Code as a Rhythm

Wednesday, July 2. 2008

Changes don't happen overnight. Or at least, that's not the end of it.

Working on big invasive changes in production code poses it's own challenges. But after going through the motions over a couple of major releases I'm learning that even though the actual workload underhand maybe breaking new terrain in my personal corner of the world, whether it'd be learning about C, imap, mime or warping my head around threads and event-driven designs - the kind of work, effort or mental labour if you will, continues to be much the same all along.

It's not just about 'sticking with it' - though persistency does help alot. It's also about feeling the rhythm, and respecting it. Just don't rush it, keep the pace, feel the beat, if you know what I mean.

There are bigger cycles, with smaller ones within. Changes are steps, bound in a pattern all of their own. From a prototype 'proof of concenpt' change, to 'pattern established: implement' change, to a consistency change wrapping it up. Consistency changes demonstrate and finalize one of those cycles. They clean-up and codify a new element of elegance, beauty if you will. It's when the code underhand starts to smell right again, and any bugs are easily tracked down and fixed with minimal effort. Until of course, the downhill ride ends where the next hill rises to the horizon...

Multifoo lift-off

Friday, May 23. 2008

Today I've reached a major milestone in the multifoo rewrite.

For those of you who don't know what I mean by multifoo; It's a term that was coined (afaik) by Aaron Stone to describe a server design for dbmail with multi-plexed asynchronous network IO and multi-threaded command processing.

Last week I found a pattern to make all IMAP commands run in the thread-pool to keep them from blocking the main thread. But somehow I kept being bitten by heisenbugs which made me have to reconsider. Last night however I had an epiphany; there were still some calls used while running in the threadpool that send data over the network. The bug was quickly fixed today, and my design saved. Imaptest now doesn't generate anymore errors, and basic message browsing works using thunderbird.

I can now start testing more fat clients such as thunderbird and outlook against what should become a release candidate for 2.3.3. Looking very good indeed.