Wednesday, March 31, 2004

Five Years Ago Today

Domino R5 shipped five years ago today. It doesn't feel like it was that long ago but time has flown by. Someone in the office linked to a series of photos that Andrew took on ship day. (Sorry, they're on an internal server so I can't share the link). There were a number of faces I hadn't seen in a while; people who have moved on to other projects, to other companies. We all looked elated in the photos; finally done!

Cellphones for Lefties

Sony Ericsson has developed a cellphone with a reversed keypad layout for left-handed customers. I'm left handed but I don't think I'd bother with something like this. I've used regular keypads for so long that a reversed layout would probably be more confusing than helpful. (Via BoingBoing)

Update: Turns out that this was a hoax. An April Fool's Day joke one day early. Got me. (Via Engadget)

Analysis Paralysis

Good Wiki entry on Analysis Paralysis:
Analysis Paralysis is a term given to the situation where a team of otherwise intelligent and well-meaning analysts enter into a phase of analysis that only ends when the project is cancelled.
I've seen a few projects get "stuck" like this. A related project issue is the Ultimate Architecture (or Perfect Architecture) anti-pattern.

Technorati Tracks Two Million Blogs

Technorati has just reached a new milestone. They now track over 2 million weblogs. 12K new weblogs are added each day and they track 150K blog updates per day. Gee, with all those other blogs to pick from, I'm honored, or better yet, shocked, that anyone is reading mine. (Via Waxy.org)

The Adventures of Seinfeld & Superman

New American Express commercials with Jerry Seinfeld and Superman (voice by Patrick Warburton). Very funny, especially the first one. (Via Jogin.com)

Tuesday, March 30, 2004

Two New Prototype-Based Programming Languages

A couple of recent articles on Slashdot highlight two new prototype-based programming languages that are under development:

Prothon is inspired by Python and Self. The language syntax is similar to Python. The underlying implementation is in C. This is a very early stage project. The 0.1 release is planned for October 2004.

Slate was inspired by Smalltalk and Self. The language syntax is similar to Smalltalk. The underlying implementation is in Common Lisp. This is also a very early stage project.

Protototype-based programming languages may seem exotic but you've probably already used one without realizing it. JavaScript is a first class prototype-based language and it's arguably one of the most popular programming languages around. The Apple Newton system was also programmed in a prototype-based language called NewtonScript. It featured prototypes and an interesting form of delegation. All NewtonScript objects had two inheritance slots, delegation first goes depth-first into the is-a-slot, then into the is-in slot which was used as a link of graphical objects to a container. This could be used to inherit properties and methods such as background color, position, etc. (Via SlashDot)

Are Weblogs Backwards?

Eric Meyer has some good observations about the "backwards" nature of weblogs. As he says:
Reading a weblog is like watching Memento, which I agree was a cool movie, except all weblogs are like that so it's as if every single movie released in the past seven or eight years was structured exactly like Memento
Good point. When posting a sequence of entries, I've worried that someone will read them in the opposite order from what I intended. Eric's solution is to fix his main page to be in chronological order. I'm not sure whether that will help or just make things more confusing. Any ideas? (Via Scoble)

Monday, March 29, 2004

The McGurk Effect: Hearing Lips and Seeing Voices

This is really amazing. Watch this video clip but don't read the explanation first. What is he saying? It's called the McGurk Effect. Here's some background on what's going on here. (Via Language Log)

Eternal Sunshine of the Spotless Mind

I saw Eternal Sunshine of the Spotless Mind the other night. I'm a big fan of screenwriter Charlie Kaufman so I had high expectations. I wasn't disappointed. I thought this was a terrific movie and plan to see it again. I'm not a fan of Jim Carrey but he's good here; toned down drastically from his usual shtick. Carrey's character, Joel discovers that his girlfriend has opted for a medical procedure that erases any hint of Joel from her memory. He elects to have the procedure performed on him. The exchange with the doctor before the procedure (which appears in the trailer) is pretty funny:
Joel: Is there any risk of brain damage?

Dr. Mierzwiak: Technically the procedure is brain damage. But it's on a par with a night of heavy drinking. Nothing you'll miss.
The main characters are typical Kaufman creations. If you enjoyed Being John Malkovich or Adaptation, you'll likely enjoy this film as well.

HTTP 101

Dumky has written a good article on the basics of HTTP. I find myself explaining this sort of thing all of the time. In the future, maybe I'll just point them here.

Citizen Kubrick

Stanley Kubrick, director of Dr. Strangelove, 2001: A Space Odyssey, The Shining, Full Metal Jacket and many other films died in 1999. If you're a fan of his films, you should read this article. The author, Jon Ronson, was invited to the Kubrick estate in 2001 and was allowed to look through Kubrick 's archives. Ronson's article provides some insight into Kubrick's obsessions.

