The flow of coding…

After some more hacking around, my code to handle IFF/ILBM images in HTML5 is reasonable complete, that is, it handles most of the image files I found, some exotic graphical modes.

The code is, of course, far from perfect, it was more a personal exercise than something useful – the image format that it handles is both obsolete and inefficient. One could ask me why I do this kind of things, and the obvious answer would be because it is fun. While this answer is valid, it is not very useful, in the sense that it does not explain what motivates me to do such coding, after all, coding is already my work, so why would I do it during my free time?

First, this coding that is pretty different from what I do for work: the scales are very different, a bit like an architect doodling houses as hobby. This code manipulates old data-structures where things were manipulated at a low-level, individual bits are manipulated around. At works, I rarely code at such a granularity, so it is an refreshing experience. Cracking open an old format like this is pretty much like a puzzle, trying to align the various instructions until the image look right.

This particular puzzle links images and data structures from the time I first learnt coding with much more modern technologies, spanning in time a good chunk of my coding experience.

While there is a strong technical basis, coding relies a lot on practice: quirks and idiosyncrasies are common, and without some intuition it is difficult to handle the monstrous complexity of the different frameworks and languages. Each time I have to learn a new one, there is this mixture of dread and excitement not unlike when one is at a foot of a mountain, about to try to climb on it. Small coding exercises like this one are a bit like a Sunday stroll on the small mountain close to my house.

Coding has certainly something in common with martial art practice – leading some to the concept of code dōjo. Like in martial arts, practice is important, but even more important is the notion of being in the flow, to be concentrated on the task at hand while at the same time being relaxed. Coders tend to express this as being in the zone, different words for a similar idea: at least for me, being in the flow while doing Aikidō is eerily similar to being in the zone at work.

2 thoughts on “The flow of coding…”

  1. I think you intended to convey this, but I didn’t think it was obvious to the reader. To be more clear, ILBM is inefficient, not the IFF format in general. Saying that IFF is inefficient is like saying MPEG is inefficient. One would need to say _which_ MPEG encoding is inefficient, and even then, compared to what else.

    For its time, IFF ILBM was very competitive with its alternatives.

  2. Indeed, IFF is a container here, I was talking about ILBM. You could see ILBM as a family of codecs, most of them amount to palette + packbit and generally perform like other image formats that can encode images as palette + packbit, like TIFF or Quickdraw. ILBM compresses bit-planes individually but requires 8 times longer runs.
    Images that uses a more modern compression algorithm (LZV, Deflate) typically yield much more compact files.
    HAM is difficult to compare because it is pretty unique, it was cool hack in its time but that format makes not sense on any other hardware.

Leave a Reply to Samuel A. Falvo II Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: