Wednesday, April 18, 2012

What every software engineer have to know

Being innovative and creative is a big advantage in a software world. Being ignorant is a curse. The basic principle is "you will never implement something what is already implemented unless...".

  1. Current implementation isn't enough and can't be easily adjusted to your needs.
  2. Current implementation is totally crap and you need implement it from scratch.
  3. You have a lot of time or money and can do it better (don't even dream about time).
  4. You can really make it better.
Anyway, to identify any of those there is one big prerequirement: you have to know about existing solutions: designs, architectures and libraries!

Design patterns

Good place to start is a Wikipedia article: http://en.wikipedia.org/wiki/Software_design_pattern
As you can read there:
Design patterns gained popularity in computer science after the book Design Patterns: Elements of Reusable Object-Oriented Software was published in 1994 by the so-called "Gang of Four" (Gamma et al.). 
And this is a book I recommend to start with. Patterns had been divided into 3 groups:
  • creational
  • structural
  • behavioral

I really like how all patterns are treated. Of course each of them has own section, which consists of:
  • Intent - more or less, what one wants to achive using that pattern.
  • Motivation - what is an application, where it was used.
  • Applicability - where it can be used.
  • Structure 
  • Implementation
  • Sample code
Sample code doesn't work for me (part of it is written in Smalltalk). But implementation section isn't bad.
In the introduction, authors suggest to start from the following patterns:
  1. Abstract Factory (wiki)
  2. Adapter (wiki)
  3. Composite (wiki)
  4. Decorator (wiki)
  5. Factory Method (wiki)
  6. Observer (wiki)
  7. Strategy (wiki)
  8. Template Method (wiki)
As long as now I'm following that order. I will summarize the book when I finish.

I highly recommend that book to everyone who is touching a software in a raw form, doesn't matter if you are using JavaScript, Python or C++, it will give you a broader perspecitve on what you do! And last but not least, it will help you to understand all of those strangly sound suffixes in code ie. -Kit, -Adapter, -Wrapper, -Factory ;-)

No comments:

Post a Comment