Perl Programmers Rant About Java

Here are two articles on Java by Perl programmers. The first is an article by James Turner from LinuxWorld asking Why Do Java Developers Like to Make Things So Hard?. The second written by Perl programmer Michael Schwern is a rant entitled Why I Am Not A Java Programmer. Both articles make valid points. Java is an improvement over C++ but compared to scripting languages such as Perl or Python, Java is not great at quick programming tasks.

Pete Lyons has been writing about transferring scripting idioms to Java. I think Pete has come up with some interesting ideas but I doubt that it will ever make the Perl crowd happy. I've been looking at some of the scripting languages that have been directly implemented in the Java VM. This approach could give us the best of both worlds: scriptable for quick tasks but able to use the vast collection of existing Java packages. One scripting language for the JVM that's getting a lot of attention is Groovy. JSR-241 is promoting Groovy as a "New Standard Programming Language for the Java Platform".

Eggcorn

I've posted a couple of rants about misuse of words and phrases. On the Language Log blog they call this sort of misuse an eggcorn which is a a kind of word creation due to a mishearing that a glance at the written form would normally have corrected. I guess I can accept that explanation for casual misuse of a phrase. And it's true that it's harder to look up a cliche or phrase that you misheard (such as "baited breath") than it is to find the correct spelling of a word. But when you use a phrase llike this in written communication, you really ought to know how to use it correctly. If you're unsure, look it up. If you can't find a reasonable definition, don't use it.

Andy Hertzfeld's Mea Culpa

Another terrific article on Folklore.org. Andy Hertzfeld discusses some of the bad decisions that were made early on in the development of the Macintosh system software. We all make mistakes, cut corners, lock ourselves into design decisions earlier than we'd like. It's healthy to admit when we've screwed up. Got any software mistakes that you'd like to own up to?

Sunday, March 28, 2004

Top 21 PHP programming mistakes

I'm a PHP neophyte. I've only learned as much as I've needed to use for my blog. This collection of common mistakes when using PHP is a useful reference as I learn more.

Saturday, March 27, 2004

Favicons Review

It's hard to design a distinctive web site icon (aka favicon) within the limits of 16x16 pixels. Makiko Itoh has reviewed a large collection of favicons from commercial and weblog sites. Obviously simple is best and color branding is important with something so small.

Friday, March 26, 2004

More Word Geekiness

A couple more pet peeves on word and phrase usage. Both of these have come up in the past couple of days and I just need to vent:
  • There are no degrees of uniqueness: a thing is unique if there is not another like it. Phrases such as "rather unique" or "very unique" are incorrect. Unique has an absolute meaning. Don't water it down.


  • The proper phrase is "to nip it in the bud" not to "to nip it in the butt". It means to to stop something at an early stage. It comes from the idea of frost killing a flower before it blooms. The frost "nips" the bud of the flower.
Sorry for being a word geek again.

Thursday, March 25, 2004

Band Of Brothers

If you missed Band of Brothers on HBO, the mini-series is going to be shown on The History Channel starting Sunday, April 11th. Excellent series. Watch it if you can.

Panasonic SV-AV100

Digital video cameras that use flash memory rather than tape are starting to appear. The Panasonic SV-AV100 is a DVD-quality SD digital video camera. It records directly onto secure digital (SD) cards. It can record in either MPEG2 or MPEG4 format. With a 512MB SD card, you can record up to 10 minutes of DVD quality video. That may not sound like much but card capacity is increasing rapidly so being able to record an hour of video onto a card isn't far off. Also, if you're willing to sacrifice quality somewhat, the recording times for MPEG4 are substantially longer.

Wednesday, March 24, 2004

The Original Trunk Monkey

I was looking through my web site logs and noticed that I had nearly 600 search query hits for "trunk monkey". Google listed me 10th for that phrase. But the search also turned up this page which describes an earlier reference that predates the TV ads. (And as the author points out, the ads use a chimpanzee not a monkey). The domain trunkmonkey.com was registered in March 2000 to Trunkmonkey Racing. The ads are still pretty funny but credit for the phrase should properly go to these guys.

Speak n Spell simulator

A Speak n Spell simulator. The voice sounds perfect, they must have sampled the original toy. (Via Waxy.org)

Charles' Rules of Argument

Charles Miller has written a great set of rules of argument. He's done a good job of distilling what happens in a typical technical argument. One good point that Charles makes is to avoid emotional involvement.
The ideal attitude to project during any argument is one of calm disinterest.
Easier said than done sometimes since disagreements tend to escalate into emotion.

Another good point Charles makes is to "severely limit what you end up arguing about". In other words, pick your battles. Don't seek out things to disagree with.

