This is BrainLog, a blog by Dan Sanderson. Older entries, from October 1999 through September 2010, are preserved for posterity, but are no longer maintained. See the front page and newer entries.

December 2007 Archives

December 31, 2007

Newbie Mac tip, and a bug complaint: My shiny new iMac fails to recognize when I've inserted a CD or DVD into the drive about 1 in every 10 times. When it fails, the hardware successfully slurps in the disc, but it does not spin up, appear on my desktop, or open or appear in iTunes (if it's a music CD).

If I had been using an Apple keyboard, I would have noticed that the eject key still works even though the Finder says it knows nothing of the disc. I could then re-insert the disc and most likely get a successful read. However, I was not using an Apple keyboard, so I had been logging out and logging back in (closing all of my apps in the process) to get the disc recognized correctly. This made me wonder, is there a way to eject the disc similar to the Apple keyboard eject key, but without the Apple keyboard? Maybe a command-line tool?

To eject a CD or DVD from the command line:

drutil eject

This works even in the lame broken case I describe above.

drutil can do all kinds of neat things, including dump data about and from the inserted disc, burn a disc image, and more. Type man drutil in a Terminal to see all it can do.

December 28, 2007

Some nice .emacs tips, with an emphasis on autoloading and eval-after-load over just loading everything at start-up.

NodeBox, a Python-powered visualization engine for Mac OS X, with the ability to export PDF or QuickTime.

December 27, 2007

Did you get a Flip Ultra camcorder for Christmas Does it not transfer files to your computer correctly? Get the December 2007 firmware update.

Sadly, the firmware updater only works with Windows. They're promising a Mac version of the updater in January. It's a cute toy, I'm sorry to have to put it away so soon.

December 26, 2007

Popular Mechanics compares the original Knight Industries Two Thousand with the one designed for the new TV movie to air next February. The new one is a black Ford Mustang. And it has heated seats.

No mention of the "Knight Industries 4000" seen in the 1991 movie that failed to turn into a new series, a red 1991 Dodge Stealth. Nor Team Knight Rider, which isn't worth my time to mention any further beyond linking to this old-fashioned Knight Rider FAQ.

Not sure if this poster of KITT as a Koenigsegg CCX for a 2008 movie was ever real, but it's cute. Koenigsegg's web site; Wikipedia on Knight Rider, including info on the 2008 movie.

MIT spinoff's little green laptop a hit in remote Peruvian village. Chicago Tribune on OLPC and the XO in Peru.

Turning on WPA encryption for wireless access points on the XO laptop. WPA is expected to be available as an official feature of the XO next month, but impatient G1G1 owners can copy a script over with a USB stick and run it.

USB ethernet adapters are also known to work.

A new tutorial on application development for the OLPC XO laptop from IBM developerWorks. Registration required to see the tutorial. Nice to see a fresh tutorial, since XO development has changed drastically in the last 8 months.

December 21, 2007

Pine is now Alpine, and is properly open source. Pine is the University of Washington's most excellent email client, and is still one of the fastest and most mature email readers out there. It's a terminal application, has a standalone version (not a terminal, but the same interface in a local window) for Windows, and now with Alpine includes the UW's web version as well. Alpine 1.0 is released under the Apache License 2.0.

Pine also included Pico, Pine's internal text editor as a standalone application and also one of the best lightweight terminal-based text edtiors. The lack of an open source license inspired Nano, an open source re-implementation of Pico found in many Linux distributions. (Type which nano and which pico to see which is installed on your system.) Pico can also be found by default on Mac OS X (though not Pine, strangely).

Alpine also includes proper automake build files, finally.

According to the Alpine story, the extreme lateness of an open source release of Pine was caused by the project's "trademark obligation" to the University, and, I gather, a lack of will in the administration. Other motions towards open source licensing and the decision to rename the product allowed for this release.

December 20, 2007

Johnny Chung Lee's Wiimote-based user interface projects include a way to control your computer by waving your hands using an LED array and some reflective tape, and an electronic whiteboard anywhere using a projector, a Wiimote, and cheap homemade infrared flashlight pens. Johnny has released his software, and both projects look fun and easy to assemble. See his excellent videos.

Somehow it never occurred to me to think very hard about how the Wiimote operates. The Wii's "sensor bar" is misleadingly named: It doesn't sense IR signals beamed to it from the Wiimote like a traditional TV remote control. Rather, the IR sensor is in the Wiimote, and the "sensor bar" is just a couple of infrared lights. The Wiimote collects data from the IR sensor along with its accelerometers that detect motion and the game buttons, and transmits the data to the Wii via a Bluetooth connection. Johnny's projects use the Wiimote's IR sensor and a laptop's own Bluetooth capabilities to detect points in a projected 2D space.

A short article and slideshow on the Wiimote's IR and acceleration sensors from the NYTimes, 2006.

December 18, 2007

OLPC has set up a nice getting started guide and a support page for the XO laptop, as well as a support FAQ. Things are still clearly in their early stages: the Give1Get1 laptops are shipping with software with known issues (no WPA wifi, no sleep feature, no printing) that will be addressed in a software update in the near future. But the newest photos and screenshots make it look pretty slick.

