Wednesday, March 7, 2007

Prefactoring

I am reading this book by Ken Pugh called 'Prefactoring', which talks about how to get the code right the first time to prevent the need for refactoring at a later time. Personally, I don't think it is the right approach. As requirement changes or with addition requirement, refactoring is almost always inevitable. Instead, we should aim to write code that are adaptable to changes. Anyway, the book touches on a lot of different topics including validation, error handling, naming strategy, etc. Granted, most of the suggestions here are really common senses, such as "don't reinvent the wheel", "don't repeat yourself", and "separate concerns." As I was reading it, the techniques feel more like reminders than new ideas.

Other than mentioning the obvious, the book is very well written with a easy flow to it. The examples are relevant which help make the topics stick to your mind. I would recommend this book for those beginners who are looking to improve their coding techniques.

0 comments: