Posted: Wed, May 23, 2007
Code Craft - The Practice of Writing Excellent Code
By Robert Earls
In Code Craft, Pete Goodliffe has created something unlike any other programming
book I have encountered - a
concise "brain dump" of an experienced programmer.
The sort of book you wish you'd had when you started your first programming job, in the absence of a mentor with the patience of a saint.
It's not specifically about one programming language, but there are
some very small snippets of C/C++/Java used as examples, but don't let that put you off as they are perfectly easy to understand.
The concepts
Goodliffe covers are applicable
to almost any language and if not, the carefully structured book makes it easy to skip over sections that are less useful.
Who is it aimed at?
Code Craft
is aimed at enthusiastic programmers who are willing and capable of changing their ways, for the better. It's not aimed at the
"dyed-in-the-wool" hardcore coders as a lot of it may appear common-sense even if
they do not apply the principles themselves.
The person who would get the most out of this book is someone who has done a bit of programming at home, or in college. Possibly worked for a small company and is now starting a new job in a
larger company working on larger projects than they are used to.
What subjects does it cover?
It starts off with some basic recommendations about what to do and what not to do when coding, including the sort of bad habits you might find yourself slipping in to, if you are lazy, under pressure to
complete work quickly, or just too eager to work on more interesting parts of the code.
Presentation and code layout are covered briefly, discussing the various styles. Not advocating any one over another, but just to discuss why in-house coding styles are a good idea and not to get
bogged down in "holy wars" about code layout.
Goodliffe
advocates meaningful variable names, while obvious to more experienced coders, may be less obvious to programming newcomers.
A good but small section about commenting code
is included while the chapters on handling errors, testing and debugging code go into much greater depth and are well worth reading if only to re-familiarise yourself with what you
should
be doing!
From this starting point Goodliffe goes on to cover concepts which may not be the software developers favourite pastimes. Housekeeping tasks which, if undertaken with the same enthusiasm as
coding, can make for better, more stable and more polished applications.
The key concepts of building code in a large project and the available tools and models available
are dealt with more
humour
than you would expect this dry subject to afford.
The art of software maintenance and spotting, what Goodliffe calls "Software Rot"
is covered - the
slow degradation of software as it is continually updated by different programmers, or (paradoxically) left un-maintained while outside influences (data) evolve.
Techniques, hints and tips for writing application specifications and requirement documents are more than useful as frequently the lowly programmer is left to their own devices in this area and this is an
activity which is very much undervalued in the commercial world.
From this we go on to examining the production of good software design documents and how to estimate timescale, a traditionally tricky subject for software engineers. And finally, in this section,
chapters on reviewing code (which I have not seen in any other books) and the incredibly useful source code control systems available.
More technical chapters cover the art of optimising your code and writing security aware applications. This should be especially useful for those writing web applications although disappointingly the
author chose to concentrate onsecuring more traditional applications.
In fact web application programming is only mentioned briefly in the final chapter before 100 pages, or so devoted to discussing in greater depth some of the points made in the previous chapters.
In conclusion I'd say that "Code Craft - The Practice of Writing Excellent Code" has a niche audience who will benefit greatly from reading and absorbing the issues that Goodliffe covers. What could
have made for very dry reading is, in fact, highly readable and in some cases very witty indeed. It's obvious from the outset that Goodliffe is passionate about producing quality applications and he does
his best to instil this passion into the ready. He achieves the almost impossible by putting on paper the instinctive best that an experienced programmer/mentor can produce.
"Code Craft" is written by Pete Goodliffe, and published by No Starch Press. The book is available from No Starch Press's European
distributor, Computer Books, for £26.34. You can also find it on Amazon.co.uk, and at all good bookshops. The book has a RRP of £30.99.
Send a comment about this article to
editor@itwales.com.
|