Random Numbers

randomnumbers.info provides a service using a quantum random number generator that lets you download a sequence of random numbers. Not only is this web site useful for producing "good" random numbers, I found reloading this page over and over to be very soothing. Like a visual mantra.

The Life of Brian to be Re-released

Monty Python's film The Life of Brian will be re-released to mark its 25th anniversary. Cool. According to the article, advertising for the film will make pointed comparisons to The Passion. Seems silly to me but not nearly as silly as this headline in a related BBC article Zombie film beats Passion in US. The unstated premise in reporting box office numbers in the press is that Movie A made more money last weekend than Movie B so Movie A must be a "better" film. Nonsense.

Unit Tests and Extreme Programming

Good article on Unit Tests (aka Developer Tests). I think most developers are sold on the value of unit tests but it has to be part of the developer culture to work. Extreme Programming (XP) proponents would take that notion a step further and say that you should "code unit tests first". Here's a hypothetical example of XP pair programming in action and how the development of unit tests work with that approach. Note: I haven't been directly involved with a project using XP. The ideas interest me but my current project doesn't fit the ideal for using XP.

Personal Proxy Servers

Proxy servers have many practical uses beyond caching. Running a local proxy server can be very useful for debugging web applications since you can "see" the requests and responses directly. Here's a list of personal proxy servers written in Java. I've tried Charles and it works quite well. It has lots of features including the ability to decrypt SSL traffic.

Rocketinfo

I tried another browser-based RSS news reader called Rocketinfo. The UI is pretty slick and works well in Firefox and MSIE. But it doesn't work the way that I do. It uses a three-pane UI (list of feeds on the left, set of articles on the top-right, preview pane on bottom-right). Nice looking but not what I want. Since RSS feed entries are often summarized articles, I don't want a separate list of titles in the top-right. I prefer the way Bloglines does this. Also, I couldn't find any way to import OPML to copy my Bloglines subscriptions over to Rocketinfo. I'm going to stick with Bloglines.

Tuesday, March 23, 2004

Linux kernel swear counts

