Two Designs for SequenceIdGenerator
Code: Chibrary, design, object orientation, Ruby, state
In my previous, marathon post on id generation, I mentioned that I was generating unique sequence numbers. It was straightforward to write a class to generate them:Continue this post
Extracting Immutable Objects
Code: design, design patterns, email, ListLibrary.net, mailing lists, object orientation, Ruby
In the last few weeks I’ve been rehabilitating some of the first object-oriented code I wrote in the hopes of bringing my mailing list archive back online. Lately I’ve been refactoring some of the earliest, core code: the
Message class. It manages the individual emails in the system and, because I didn’t understand how to extract functionality, had turned into something of a God Class.
Yesterday I tweeted about a really satisfying cleanup:Continue this post