Amy in a Hat

What can I say? This was just too cute to pass up.
Amy in a hat

Scientific Debugging

One of the things that often amazes me is how poor most programmers are at debugging. Yeah, I know, it sounds like I’m putting on airs when I say that, but it’s true. Schools basically don’t teach debugging as such, though you’ll pick some up in the course of doing projects, and a lot of people don’t ever get much better at it later in their career. Many of the articles and books you’ll find on debugging tell you no more than how to use a particular debugger or how to debug a particular program, which is useful but still too narrowly focused. My intent is to introduce some more general approaches to debugging.

Amy’s Language Skills

As promised, here’s some info about where Amy is speech-wise. She’s doing great in the noun department. She can identify well over a hundred (maybe even two hundred) different objects in books by pointing, and say maybe a third of the names if Cindy or I point first. Richard Scarry books are great for this, though I find his drawing style kind of annoying. Some notable categories include:

  • Animal names and sounds – cow, horse, sheep, rooster, cat, dog, owl, camel, etc.. Thanks to Sandra Boynton she still thinks pigs say “la la la” and “duck” is one of her favorite words but “quack” doesn’t seem to have made the cut.
  • Body and face parts – eye, ear, nose, mouth, finger, thumb, hand, elbow, knee, foot, toe, etc. A drawn-out “eyyyyyye” is a favorite (though it might also be a form of “hi”) and “cheek” is one of the newer additions. She still responds to “lips” by putting her hand up to her mouth and doing a “ba-ba-ba” kind of thing sometimes, but not as consistently as she used to. While they’re not actually body parts, “shoe” and “sock” are still on the list and “shirt” has made a recent appearance.
  • Foods – ham, cheese, peas, salad (“sa-za”), and others. “Bab-izh” is her word for both cabbage and batteries. “Soup” refers to anything in a mug, including coffee, and is sometimes hard to distinguish from “soap” which is also a favorite.

Amy doesn’t have nearly as many verbs as nouns. She knows eat, sleep, and sit. She also uses open (“ope”) but I’m not sure whether it’s as an imperative verb or an adjective. She doesn’t have a ton of prepositions either, though some that she does have are notable. She likes both up and down (“dow”) and says both quite emphatically but doesn’t seem too clear on the difference. “Off” is common, meaning both that a light is on and she wants it off or vice versa, but “on” is rare. As with some of the other words, the terminal “n” is absent. Other notable categories:

  • Colors – blue (“boo”), yellow (“la-low”), green (“gee”) and purple (“puh-puh”). Blue is tricky, because “balloon” and “bow” are pronounced almost exactly the same way.
  • Numbers – surprisingly, she seems to know at least up to six. We have a “Five Little Monkeys” book and she’s quick to point out that mama makes six. She also seems to know “eight” but not where it fits in.
  • Letters – B, M, N, O, S, X, and Z are all clearly recognized, though S sounds like “ass” and X sounds like a hairball.
  • Please (“pzzz”) and thank you (“ta-go”).

I can’t think of any adjectives (other than colors) or adverbs that Amy knows, off the top of my head. There might be a couple, but in general it seems like those come later. I expect she’ll be putting words together soon, at least to the level of “yellow duck” and such, and then on to sentences. She clearly gets a kick out of being able to communicate at least somewhat, and she’s quite a show-off when it comes to showing that she can recognize multiple objects of the same type. The last couple of nights, for example, she has made quite a show of going back and forth from my office to my closet, pointing to the tiger on a book cover and the panther on a sweatshirt, clearly excited at having recognized them both as cats.

I’d love to get video or audio of some of these, particularly “lips” and “umbrella” which both involve use of the hands, but I keep running into the Heisenbaby Effect: the act of trying to record a moment for posterity causes the moment to be aborted as the recording device becomes the focus of attention. If I want to catch something I have to do it surreptitiously.

Comment Passwords

