Wednesday, November 30, 2005

CSS3 Columns in Firefox 1.5

This text is in a div block with the following style.

<div style="-moz-column-count:2; -moz-column-width:10em; -moz-column-gap:2em;">

If you're not using Firefox 1.5 or later this post will appear like all the others, however, if you are viewing this with Firefox 1.5 you will see this text as two distinct columns in the normal single column posting space.

Column support is a neat feature but what I really want is someone to implement the table layout features of CSS3. I hate using tables in HTML, but it's so damn hard to live without them.

Put a man up a tree

As I mentioned a couple of posts ago, I've been spending more time working on writing fiction. Pursuant to (and arguably obstructing) this goal, I've also spent more time surfing writing web sites. Luckily this side work has born some fruit. I've found a simple piece of writing advice that has become a mantra of sorts when I'm trying to advance my ideas.

Put a man up a tree

Throw stones at him

Get him down


Monday, November 28, 2005

Programming Language Wars

Ruby is more wrinkly floop than Java, that we all know is true. The problem is Java bongs the Tunger tops, so most flickery wrangle yaks, especially those that huzzle the underfur, all cull clams from the muddlehuts. I realize the jiffles of J2EE quaf the buster crumps, so when a Ruby-on-Rail zealot yabbers lopootously it's easy to hungle the wassel flumps. That's not even mentioning PHP unglefoops and .NET Pooplefronds, they have their own jikklewraps. But if we measure the bity flips and yimmer yanker the horse plums of perfunkety, it all becomes clear; this has all been said before.

Link via Java Lobby

Wednesday, November 23, 2005

Goings on

I've not posted lately but that's not from lack of trying. I have a few unfinished posts in the work on a couple of topics. First off, I've been playing with Ruby a lot and have been thinking about different angles to discuss my work with it. Unfortunately I've yet to find anything to say beyond Ruby is cool and fun.

On a completely different tack, I've been inspired by Susan Senator's recent postings to try my hand at creative writing. So far, I have a few paragraphs written and a general idea for a story I want to write. I confess I've always wanted to write fiction, but I've always found the process very difficult and my results less than satisfactory. I realized recently, however, that I wont get any better by just thinking about it, so I might as well just dive in and give it try. If I like the results I'll post them here.

Friday, November 18, 2005

Ruby the Rival

Wow, I knew Ruby and Ruby on Rails were getting big, but I didn't know this big. The following is from O'Reilly's Ruby the Rival

Wednesday, November 16, 2005

Paris in a Ferrari

I'm stealing this link from Bob, but it's just too good for my friends that don't also read his blog to miss. If you like driving fast (who doesn't) this movie is for you. Just watch it.

What obsolete skill are you?

Here's yet another quiz. I know, I know, these have become a blogging cliche, but this one's short and the results are unusual. (from MetaFilter)

You are 'Latin'. Even among obsolete skills, the
tongue of the ancient Romans is a real
anachronism. With its profusion of different
cases and conjugations, Latin is more than a
language; it is a whole different way of
thinking about things.

You are very classy, meaning that you value the
classics. You value old things, good things
which have stood the test of time. You value
things which have been proven worthy and
valuable, even if no one else these days sees
them that way. Your life is touched by a
certain 'pietas', or piety; perhaps you are
even a Stoic. Nonetheless, you have a certain
fascination with the grotesque and the profane.
Also, the modern world rejects you like a bad
transplant. Your problem is that Latin has
been obsolete for a long time.

What obsolete skill are you?
brought to you by Quizilla

Tuesday, November 15, 2005

Western Conifer Seed Bugs

Every fall, for the past few years, these little buggers have been uninvited guests in our home. I'd never really thought much about them until the other day when Jayne asked me what sort of bug they were. I had heard people call them 'stink bugs' before, but that name gets applied to all sorts of insects. It's nice to finally have a specific name for them. Link

Monday, November 14, 2005

