Recommended Reading

Design Patterns, Gamma et al. I have purchased and read several other books on this topic, including language-specific books and longer books. I still like this one best.

Programming Perl, Wall, Christiansen, and Orwant. The "camel book" is a clear and concise book about a perhaps unclear but very concise language.

UML Distilled, Martin Fowler, Kendall Scott, and Grady Booch. An excellent introduction to and explanation of the UML. This book can clear out the fog of an initally dizzying set of diagrams and distill out (!) their importance.

Refactoring : Improving the Design of Existing Code, Martin Fowler. This is a book that resonates strongly with experiences I have had where an existing code base had to be brought under control, cleaned up, and then enhanced. Such work is not totally ad hoc, but instead can be understood (and performed) as a series of well defined transformation. By doing so, and talking about it, our ability to talk about and manipulate software at a higher level is enhaced.

Extreme Programming Explained, Kent Beck. There is a lot of merit in going to original sources… the first book on a topic, a specification document on a technology, etc. This is that book for Extreme Programming, and the subtitle on the cover expresses the core thrust of XP in two words.

 

The links all go to Amazon for simplicitiy’s sake; you can perhaps get them elsewhere at a lower cost.

Refactoring

Here is a common situation where refactoring can be used:

Problem:

You have a body of code which exposes and API (set of entry points). You want this code to have a different API.

Non-refactoring based solution:

Take the old code apart. From the pieces, write new code that has the desired API. The problem with this is that it’s a big leap… with little confidence along the way that the code will work.

Refactoring based solution:

Create a empty implementation of the desired API. Use the old code’s API to implement these functions – create a wrapper around the old code. Verify (with unit tests) that the code does what you want, using the desired API.

Now, consider the “wrapper” and the old code as a body of code to be refactored… incrementally change it to improve the design, maintainability, etc.

Alternatively, if the code is “throw-away” code not of long term important, you have the option to stp – just leave the code wrappered and un-refactored.

Right now, most refactoring is happening “manually” – but in the future, a direction that IDEs can add more value is by automating the process. Imagine right-clicking a method and selecting “refactor up to superclass”. You can take a look at this idea with a tool that “adds-in” refactoring to your existing IDE, like TransMorgify. A new Java IDE, IntelliJ IDEA offers a limited set of refactoring tools, built in to the IDE.

KCSM – Kyle Cordes’s Session Manager

Back in the dark ages of PHP3, session support was not built in.

KCSM implements and ASP style session[] array in PHP3. There are two version of KCSM – one works with files stored on the web server (this requires no database, and should work with any web hosting account), and one that works with MySQL.

Download as a gzip’ed tar file: kcsm0.2.tgz

Download as a ZIP file: kcsm0.2.zip

An updated kcsm.php3 file, modified by a user (Garritt Grandberg) is available here.