I just received a query from one of my readers about how I implemented the comment password that’s used on the site to prevent spam. Since this is the third such query in the past month, I figured I’d post the explanation here for others who might be curious. It’s not particularly complicated, but the following instructions will nonetheless probably only make sense to programmers.

  1. In content/themes/default/comments.php, look for the author/email/url input boxes. Cut and paste one for the password, giving it a unique name/id/label (I use “cheese” for hysterical reasons) and tabindex. For convenience, you can add it as a hidden form element instead in the registered-user case, thus:
    <input type="hidden" name="cheese" value="maple" />
  2. In wp-comments-post.php, look for the “please type a comment” error message. Immediately afterward, check the value:
    if ($cheese != "maple") { die("<p>blah blah</p>"); }

That’s basically it. There’s nothing super-secret about any of it (it’s just supposed to stop machines, not people) so here are comments.php and wp-comments-post.php as I’ve modified them from WP 1.5. I haven’t gotten around to upgrading yet, but I imagine it would be equally straightforward for WP 2.0.

New Site

If you’re reading this, it means you’ve arrived at the site’s new home. In a nutshell, I’ve changed hosts from TotalChoice to Site5. Why? Maybe it has something to do with the ever-decreasing reliability, culminating in a near-total outage since Friday. Fortunately I took a backup over my weekend, because I haven’t been able to reach the old site today at all. The only reason I’d want to at this point is to retrieve any emails for the last couple of days. Other than that, I’m done with TotalChoice. They were great for a while, but I’ve come to the conclusion that web hosts are consumable (rather than durable) commodities. If they’re any good at all, then over time they’ll get more customers and their servers will become overloaded. Then the one guy with a clue (there’s always exactly one) leaves, and now you’re stuck with a bunch of overloaded servers and nobody who knows how to run them. Time to move on.

Let’s see how long this one lasts.

Stupid Pirates

I can’t quite decide whether this is a new definition of chutzpah or just Darwin Award material, but somehow it’s funny either way.

The early morning gunbattle ensued after sailors spotted 30-foot fishing boat towing smaller skiffs and prepared for a routine boarding, said Lt. Cmdr. Charlie Brown, spokesman for the U.S. Navy’s 5th Fleet.

Passengers on the fishing boat then began shooting, and U.S. naval gunners returned fire with mounted machine guns.

The Cape St. George, a guided-missile cruiser, and Gonzalez, a guided-missile destroyer, were conducting maritime security operations in the area.

What was going through the pirates’ heads when they fired on a US Navy cruiser? No, silly, I mean just before, because it’s perfectly predictable what would be going through their heads a moment later. ;)

Amy Pictures

As promised, here are some pictures of Amy. I’ll do text later.

Amy playing in front of the tree Amy playing in front of the Christmas tree at Cindy’s parents’ house in January.
Amy sitting on the gas station Same day, Amy sitting on the gas-station play set she got for Christmas. Sitting on things is one of her favorite hobbies now.
Amy reading in the sunroom Amy reading a book with Daddy (that’s me, folks) in the sunroom at Cindy’s parents’.
Amy and the shape-sorter Amy playing with a shape-sorter. She has a little bit of trouble with the more complex shapes in this and in some puzzles (we have a butterfly one that’s particularly challenging at home) but mostly she gets them.
Eek! The amazing static that Amy sometimes gets from the sofa. This just screams for a funny caption, but I can’t think of one right now.

Amy Video

The last two comments here have been from uncles. Ted (from my side), meet Skip (from Cindy’s). Skip, meet Ted. I think you guys will get along great. If the family’s showing up in force, that probably means I’m way overdue to post something about Amy. It just so happens that last night I finally had the time and energy to process some of the video from our trip to Michigan between Christmas and New Year, so I’ll post those now. Some time in the next few days I’ll write some more about how she’s doing, and maybe post some newer still pictures as well. Click below to see thumbnails and descriptions of the video.

Amazon S3

