SOLID principles of Object Oriented Design.

Share Button
  1. Single Responsibility Principle.
    Because each responsibility of a class is an axis of change and if a class has more than one responsibility, the code will become coupled and hard to change. SRP is an idea of breaking things into molecular parts so that it becomes reusable and can be managed centrally.
     

    Single Responsibility Principle

  2. Open Closed Principle.
    Abstraction is the key of OCP. If you do abstraction well, most likely, it would require no change when the functionality is to be extended. For example, if a client depends on a concrete server, and the server need to be changed, it is highly possible you need to change the client code too. But with OCP design, if client depends on an abstract server, even if you change the concrete server, client code don’t need to be changed.

    Open closed Principle

  3. Liskov Substitution Principle.
    LSP means functions that use references to base classes must be able to use objects of derived classes without knowing it. This is to help designer to enforce is-a relationship when using inheritance.

    Liskov Substitution Principle

  4. Interface Segregation Principle.
    Interfaces should be easy to use, which means client should not be forced to depend on interfaces they don’t use. In addition, client should be able to use your interface intuitively.

    Interface Segregation Principle

  5. Dependency Inversion principle.
    High level modules should not depend upon low level modules. Rather, both should depend upon abstractions.

    Dependency Inversion principle

Reference:

How I explained OOD to my wife.

 

6 Common Tech Myths That Cost You Money

Share Button
  1. Refurbished Products Aren’t As Good As New Ones.
    Refurbished products tend to get a bad rap because a lot of people equate refurbished with “used,” which is not the same thing. In fact, refurbished gadgets come from a variety of sources:

    • A product with damage to either the unit itself or the box that has been fixed.
    • A demo unit from a retailer.
    • An open box item that was returned by someone who decided not to keep it.
    • A defective product that has been returned and fixed.

    Once a product is returned, it’s inspected and deemed ready for sale again, but it can’t be sold as new, so it’s sold as refurbished for a fraction of the cost. Subsequently, buying refurbished is one of the simplest ways to save money.

  2. Extended Warranties Are Worth the Price.
    It’s next to impossible to walk out of an electronics retailer without someone attempting to upsell you on an extended warranty. It’s not just high-end electronics either. A lot of retailers will even try to sell you an extended warranty on DVDs or video games. But in most cases, extended warranties are not worth the extra cost.
  3. More Expensive Cables = Higher Quality Picture and Sound.
    If you walk into any electronics department you’ll find a ton of different cable options for TVs and stereos. Chances are you’ll also find a salesperson trying to convince you to buy the most expensive option. When it comes to digital cables, though, all of them are essentially the same.
  4. Better Processors Make for Better All-Around Speed.
    For the most part, we’ve reached the point of diminishing returns for clock speed on desktop computers. Which is to say, unless you’re editing a lot of video or buying a laptop, you don’t need to spend the extra money on more processor speed. For speed improvement, your money is best spent elsewhere: If you want to speed up your rig for gaming, you’re best off buying a better video card, and if you want to just speed up general performance, a solid state drive will boost your speed more than a new processor.
  5. DIY Isn’t As Good As What You Buy on the Shelf.
    The myth that DIY options aren’t as good as products from a store goes far beyond tech purchases, but the idea that you’ll get a better product from Best Buy than you can make yourself is just absurd.
    DIY options are just as capable as their store-bought counterparts. Even if you’re not sure what you’re doing, you’ll find a ton of guides online that walk you through the process to make your own gear. While your project might not end up looking as pretty as what you buy in the store, it’ll likely work just as well and save you a lot of cash.
  6. You Need to Pay for Cable to Watch All the Newest Shows.
    If you talk to pretty much anyone with cable TV, they’re biggest defense for keeping cable is that they want to stay up to date on popular shows. But for many of us, that’s easy enough to do without spending $60-$120 a month on a cable bill.
    With the exception of live sports, you can get almost any TV show from a variety of places, for example, Hulu Plus, Netflix, Amazon, iTunes and etc..