This sucks

When it comes to wars about programming style, I try and stay neutral. The one glaring exception to my neutrality is the "this." prefix for unambiguous field accesses. It drives me absolutely crazy. I don't understand why the style has prevailed in both the Java and the C# communities. Prefixing an unambiguous field with 'this.' is verbose and syntactically meaningless. At least when you use a convention like "m_", "i_", or simply "_" to prefix a field you are adding something that has meaning to the compiler.

When I first started using Eclipse I was very happy that their code generation rules allowed me to specify a prefix for fields. I counted it as a small victory, that there were other like minded people in the world that didn't think "this." was the stylistic answer for differentiating automatics from members. Unfortunately, while reviewing the new features in Eclipse 3.2 M3, I see they've added a new "Clean Up" rule that will add a "this." qualifier to unqualified field access. Dammit! I guess I must chock one up for the opposition.

One final point, please don't tell me about conversion and interoperability across languages being a valid reason to use "this." instead of a prefix. I don't carry a canoe around just so someday I can cross a river, so don't expect me to burden my code either.

Saturday, November 12, 2005

The Exploding Chicken Head Machine

Long before Continuous Integration became a familiar process in software circles, a group of co-worker and I at Alpha Software built, what we called, The Exploding Chicken Head Machine. The job of the Exploding Chicken Head Machine (or Chicken Head Machine for short) was simple - build the code, constantly. Once a build was done, the log was copied to a known name and location and a new build was started. There were no notification smarts or automated tests, but it served it's purpose; we always knew the basic state of the source control tip.

The name for the machine came from the intersection of two different stories. First is the common image of the a chicken running around with it's head cut off. The second story is a bit weirder. At the time, we were using Borlands C++ tools; contained within their documentation for the beep() command was an anecdote that described how some unfortunate sound technician discovered the frequency at which chickens skulls exploded when their experiments started killing chickens at a nearby farm. (This sounds like a job for Myth Busters to me).

We knew this machine was stupid. It would rebuild again and again, even if no one had checked in code to correct a problem; running around like a chicken with it's head cut off. And we knew our builds would frequently fail due to builds catching partial checkins as we continued development, oblivious to its schedule; much like the exploding chickens next to the ranch. The simple fact is none of this mattered. We didn't panic if the machine had a problem. It was just a simple metric we used to judge the state of the build. If errors persisted across many builds a red flag was raised but that was it.

The Exploding Chicken Head machine served us well. It was simplistic and stupid but it required next to no maintenance and the extra information it provided was always useful. Long live the Chicken Head.

Friday, November 11, 2005

A couple reasons why an Eclipse user might like Ruby

Reason #1: Ruby Gems

If you've worked with Eclipse you understand the power of Eclipse's plugin manager. With just a few clicks you can install a whole new component that becomes tightly integrated with the environment. Gems are Ruby's equivalent to Eclipse plugins. With just a network connection and a simple command you can extend your Ruby environment with any of the latest Ruby do-dads.

Let's say you've gone to Rubyforge and downloaded the One-Click-Installer and installed Ruby. If you then decide you want to install Rails the hip Ruby web application framework, you just need to enter this line at a command prompt.

gem install rails --include-dependencies

It's really that simple to download and install new components. If you want to find what components are already installed you just enter a command like:

gem list

If you want to find what components are available the command is:

gem list --remote

Reason #2: Ruby Eclipse Plugin

The Ruby plugin for Eclipse has been around for a while but it wasn't until recently that it's come into it's own with the release of version 0.6.0. It's not equivalent to the Java environment by any means, but it's very usable. It's the first IDE for Ruby that's lured me away from PE for doing Ruby development.

Tuesday, November 08, 2005

The 50 Greatest Independent Films

Here's a fun list of good independent films from Empire Online. I've not seen half the films but the ones I have seen I liked.

via metafilter.

Friday, November 04, 2005

