Tuesday, February 28, 2006

Virtual Earth Street-level

I like playing with the bird-eye view feature in Windows Live Local. The level of detail is pretty amazing and it's fun to try to figure out when some of the images were taken.

Now there's something else to try: a tech preview of a street-level driving mode. Currently it only supports the City Center areas of Seattle and San Francisco but it's still fun to explore. It reminds me of the Aspen Movie Maps project done at the MIT Architecture Machine Group (now part of the Media Lab) in the late 1970s.

Flow river flow

One of my college roommates was an obsessive fan of the solo career of Roger McGuinn. Not really knowing McGuinn's music all that well, the rest of us made fun of his quirky warble on albums such as Cardiff Rose. Eventually we grew to appreciate McGuinn, especially his excellent 12-string guitar work. Here's an interesting story about how McGuinn "collaborated" with Bob Dylan on the song "Ballad of Easy Rider" for the film of the same name.

The Blonde Gene

According to this article, a study argues that blond hair originated in Northern Europe because of food shortages 10,000-11,000 years ago. North European women evolved blonde hair and blue eyes to make them stand out from their rivals at a time of fierce competition for scarce males.

The article also mentions that a World Health Organization study found that natural blonds are likely to be extinct within 200 years because there are too few people carrying the blond gene. According to the WHO study, the last natural blond is likely to be born in Finland during 2202. (Is that a typo? 2202?)

It seems to me that if we're talking about 200 years from now, genetic manipulation will have evolved to allow selective insertion of whatever hair color genes you want.

Sunday, February 26, 2006

Pixel Art Tutorial

Derek Yu's Pixel Art Tutorial teaches the basic concepts behind pixel art for games. Very time-consuming stuff but the end result looks good.

Saturday, February 25, 2006

Galactic Bathroom Symbols

My older son and I visited the Science Fiction Museum (SFM). It's co-located with the Experience Music Project in Seattle Center. Both museums are worth a trip if you're visiting Seattle.

SFM was clearly designed by sci-fi geeks right down to the symbols on the bathroom doors:

 

Pretty funny.

Update: as reader TL Holaday points out in the comments, there's an error here: Birds have a ZW/ZZ system where females are ZW (heteromorphic) and males are ZZ (homomorphic).

Friday, February 24, 2006

Leitungsgeräusch

Related to my blogging for newbies post I thought that I'd mention that my first blogging experience was on EditThisPage.com. I started a blog there in 2001. I posted several articles but lost interest. The blog is gone now but still available from the Internet Archive (or from the Google cache).

The title of my old blog was silly and pretentious sounding. I called it Leitungsgeräusch which means line noise in German. That's one reason this blog is just called Bob Congdon. Simple and clear.

Blogging for newbies

Dave Winer has some advice for anyone considering starting a blog:
When I encourage people to start a blog here's what I suggest they do.

First, create a new weblog on one of the free services, like Blogger or MSN Spaces. It takes about five minutes, and is about as hard as creating an email address on Yahoo or Hotmail, and represents less of a commitment. Then make your first post, something like Hello There, or Testing 1-2-3. Once you've verified that it works, you can stop there.

Then someday, when you're in the shower or lying in bed in the morning and get an idea that you wish you could tell everyone, remember that you have a blog, and go to the computer, and write it up and publish it. That actually feels pretty good, even if you think no one will read it, because you got it off your chest.

Then in a few days Google will probably visit your site and index the post, and then when someone searches for that subject, your page will come up, and maybe you'll pass that idea on to someone who can use it, or meet someone who agrees, or someone who disagrees. And that's blogging, and that's all it is.

To illustrate the point, this morning I woke up thinking that I should really post my standard blogging pitch. And there, a few minutes later, it is.
My current blog was created on a whim with Blogger back in April 2001. I forgot about for quite a while. I rediscovered it, posted an entry, Ned noticed it and I've been active ever since.

Dang

I just noticed that Blogger "lost" a couple of my posts from February 17th. I was able to restore them but the comments for those posts are gone now. A couple of my draft posts disappeared as well. Dang.

Thursday, February 23, 2006

The Simpsonmaker

This is just a placeholder for the correct URL. Look here

The Simpsomaker

Create your own Simpsons character by picking hair, head, eyes, nose, etc with the Simpsomaker. Cool but I wish there were more options. Here's my attempt at a Simpsons self-portrait:

It doesn't really look much like me but it was about as close as I could get.

Update: I just realized that I spelled the name wrong. D'oh!

Wednesday, February 22, 2006