Amazon has rolled out S3, or Simple Storage Service. Here’s the blurb.

Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It gives any developer access to the same highly scalable, reliable, fast, inexpensive data storage infrastructure that Amazon uses to run its own global network of web sites. The service aims to maximize benefits of scale and to pass those benefits on to developers.

Price is $0.15 GB-month of space, and $0.20 per GB of transfer. They actually describe requirements and even design principles on the referenced page, which is kind of cool. Requirements are that the service be – and I quote – scalable, reliable, fast, inexpensive, and simple. OK, yeah, those all sound like good things. The design principles they supposedly use to achieve these goals are as follows.

  • Decentralization
  • Asynchrony
  • Autonomy
  • Local responsibility
  • Controlled concurrency
  • Failure tolerant
  • Controlled parallelism
  • Decompose into small well-understood building blocks
  • Symmetry
  • Simplicity

Again, that’s a lot of mom and apple pie. One thing glaringly absent from the requirements is data consistency, and in fact some of the statements associated with design principles seem to indicate that it’s not a feature. For example, under “local responsibility” they make the statement that “Each individual component is responsible for achieving its consistency; this is never the burden of its peers.” You might think this is a minor quibble, that because of their excellent (but undescribed) modularity they can add consistency for those who need it, but whether or not a data store provides a consistent view of data is a fundamental property of that data store. Distributed data stores are all about who has (or can have) which data when, and consistency requirements change that calculus at the most basic level. Like performance or security, or perhaps even more so, it’s not something you can just tack on as an afterthought because whether or not you seek to provide consistency drives many other design choices all the way down to network protocols and internal metadata structures.

Without consistency you might as well use the Internet Backplane Protocol, which was designed to serve almost exactly the same need as S3 in an open-standards way. I’m not saying IBP is the greatest thing ever, but I’m not sure Amazon’s proprietary version is either.

iAudio G3

A long time ago I decided to get half-way on the bandwagon and bought a little MP3 player with a built-in radio. It’s nice, but Cindy has used it more than I have and she has used it more as a radio than as an MP3 player. A major part of the reason is that it’s just too small. 128MB is only enough for a couple of CDs worth at any decent bitrate, and that’s not much variety. Basically it’s useful to listen to a specific CD, but not as a “take it along just in case” kind of thing.

This time around I wanted a similar physical size but a larger capacity. Cindy and I have a 20-CD wallet that we’ve been taking on car trips just about forever, and it seems to provide plenty of variety. Doing the math, that works out to around 1GB, so that’s the size I went for. I also wanted a radio and voice recorder, even though I’m not likely to use them often, and USB2 for faster file transfers because the player I already have is only USB1 and frustratingly slow. As I looked around at the various options in this niche, the iAudio (also known as Cowon) products stood out as providing better capacity and functionality than most brands at the same price. There were many options to choose from, but I eventually settled on the G3 because it was one of the cheapest options that met my criteria (at about $120) and also boasted an impressive battery life. In fact, I’ve been using mine quite a bit for a few weeks now and I have yet to replace the battery that came with it. The other thing that seemed notable was the mention of a higher-than-usual output wattage for better sound, and it seems to work. I’m no audiophile but even I can tell that the sound on this unit is excellent compared to most portables. I can crank up Red Delicious’s Casualties or Live’s Lightning Crashes to levels that are almost painful, and it never sounds either tinny (the most common problem) or washed-out. At first I wasn’t sure whether it was the unit itself or the included earphones that were better than I was used to, so I did some experiments with other components on each end and it’s both. Either component used with something else won’t be as good as the two used together.

So we have excellent battery life and sound, decent capacity and a very convenient form factor. What’s left? Downloading files was dirt-simple, and the controls (including navigation of all those CDs I downloaded) are very intuitive. There’s line-in and FM recording, which I’m unlikely to use but not universal in this category and nice to see as extras. That’s about it. In short, I’ve been delighted with this purchase and wanted to share my positive experience with others.