it works if you work it

Ah , a la recherche du temps perdu( Pretentious? Moi?)

I remember back in the day , was it 2004 or 2005?  Something. I was principal engineer for a startup that did not do so writing among other things an IMAP server in c++. The tools I was using were Visual C++ 6(which was actually pretty good compared to what came before and after. It installed from one CD(remember those?) as opposed to the two DVDs it takes for Visual Studio 2015 ) and whatever version of gcc was out and about at that time.  C++ was at C++98-C++03 was just starting to appear. For the network transport and stream demultiplexing I decided to use the Adaptive Communication Environment  , written by the old C++Report warhorse Douglas Schmidt. For the MIME processing I used a proprietary library from Chilkat. Storage was virtual-no mbx or sendmal mishegas and was opaque to the end user. The server was a to be used as a front end for a custom email and search solution , not as a general server. It turned out surprisingly well and remains probably the piece of software I am proudest to have developed. It also is singular in that this project was the only cradle to the grave project I have ever worked in 25 years as an engineer that I was responsible for everything and actually delivered the goods(I designed the product directly from a patent specification). The goods unfortunately did not sell , but that part wasn’t my fault.

What brings on this reverie , you ask? Alzheimer’s? Jim Beam?  No , actually a fairly amazing happening. I am currently doing the design and proof of concept for a pluggable dispatch daemon which can transparently handle creation , redirection and tunnelling for a number of messaging and search server clients-either as a pass through proxy or a smart proxy in the first iteration. I’ve finished the first prototype for the tunnelling component using boost.asio and and am pleased with the results. Turning to the plugin capable daemon , as I was trolling through options I suddenly remembered my old friend the Imap server. Just for giggles , I dug it out of github to have a few laughs.

There is something strange about looking at code you wrote over a decade ago. Only other engineers would understand. In some ways I was better than I am now-it took me  a while in some places to figure out what this jaspar was doing and thinking to myself after getting it that hey this guy was really good and……..wait a minute , this is me circa 2004-2007. And in some ways worse(man , I hate Hungarian notation , what the hell was I thinking?). I decided for no particular reason to see how badly the code had aged. But the more I tinkered with the pieces , the more I realized that the full monty would probably work as it did 10-12 years ago. I did not expect it to compile,  It did , with only a single error: comparing a pointer to an integer without a cast is no longer allowed in C++. That’s it. 15,000 lines. I did not expect it to work. It did. Exactly as it did back in the day. It was developed when WindowsXP was a baby and the Linux kernel was 2.4 and C++ was C++98. It compiled and ran on Windows10 and Linux kernel 4.47 and C++14 with no changes. The use of the ACE wrapper facade and the fact that I had consciously kept close to the baseline of the STL seems to have been the secret. ACE is still actively maintained(Dr. Schmidt himself occasionally puts in a cameo on the ACE message board)  and has commercial support from several companies while being  used extensively in a lot of real-time hijinks , including submarine systems , through its sister project TAO. Chilkat is still alive and well too. So it seems my product design decisions were the cat’s whiskers(ahem).