Simple

I was looking for a basic web server this evening and found Simple.

Simple is an embeddable Java based HTTP engine. It's simple to setup and easy to use. Even simpler than Tomcat. It also support Groovy templates but I didn't need that.

Simple is good.

Friday, February 17, 2006

Poetic Warning

Apple developers have embedded a warning in Macintosh OS X software for hackers intent on getting the OS to run on non-Apple hardware. The warning is in the form of a poem:
Your karma check for today:
There once was a user that whined
his existing OS was so blind
he'd do better to pirate
an OS that ran great
but found his hardware declined.
Please don't steal Mac OS!
Really, that's way uncool.
(C) Apple Computer, Inc.
Clearly Apple hires developers for their programming not poetic skills.

This reminds me of the image that was hidden in the Macintosh ROM. It was put there to check whether the ROM on early Macintosh clones was copied from Apple.

Improve Your English

This Berlitz commercial is pretty funny.

It's only 30 seconds long, have a look. (Via Volker)

IE Tab Firefox Extension

The IE Tab Firefox Extension lets you run an embedded Internet Explorer in tabs of Mozilla/Firefox. Great for web developers, since you can quickly check whether your web pages render properly in both browsers.

Thursday, February 16, 2006

LED Throwies

LED Throwies are an inexpensive way to add color to any ferromagnetic surface in your neighborhood. Each throwie consists of an LED, lithium battery and strong magnet taped together. If you make enough of them, the results are interesting. Of course scattering clumps of lithium batteries, LEDs and magnets all over the place isn't the most ecologically friendly thing to do but it looks like fun. Watch the video.

I think the music choice in the video was intended as a nod to the Sony Bravia Bouncy Balls commercial. It's José González doing a cover of Heartbeats. Nice.

Brown Number

KC Lemson's post about the Microsoft Vocabulary includes a term that I hadn't heard before:
"Bob, how long is that going to take to test?" "3 weeks." "That sounds like a brown number to me." "Brown number? What's that?" "It's a number you pull out of um... um.. anyway..."
Note: I'm not the Bob in this interchange.

Brown number sounds innocuous — in fact it's also a mathematical term.

And if you put together enough Brown Numbers you'll be able to create a Brown Schedule with a Brown Ship Date. (Via The Old New Thing)

Wednesday, February 15, 2006

Opera Browser for Nintendo DS

I knew that the Nintendo DS supported wireless multiplayer games but I'd forgotten that it used "real" 802.11 Wifi.

So far the Wifi support has only been used for multiplayer games (and for wardriving) but now you'll be able to browse the web with a DS. With its stylus and dual screen, browsing the web using the Opera Browser for Nintendo DS might be kinda cool.

Of course what this means for parents is that keeping your home computer in a public space so that you can monitor Internet usage will no longer be sufficient if your child can browse the web with his/her Gameboy. Yikes!

Programming Languages and Platforms

I'm not sure that I'd go as far as Sean McGrath in declaring that The library IS the programming language but I agree with this sentiment:
Real world applications are not developed primarily IN a programming language. They are developed primarily ON a platform - a library of pre-developed code doing everything from opening databases to drawing GUI screens. These libraries are, these days, behemoths. So big that competent programmers can and do spend literally years wrapping their heads around them.
I think it's reasonable to say that C++ is getting surpassed by Java and .NET to some extent because C++ was just a programming language and not a platform. For many years, there was no standard library in C++ even for the most basic types and algorithms.

I wrote Java code for many years. I've been working in .NET for several months now. Java and C# are comparable. The bigger learning curve is the .NET platform. It has a lot of the same services but they're different enough to require some mental gymnastics to map from one world to another. In some respects it's been a refreshing change. Java APIs have been around longer and some "cruft" has built up. For example, the old collection classes (Vector, Hashtable, etc) are still there even though better alternatives were added a while ago.

Grey Matter

My wife and I were watching Grey's Anatomy on Sunday night. It was the second part of a two-parter. The main plot was about a patient with an unexploded bomb lodged in his body. Code Black. Okay, that was already over-the-top. But the way in which this particularly gruesome plotline ends was just too much. The bomb squad guy (Dylan) gingerly takes the bomb away. The main character (Meredith Grey) turns into the hallway well behind him and is about to say something and....

The bomb explodes. Dylan and his partner disappear. Vaporize. As one character says during the first part: Pink Mist.

Nasty. But what follows is nonsensical. A quick cut to two of the main characters exiting an elevator; down from the floor where the bomb exploded. Are all of the main characters okay? Will the patients undergoing surgery pull through? Huh? What about the vaporized bomb squad guys? No mention. Life goes on. The plot up to this point was full of holes but this just seemed callous.

Okay, maybe I'm making too big a deal about this but it's my blog. And several of the commenters on the episode writer's blog agree with me.

Tuesday, February 14, 2006

KookyChow

KookyChow features real but absurd food products. Of course absurd is in the eye of the beholder. All of the products on display are eaten by someone. But that doesn't make them any less funny.

Case in point: Steers Monkey Gland Sauce. Apparently it's not made from monkey glands nor is it a sauce for monkey glands. The name is a joke — Monkey Gland sauce is a popular South African steak sauce.

A lot of the products featured on KookyChow contain questionable meat products. It's true what they say about pigs, meat processing plants use everything but the oink. How else could you explain the existence of Pickled Pig Lips and Armour Pork Brains? The dietary information on the Armour can is pretty amazing. Pork brains contain 1170% of the daily value of cholesterol? Wow.

KookyChow is missing one other pig-related delicacy: Pork Tails packed in brine. In high school I had a summer job in a meat packing plant. When I worked in the cooler, we would fill hundreds of plastic drums with pig tails and brine. The contents were about as unappetizing as you might imagine. I always wondered who ate them. I've since learned that pork tails are popular in Jamaica.

Big Risks Come in Small Packages

Big Risks Come in Small Packages is a good article by Bruce Schneier on the increasing risks of portable digital devices. It's so easy to lose an enormous amount of information on a misplaced or stolen laptop, USB drive, cell phone or flash card.

Worst City Choke Points

Here's a list of the Worst City Choke Points in the US. Most large cities have one; Los Angeles has two on the list. Boston's I-93 is on the list, as is the 520 Bridge in Seattle. At rush hour Boston can feel like one big choke point but Seattle's traffic is pretty bad too. The highways can clog up pretty tight at rush hour.

You Know You're From Albany If...

I grew up in the Albany, New York area but haven't lived there for many years. My Mom sent me this list of Albany trivia via email.

