Tag Archives: Software

General

Infra Recorder

Because this was a bit harder to find that I figure it should be, I’ll help Infra Recorder shoot up the search-engine charts. It’s an open-source CD and DVD writing/burning solution for Windows. It’s a GUI that appears to be a front-end for the various CLI-oriented tools ported over from Unix-land (like cdrecord, cdda2wav, mkisofs, etc.)

I bought a laptop with a DVD-writer, but the burning software that came bundled is pretty abysmal. So of course I went off in search of an (why not?) open source solution. I didn’t find Infra Recorder (though I did find burnatonce, which ain’t too bad). But it found me on del.icio.us yesterday. I am getting a little freaked out about how del.icio.us can read my mind, but I guess I’ll live with that…

General

Hair sketching

I wonder if Shahzad Malik has ever played with Barbie Magic Hairstyler:

Shahzad Malik’s Web Page – Projects (see ‘Hair Sketching’ project)

(I already explained how I know about Barbie Magic Hairstyler.)

General

“Make Your Own Fun/Rules”

These are some pretty great suggestions about modifying gameplay by conventions to get some more life out of your video games:

game girl advance: Make Your Own Fun/Rules.

I try this sort of thing on occasion, but I haven’t yet reached the heights of creativity demonstrated here. Part of it is that I mostly play games by myself, so I don’t really have the social component that is key to those rule sets, nor do I have other people checking me on whether I’m sticking to the rules.

This reminds me of something I’ve been thinking about lately with regard to video games (well, it’s true of all games), which is that the structure of a game, its rules, scoring, criteria for winning, etc., imply a certain value system. To play the game ‘by the rules’ is to agree to enter or pretend to enter into that value system for a while. That can be fun and that can be annoying/frustrating/disgusting. I forsee video games getting more and more direct support for regular gamers (i.e. not modders or programmers) to modify the rules of the game to tailor it to their own value choices.

For example, in Need for Speed Underground 2, I like to play drift races, but I don’t quite like how the game scores them (wagging your ass all over the place willy-nilly gets you lots of points, for example). If I had some nice little control panel where I could modify the scoring algorithm, then I could have more fun with the game and still have the computer track my ‘performance’ for me. Of course, I can always just ignore the scores, but why not have a nice middle ground?

General

The XML Illusion

One of the things that people tout as a strength of XML is its “human-readability”. But we pay a big price, in terms of CPU, bandwidth, and storage, for the terabytes of XML that are parsed, shuffled, and stored without a human eye ever reading them.

By the way, you ever tried to read some of the stuff that comes out of, say, OpenOffice? To call it human-readable is a bit overstated. And don’t get me started on XML-based scripting languages! I mean it, don’t!

General

Flow and Refactoring

Those being the names of two books I’m reading now. I like it when two things I’m reading, from different fields and for different purposes, turn out to have a nice connection.

It sorta struck me when Fowler mentioned “not once did I have to open the debugger, so the process actually flowed quite quickly”, that, yeah, there does seem to be a connection between flow and refactoring in a general sense.

With any complex project, there are multiple competing concerns. For example, in writing software, I want the functionality, but I also want a clean architecture, good performance, multi-platform capability, etc. With a document, I want clarity, completeness, cleverness, alliteration, etc. But due to limitations of brain-context-capacity, varying interest levels, and compounded complexity, it’s rarely possible to keep all these concerns going simultaneously. And swapping between them all the time can wreaks havoc with the potential for flow.

Given that, one can look at refactoring as a way to profitably resequence work. If I can’t fulfill all the concerns at the same time, I’ll just focus on slapping down something that works, forgetting for the moment all the other stuff. Then, one by one or two by two, I can go back and refactor in the other concerns, as time and interests permit. Beyond simply enabling me to get past the block of “I can’t do it all, so I shouldn’t start at all”, I can also match my work to my capacity and have some chance of getting a flow state going.

General

Telling a story in code

I had a discussion with a client and a colleague yesterday about commenting code. I haven’t thought about this much lately because most of the code I’ve written in the last few years is, in practice, basically never touched by anyone else. I still prefer that type of work compartmentalization, but won’t be the way it goes in this project, so I’m led to ponder my commenting style.

In a couple words, my commenting style is ‘not much’. However, this is a defensible position :-).

Part of the defense is that when I hear the word ‘comment’, I think about, specifically, little bits interspersed through the code that explain what the lines around are doing. This is different than documentation, which are the bits prefacing each function that explain what the function is for, how to use it, and caveats. Documentation, I’m down with dat.

Speaking, though, of caveats, that is one place where I make sure to add comments. If I know that, say, a section of code makes sub-optimal assumptions about its environment, I mark that fact, and use a ‘TODO: ‘ string to make sure it stands out (today’s IDEs have an automatic feature to extract and display TODOs). Or if I do something that’s nasty, I give it a ‘HACK: ‘. (I do not, however, use ‘TOXIC: ‘, because I associate that with unpleasant memories from a previous work environment. However, you don’t care to know that.)