G1G1 participants should start receiving their laptops this week on a first-come first-serve basis. The G1G1 program runs through December 31st, so you'll still be able to jump in after reading dozens of reviews from other G1G1 participants.

December 17, 2007

The Computer History Museum has a YouTube channel, where they'll be posting lectures and other presentations. First up: Commodore 64: 25th Anniversary Celebration.

December 14, 2007

Duelity, a cute, short split-screen animated film of two stories of how we came to be. (Via Jason: click "watch" then "duelity" for the split-screen view.)

Anxiety, a lightweight to-do list app for Mac OS X Leopard. Free.

Movable Type is now open source software, released under a GPL license. Their status page has details on which pieces of their open source support infrastructure are operational, including the SVN repository, nightly builds, and bug tracking system.

MTOS is identical to Movable Type 4.0. Six Apart will continue to sell licenses with support contracts and paid benefits (some plugins and templates), but the main software and default template set—everything you need to set up a blog—are all free and released under the open source license. 6A has a slightly tricky branding problem on their hands describing the open source version of MT and their paid "versions," and they've decided to call this "MTOS" (as opposed to "MT"), even though the main software (minus paid-only extras) is and will probably always be the same across versions.

ido.el, advanced auto-completion for file and buffer names in Emacs.

December 11, 2007

Anita Rowland, friend, old-school blogger and a founding and supporting member of the Seattle blog community, has died of cancer. Her husband Jack has set up a page for condolences and memories.

L and I have known Anita since the early weblog days. We drove out to Ellensburg together to watch a meteor shower. Anita and I went to Ikea together, I forget why. We went to Anita and Jack's wedding. We haven't seen Anita or Jack in a while—Anita never got to meet our kids, I don't think. Anita, we'll miss you.

December 7, 2007

Syzygy, a fast-paced multiplayer crossword game. See videos. Really neat idea, makes me wish I had friends.

See also Bananagrams, Take Two!, Pick Two!, Double Quick!. (Thanks to a coworker.)

December 6, 2007

Advanced Bash-Scripting Guide. I'd say "where has this been all my life?" but it was just written in the past few months.

Especially: Manipulating Strings with Bash. Includes clarification of an unclear point on the bash man page about the substring syntax: ${var:-3} doesn't work (full value of $var is returned), but {$var:(-3)} works (last 3 characters of value of $var). I found it looking for this: ${var%".html"} evaluates to the value of $var with the suffix ".html" removed, if any.

December 4, 2007

I was so thrilled with Mac OS X Leopard's new version of Terminal that I didn't notice an important missing feature: You can no longer customize the 16 ANSI colors. This is important because dark blue is practically unreadable on dark backgrounds. Someone has a hack that adds this feature back in, though it uses an Input Manager (bad voodoo), so it's not ideal.

I like that iTerm is a free open source competitor to Mac Terminal, but I've never been that fond of it as an application. Before Leopard, iTerm was simply the only alternative to Terminal's (previously) atrocious preferences panes and limited feature set. For better colors alone, however, I'm willing to reconsider. Like Terminal, iTerm has grown some in the past year or so. Custom ANSI colors have moved in a recent version: They're now under the Bookmarks menu, under Manage Profiles..., Display Profiles. Select the Default profile and brighten up that blue!

Seems like once again, my ideal Mac terminal program is somewhere between Terminal and iTerm. If I could brighten Terminal's blue with a plist file or something, I'd go back.

December 3, 2007

Brian Foote: Big Ball of Mud [Google Video], a presentation of his paper of the same name that Brian gave at Google back in August.

My terse comment attached to my link to this SciAm article on raising smart kids got a reaction from my mother, so I thought I'd clarify my position a tad, which is actually represented pretty well in the article.

The myth of natural ability cuts two ways: It makes those with more ability than their peers less likely to apply themselves because it implies only those with less ability need to do so, and it makes those with less ability than their peers less likely to apply themselves because it implies the cards are already dealt and only those who already have more ability will ever have it. There's no shielding anyone of the fact that they have more or less ability at various things than other people at a given point in time. The trick is learning how people get good at things, knowing that it's possible to get better at anything with work, and feeling good about working at something even when others seem to be having an easier or harder time at it. In other words, it's about teaching self esteem, and that's difficult. But we're starting to understand how too much praise can be bad for self esteem.

Throughout my education, I had always wanted (but hadn't always known I'd wanted) a study subject that covered work and study skills directly: what to expect (when it's easy, when it's hard, when it seems like you can't get any better), what skills are involved (memory, abstraction, persistence) and how to improve them (drills, creative application), techniques for handling specific kinds of challenges (taking regular breaks, free-writing, flashcards—seriously, nobody told me how and when to use flashcards), the simple fact that some things are difficult and they're supposed to be difficult. When I was in high school I found a book on these subjects and was astonished that nobody was teaching that material in school. Most schools just assign work and expect students to discover the skills needed to do it. (Sadly, I didn't buy the book, and haven't found it since.)

So when I say I hope my kids never believe the myth of natural ability, I mean that I hope they learn how to do and enjoy hard work, regardless of their ability. Calling natural ability a myth is a mind hack: It's not the case that everyone is capable of everything, or even that all skills are formed environmentally. Even hard work itself may be out of reach for some people. But an extreme fatalistic view is a more natural state for young people than its opposite, and this can have serious negative developmental effects.