Books, General, Programming, Refactoring

Code Simplicity


Code Simplicity by Max Kanat-Alexander is a thought provoking book on improving software code quality. As with many “philosophical” books (i.e. books not aimed at a specific technology) on software development the advice given here is not “hard and fast” and should not be considered as “rules” but rather as “guidelines” that developers should think about when writing code within their own context.

The book’s main theme is on the three flaws of software design.

  1. Writing code that isn’t needed (YAGNI)
  2. Not making the code easy to change
  3. Being too generic

These three flaws have some conflicting aspects and I think the developer needs to find the right balance. The author himself talks about these flaws in this great 4 part series on YouTube.  I suggest watching these short videos if you don’t want to buy the book (or perhaps buy the book after watching them :))

There are many other useful advice in the book such as;

 

It is more important to reduce the effort of maintenance than it is to reduce the effort of implementation

 

Never “fix” anything unless it’s a problem, and you have evidence showing that the problem exists

 

The ease of maintenance of any piece of software is proportional to the simplicity of it’s individual pieces

 

Strangely to me (call me nuts ;)) the most simple but most important line in the book was not about code quality itself, but rather the author’s answer to the question “What is the purpose of Software?”

 

The purpose of software is to help people….”not to make money” or “show people how intelligent I am”

 

Software developers (including yours truly) often ignore or forget this basic fact when designing and implementing software products. This most often results in a complex, over-engineered product that makes simple things hard for the end-user.

Books

iWoz: Not a literary masterpiece, but an interesting read


Just finished reading iWoz: Computer Geek to Cult Icon: How I Invented the Personal Computer, Co-Founded Apple, and Had Fun Doing It, the biography of Steven Wozniak the guy who co-founded Apple with late Steve Jobs and probably more importantly the guy who invented the Apple I, the first ‘personal computer’ which can be hooked up to an inexpensive television set.

The book itself is a not a bad read but it is by no means a GREAT! read. Wozniak talks a lot about his young days how he was into inventing stuff and about the pranks he used to play. There is a lot of technical stuff regarding circuits, transistors, micro chip etc., although Wozniak tries to explain them in plain language there was not much value addition to the reading experience. He also emphasizes that he was not after money (although it was a bonus) and never wanted to climb up the managerial ladder but rather wanted to be an engineer working on the lower rungs of the corporate ladder.

The relationship with Steve Jobs is a bit underplayed and there is not much details regarding the genius of the man (well thats expected the biography is not about Jobs, right!)

Some controversial (and interesting) stuff including how Jobs lied about how much he was getting from a customer for a project they were working on together was mentioned. This meant ‘the Woz’ was paid a smaller amount of the 50% from the total they got.

The “Rules to Live by” chapter was pretty boring and nothing valuable was given to the reader, it seemed that the chapter was put in there just for the sake of making the book “complete” rather than give valuable advice to budding engineers or entrepreneurs.

To sum things up if you need a fun read on the personal (and professional) life of a great computer engineer and inventor including details on how Apple was formed then this is a good book. But if you want to read something that will inspire you with loads of personal development advice then this is probably not a book I would recommend.

I’d rather recommend this video of a lecture by Wozniak at MIT which pretty much covers everything in the book and probably does more justice to his genius than the book, plus it takes only 41 minutes 🙂

Hopefully the upcoming authorized biography of Steve Jobs will be a more inspiring piece.