January 6th, 2012

krazy koati

That's Why I Go For That Rock And Roll Music

It's a good idea to learn good program coding practices for your software development, although I've got to admit I don't know why. It's one thing if you're a programmer, but most people won't ever need any coding practices. If a stranger approached you and demanded, ``write some code that'll figure stuff about electricity in a weird tangle of resistors'', you wouldn't leap to the keyboard and try programming Kirchoff's Laws. You'd flee, if you had any sense or the same vague confidence I have that Kirchoff's Laws are about how you know which germs cause which disease. (These laws require disease-causing germs to be labelled ``not for Martians'' on the packaging.) Really, I can't figure why I'm going on this topic. Maybe I'll find a reason.

A valuable coding tool is a proper development environment. There are still programmers who try writing code without one, few of whom are never seen again. They disappear in a swirl of compiler options and the only trace of them is three weeks later when a lone red sneaker, laces untied and tongue holding down a half-eaten banana, washes ashore in Lake Erie. The mysterious part is they'd never been near Lake Erie, and never owned red sneakers, and the eaten half of the banana is the middle. Also who found it. Maybe the shoe is just coincidence.

A good development environment should include parenthesis matching, word completion, clean water, language reference pages, a loamy soil replenished by ant or termite populations, various mid-sized omnivorous species, low-interest long-term financing plans, shared basic office requirements such as telephone services and color printing, some top carnivores, a large plastic dome as emergency backup ionosphere, and a really giant yet responsible child to put in fresh water bottles and change the cedar chips once every two weeks whether it needs it or not. This can alleviate as many as four of your programming burdens, unless the child likes to pick you up and put you in a plastic ball to spin around.

There are dozens of development environments, and selecting one can let you spend days impersonating work before anyone catches on and you pick the first you looked at. Look for one that lets you set as many colors and typefaces as possible, especially if these can change within quote marks, and find how nobody has invented a fixed-width typeface that doesn't make your soul weep for the death of the idea of beauty. Settle for the typeface which looks like 1970s bus schedule fine print without the warmth. The tabbing should be set so that no particular indentation can be noticed at a glance but somehow all code which does something will be off the right margin of the screen.

It's worth figuring out some system for naming things, so you can spend the first half of the project deciding that everything needs to be an exception, and spend the second half finding the system is so well-established by this point there's no sense resisting. Before long you can enjoy nearly three heaps worth of code which won't run. There it can sit, thinking about what it's done, until it's eaten by a panther. You'll probably want to have saved the code to a backup hard drive or just photocopied the screen.

With the code in no kind of functional state you can start commenting out lines to find the exact point where it doesn't run, or you can just comment out everything so the program does nothing and is only a little slower than having nothing there at all would be. This allows it to sit until it's eaten by a badger. Coding for mobile devices has to be extremely compact, so that it can sit there until it's eaten by a grasshopper mouse; you'll find this easier to do if you scrunch up.

Once it is finished not doing anything as well as possible, see about getting an upgraded environment, possibly one with less hungry panthers and better-labelled germs. But overall I still don't see why anyone should have read this. I honestly expected some reason to turn up by now.

Trivia: The IBM System/360 initially had provisions to support both ASCII and EBCDIC character encodings, but the ASCII support was dropped due to low use. Source: A History Of Modern Computing, Paul E Ceruzzi.

Currently Reading: Bridges, Robert Silverberg.