Sunday, April 11, 2010

Today was a refreshing change, I spent most of it glued to my desktop: three command prompts open, with pidgin tabs, chrome tabs, and mplayer occasionally filling in the rest of the space :-D.

I basically rewrote the recipe parser for tmk, bringing it up to the specification. Generally I'll avoid such leg work, except when it's a simple grammar or no suitable tools are available; and tmk is very simple. Command directives and much of the expansion system were also implemented today, making tmk almost complete enough to compile a project. What needs doing, is proper macro expansions (tmk vars don't work yet, but the rest of the expression syntax does), so that `magic` variables acline to makes automatics can be created. Once that is done, creating the desired directives is a fairly trivial process; hooking them up to language/tool independent and developer serviceable backends being a piece of cake.

While testing the directives code, I needed to come up with a temporary error message, one that had to be a bit absurd: being as it was intended for testing the domain in which the error applies, rather than an already iron clad reason to use any given message To that end, I came up with one that would really stick out among the other diagnostics: "{file name}:{line number}: the bad year blimp has landed". This, as some might instantly see (;), is a slight homage to Mel Brooks' Spaceballs, more specifically to the scene, "Uh oh, here comes the bad year blimp!", in which Lone Starr calls for the switch to "Secret hyper jets". And of course, I had to load that film into MPlayer and my DVD drive while I wrote code xD.


When developing something, I typically do a large amount of in flight testing to verify the codes behaviour. My efforts today have been no different, testing time perhpas, making up more than 60% of the time I spent working on tmk. It's not unheard of, to find XXX marked comments denoting details about some edge case that hasn't been covered, and a note to kick me in the head if that theoretical hotspot ever occurs; such things usually happen when I'm extremely pressed for think-time, due to (ofc) being interrupted every upteen times. At which point, priority is usually on implementation speed over perfection. Today, I was lucky enough to be able to work largely uninterrupted: a rare pleasure.


For me, programming is a very relaxing effort. It's one that I can absorb myself into the art and craft, designing programs bit by bit, constantly improving them with each iteration, until my aims have been achieved, or I've passed out. Despite being a very exhausting task to keep working at, I rarely find it to be an intellectually arduous one, so much as a test of endurance: to stay in the zone for long stretches and deal with the effort required for the, eh, shall we say more paltry and menial aspects of coding a decent program. There are some parts of programming that really do tax the brain, the fun stuff to work on solving ;). On the other side of the coin of course, is a lot of things are more straight forward to sort out. Many aspects of programming overlap both the engineering and the every day groan of getting ti done. Both are needed, in any non-trivial application, that you'll be seeing more than a couple hours of use with.

That being said, being able to look at things from several vastly different directives, does help a lot. Because of the amount work needed, it seriously helps if you can stay in the zone for a good 6-8 hours or more per sitting; but becoming tunnel visioned on the creative and problem solving parts, is generally a bad thing. One must slip gently through the mind of no mind, and know how to leave your box behind. There can be an insane amount of stuff to deal with in some programs, and I find that the level of such, increases both with the complexity of the problem and the pitfalls of the language utilised. For example, C, lisp, perl, and python can each express many problems quite well; yet each excels at expressing certain ideas more naturally, or with less effort, than the others. I actually was missing lisp for a good hour today lol.


Days where I can just sit and focus on getting stuff done (in peace) are terribly rare here. When I get into work mode, just get out of my way, or I'll be quickly annoyed. I don't like it when people waste my stack space.

No comments:

Post a Comment