Aunt Irene's Poetry

I didn't know my aunt well but I always found her fascinating. Among other thing, she was a weaver and a poet and lived in what seemed to me the wild west of Idaho. The funny thing is I actually grew up thinking she was a witch; not the nasty evil kind but rather the nature linked sort who mixes herbs and tree bark to protect people from the woes of the world. I don't know if she was actually into witchy things but for some reason she struck me so. Irene was a year or two older than my mother and the freer of the two spirits.

The last time I saw Irene was when she came from her home in Idaho to visit my mother in the hospital. My mother, whose name was Rita, had Alzheimer's and was in a steep decline. Irene had come out for what we all knew would be the last visit. I can still see the two of them sitting in the hallway of the hospital with my mother's hand in hers saying "Ree, it's Reen, Ree it's Reen". Irene was using pet names from long ago in an attempt to cut the fog of Alzheimer's. It was sad seeing two elderly sisters like this. One lost with a broken mind and the other reaching out trying to make a final connection.

This nostalgic post started because I recently found a collection of my aunts poems on the web. I think they're pretty exceptional. In the following poem Irene used symbols from her weaving work in an autumnal meditation on the shortness of life. If you like this, you can follow the link above and read some more. You have to scroll down a little before you get to Irene's but they're well labeled.


There will be time when winter comes
to sit beside sweet fancy's fire with books,
or weave with penciled words
the fabric of one's life and loves;
to pick among the knotted threads of dreams
for colors that may still be bright,
and so, with backward ranging thoughts
to while away the nights.

But now,
when all the flames burn bright,
let loving be the warp, the woof of life,
the binding arms, the thirsting lips,
the final fulfilled sigh...
There will be time enough
when winter comes
for sleeping through the night.

Irene Dodge

May the plot be with you

Name the greatest postmodern art film.

Give up? Well according to this Slate article by Aiden Wasley, that film (or rather films) is the complete Star Wars series.

Thursday, November 03, 2005

Rand on Vegas

I've only been to Las Vegas once. It was Lotus Dev Con or some such event and I stayed at the Mirage Hotel. I gambled a little, ate at a couple nice restaurants with my co-workers (Commandeers Palace at the Aladdin stands out) but for the most part, I behaved and focused on the job at hand. I was pretty satisfied with my stay too. That was until recently when I read Rands Vegas System, a series of blog posts about how to enjoy Vegas. It appears I missed out on a lot.

Rand's travel guide to Vegas is a bit different from most. Instead of describing how a typical couple might enjoy the town on a budget, Rand describes, in great detail, how a group of fun seeking men, with cash to burn, might manage their stay in a place of such temptations. In short, it's a series of essays on drinking, gambling and strip clubs. If those topics don't offend you, they're a fun read.

After reading it I've come to one conclusion. I need a posse.

The future of C++

The site Programming Language News has posted Herb Sutter's presentation on the future of C++. I had seen some interesting references to this presentation across the blogsphere over the past month but no one, till now, had ever posted a link. Even if you're like me and have mostly lost interest in C++, this is a cool presentation that lays out some pretty nifty ideas for the evolution of the language. The concurrency stuff is particularly brilliant.

Wednesday, November 02, 2005

What's your programming muse?

I was at the gym this morning, listening to my iPod as usual, when my attention turned to the TV in front of the elliptical I was peddling pedaling. The TV was tuned to Live with Regis and Kelly and the guest was the great actor Philip Seymore Hoffman who was there to promote his new movie about Truman Capote. They were discussing Capote's relationship with one of the killers he wrote about in In Cold Blood, when Hoffman said something that intrigued me. When asked whether the killer was Capote's muse, Hoffman said something to the effect of, 'All creative people have a muse that gets them excited about what they are working on.'

