I Hate Info Docs

GNU’s insistence on building their own documentation system instead of sticking to good old UNIX’s man pages is obnoxious. They provide second rate man pages and pretty good info docs. Why? Why not use some sort of generator that spits out the same data as both man pages and info pages? Anyone who wants to navigate from Emacs or use the schmanzy fancy navigation can use them and those of us who prefer man will still get full documentation. Doesn’t seem like so much to ask. So, GNU: knock it off. I hate info and trying to suck me into using it isn’t going to help matters any.

So Much for WORA

The promise of Java is WORA-Write Once, Run Anywhere. I decided to tinker with the Blackberry development one of the options for which is Java. So, I set up Eclipse (which is way harder than it should be; people found Vista’s branding or Linux distros confusing? Eclipse makes them look positively simplistic) and installed the Blackberry JDE plugin. After restarting Eclipse what greets me? A message that the IDE could not find a Windows USB DLL. I’m running this on Linux because I thought Java was platform independent. There are some USB wrappers in Java that hide the OS. What is the point of using Java if we are going to be tied to a single OS?

Levenshtein Rocks

The company I work for is running a project in which various numbers are getting scanned. Often, the barcodes were missing or illegible and had to be typed by hand. On the backend, we found that a great many of them were subtly wrong. For example, O (letter oh) and 0 (number zero) were swapped. Well, it’s pretty easy to drop in a quick AJAX callback that checks the barcode number to make sure it is on file. I thought it would be cool, though, to have the program suggest the correct number to the user. If they were right and it was just something we hadn’t seen yet, then they could just leave it be. If not, the system would give them a much better idea where they were messing up.

Meet the Levenshtein distance. I had heard of it before (it is commonly used in spellcheckers), but never had a reason to use it. A quick googling showed gave a blog post in which the writer implemented the dynamic programming implementation of an algorithm to find the Levenshtein distance as a MySQL UDF. It worked beautifully.

Why Am I Still Hacking This?

This weekend, I spent a bit of time working on Latrunculi and my wife asked me why I was working on it, rather than one of my more businessey ventures. Well, the short answer was that Latrunculi has been a labor of love for a long time now. It started as an exploratory project, meant as a way to learn some basic AI algorithms, while underemployed (not unemployed–when unemployed, I had no time for Latrunculi) and expanded beyond it to a much larger vision. The goal is for it to have bleeding edge AI with 3D graphics and an excellent user interface.

Latrunculi also represents a lot of growth for me. The initial work was done in Chicken Scheme (an excellent R5RS Scheme implementation, I might add) and is presently happening under CLISP. The switch was done because the SDL bindings were much more mature in Common Lisp. Additionally, I wearied of the ad-hoc way I had to assemble pieces of the Scheme language. Arrays? Vectors? Nope. They’re in a SRFI, though. Modules? Not part of the language. And so on. Common Lisp has a much more practical bent to it as a language. Especially in the very first revisions, there is a lot of code that I am not proud of. The graphics code, especially, relied heavily on side effects and had a lot of poor variable names (brd for board). The number of set!s is simply revolting. It is coming together, though. A lot of the side effects have been cleaned up. On my personal git branch, I am starting to set up some unit tests. After a couple of things are done, we will have something resembling a real game, only with terrible AI (which is where I have been looking forward to being, again; I’ve read some papers and plan on doing a complete overhaul of the AI code).

Since the initial burst, work on Latrunculi has been sporadic. This is the project I do when the boys are napping (like that ever happens) and when all the house is quiet. It has always been that little spot of technical refuge from the grind in IT. Latrunculi is one of those embodiments of why I love this trade so. This idea of building something beautiful and, at the same time, usable is appealing. This week has been one of the longer ones at work, with a new project getting underway. It is after times like pounding on XML dumps and inventory reconciliations that the algorithmic challenges and graphics programming are so soothing.

Moving Time

I am moving Latrunculi’s headquarters over to Mad Computer Scientist. Information is on the Latrunculi page (see the navbar on the right). I will be updating the Latrunculi page and the SourceForge page shortly. After I finish out a few graphics bugs, it will be time to get cracking on the AI.

Hosted Code

I currently have two projects on SourceForge (Ocean and Latrunculi). After reading Eric Raymond’s recent series of posts on Forges (not limited to SourceForge), beginning here, I am seriously considering migrating these little buckets of code over to mad-computer-scientist.com. I could move the repos over to Git pretty easily, it looks like (which really sets Git apart from many of the other, wonderful distributed SCMs i’ve used). Some quick wikis and we’re done. Fossil is another possibility, offering the wiki and bugtracking for free as it were. Raymond’s vocal denunciations bring my own nagging paranoia to the forefront of my mind. I don’t know. We’ll see.

Knuth is a breath of fresh air

I am almost finished reading a paper by Donald Knuth (about which another blog post will be forthcoming) and I must say that it is a breath of fresh air. Something about reading this simple paper in front of me is exhilarating in a way that I seldom feel and it is because of something so very simple: Donald Knuth cares.  He cares about computer science, he even cares about programming. He sees it as a fresh art. Those little things that seem to get brushed off like beauty, both algorithmic and typographical, actually matter to him. He cares about the human beings reading the code as much (dare I say more?) than the ones using the code. He clearly has some fun while he does this (the system WEB is made up of TANGLE and WEAVE, echoing Scott’s “What tangled webs we weave / when first we practice to deceive”). One does not crank out code or even write a program. One composes a program.

Perhaps I am showing my geekdom here, but it is a real pleasure to read someone who does care about these things. When we are programming, we are usually working with people who would rather have an impacted wisdom tooth than hear about what we do–ephemerally referred to as users. Then, with usability receiving its due as of late, we have a nice chunk of programmers who are trying to live as Spartan coders, thinking naught of their own pleasure but only of “the user.” Then, we have the majority of those in the field who are punching a clock and do not care about the job either. In short, the world is crammed full of people who just do not care about programming as art and literature and something beautiful and pleasurable in its own right. It is nice to read someone who does.

Piece of CookiePie

When testing a web site with various levels of user permissions, I thought it would be useful to be able to login with different accounts on different tabs of one Firefox session (especially because that’s all you can really have of a given profile). Towards this end, I found CookiePie. It works great and, as advertised, lets you keep multiple sessions of a web application running. However, after a little bit of experimentation today, I found that it interferes with at least three web apps:

  • VMWare 2.0 web Interface
  • Facebook
  • Napster web interface (no, I’m not a pirate; the first time I used Napster was after it had become a legal, paid service).

So, unfortunately, CookiePie must remain disabled on my Firefox profile. I need those apps a lot more on a daily basis than I need CookiePie. Still, it would be nice to see if they can clean up the bugs that make it interfere with other apps. I wasn’t using CookiePie on any of the above, so it shouldn’t have been interfering with them. It is possible that the only way to get this functionality right will be to bake it right into the browser. To the best of my knowledge, this has not been done on any major browser.