Archive for March, 2008

Fencepost Error

I just read that they inadvertently released Sara Jane Olson one year too soon. After nearly a week of freedom, she was returned to jail to complete her sentence. That has to suck. They blame a “clerical error”, but I’m thinking this is a fencepost error in some poorly tested software.

I can only speculate, but it seems pretty likely that a prisoner serving several years in jail knows EXACTLY when his or her sentence is up. I know I’d be counting down the days. And if I had exactly 365 days left and the warden set me free, I doubt I’d complain either.

Reset CSS?

I plan to create a new theme for this blog, and am seeking opinions. Should I base my CSS on this Reset Reloaded stylesheet?

What do you do for your own sites?

When We Were Kids

Remember those station wagons?

Are We There Yet?

On Links and IDs

After writing Best. Comment. Ever., I realized comment permalinks were not working on my blog. Clicking the link brought up the page, but failed to scroll to the comment.

Jörg offers this advice:

Firefox does right, and so does safari: You anchors name (”…#comment-7155″) contains a “-”, which is an invalid name. Try something like “#comment7155″, it will work.

While his suggestion served as a catalyst for me to finally investigate the problem, I was not convinced “-” was the cause. So I researched the HTML specification, which has this to say:

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (”-”), underscores (”_”), colons (”:”), and periods (”.”)

Dashes are frequently used in URLs, so this cannot be the problem.

The Solution

While my heavily customized WordPress theme defined links, it failed to define anchors or IDs. So the links were going nowhere. I had to edit comments.php and add this ID to a <div> tag:

<div id="comment-<?php comment_ID() ?>" class="comment">

And that fixed the problem. I also re-learned some things about HTML that I probably knew at one point, but forgot:

  • On the receiving end of an anchor-type link, you omit the # character
  • You don’t have to link to <a name=”something”>. As my theme shows, you can link to <div id=”something”>

I suspect WordPress works fine out of the box, but I must have screwed it up when creating this theme.

The Man Gets Obama

Someone he knew said something…

The Man Gets Obama

High Tech Henpecking

This dialog keeps popping up:

NetBeans Annoying Dialog

I can think of an improvement:

NetBeans Dialog Fix

Respect your customers by giving them the opportunity to say “No thanks”.

iPhone SDK Penguin

Elwood: It’s 106 miles to Chicago, we got a full tank of gas, half a pack of cigarettes, it’s dark, and we’re wearing sunglasses.
Jake: Hit it.

iPhone SDK Penguin

Android Construction

It all started with some scrap MDF:

UPDATE: Here is the ebay listing.

I cut the circular base using a router and some scrap wood as a circle cutting jig:

Resulting in a perfect circle:

Using the router, I then cut a rabbet around the edge of the base:

Here is the completed rabbet with the motherboard and fan. This is a mini-ITX motherboard:

Next Steps

Here is a picture of the 12″ diameter steel hemisphere:

And here’s a little jig to route out the fan hole:

I used my drill press to cut the circles, which provide ventilation as well as holes for wires:

Here I’m gluing the four feet on the underside of the base:

Primer and Paint

Painting was very time consuming. Here is some primer on the hemisphere:

And some paint on the base:

Metal Brackets

I used some aluminum stock to fabricate the front panel (power, reset, and LEDs):

And the hard drive brackets:

Here we see the Raptor hard drive and fan mounted to the base:

I used threaded rod, washers, and nuts to suspend the motherboard above the drive:

Nearing completion:

With the painted cover, with holes for eyes and salvaged antenna:

Here is the final product:

All of these pictures are on Picasa Web Albums.

For Sale

Here is the ebay listing.

Now that Android is done, I don’t have much use for it. The specs are as follows:

Keyboard, Mouse, and monitor are NOT included.

Designed by Apple in California

By now you’ve seen the shuttle picture showing an iPod in the window:

Shuttle Zoom

Number of Methods in the String Class

Python, Java, Ruby.

String Methods

I just counted methods on these pages:

Bonus challenge: write a program in each language that counts the number of methods in the String class.