I don't know about you, but I consider software development pretty creative, so I started to wonder how this assertion might apply to me. I've been enamored by the languages Java and Ruby, and I've been inspired by the writings of the Gang of Four and the Pragmatic Programmers, but I'm not sure if I would consider these my muse. They've certainly been influential; but my muse? No.

So I pondered this some more. Could it be a product that inspired me? Could it be a mentor that influenced me? Could it be that Hoffman just made a sweeping assertion that doesn't apply to programmers at all? I considered all of these. The fact is I don't know. If any of you have an idea or feel you know your muse, I'd love to hear about it.

Meta programming with Cog

I've known about Cog since Ned first mentioned it in his blog and I've worked with it since I joined Kubi but it wasn't until recently that I sat down and applied it to my own work. The experience was enlightening.

If you don't already know, Cog is text processor that searches text files (source code) for special blocks containing Python code. Once it finds one of these blocks, it executes the Python code and inserts the results back into the text. The principle use for Cog is as a code generator - hence the name.

Given how I have seen Cog applied at Kubi and how the DRY principle that guides its use is generally described, I tended to think of it as a systemic tool for generating reams of glue code. But once I played with it a little I realized it's also great for little jobs as well.

Recently I was writing some code that worked with a bunch of bitmaps. Each bitmap needed to be loaded from a separate file and each one needed to be accessed independently via a offset into an array. The first pass through, I defined an array of string constants that defined the bitmaps file names and I defined another array that would hold the bitmaps and then a whole bunch of nicely named integers constants that mapped to the slots in the array where the bitmap would be loaded. The following shows basically what I'm talking about, but imagine a lot more bitmaps.

private const int foo_offset = 0;
private const int boo_offset = 1;
private const int moo_offset = 2;

private static readonly string[] BitmapNames
= new string[] {

private static Bitmap[] LoadedBitmaps;

Unfortunately, the next day after I wrote this all the bitmap file names changed. As I started the tedious task of renaming the filename constants and the integer constants to match the new filenames it dawned on me this would be a perfect problem for cog. I defined a single array in Python to describe the basic names and wrote a small amount of code to translate the simple list into both both the filename array and the access constants. The code looked like this:

import cog
bitmaps =(
counter = 0
for name in bitmaps:
cog.outl("\tprivate const int %s_offset = %s;"
% (name, counter))
counter = counter + 1
cog.outl("\tprivate static readonly string[] BitmapNames
= new string[] {")
for name in bitmaps:
cog.outl('\t\t"%s.bmp",' % (name))

The above cog snippet generates the equivalent of the original code and eliminates the need to coordinate the offset with the slots in the array thus eliminating a tedious maintenance chore. You can go one step further as well and put the Python code in a function so you can use the exact pattern again without needing to duplicate the code.

The savings of using this technique may be small initially but it will grow over time. The more you use the pattern the more the saving accrue. It's really an addictive technique. Give it a try, I think you'll like it.

Google's vulnerability

Everyone seems to be talking about Google these days. Most of the talk centers around whether they've turned evil or not. The fact is, most big public companies do turn evil at some point and there's little that average Joe can do about it.

But I wonder if Google isn't a different kind of beast. Unlike most big companies, Google's main product is very easy to replace. A few clicks and your default search site can be A9, Yahoo, IceRocket, DevilFinder, Teoma, you name it. If enough people do that Google's value to advertisers plummets.

Even though I really have nothing against Google search I think I'll switch over to A9 just to show them who's boss. Granted, I'm only one person but it's easy and It doesn't really affect my ability to search the web. If enough people do it, we could change the world. Who's with me?

Tuesday, November 01, 2005

New banner?

I've been learning to use Photoshop Elements 4.0 and I made up a new banner for the site. I don't know if I'll adopt it yet, but I thought I'd share it will you all. The boat picture that forms the left side of the banner was actually sent to me by a reader who I only know as Bobby. I've been meaning to share those photos as well but they will have to wait for another day.
The Out Campaign: Scarlet Letter of Atheism