Test of code in blog post - eventual success

May 5th, 2007

Here’s a test to see if the ‘code’ tags work as advertised. For the inline version I’ll write [1, 2, 3].each do {|number| puts "You're number #{number.to_s}" which is a simple Ruby block.

And in it’s own paragraph how does it look?

["wine", "bread", "cheese"].each do |treat|
puts "pass me some of that tasty #{treat}"

Okay, WordPress, let’s see … well, the inline looks pretty nice, but I’m not pleased with the stand-alone paragraph form. The indentation was not preserved as I had intended.

Update: after installing the “preserve formatting” plugin from Coffee 2 Code, the indentation has been restored. OMG that’s great.

Hackety Hack Is Good For Your Kids

May 5th, 2007

Here’s a beautiful little application for teaching some principles of computer programming to youngsters. It’s written in a very approachable style. I think this kind of thing is a fine way to increase computer literacy, demystify the computer, and empower kids to think about the technology which is now so important in our culture.

The greatest thing about this, for me, is that it brings back memories of my youth. I can remember playing on my parent’s computer when I was 8 or 9 years old. I guess that, since it was about 1985, that home computer places me in a particular bracket of families who had the disposable income to afford what was essentially a useless appliance. But hey, my grandfather was a salesman for IBM and I guess he got us a killer deal on our first-generation PC. And I remember that my favorite thing of all on this computer was that you could draw shapes on the screen with a little “turtle” in an application called Dr. Logo. Maybe it wasn’t even an application, but Wikipedia has an article on the Logo programming language which is exactly what I remember writing in.

successful test of BlogMate

May 4th, 2007

this is a test post via BlogMate which is actually working!

I love Neal Stephenson

March 27th, 2007

because he writes with just the right amount of wit, humor, sarcasm, innuendo, and showmanship to keep me always wanting more. Sure, at times his prose feels like it came out from the bottom of the drugstore bargain bin. But who cares? Stephenson is the nerd’s nerd. Perhaps you have to be a Physics major to see him the way I do.

I just found his delightful 1999 essay In The Beginning Was The Command Line, which begins with the most delightful metaphor of Computer OS makers as Automobile Dealerships. Although I have only made it through about a third of it, I can already recommend it highly.


March 22nd, 2007

I would like to write a long post about the sensations of ecstasy coming over me as I get introduced to the Ruby programming language. But alas, I am having so much fun that I must really get back to work. Go figure. The nerd within me is boss.

TextMate is Beautiful

March 21st, 2007

It’s hard to get excited about a text editor. Sure, I have been excited about the benefits of using a text editor instead of a frustratingly snarky WYSIWYG tool (examples of which shall remain nameless). But that said, it really does not matter all that much which text editor you choose. Use whatever you are familiar with.

When I started using text editors in earnest, I adopted Emacs because that was what everyone else was using. When I had to switch over to Win32 systems, Crimson Editor has been a great sidekick, if a little slow to load. But now I am switching towards the Mac OS X environment. BareBones Text Wrangler seems too complicated and heavy-hitting to me, and after more than six months of keeping it centered in my dock I used it less than ten times.

Along with a growing number of users, I am very pleased to be using TextMate. Rands tried it and wrote probably the most evocative review anyone could write of a text editor; I was almost moved to tears, folks. One day into using TextMate and I’m happy to have spent the money. Hey, if yours truly (a cheapskate developer who would more readily go barefoot in the desert than pay for software) bought it and is happy, maybe it’s actually worth something.

Implement your own protocol, please

February 15th, 2007

What is it with communication protocols? Why does there always have to be some secret quirk or trick to get a device to talk nicely? I remember in high school when I could never seem to figure out how to get a girl to talk to me. Couldn’t decipher the secret code. The football team did, though, which only made me more confused.

I’ve recently been working on an application which needs to communicate over TCP with an expensive radio-frequency power supply made by Dressler. For some odd reason, the device won’t just take it’s commands as ASCII strings over TCP. No no no, the makers of this device decided that Modbus, the 1979 protocol designed for reading and writing single bits in remote device memory addresses, would be co-opted and perverted in order to “facilitate” sending high-level commands to the device. No, I don’t have any idea why they came out with this design. Probably a bad mix of history and inertia.

To make matters worse, Dressler implemented the Modbus part carelessly — making it impossible to employ a standard Modbus API to soothe the protocol burn. The good folks at NModbus have put together a great .NET library for dealing with the Modbus protocol. At my prompting, the team even put in support for Function Code 23, a very flexible Modbus function which the Dressler device perverted for it’s communications. I would have loved to use it in my application. Oh, yes, I would have liked that very much. Now I’m left to hack my own odd library which none on the planet will be able to reuse.

Let’s all resolve to write sane, reusable, standardized protocols.