34 of 39 people found the following review helpful:
2.0 out of 5 stars
Pure D-lite, 12 Jan 2006
By wiredweird "wiredweird" - Published on Amazon.com
This review is from: Prefactoring (Paperback)
That's "Design Lite." There's a lot of good advice here, summarized in the aphorisms of appendix A. That includes the usual about avoiding "magic numbers," and some good points about using inclusive data types (strings, for example) to hold values with many incompatible meanings. Pugh also noted that "function codes" as method parameters generally cause problems. If there are different functions to perform, implement them as different methods - don't make one method do lots of different jobs according to some selection key. He could have noted, however, that the "function code" is often a bad smell indicating polymorphic behavior that should have been implemented with class polymorphism.
The presentation as a whole just didn't work for me, though. There were lots of little things, like a sloppy misquote of Santayana's famous "Those who cannot remember the past are condemned to repeat it," minor but annoying. The whole conversational, I-said-then-he-said style is too user-friendly for me - by the time the writer finishes piling on all the scripting flourishes, discussion tends to evaporate into fluff. Pugh could have just made his point without chopping it into pieces and mixing in fictional personalities. Much of the good in this discussion was buried under this chatty style, or lost amid the scene-setting details preparatory to the real discussion of planning for extensibility.
The technical problems were the big ones, though. In discussing error handling (p.35), he omits mention of the worst sin I know: silently converting a bad value into something you'd rather deal with. He also missed the biggest extensibility problems I've seen in any system, the ones where external data formats change over time. That happens when your 2.0 program reads a file written by the 1.0 version, and the file format has changed. It can also happen when someone creates a version 2.0 file and sends it to a user still running version 1.0. It happens in worse form when your networked application requires that 2.0 and 1.0 versions of the code talk to each other. Face it, you'll never be able to take down the whole production network and force all the servers to run the same rev of protocol. Inter-version interoperability is a must in any major application, and simply not mentioned here.
There is good in this book, but it is often hidden under poor organization, weak descriptions, and lack of technical explanation. Beginners may get a bit from this book but, on the whole, I don't recommend it.
//wiredweird
12 of 15 people found the following review helpful:
4.0 out of 5 stars
I think the title is misleading, 9 Nov 2005
By Foti Massimo - Published on Amazon.com
This review is from: Prefactoring (Paperback)
I think the title is misleading, the book is little, if any, related to Martin Fowler's seminal work on refactoring, instead, the book is mostly a collection of best practices, much more like "Code Complete" by Steve McConnell. Nothing revolutionary or innovative, but the book reads quite well and provides a nice good walkthrough of a fictional project. Beginners may benefit a lot from this; more seasoned developers may use it as reminder for best practices.
3 of 3 people found the following review helpful:
5.0 out of 5 stars
It's always good to remember the basics, 6 April 2006
By Matthew B. Doar - Published on Amazon.com
This review is from: Prefactoring (Paperback)
This book does what it sets out to do: it describes some wise ideas for software design. (If the name of the book bothers you, get a grip: at least it's short.) Some of these ideas may be familiar to experienced developers, in which case it's a well-written refresher. For some of the ideas, this may be the first time you've seen them described in that way, and a different perspective is also useful.
So, what do I like about this book?
- The ideas are practical, common-sense ones.
- I like the revisiting of a small number of examples, developing them a little more each time as familiar problems with them are identified.
- The book sits comfortably in the world of Agile development, but is not rabid about it.
- Design diagrams are used sparingly, enough to educate and remind, but not overwhelmingly so.