You Know You're From Albany If...
  • You've ever been to Larkfest or the Tulip Festival.
  • You still call the Pepsi Arena "The Knick".
  • You can correctly pronounce the words Kosciuszko, Cohoes, Coeymans, and Kayaderosseras.
  • You know what The Egg is.
  • You know what and where Nipper is.
  • You expect to see nothing but grey between the months of November and May.
  • You remember when Crossgates was only half as big as it is now. Bonus points if you know what store was there before Best Buy.
  • You've ever rooted for the River Rats.
  • You grew up on Channels 6, 10, and 13.
  • The word "dredge" immediately conjures up thoughts of GE.
  • Spring means potholes.
  • You never expect them to pass the budget on time.
  • You know the 3 closest Stewart's shops to your house.
  • You've ever eaten something from Freihofer's or Brueggers.
  • You've never called I-87 anything other than "The Northway".
  • Okay, maybe you've called it "The Thruway", too. Depends which side of Albany you're from.
  • You know when there's going to be traffic on the Twin Bridges.
  • You know what SPAC stands for.
  • You go to or know someone who goes to UAlbany.
  • You know what SUNY means.
  • You know what a Karner Blue is.
  • You've ever gone up in the Corning Tower.
  • The name Arbor Hill doesn't bring anything plant-related to mind.
  • You know where the Stockade is.
  • You know which city is the Collar City and which is the Electric City.
  • You think Saratoga is classy.
  • If you're from Schenectady then Troy might as well be Mars to you and vice versa.
  • Milk = Stewart's, Cookies = Freihofer's. End of story.
  • It doesn't bother you that the Northway has no Exit 3.
  • It also doesn't bother you that Central Ave. is State Street at the other end.
  • You know that somehow Sand Creek Road is the shortcut to everywhere.
  • If there's a chance of a snow day then every radio in your house is tuned to WGY.
  • You've argued with your parents to take the car out in the middle of a blizzard.
  • You refer to the place where I-87 crosses the Mohawk River as "The Twins".
  • You remember Ranger Danger (say, isn't he on PYX 106 now?)
  • You have an ingrained taste for concrete architecture.
  • You know "The Track" is The August Place To Be.
  • You know it's "Awl -buh-nee", not "Al -buh-nee" or, even worse, "All-ben-nee".
  • You can think of at least 4 different ways to get to Stuyvesant Plaza from the same starting point.
  • You know what "Harvard on the Hudson" is.
  • You remember when Hannaford was still Shop 'n' Save.
  • You consider walking to the Plaza on the 4th of July because you know it'll be about the same time to drive there and find a spot to park.
  • You know What a Guy! Ken Goewey is.
  • You know that AirTite Windows knocked Resnick's sign down (but then put it back up).
  • You know who Nina (of Manchester) and her husband are, and how they sell diamonds for less than 33%.
  • Everybody likes Jack Byrne.
  • You thought Hoffman's Playland was the bomb as a child.
  • You know that "My dad Terry Morris is still number one!"
  • You've eaten at Bomber's one too many times.
  • You're bummed that the Firebirds left.
  • You know that you do nothing but eat and drink at the Pump Station.
  • You know the Times Union is your source.
  • If there's even a chance of snow Ichabod Crane will be closed.
  • You refer to Albany as "the 518".
  • You know what "I Love" is.
  • You know at least three people whose last names start with "Van".
  • You have your choice of cities on First Night.
  • You know who Neil Golub is.
I recognize many of the entries on the list: I know what The Egg is, I remember Stewart's, Freihofer's, SPAC, etc. And, I know what and where Nipper is.

But I have no clue as to who Ranger Danger was.

Update: The original (updated) version of the list can be found here.

Comcastic

Comcast's recent television ads feature a snippet of an updated and redubbed portion of the $25,000 Pyramid televison show. In the update, the answer to the last question is "Things that are Comcastic". The term Comcastic is silly but the commercial is clever.

Cable companies aren't exactly beloved by most people. Cable service is expensive and sometimes flaky or troublesome. It's pretty easy to find people who don't like Comcast. That said, our recent experience with Comcast was pretty good. We added HD and DVR services to digital cable. The DVR is nice — it stores up to 80 hours of standard broadcasts or 20 hours of HD content. We've never owned a TiVo so I can't compare the two services but with Comcast DVR there's a single box and single remote for both cable and DVR. Not sure if it's Comcastic or not but we're pretty happy.

Monday, February 13, 2006

Locking code blocks

Java provides language support for critical sections by marking methods or blocks using the synchronized keyword. For example, a method that can only be executed by a single thread at a time would be written like this:
public synchronized void myMethod() { 
    // critical section 

this is syntactic shorthand for using a synchronized block:
public void myMethod() {
    synchronizedthis ) {
        // critical section
    }
}
In this case the instance is the object used to define the lock. A common idiom for protecting access to static data is to lock the class object like so:
synchronized ( getClass() ) {
    // critical section
}
C# has similar support for locking using the lock statement. One difference of note is the advice on using lock:
In general, avoid locking on a public type, or instances beyond your code's control. The common constructs lock (this), lock (typeof (MyType)), and lock ("myLock") violate this guideline:
  • lock (this) is a problem if the instance can be accessed publicly.
  • lock (typeof (MyType)) is a problem if MyType is publicly accessible.
  • lock("myLock") is a problem since any other code in the process using the same string, will share the same lock.
Best practice is to define a private object to lock on, or a private shared object variable to protect data common to all instances.
This seems a little paranoid but I understand the concern. External code could use a lock on your class or on an instance of your class and would block access from your code.

To follow this guideline in Java would mean never declaring synchronized methods on public classes (since they implicitly lock this) and using synchronized blocks on an internal private object instead.

Sunday, February 12, 2006

Using using

With garbage-collected languages such as Java and C#, managing memory resources is handled automatically. But dealing with other resources such as files or database connections has to be done manually. You can't rely on garbage collection to free such resources. You have to explicitly close and dispose these resources. But that can get tricky when exceptions occur. For example in this Java code:
FileWriter fw = new FileWriter("log.txt"); 
fw.println("Foo"); 
// Other stuff 
fw.close() 
If an exception is thrown after the file is opened but before it's closed, the file will remain open. And you have a resource leak. There's a finalize method on the underlying stream but that won't get called unless the garbage collector recycles the object. And there's no guarantee that that will happen. In the meantime, if you leak enough file handles, you can get into trouble. The idiom to deal with this problem in Java is to use a try/finally block:
FileWriter fw = null
try {  
    fw = new FileWriter("log.txt");    
    fw.println("Foo");    
    // Other stuff    
}    
finally {   
    if (fw != null) { 
        fw.close();
    }
}
This works but can be kind of tedious and error prone. What we need is a way to declare a block-scoped object reference that won't let the object escape the block without being disposed. C# has such a feature, the using statement. Here's what the block would look like in C#:
using (TextWriter tw = File.CreateText("log.txt")) { 
    tw.WriteLine("Foo"); 
    // Other stuff 
}
Cool but how's that work? The type of the variable declared in the using statement needs to implements System.IDisposable. Its Dispose method will automatically be called when the using block is done. In this case, the Dispose method causes the file to be closed.

The compiler transforms our using block into code that looks like this:
TextWriter tw = null;
try {  
    tw = File.CreateText("log.txt");  
    tw.WriteLine("Foo");  
    // Other stuff  
}  
finally {  
    // Check for a null resource.  
    if (tw!= null)  
    {  
        // Call the object's Dispose method.  
        ((IDisposable)tw).Dispose();  
    }  
}
The using statement isn't rocket science but whenever you deal with a resource that needs to be cleaned up you naturally turn to it. If Java had support for using, people wouldn't need to resort to ugly hacks like this.

Protecting resource objects with a block scope wasn't invented for C#; it's possible to get the same sort of behavior by declaring block-scoped variables in C++. But the syntax isn't as clean. The concept of using a special block form is popular in Lisp languages, such as with-open-file in Common Lisp. In languages that allow special forms and syntax extension such as Scheme this is a pretty simple extension. It's just a simple syntax transform. But it's still quite useful and makes it clear that you're dealing with a resource that needs to be disposed of properly.

Wednesday, February 08, 2006

Borland Eclipsed

Eclipse is a terrific Java IDE. Its plugin architecture is superb. And it's free. Apparently that "free" part is having some negative consequences. According to The Register, Borland is dumping their Java and Windows IDE business to focus on the software delivery lifecycle. Why? Borland has been badly hit by the rise of "free" software tools, notably the open source Eclipse Foundation.

Another article from The Register asks can IntelliJ IDEA can survive the Eclipse onslaught? IntelliJ IDEA originated a lot of Java refactoring features. Now they're available for free in Eclipse. That's great for developers. But what about tools vendors? One of the goals of Eclipse is to provide a platform for vendors to add their own value. But is it a good thing when Eclipse provides these same features for free and, as a result, forces vendors like Borland (and possibly Jetbrains, the developer of IntelliJ) to abandon the tools market?

According to this article in the Red Herring, the Eclipse Foundation has created an interesting situation — a nonprofit foundation having so much financial impact on the community around it. Members have come to agree that cooperation is in their competitive interest.

I can't think of an analogous situation with any other open source project. It'll be interesting to see whether this assimilate or die consortium can hold together for the long term.

Tuesday, February 07, 2006

Email Blender

Email Blender is an animated anagram generator. Let's try an old Sun marketing slogan:
The Network is the Computer → Throw up cheekiest torment
Sounds about right.

Monday, February 06, 2006

The perils of audio compression

Interesting story on the Language Log about an Elmo kids' book on potty training. The book has recorded audio, activated by pressing buttons. When you press one of the buttons you may hear Elmo say "who wants to die?" for what was recorded as "who has to go?". Brent Edwards' explanation is compelling. If you listen to the clip expecting to hear one phrase or the other, you'll hear it. He goes on to explain how the consonants d and g can be confused due to crappy audio compression.

The Troll cap

Most blogs offer a way to post comments but comment systems can be abused. Not just by comment spam but also by off-topic, inflammatory, or otherwise inappropriate comments. Comments like this can be removed or disemvoweling.

How about slapping inappropriate comments with the Troll Cap icon? Looks cool. But that's a problem — the troll cap would probably just encourage trolls to post more comments.

Friday, February 03, 2006

The Wisdom of Parasites

Carl Zimmer's essay The Wisdom of Parasites tells the gruesome story of how the Ampulex compressa wasp uses a cockroach as her egg's host. By delivering two precise stings, she turns the roach into a zombie and leads it back to her burrow. Amazing.

Thursday, February 02, 2006

We're Toast

You don't have to be Sherlock Holmes to realize that someone is trying to corner the world market for toast: They're stealing butter. They're stealing bread. Hide your jams and jellies!

Update: Okay, sorry about that one. I was just looking for an excuse to post a link to the Thieves Posing as Policemen Steal Truck Full of Butter story. But since we're talking toast, it's worth paying a visit to Dr. Toast's Amazing World of Toast

Wednesday, February 01, 2006

The Smell of Moondust

The third installment of Apollo Chronicles describes how Apollo astronauts dealt with moondust. Apparently it smells like spent gunpowder although no one is quite sure why.

This page is powered by Blogger. Isn't yours?  Subscribe with Bloglines