There's one absolutely critical task in building software, and that's creating the actual sequence of operations that comprise your software. If you can't get this right, you're nowhere.
Short tangent: think back with me for a moment to the first computer science class you ever took – that one in high school, with the hand-me-down PCs from the typing lab, and the part-time Math/part-time CS teacher. Ah, the heady days when making “hello world” appear on the screen seemed like magic, and HTML felt like a “programming language”.
I’m willing to bet that one of the first lessons you learned was about “routines” – nice, isolated bits of code that did one thing and did it well, bits that could be incorporated into other bits with a simple call. Boom, magic.
There’s always some smart student in the room who asks, “when do I use a routine and when should I just write the code in-line with everything else I’m doing?”
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx64lKwGieuIdYNUfMEwmICovsWe5dYwG5JIbaY80A0Q3yL_jNGwlgOXYlvKqV5OFuvvIOpjh7ncKvCP5h1JJh_UzUabXHAcpMUDWTzZcEDF3KhaVZT3TBLPlSiNQquRcbWyVL/s400/code+complete.gif)
If you read nothing else on this list, please, for the sake of software, please read Code Complete. This book is jam-packed with hundreds of little tips that will make your code better, one line at a time
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqCaQ_kcGspvcN-p0klSAtpDjR74t_-QQlmzBuQedUt3if9l3sdKeB20-KUzEamca_Llq8fNzao1Uo8lmjX1AXQmGlQAxmdJTXlm4Y_BCcF6z_FpQnNaTRUtlUNy97ksR68jZD/s400/design+patterns.gif)
First, Design Patterns. A lot of developers like to write off Design Patterns as some pointy-haired fluff, but the fact is, in the 14 years since this book was first published, Design Patterns have become established as a useful shorthand for discussing high-order organization of code. If nothing else, you are likely to encounter other people using Design Patterns when they describe their code, and you need to understand the language in order to communicate with them.
There is a risk associated with reading Design Patterns - many people read this book and decide that patterns are the meaning of life itself. I am not advocating that you become a Design Patterns weenie, searching for ways to needlessly incorporate a Strategy or a Factory in your code, or, pure Design Pattern nerd-vana, a StrategyFactory. Nonetheless, there are a lot of fantastic ideas in this book, and your code will be easier to maintain, by yourself and others, if you apply the ideas espoused in Design Patterns.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR2498nZ0NO89w3Yhbr0jCsc895yjukyxzoup3MwGWxQCWc4R0Ws_j8KSMDiHMnO3R6u_RGWcuXpDUs7gJgNvbiq6lHL8I1Irls-ZSw3jpiH1yLKhozWJOqDfszuQBr6s0ieDH/s400/refactoring.gif)
Once you're through these three books, the raw quality of your code will be immensely better. Code Complete is the longest, but it's a fairly quick read. The other two should be easy to get through in free time.
Coming up tomorrow: now that you're writing great code, we'll talk about the skills you need to go along with that in order to round out your abilities.
No comments:
Post a Comment