Comfort Code – Like Comfort Food, but Code
Wednesday, February 6th, 2008Having a tough morning this morning... feeling a little behind the 8-ball. Nothing impossible, hey, even Cowgirls get the blues. But when I'm feeling a little blue I like to put on some of my favorite music on my iPod and force myself to go through the motions of a regular day knowing that everything is temporary and in a little bit things will change... problems will arise needed to be fixed, and the day will be off to a running start.
One of the things I do every morning is to scan all the systems making sure that everything is looking normal - within limits. Just giving everything a once over. Like every morning this included my laptop - I put notes here and there to remind me of things and the way I'm sure to find them is to check each morning. So I'm flipping around and I stop on this little simulator I started writing back in 2003. Nothing fancy, but it's written in Obj-C for the Mac and it's using the BLAS package - kind of fun. Anyway, I was just scanning the code - reading it to see where I was. And it started to make me feel good.
Like Beans-n-Weenies and Cornbread.
Comfort Code. I'm sure that just about any language can appear artistic or beautiful to someone. It's what we each read into the code - like a painting. It's just that Obj-C has always been one of the more beautiful languages to me. Maybe I was just lucky and learned it from a couple of the sharpest guys I ever knew. That certainly helps. But it's also that I wrote this code not on a deadline or from someone else's specs - but what I wanted, so all the comments are nice, all the code is done really well. It's just a really nice piece of work.
I ended up running the example I had worked up for the simulation and it's almost to the point that I could make it dynamically recalculate the results on any input change - it's fast. Sure, that's the box and the BLAS routines and the OS, but it's really neat to see something that used to run as a batch job run about as fast as the blink of an eye. Another smile.
We all like comfort food... it makes us feel like home really isn't that far away. Comfort Code is a lot like that. Makes me realize that things are all that bad, and maybe I need to get back to that.