Originality is Overrated

Let’s talk about chapter 8 of the book 🙂

FlusteredVastHammerheadbird-size_restricted.gif

In this chapter they talk to you about how the smartest (actually they call it the less stupid) thing you can do when you are building is using others work if they have done it before and had proven it to be a very good solution. That using the OO design principles result in an overall better project in terms of flexibility, maintainability and extensibility.

Those OO principles that they suggest you to use are this ones:

  1. Classes should be open for extension, but closed for modification
  2. Avoid duplicate code by abstracting out things that are common and placing them in a single location
  3. Every object in your system should have a single responsibility, and all the object’s services should be focused on carrying out that single responsibility
  4. Subclasses should be suitable for ther base classes.

Those seem like very good rules to follow.

MNpGOg2.gif

The thing i liked about this chapter is how they tell you that you don’t have to do everything yourself from scratch, use the things that others have done before you that are most likely better than the things you could come up with because it has been worked in for a very long time. This reminded me of numerical methods class where the teacher didn’t minded if we used other people’s programs because this methods are widely used so we were going to find much more better stuff on the internet than us coding from scratch. But what she did wanted was an understanding of how the program worked and that we did. I just think its good to learn how to use other people’s things and learn how to adapt it to what you need according to your problem.

Anyways that is all for today.

Leave a comment