David Findlay

Bug Labs Community Site


BUG Community Banner

Bug Labs just made their community site official. You can find it at:

http://community.buglabs.net/


I’ve posted a few things up there so far. I think it’s a neat idea: letting the community share what they’re working on and what they’ve figured out. You could sort of do that on the forums, but the new site is much more feature-rich. It isn’t even restricted to projects directly involving the BUG; here’s an example.


Disclaimer: I’m doing some consultancy for Bug Labs now; but that is because I like the BUG and the folks at Bug Labs, not why I like it/them. :-)


Drawdio

A friend at work put me onto ladyada’s blog recently. I’m a fan of her work: I built her MiniPOV kit a while back and really enjoyed it, and I’d recently picked up a couple of Arduino shield kits from her (that I haven’t had time to build yet), so I was interested to keep up on her projects.

On her blog I came across the Drawdio, a kit originally designed by J Silver (http://drawdio.com). It uses a standard pencil and generates fun sounds using the conductivity of the carbon in the ‘lead’.

Here’s my one:



I had been looking for a quick and cheap project to tryout my new soldering iron anyway, and this seemed to fit the bill; plus, the kids would like it, right?

It only has a few through-hole parts so it doesn’t take very long to assemble the kit at all, even for someone as inept at soldering as I am (loving that Weller WESD51 by the way: beats the pants off my old chisel-style iron).

The end result is pretty fun to play with, the only negative being that it could stand to be a bit louder. I’m not sure if I’m up to it, electronics-skillz-wise, but maybe I can hack in an amp someday?

Here’s a video (with apologies for the hairdryer sounds of my knoppmyth box’s fans in the background), so you can hear what it sounds like:

Still Here

I’m still here — really. Work has been mad as always, my son just started Kindergarten and my daughter just started Second Grade, and I’ve been building a chicken coop too.

I’ve also been doing a fair bit of mucking around with building the upcoming R1.3 release of software for the Bug. They switched their build system from LTIB to Poky Linux:



That Poky Linux beaver may be the cutest darn thing I’ve ever seen, but I digress. The Bug now sports the Matchbox window manager rather than old man twm (we’ll miss you xeyes). It looks great, and the new touch screen driver is much more responsive than the old one. More on this when I’ve had more time to play with it.

For kicks, I just uploaded my Technical Books shelf (okay, the only one I bothered to scan books for at all) from Delicious Library to MobileMe. They did a pretty nice job making it look shiny:

Delicious Library

I feel compelled to point out that the old ActionScript books are there because of my wife’s Chumby (stagnating plans to write a widget for it).

Okay, back to reading some Arduino stuff…

Accessing the OS X Services Menu programmatically

Work has been exceedingly busy lately, but I have found some time to get most of the way through Aaron Hillegass’s excellent 3rd edition of Cocoa Programming for Mac OS X.

The book is well written and well organized. I’m an experienced non-Apple programmer, but this was my first foray into Objective C and Cocoa, and my first time using Xcode. As a C++ guy, I can’t always bring myself to like the way Objective C goes about things, but there is a certain elegance in its simplicity. I’m also impressed with Xcode and with Cocoa. I’ve never done much in the way of visual programming, but I am obliged to use Visual Studio for work, and on occasion (I don’t know MFC, really, I don’t) I’ve done some minor GUI stuff with it and always found it most distasteful. Cocoa and Xcode just blow it away: proper separation of model, view and controller!

Falling back to my non-visual roots, I thought it would be interesting to see what it would take to make a command-line utility that would open up a list of files in Aquamacs Emacs (like mate does for TextMate). (Aquamacs Emacs will accept multiple files via open -a Aquamacs\ Emacs, and I have an alias set up to do that, so I don’t actually need this utility, but it fit the bill for a good, small, learning task.)

I struggled a bit with path manipulation - there has to be a better way to convert from relative to absolute than I came up with - and I only made it open one file, although it would be trivial to add a loop (multiple service calls - it won’t take multiple files in one) to cope with that. I also had to do a bit of googling to figure out the incantantion to get my file onto the pasteboard properly.

So, it’s certainly sub-optimal, but it does at least work. Here’s the code. It just takes the (first, absent the loop) file name from the command line arguments, places it on the appropriate pasteboard, then invokes Services/Aquamacs Emacs/Open Selected File.

Radiohead Nude Remix

This remix of Radiohead’s Nude by James Houston is strangely wonderful. I haven’t seen an EPSON LX-86 in ages...(hang on until at least 1:10 in before you give up)


Big Ideas (Don't get any) from 1030 on Vimeo.

More details here.

From iSight to Chumby with love

Since my wife got her Chumby, I've been reading up on ActionScript. It's not been a terribly amusing process, and I haven't had much time to devote to it, so I haven't gotten any further than a prototype recipe chumbifier widget so far.

Then the other day I was perusing the available widgets on chumby.com and came across, in the web-cams sections, a widget that will display and poll an arbitrary image given a URL. I thought it might be fun to make a self-spy cam, as it were, and have my MacBook upload the iSight camera image every few minutes while I was work. Then my ugly mug would show up on my wife's Chumby, between Chuck Norris Facts and the San Diego Zoo's panda cam.

My first thought was to use Automator for this task. It has iSight support, and Transmit has Automator support, so it should have been pretty easy to take the picture and upload it to one of my websites. But Automator apparently insists on doing the 3-2-1-beep/flash means of taking a picture, as in Photo Booth. Putting up with that every few minutes would be irritating to say the least. So I did a quick google and came across isightcapture. isightcapture is a command-line application that captures an image from your iSight camera and saves it to file. It was a simple matter to put together a shell script to capture the image and then use scp to upload it to my web host (I already had SSH public key authentication configured on the host, so I didn't need to worry about having to enter a password).

This is pretty good; we have our image automatically taken and uploaded, ending up with something like this:

Raw

Tweaking the Image
So far, so good; but there is room for improvement: 1) at 640x480 it's twice as big as the Chumby wants; 2) how would my wife know when the picture was taken? isightcapture can resize the picture, but let's pretend it can't. My wife likely doesn't care when the picture was taken, but let's pretend that she does. Humour me here, okay?

Is there something out there that could solve both of these problems? Something free? Why yes. Enter ImageMagick. ImageMagick is an excellent full-featured image manipulation toolkit; indeed, you will see it prominently featured in the Acknowledgements section of Pixelmator, for example. It also is command-line driven, which is perfect for what I wanted to do here: resize the image and annotate it with a timestamp prior to uploading it. So, I built ImageMagick via via MacPorts and added a call to its convert tool to my script with the following options:

+contrast +contrast +contrast -noise 3 -resize 320 -stroke blue -fill white -pointsize 18 -font Arial-Bold -annotate +20+20 "$(date '+%a %m/%d %H:%M')"

That's a bit of a mouthful, so let's break it down:
+contrast +contrast +contrast bumps up the contrast a little, as my iSight happens to face a window in my office;
-noise 3 denoises the image, which looks pretty pixelly in the poor light of my office;
-resize 320 resizes the image proportionally to a width of 320 pixels;
-stroke blue -fill white sets the text to be white with a blue outline;
-pointsize 18 -font Arial-Bold sets the text to be 18pt Arial Bold;
+20+20 sets the text origin at 20 pixels in and down (respectively) from the top left-hand corner;
"$(date '+%a %m/%d %H:%M')" runs the command-line date program to get the timestamp in the format that I want: Sun 05/04 23:28

Running convert on our raw image with those options gives us:



Great! We now have an automatically-annotated image.

Automation
Now all that remains is to automate the process of running the shell script every few minutes, so that the image the Chumby will download from the website will actually change.

You could use cron or launchd for this. Unfortunately, Apple recently changed things so that isightcapture wouldn't work from background daemons, likely as part of some security update. Fair enough, I suppose. To get round this we must introduce another quirk: a little AppleScript to make our script execute in the user's 'face', so that it can access the camera. To do this open up Script Editor and create a script with a line similar to the following:

do shell script "/Users/dave/bin/grabme"

Save your script out as an application. In my case I made it grabme.app.

Now we can set up cron to run our AppleScript for us, by adding a line to our crontab:

0,15,30,45 10-17 * * 1-5 open /Users/dave/bin/grabme.app

This example will take a picture every 15 minutes between 10am and 5:45pm, Monday through Friday.

On the Chumby
So now we have our image automatically captured and uploaded when we want it to. The next step is to configure the Chumby to display the image. In the widget selector on chumby.com, go to Webcams and then choose Load Image From URL. Put the widget in the channel you of your choice and then customize it with the URL your image is available at. Be sure to select the prevent Caching radio button.

After all that you should be "rewarded" with:

iSight on Chumby

ShareBuilder lets me down: Trusting Email Delivery

I opened a ShareBuilder account in January so that I could buy a single share of Apple when it dropped from $200 to $130. I have an ING Direct account, and they recently acquired ShareBuilder, and with their no minimums approach it seemed to be a good fit.

So, I bought my share for $130 plus a $10 transaction fee and didn't think much more about it. I set up the Stock widget in Dashboard to watch AAPL and was pleased to see it up to around $167 this week. Then I got an email from ShareBuilder acknowledging the transfer of funds from my account. I was very concerned, since I had made no such transfer. I immediately called them, and they told me that they had closed my account because they were unable to verify the information I had supplied when opening the account. They couldn't even tell me what part they had a problem with. Apparently they had sent me an email about it back in January; an email that I never received. One...single...email. I explained I had not received the email and they confirmed they had not bothered to make any kind of follow up whatsoever: no second email, no phone call, nothing. So they sold my share for the exact amount I originally bought it at and initiated the transfer of the money back to my checking account.

Nice, huh? Who on earth uses a one-time email for something as critical as this? I don't expect personal service from an online provider on a daily basis, but I don't think it's too much to expect them to be a little more proactive before choosing to sell my portfolio and close my account. Now, I'm only out $30 so far on them selling my share before I wanted to, but what if I'd bought 1000 shares? Plus, how annoyed am I going to be once Apple's back to $200 and head north from there?

As you can imagine, I declined their pathetic offer of one free trade and the 'opportunity' to go through the activation process again.

BUG Unboxing

BUGbase
My BUGbundle arrived yesterday. I put a set of unboxing pictures of it on Flickr. I pinged Engadget after I posted them, since they've been following the BUG for a while. I didn't really expect them to pick it up, but they did. My Flickr stats will be forever skewed ;-)

UPDATE:

Yup, 30000+ views of those Bug pictures in the last day and a half:

Flickr Stats

New British Coins

Okay, so this isn't really tech-related, but the new British coin designs are seriously stylish!

New British Coins
Thanks to Gruber for the link.

Come in Chumby

So, my copy of Linux Journal arrived in the post the other day. I happened to show the front cover to my wife, and happened to point at the Chumby that was featured there. She saw what it could do and asked for one for her birthday, which happens to be just around the corner. So now I'mshe's getting a Chumby! I know I'llshe'll like it a lot.

I've been looking at the Chumby for quite a while, but the flash-only GUI put me off. However, the LJ article points out that you can save OpenOffice presenations to flash, and of course Keynote can do that as well. In the article, the author used that to create recipe cards that you could view on the Chumby, which I thought was a great idea. The Chumby folks are keeping the device as open as they can, so there should be opportunity to do some good ol' hackery on it too.

For example, if you
turn on a slightly hidden setting, you can enable SSH, and you get this neat welcome message when you sign in:

Chumby SSH Welcome Screen

It runs the Freescale iMX21 processor, which is a little old in the tooth - stuck on a 2.4 kernel for example - but still, it should be fun. By comparison, the Bug runs an iMX31 on a 2.6 kernel, but then it goes for $549 and the Chumby is only $179. My only real concern with the Chumby is the feeds concept, where it seems possible that they might push stuff to your Chumby that you didn't necessarily ask for, like adverts for example. But even then, since it's open you could just stop pointing it at their site and do your own thing.

I'll post back once I've had a chance to play with itset it up.

Larry Lessig using Keynote

Video of Larry Lessig's Keynote slides while talking at Penn. Very interesting, and effective style. I wonder what sort of clicker he's using: the standard Apple Remote maybe?

Cabel Sasser's talk at C4

I just finished watching Cabel Sasser, from Panic Software, talking about the design and development of Coda, their website development application, at the C4 Macintosh Developers' Conference. He's a great speaker: very dynamic, and funny, and his mannerisms bear an eerie resemblance to those of someone who used to work with me. His Keynote slides were good too; I must remember to include a vomiting kid in my next presentation!

Here's the video from the talk; highly recommended.

Lambda Functions and Closures officially in C++0x

Herb Sutter just posted about the most recent ISO C++ Standards Meeting. The most exciting news is that lambda functions and closures have been officially voted into C++0x! This is really going to make taking advantage of the Standard Algorithms much more straightforward.
Here's a little taste from Herb's post:

In C++0x, you can just write:
// Calling find_if using a lambda, in C++0x:
find_if( w.begin(), w.end(),
[]( const Widget& w ) -> bool { w.Weight() > 100; } );

Yes, you can already achieve the same thing today, with a standard binary predicate and a helper, thusly:

find_if(w.begin(), w.end(), bind2nd(greater<int>(), 100));

but it isn't nearly as easy on the eye, is it?

Lambda functions will also make it a lot easier in situations where now you'd be forced to use a custom predicate; previously you'd have to: create a functor; remember to make it inherit from std::unary_function or std::binary_function for completeness; stick it in an anonymous namespace (optional but recommended; and finally, use it in your invocation of one of the standard algorithms. That works, but if you're coding a for_each, because you're trying to be good and not write a loop on an STL container by hand, then having the interesting part of the loop in a functor makes the code much harder to follow: instead of it being right there in the loop, it has to be somewhere else, breaking up the flow of the logic in the poor reviewer's head.

New Look

As you may have noticed - in the unlikely event that: a) you're reading this at all; and b) you're not reading it in a news reader - that I switched the site from RapidWeaver's built-in iPhone theme to seyDesign's dogPress theme.

I am still not happy with it, but then I can't do web design for toffee, so I'll just have to be okay with the fact that it at least looks a tad better. It's still too narrow, and I had to pants around making the images smaller as the hard edge now makes them look awful when they stick out. RapidWeaver makes this inconceivably (I'll wait for you to reminisce about the Princess Bride here...okay, let's continue) painful. It lulls you into a false sense of security, because it does have a built-in feature to let you scale images, right in its Media Inspector:

RapidWeaver's Media Inspector

Handy, right? Well, the problem is it that if you check "Scale Image" and start modifying the percentage, it does not update the height and width values shown below, or show the new values anywhere else that I could see. My theme has a constrained width for images of about 465 pixels, which I determined from experimentation. If scaling would update the size fields, I could just reduce the percentage until the height showed 465. But, because it doesn't, I have no choice but to disable it and scale the image by hand. So I enter the height of 465 and then determine the new height with 465/original-width*original-height. The only saving grace here is that Spotlight will do basic calculations right in its search window:

Spotlight Calculator

Very handy, but RapidWeaver should not have made me use it in the first place.

RapidWeaver also won't let you preview old blog posts; normally that wouldn't be an issue, but it was for me when trying to find all the images that were too wide for the new theme. I ended up publishing the site as-is then using Safari to walk though it all and find the problem articles.

I picked the blue variant of the dogPress theme and tuned the title and sub-title colours a little. I then used a photograph of The Gateway Arch in Saint Louis to make the header my own. Here's the original shot:

Gateway Arch

I took this in 1992 with my Olympus μ1, a very compact and cool-looking (IMHO) film camera. I held it against the side of the arch pointing up; if you look closely, you'll see the observation windows at the top of the arch in the center of the image.

So whaddya reckon? Less or more ugly than before?

SQLite

We've incorporated SQLite* into a project at work recently. If you haven't come across it before, SQLite is "a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine". Pretty good for a library that weighs in at less than 250KB, huh? It's also trivial to embed, with its amalgamated version (where much of the precompilation is done already) consisting of just one C source file and one header file. There are also wrappers for SQLite's C API available for lots of languages, from .html to Tcl/Tk; there's even an ODBC driver for it if you're into that sort of thing.

You can use a command line tool to interact with the database, or more commonly, you can integrate the library into your application directly. It's very full featured, with only a few SQL features missing (right outer joins, updatable views, foreign key enforcement, and a couple of other things), so you can perform some pretty powerful operations on your data right out of the box.

Transactions use a journal file, so if power is lost during an update, SQLite will automatically rollback the incomplete transaction when power is resumed. This robustness, couple with its size, makes SQLite very popular with embedded device and cell phone manufacturers. It's used in many cell phones, and it is embedded into Apple Mail and many other common applications, including Firefox.

The implementation of SQLite is pretty interesting, in that it compiles statements to byte code for its own virtual machine when you prepare them. The command line tool even has an EXPLAIN command that lets you see the byte code that a statement will generate, so you can see how it will run and potentially do some optimization. The code is well written and well documented. The code base has a 60/40 split between test code and source code and its regression tests have 98% code coverage. I wish I could say that about all of the projects that I've worked on over the years.

Here's some resources if you would like to find out more about SQLite:

- Leo Laporte and Randal Schwartz talked to SQLite's author D. Richard Hipp recently on episode 26 of the FLOSS podcast.

- There is an excellent book on SQLite by Mike Owens. It covers all aspects of SQLite, from its inception to writing extensions for it. There's also a couple of chapters that provide a nice introduction to relational database theory, and SQL. The only bad thing I can say about this book is that its index is next to useless.

- There's also a nice video of D. Richard Hipp presenting "An Introduction to SQLite" at Google in May of 2006:




*Pronounced ess-que-ell-lite according to its author (and he should know).

Firefox 1.0: the NY Times ad

As the release of Firefox 3 draws nearer, I thought it might be fun to look back at the NY Times 2-page advertisement from December 15th, 2004. You can get the full PDF from my site, but here's a couple of smaller shots of it:

Firefox Ad: Page 1

Firefox Ad: Page 2


And, hidden in the piece of land eminating from the fox's nether regions, is my name. Can you spot it?

Firefox Ad: Closeup

In the 3+ years since it was released, Firefox has done amazingly well, sitting at around a 17% market-share right now according to netapplications. It pleases me to see an open source project scale to the level that Firefox has, take on the status quo and do so well. Version 3 Beta 4 looks pretty nice on the Mac too.

MythTV on mac

I repurposed my Pentium 4 HT tower a while back (no more Windows!) to run knoppmyth, a custom Linux distribution for MythTV that makes it as easy as possible to set up a beige box as a PVR. In our house, this box's primary purpose is to record Spongebob Squarepants ad infinitum, with the occasional Daily Show with John Stewart thrown in for the adults. It works great; I don't even have a monitor hooked up to it anymore, just the TV with the Hauppauge 350's IR sensor hot-glued to the front.

MythTV is often used just like this, with a single machine hooked up to a single television or monitor. However, it can also act as a media server for your network, making all the recorded shows, your music files and pictures available to any other machine on your network running the MythTV frontend. So, I was pleased to fine pre-built binaries of the MythTV frontend for OS X over on their wiki. I downloaded one from The Snider Pad and didn't have too much trouble getting it up and running. All I had to do was change the permissions in the MySQL configuration file on the MythTV box to allow non-localhost connections (set bind-address to 0.0.0.0 in /etc/mysql/my.cnf). After that, I could sit on my bed with the MacBook on its 802.11b connection and watch any of the recorded shows, or live TV even, remotely from my MythTV box.

Here's the main menu:

MythTV menu on the MacBook

From there I'm only a couple of clicks from:

A yellow sponge character on MythTV

...wait, that's not the Daily Show...but I haven't seen this episode before...

The Way of the Brew Peg

I've been a software engineer for quite a while now. How long, you ask? Let's just say that the waterfall model was state of the art when I was studying* for my CS degree. Actually, despite it being the title on my business card, I've always been reluctant to refer to myself as an engineer; writing code has always seemed to me more of a creative process, than one of precision as would befit the title "engineer". Code is constrained more by the experience and imagination of its creator, than by such practical considerations as capacitance and resistance that are the realm of an electrical engineer, to whom the title of engineer seems far more apropos.

But that isn't to say that the work days of we code monkeys are entirely devoid of process. I think it is terribly important to learn from the mistakes we've made in the past. We've learned that customers could not reasonably be expected to completely understand up front what it is they wanted a computer program to do; and so, the rather rigid waterfall model fell by the way side. In its stead we now see predominately iterative models, with Agile seemingly leading the charge these days. This is all good progress, barring the odd self-indulgent wallowing in buzzwords that we've seen along the way. Still, I'm not much of one for blind faith when it comes to software development models or design practices; I don't particularly try and follow any given formal method of decomposition during design, or care whether a particular refactoring I just did has a cool name. So what do I do?

I follow The Way of The Brew Peg:

Brew Peg

So what the heck is The Way of the Brew Peg? Well, at work we have a large coffee pot. It is filled often, as you might imagine, but there's a problem: it's very hard to tell, without stooping down and peering between the filter cup and the pot, whether the coffee is still brewing. Hence, there have been many cases of still-pouring coffee making its way onto the counter and floor as one poor caffeine-seeking soul pulls the pot out prematurely. Sure, an upgrade to a fancier coffee pot might have done the trick: had a glaring brew-indicator lamp, or a locking mechanism of some form. And we even have one of the most imposing looking coffee-in-a-teabag-thingies too.

But you know what works great? A plain wooden clothes peg clipped to the handle of the pot. When your sleep-addled brain tells your hand to pick up the pot, your hand spots the impediment in its path and quickly relays caution back to the brain. Those two small pieces of wood held together with a spring have saved you from embarrassment, a potential scalding and some floor cleaning.

The brew peg keeps me grounded. So while I consider the possibility of reuse when defining objects and interfaces, the brew peg stops me from taking that consideration too far, so that the intended purpose - right here, right now - of that object or interface is not compromised by some potentially nonexistent future need. The brew peg is the physical embodiment of practical simplicity; and, it's comforting to have an actual physical mnemonic in my design process to balance the otherwise overwhelming abstractness of it all.**

So when you're writing that next design document, or defining that API, remember the brew peg. It may not have the pizzazz of a YAGNI or a KISS, but will they keep you from burning your hand?


* where by studying, I mean: playing Super Nintendo while watching Neighbours and listening to "Fools Gold 9:53" by The Stone Roses (played at 33 RPM even though it was recorded at 45 RPM)

** which is also why I like woodworking, as awful as I am at it

Can't do web design for toffee

mmm, toffee

I haven't posted in a while because I have been playing with blogging tools. I currently use RapidWeaver, but it bugs me in a Microsoft Word sort of way; well okay, it's nowhere near that annoying, but still an annoyance nonetheless. It just does things the way it wants to, rather than the way I want it to. It's a bit for flexible than iWeb, granted, but its themes are not nearly as pretty, either.

To satisfy my curiosity about what else might work, I set up a couple of Wordpress blogs (one canned, one not), and a Movable Type blog (way not canned) on my webserver. I then downloaded the much-acclaimed MarsEdit 2, a blog publishing application for the Mac. At first it seemed surprisingly bare-bones (although it's not from barebones), but that actually isn't a bad thing; I suppose I just expected it to be flashier based on what I had heard about it. It has an intentionally non-WYSIWG editor, and the developer in me likes that; needs that even. Besides, Gruber uses it, so it has to be good, right? So, I played around with it some more, and I started to really appreciate being able to set up a post the way I wanted it set up.

But part of me still wanted more control. The little developer in my head, who forgets that I can't do web design for toffee, was saying "let's do this using hand-crafted-with-love XHTML and CSS". I got as far as purchasing cssedit, a really great CSS utility from macrabbit software. I love how you can use it to override the style sheets on a site and tweak them live: really neat stuff. But as I said, I can't do web design for toffee, or any other highly-sugared sweet for that matter (and if you know me, you know how much I like highly-sugared sweets, and hence you know how bad I must be at web design). So, while I have used it to tweak RapidWeaver's themes a little, I haven't really gotten a lot of use from it.

I considered looking at Panic's Coda again. Coda is billed on Panic's site as "one window web development"; it includes a text editor, CSS editor and a cut-down version of Transmit - Panic's excellent FTP/SFTP/etc tool (which I use often). I played with Coda back when it came out, but I didn't care to learn another text editor (it uses SubEthaEdit); and, as I mentioned before, I can't do web design for toffee, so creating the CSS from scratch likely wasn't going to work out well for any passing viewers' eye balls or sensibilities.

So what to do? I think I could get either Wordpress or Movable Type to look the way I want, or as close to it as my can't-do-web-design-for-toffee skillz will allow (thank you, cssedit). I would then have to figure out how to get all the old posts out of Rapid Weaver. It stores your site's data in a single binary project file, so there doesn't appear to be an easy way to extract the individual posts. I could try and scrape the appropriate tags out of the rendered HTML but that seems kludgy at best. Maybe if I create a RapidWeaver them that has next to no formatting and publish that, the scraping might be easier?

As I continue to ponder, I will stick with RapidWeaver. Maybe version 4 will make me okay with staying the course?

New Hitachi Drive

So, within 10 days of me buying Hitachi's Travelstar 7K200, they have come out with a Travelstar 5K320. Luckily for me, that 5K prefix means that it's only 5400RPM though.

Travelstar 5K320

If Apple gives you lemons, make lemonade

When OS X 10.5.2 came out, with its associated graphics update, it broke the ability for my PowerMac FW800 to resume properly from sleep. It would go to sleep just fine, and it would seemingly wake up from sleep just fine too. However, it would not enable power to my monitors. I found that other users reported the same problem on Apple's forums. I even connected via Screen Sharing and could see that the PowerMac was functioning fine; it just wouldn't turn on its monitors.

So, Apple gave me a lemon upgrade; could I make some lemonade here?

I have a USB 2.0 PCI card in the PowerMac, but even back on Tiger, if I put it to sleep with a power-drawing device attached to that card, it wouldn't sleep properly and I'd have to power cycle it to get it back. So, I had gotten into the habit of keeping the USB cable for my SD card reader unplugged from the reader, but plugged into the PCI card: a pain, but better than trying to copy 7MP images over USB 1.1.

For backups, I used to have the computer wake itself up at 3am. I had SuperDuper scheduled to run at 3:05 and then put the computer back to sleep.

Since sleep wasn't going to work any more, I changed my backup schedule so that SuperDuper would run at 12:30am and then power the computer off. I then changed the scheduled wake up to be at 7am, a few minutes before my wife would get up and check to see whether or not our daughter's school was on a 2-hour delay.

The wakeup feature is accessible via the Schedule... button on the Energy Saver panel in System Preferences:


Energy Saver Schedule


This did the trick nicely, because the scheduled wake up works even if the computer is off. So now, while I can't enjoy the power-saving benefits of sleep, I can at least keep my backup running out-of-hours and still avoid having to leave the PowerMac running 24x7.

I think that qualifies as lemonade, even if it's only Country Time and not the real stuff.

Update:
There is another discussion going on on Apple's forums about a possible fix for this sleep issue. Basically, it involves rolling back the drivers in the graphics update in a somewhat kludgy fashion. I think I will just wait until Apple releases a real fix though.

New Drive: Update

So I've had the 200GB, 7200RPM, Hitachi Travelstar™ 7K200, in the MacBook for almost a week now. The first night I had it, I had it copy our entire iPhoto and iTunes libraries from the PowerMac. I"ve also added a Fedora Core 8 VM to go with my Windows XP VM, and I've turned on iDisk syncing.

So what's left now:

Hitachi drive, after one week

- 56GB, which means I've gobbled up 80GB with the aforementioned stuffed, but still a goodly amount left for more cruft - huzzah.

On the speed front, it seems to be peppier, but I could be imagining that since it never felt all that slow anyway, even with the 5400RPM Toshiba in it. I also don't notice any more noise or heat. I haven't yet run off-grid long enough to see if battery life has been reduced.

So far though, I couldn't be happier with the upgrade. I now have all of the movie files from our digital camera on the MacBook, so I can put them together in the new iMovie; I couldn't do that on the PowerMac as it's too old for the new iMovie to install on. It's also nice to have all of our music with me, since I sync my Nano to the MacBook (mostly just for podcasts for my commute, but occasionally I'll listen to some tunes).

You don't know the power of the darkside MacBook

I was catching up on some work tonight. I had a Visual Studio 2005 application running on an XP machine, connected via TCP/IP to a Java server application running on a Fedora Core 8 machine. During compilation, and commits to source control, I was going through my news feeds in NetNewsWire on my MacBook.

No big deal, right? Well, the interesting thing is that only the MacBook was a real machine: the XP and Fedora machines were actually virtual, and running on the MacBook courtesy of VMWare Fusion. It hit me just how much computing power we have at our disposal these days: a 15-month old consumer-grade laptop running 2 virtual machines plus its own applications, all simultaneously and without any perceptible slowdown: this is not even a MacBook Pro!

Here's what my Spaces-plus-Expose view shows me (Spaces is Leopard's multiple-desktop implementation, and Expose is OS X's way of showing you all the active windows on your desktop, so you can pick one to switch to; in true Apple-cool fashion, if you bring up the Spaces view and then ask for the Expose view it shows you the Expose view for each one of your desktops simultaneously):

Spaces plus Expose view of my MacBook

In the top-left we have space number 1, where: I have started to write this post in RapidWeaver; iTunes is running (that's Californication from Red Hot Chili Peppers at the front, if you were wondering); Transmission is seeding the Fedora Core 8 DVD ISO; OmniFocus, iChat, Terminal, Mail and Safari are all doing their thing; and Activity Monitor is letting me know how this is all going. It's not shown, (eggs, chickens and what not) but I had Pixelmator going as well, long enough to blur a couple parts of the screenshot to protect the innocent.

In the top-right, the Fedora 8 VMWare Fusion virtual machine is running a Java server application and its database backend.

In the bottom-left, NetNewsWire is keeping me up-to-date.

Finally, in the bottom-right, the XP VMWare Fusion virtual machine is running Visual Studio 2005 debugging an MFC application; by the way, I don't know MFC.

Here's a close up of Activity Monitor, with the memory tab active, sorted by descending order of use of real memory:
Activity Monitor

The big hitters, unsurprisingly, are the two virtual machines, weighing in at around 500MB each. They were both configured with 512MB of RAM, so that makes sense. Next we have the kernel, close followed by RapidWeaver (the application that I use to write this). From there you're down in the weeds of measly 60MB chunks of RAM here and 40MB chunks of RAM there. From the stats at the bottom, you can see that there's 369MB (sum of free and inactive) of RAM free (see this Apple article for an explanation of the different categories of memory).

And just think, if you buy a MacBook now you can fit 4GB in it and the integrated graphics are faster than mine. How many VMs can you run?

New Hard Drive

lots of free space!

I replaced the hard drive in my MacBook today with a new 200GB, 7200RPM, Hitachi Travelstar™ 7K200. I had read several reviews, all favourable, and supposedly it doesn't use much more power, or get much warmer, than the stock Toshiba 80GB. I use VMWare Fusion to run an XP VM and an OpenSolaris VM, so the 74GB on the stock drive wasn't cutting it. I ordered the new one from MacSales and picked up a Newer Technology USB 2.0 Universal Drive Adapter at the same time; it lets you hook up just about any bare drive to a PC or Mac via USB 2.0.

I hooked up the new Hitachi via the adapter and used Disk Utility to create a single 185.99GB partition. I set it up with 'GUID Partition Table' as the Partition Map Scheme, since that's required on Intel Macs for boot volumes. I then had SuperDuper make a bootable image of my existing hard drive, which took a couple of hours.

Once I had that, I rebooted while holding down Option so that it would let me choose a boot volume on boot. The Hitachi showed up - a good sign - and I selected it. It came up, I logged in, and everything looked good, so I shut it back down and proceeded to swap the drive out. Fortunately Apple makes this about as painless as it could possibly be; providing you follow common-sense precautions for ESD you shouldn't have any trouble. I printed out the instructions at
MacInstruct and headed over to our hardware lab at work, since it has copious amounts of static-mat-covered workbenches and the Torx T8 you need to get the shield off the old drive. 10 minutes later I was up and running on the new drive.

I should have named the new drive 'Macintosh HD' to match the old one, but I didn't and both Time Machine and Spotlight got a bit excited when I booted up. But my old Time Machine drive isn't going to be big enough for long, and I don't need any of the history that's on it anyway, so this wasn't a big deal for me.

I'll report back on whether the RPM bump affects battery life and performance.

SuperDuper! for Leopard is here

Today is a great day. Shirt Pocket have finally released their Leopard-compatible version of SuperDuper. As we speak I'm ditching my last Tiger SuperDuper backup and replacing it with a Leopard one. I've had Time Machine running since November but I'll breath easier with a bootable SuperDuper clone to go with it.

BugLabs update

Well a lot has happened on the BugLabs front since last I posted: the bug won CNET's Best of CES award for Emerging Technologies; they opened their store to early adopters today; and they let me know that they're sending me a very generous gift!

Back in November, they had an "application cook-off" that I co-won with koolatron. Jeremy, the BugLabs marketing guy had said "prize details forthcoming" back then, and I'd pretty much forgotten about it until I watched the
Engadget video with Jeremy at CES. I sent him a friendly reminder after he got back from CES and he wrote back with:

Was waiting til Monday to do this, but hey, it's the weekend, why not?

We're going to be sending two BUGbundles out, one for you, one for Koolatron. So you get the BUGbase and all four shipping modules, and we'll send you the "von Hippel" module when it's ready!

Sorry for the long, long wait - we had planned to do this some time ago, but the snag we hit early on in manufacturing basically nixed our whole approach. But, we're back up and running now...


I was amazed. The kit's early adopter price is $549, so they are being exceedingly generous. I didn't spend nearly enough time with the bug to warrant that, but now that I have actual hardware coming I will need to get back into working on some of my apps.

I took a gander over to
bugnet and saw that, now that the beta is open, the apps are getting a lot more attention. One person even commented on mine about a typo; in this case one that was in the SDK last time I had compiled the app, but which has since been fixed by BugLabs. In the closed beta there were a lot of crickets chirping after the initial excitement, so It's nice to see the community around the bug starting to come alive.

I have to say, I'm excited to be getting a bug. With my intention to be more frugal in 2008, I had written off my chances of getting one to play with, but now I'm going to get one guilt-free! Maybe I will finally get round to making that
GpsLogger do some actual logging.

Bye Bye OLPC XO

So, I ended up putting my OLPC XO up on eBay. Some nice chap from Mexico picked it up for far too much.

I felt good about the donation part of the Give One Get One program, but not so good about adding $400 to my ever mounting AMEX bill. I had some grand ideas for working on some Python apps for it, playing with the Sugar frontend, and some other stuff. But, I realized over the Christmas break that I really wasn't going to have the kind of time to dedicate to it that would be required. Also, my kids are spoilt by access to nothing slower than a PowerMac G4, and so there wasn't much to offer on the XO that they didn't already have quicker access to, with better input devices, and a better screen, on the Mac.

Now, that's not to say that I don't think that the XO is a worthwhile device. I think it will be useful to its target audience: children who likely would not have the opportunity to be directly exposed to information technology otherwise. And as the interfaces get a little more polished, and the selection of applications expands, it will become more and more useful. I saw recently that John Negraponte intends to sell the XO officially in the US, as opposed to just via the Give One Get One program that I acquired it through. The success of the
Asus Eee PC shows that at least some portion of the populous has cotton on to the fact that they don't need the resources of the supercomputers-in-PC-clothing that are now available from Dell et al. I do think they will still want something a little swifter than the XO, but perhaps in the educational setting it might just do okay.

I wish it well.