Beyond caveats, I add comments if I do something that’s so utterly cool and astounding that it’s worth a patent, even if I’m too lazy to patent it. However, this never occurs. If I can write the code, I’m sure you can read its intent. OK, not quite ‘never’… Sometime I do have pretty novel coding ideas.

The biggest problem with comments is that they can get out of sync, since they are not automatically semantically checked against the code they apply to. So I prefer to use features that _are_ semantically checked, in some sense, by the compiler or other tools in the chain. So variable names, for example: if a variable is named ‘isRequired’ and you write ‘if (isProhibited)’, which may be a reasonable thing in your mind at the time, the compiler will tell you there is no such variable and you’ll find your mistake. Other examples are modifiers like ‘const’ and ‘abstract’, assertions, etc. So if I can find a way to express my beliefs in those modes, I do that and skip the commenting.

Thinking about this has me in a sort of mood that I want to think of my code as telling a story. Of course, I’m telling a story to the computer, but the computer is both too dumb and too precise for that same story to make sense to a human. So if I keep my human audience’s cognition in mind in parallel with the compiler’s computation, I can use the syntactic richness of the language elements to tell the story simulataneously to both audiences. The computer doesn’t care about the difference between ‘InsufficientUserIntelligenceException’ and ‘N13B’, but a fellow coder will.

General

Smack!

Y’ever want to smack yourself until you cry?

Today I spent an hour and a half trying to figure out why a web browser control I placed in a dialog was refusing to show the page I navigated it to. I won’t go into the details of the symptoms and the things I tried to fix it, but it was weird, and I tried everything.

Turns out I had somehow placed two identical copies of the control on top of each other, and I was (successfully, probably) navigating the bottom one but not the top one. Geee, eeee, eeesh.

Of course, I can’t entirely blame myself, as it was the retarded IDE that caused me to plop down two copies of the control…

General

Long-lived software

I was just pondering today that one of the more useful and stable day-to-day utilities I’ve ever used, less, I’ve been using for 15 years. That’s a long, long time in software-years. There are few other bits of software that I’ve used so much over so long. So, a salute to you, less, you old pile of bits ya, and to your author Mark Nudelman.

LESS

General

Complications

So, you ever decide to upgrade the storage on your living-room server, buy a hard drive, realize that the hard drive is SATA, which means it won’t work on your server, then figure, “hey, I have SATA on my desktop, might as well try that out”, then realize that your SATA is also RAID-0 capable so you might as well buy another drive and take advantage of that, only to find out after a couple experiments that it’s really not RAID but FakeRAID, and after you find a disk-clone utility that works with FakeRAID, you get the partitions cloned, but now GRUB won’t load due to some error that you don’t understand, so you reinstall the Windows MBR just to see that Windows will at least boot, but you can’t find the XP CD any more so you have to find some random MBR utility on the web and hope it works, but it does indeed work and Windows now boots, but of course Linux doesn’t because neither GRUB nor your installed kernel can deal with FakeRAID, and you finally get GRUB reinstalled but it still gives the error, which is number 18 which turns out to mean that GRUB can’t address your Linux partition through the BIOS, so you figure you might as well try updating the BIOS even though that seems unlikely to fix the problem, and since you don’t have a real floppy in the system and the BIOS makers haven’t graduated into the 19th century or whenever this is and they don’t make a CD-bootable flasher, you have to get the USB floppy from your laptop, make a flash floppy, make a bootable CD from the floppy, boot it only to find that you downloaded the wrong BIOS, repeat that process twice more until you do get the right BIOS, which then stuns you by actually fixing the problem, so now GRUB boots and can get you back into Windows but you still need to get dmraid installed in your initrd in your Linux kernel so you can boot that, which requires that you find a rescue CD that supports dmraid so you can even get to your Linux partition to do the initrd thing, after which you find an article that explains how to install dmraid in initrd, which thankfully works and now you finally are back to the point that everything works again, and it’s kinda cool?

I just did.

General

Data Translation

By various sorts of happenstance, I’ve had quite a bit of exposure to data/file-type translation in projects I’ve been involved in. Given that, I don’t know why it still surprises me how difficult it can be. I think what gets me is that the broad strokes always seems pretty simple (“both formats are basically just a bag of polygons, right?”), and you can even get promising results based on that naive view. Fueled by that initial success, you start charging into the deeper details, and uh-oh, suddenly there’s some ‘little’ detail that threatens to swallow the whole project.

Another factor is that you don’t want the users of your translation facility to have to think about whether some given feature carries over perfectly into the translated realm, so you go nuts trying to support every little corner case, probably many that no user will ever encounter.