Vidar Holen is keeping a tally of swear word counts in Linux kernel code. An interesting idea although I think using swear words in comments has more to do with programmer style and temperament than with the quality or complexity of the code. Often comments like this come from frustration not malice. One of the funniest comments I've encountered (sans swear words) apologized for code size and complexity:
// This is, and always was, the mother of all routines.
// Sorry. (PUSH! PUSH! It's coming! It's... a BOY!)
If you work on a moderate to large software project, here are a couple of experiments to try for yourself. Scan your source code for the same set of words that Vidar looked for. Did you find anything interesting? Next, write a quick comment scanner that dumps comments out from source code (e.g. look for // and /* ... */ comments). Most of the comments will be mundane but occasionally you'll find a gem. It's amazing what some people put in their comments. Like a message in a bottle waiting to be found.

How To Write Unmaintainable Code

This essay on how to write unmaintainable code starts with one of my favorite quotes:
Never ascribe to malice, that which can be explained by incompetence.
Although a lot of the content here is tongue-in-cheek, I've seen examples of many of the "coding techniques" described here. At a startup, one of the programmers, who shall remain nameless, didn't believe in functions. He firmly believed that the overhead from a function call was too high. So he wrote thousands of lines of code within the same mainline function, including deeply nested blocks, nested switches, etc. He would duplicate the same chunk of code all over the place rather than split it out as a utility. (Some people should never have access to a text editor that's capable of copy and paste). After being frustrated by this mess a couple of us intervened and rewrote 30K lines of his code down to 5K of relatively clean code in an afternoon.

How to forge an S/MIME signature

Jon Udell received a spoofed email that looked like it was signed by him, but it was a forgery. The message used a free certificate from Thawte with a valid email address but when displayed in Outlook it appeared to be coming from someone else (and signed as well). Just shows you that the underlying technology can be completely sound but if you can fool users this easily, why bother?

Hard-Disk Risk

Simpson Garfinkel bought a bunch of old hard drives and discovered that 90% of them contained recoverable data. One drive once lived in an ATM and contained a year's worth of financial transactions including account numbers and withdrawal amounts. Scary. If you dispose of old drives, or old computers Simpson's article is worth reading. A related issue that I've been dealing with recently is getting rid of old floppies and archive CDs. I've been destroying them by smashing them up but it's time-consuming. (Via BoingBoing)

Glowing Seafood

In the early 90s I lived in an apartment in Brookline. It was just me and my overfed cat. One evening the power was out when I returned from work. The cat was hungry, as usual, so I opened the refrigerator door to get her a treat. She ate a mixture of canned and dry food but occasionally I'd buy some imitation crabmeat for her. Opening the door to the darkened refrigerator I found the imitation crabmeat in its transparent container. It was glowing. A bright green glow. Creepy. Feeding glowing food to the cat seemed like a bad idea so I tossed it out. I'd never heard of this phenomenon before. I assumed that it had something to do with fish eating phosphorescent plankton or the like. But that's not it. It was caused by luminescence bacteria and should not have been present in this type of seafood. Most types of luminescence bacteria are harmless but some can make you ill. Good rule of thumb, if your food is glowing, don't eat it.

Monday, March 22, 2004

iPod Envy

Bob's iPod?My sister visited us yesterday and showed us her new 40GB iPod. She said "Well, if you're going to buy one, why not get one with the most storage?" Why indeed. She also got an iTrip FM transmitter for the iPod to play music and audio books through her car's FM radio. The fit and finish of the iTrip is nice and it seems to work quite well. I'm green with envy.

IM Zork

If you have an AOL Instant Messager (aka AIM) account send an IM to InfocomBot or InfocomBot2 and you can play a classic Infocom text adventure game such as Zork, Planetfall, Hitchhikers Guide, etc. (Via Waxy.org)

Expressions

Two expressions that are often used in error:
  • The expression is "take a different tack" not "take a different tact". It's derived from sailing in which a different direction is taken as one tacks (turns) a boat. As an expression it means to try another approach.


  • The expression "bated breath" is often misspelled as "baited" breath. The proper interpretation treats bated as a contraction of abated which means to "reduce or lessen". Thus, the phrase means that you almost stop breathing.
Sorry to be such a word geek today.

Sunday, March 21, 2004

User Agent Switcher for Firefox

If you use Mozilla Firefox then this User Agent Switcher Extension might come in handy. It allows you to switch the user agent of the browser.

Resource Releases Resource Java Idiom

One of the few features of C++ that I miss in Java is scoped-object destruction. The ability to cause code to get executed automatically when a block scope is exited is powerful especially as a way to automatically release resources (e.g. open files). Ned has detailed the usefulness of this technique (described as the "Resource Acquisition Is Initialization" C++ idiom on this Wiki page).

Patrick Logan describes a Java idiom for achieving the same result called Resource Releases Resource. Interesting but seems a bit clunky.

Language Idioms

One of Alan Perlis' epigrams advises us to "Accumulate idioms". Good advice. I've always tried to master the idioms of each programming language I've learned. And over time we develop own own idioms to share on a project. I found a reference to this Wiki page of Python Idioms. A good start but far less complete than a similar page of Java Idioms.

Epigrams on Programming

Alan Perlis wrote this terrific list of programming epigrams. It originally appeared in SIGPLAN Notices which is where I recall reading it the first time around. Some of these are more than just funny or witty; they offer good advice to programmers. It's a lengthy list but worth reading through a few times.

Dictionary of Algorithms and Data Structures

This is potentially interesting. The National Institute of Standards and Technology (NIST) has a Dictionary of Algorithms and Data Structures. Could be useful for looking up unfamiliar terms. Some of the algorithms have references to implementations as well.

Saturday, March 20, 2004

Word of the Day: salad days

I've often wondered about the etymology of salad days (but not enough to actually look it up). It's from Shakespeare in Antony and Cleopatra: "My salad days,/ When I was green in judgment, cold in blood." Note: the RSS feed for Word of the Day can be found here

Trunk Monkey Redux

The trunk monkey links that I posted a while ago seem to be broken now. I also found a newer trunk monkey video about a speeding ticket. Here are links that work:Enjoy. The first three are Quicktime, the last clip is MPEG video. Note: another source for these clips can be found on MilkAndCookies.com

Friday, March 19, 2004

XPower Mobile Power Inverter

This solid-state inverter looks like it could be useful for gadgets. You plug it into your car's lighter socket and can power any AC appliance up to 75 watts. Nice. No need to buy yet another adapter. There's a somewhat larger model that support 175 watts.

I've been noticing that newer cars have multiple power outlets (my Camry has a second outlet up front in the storage bin). The shape of power outlets in cars was designed to fit a cigarette lighter but newer cars often don't come with lighters, just the outlets. The outlet could be redesigned to be a lot smaller except that car makers would need to agree on a new standard outlet shape. Too many different outlet types would make it unprofitable or expensive to produce devices like this. (Via BoingBoing)

Happy Meal Turns 25

The McDonald's Happy Meal first appeared 25 years ago. It included a circus wagon toy. The article doesn't mention who came up with the idea but it was pure (evil?) genius to combine toys with fast food. The marketing tie-ins with movies, televisions shows, comics, etc. have been enormously popular and profitable. Happy Meals have even shown up in Linux source code.