A topic that is related to my CS-343 class, is the SOLID principles. SOLID principles are important in the design of object oriented software. They are also similar to the code smells that we have discussed in class as a detection of a code smell could mean one of the SOLID principles are broken and thus could lead to inefficiencies in one’s code; whereas fixing the code smell or SOLID principle with a design pattern/technique can make code more understandable, flexible, and maintainable. For this topic, my source of information comes from the Data Science Blog article, “The SOLID principles: a Guide for Object-Oriented Design”, which will be linked below this post. The post summarizes and explains each individual principle of SOLID, and it provides an example as well as advantages of implementing the principle and also the author’s advice on implementing the said principle.

The reason why I chose this topic was to learn more about common concepts that other programmers followed and are familiar with. Along with trying to familiarize myself with some well-known concepts in the programming world, I also chose to learn more about SOLID principles because it is a topic that I remember being brought up in a previous course that I had taken, which was aimed towards designing cleaner code. Because of this, I became curious and wanted to learn more about SOLID principles as well. From the blog post on SOLID principles, along with learning about each individual principle and implementation from the principles, I had also enjoyed learning a new tool of modeling code, which was the sequence diagram; which the author had to used to model the code example for the Single-Responsibility Principle.

While following the blog post, I also found that the article was a good refresher in tying/connecting to similar material that we have went over in my Software Design and Architecture course, which are some of the reasons why I chose this article. One of the principles, ‘the open-closed principle’, was similar to the simple factory pattern, in that both designs had the pattern of ‘encapsulating what varies’. And the implementation of this principle reminded me of a code smell because the author provides a note to not cover this principle for all of an applications code, but to rather only apply the open-closed principle where it is deemed appropriate; otherwise it would create unnecessary abstraction; this ‘unnecessary abstraction’ segments relates to the code smell, needless complexity. And the fix for this code smell was implementing a decorator pattern fix, which is another subject that has been covered in my Software Design and Architecture course. Overall, I found the article to be a good read to learn more about SOLID principles as well as tying the principles to other programming topics covered in a design pattern course.

Link of source below.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website at
Get started
%d bloggers like this: