Archive for the ‘software’ Category

Playstation 3 leap year bug

As a big fan of Reingold & Dershowitz’s Calendrical Calculations, I’m always on the lookout for calendar-related programming news. This morning I heard (via @jamesthomson) that the Playstation 3 has a leap year bug that screwed up a lot of users yesterday when it became midnight GMT and the calendar flipped from February 28 to March 1.

In addition to my nerdy calendar interest, there was a family angle. My son plays Modern Warfare online with many of his friends. Last night he told me that a few of them were locked out because they couldn’t get online. It seemed weird that 3-4 kids would have network problems simultaneously, but now we know it wasn’t a coincidence.

Unless there’s a leak out of Sony, we may never learn the precise cause of the bug, but it must have acutely embarrassing for an international electronics giant to have to post this:

We are aware that the internal clock functionality in the PS3 units other than the slim model, recognized the year 2010 as a leap year.

Let’s first note that recognized is the wrong verb; you wouldn’t say you saw Ernest Borgnine in a restaurant and recognized him as Brad Pitt. How about mistook? More to the point: can you imagine spending millions of dollars to develop a product that can’t figure out whether a given year is a leap year or not?

My guess is that the firmware takes every even-numbered year to be a leap year. The PS3 came out in late 2006, too late for the bug to have an affect that year. 2008 was, of course, a real leap year, so the faulty code worked. Yesterday was the first time in the PS3’s product life that the bug would cause a problem.

I’m pretty sure that Sony has no real fix. The solution, like Microsoft’s solution for the Zune’s leap year bug back in 2008,1 was to simply wait until the calendar flipped again. Now that February 29 March 1 is over in the GMT zone, the bug is safely tucked away. If my guess is right, it won’t resurface until 2014, by which time most “fat” PS3s will be out of service.



BBC iPlayer site-specific browser

As I’ve mentioned at great length in earlier posts, I use Audio Hijack Pro to record BBC Radio shows that are streamed over the internet but don’t come in podcast form. Until recently, I’d been using Safari to open the stream URL. Generally, this worked out fine, but if I wanted to browse while recording something in the background, I had to follow two rules

  1. Don’t open any sites that play sounds, as these will be recorded on top of the show.
  2. Don’t quit Safari when I was done browsing, as that will kill the recording.

Sometimes I’d forget to follow these rules and ruin a hour or more of recording. Whenever this happened, I’d try to fix the problem by swearing at myself, but that never seemed to work.

What has worked is creating a site-specific browser (SSB) for recording. I used Fluid1 to create an SSB, called BBC iPlayer, that opens a generic BBC page.

BBC iPlayer, then, is the application whose sound output gets hijacked by AHP.

AHP tells BBC iPlayer to navigate away from the generic page to the URL for the stream. Now I can browse in Safari without worrying that something I do will screw up the recording.

Luckily, the various scripts I wrote for getting the streaming URL from the BBC—all collected in this GitHub repository—are browser-agnostic, so they didn’t have to be edited at all. Only the settings in AHP itself needed updating.

I was going to use the current BBC logo as the icon for the BBC iPlayer SSB, but its horizontal layout doesn’t work well as an icon. So I found a screenshot of the old spinning blue globe logo (the one you’d always see during Monty Python’s Flying Circus) on this BBC logo history page and did a bit of editing.

It doesn’t look great at a small size, but it’s instantly recognizable to me.

One more thing: As you can see in the AHP screenshot, one of my upcoming recordings is of an episode of Radio 2’s semi-regular show, The Record Producers. The subject of this Saturday’s show will be Todd Rundgren. Obviously, I have no idea if the show will be any good (personally, I’m hoping they don’t spend too much time on Bat Out of Hell), but Todd fans will probably want to listen regardless.


  1. Fluid is what I used to create my Twitter client, Dr. Twoot


Hardware cheapskates, unite!

Once again, Clark of Clark’s Tech Blog has relieved me of the pain of writing a post by putting my thoughts into words for me. In this article, he responds to Brent Simmons’ argument that developers should stop supporting Leopard in new versions of their software.

As Clark points out, the big problem with Simmons’ argument is that Snow Leopard is Intel-only. This punches a hole in Point 2 of his argument:

2. People who don’t upgrade their OS are, in general, the kind of people who just don’t buy software anyway. (Particularly in the case of 10.6, given how inexpensive the upgrade price was.)

I do buy software, and I did buy the upgrade to 10.6, but because one of my computers is non-Intel, that machine is still running 10.5. If you want to call me a cheapskate, go ahead, but at least get your terms right: I’m a hardware cheapskate, not a software cheapskate.


Microsoft’s text-like interfaces

Following a link from Daring Fireball, I read this article by Luke Wroblewski comparing the user interfaces of the iPhone and the new Microsoft Windows Phone 7 Series [sic]. The gist of the article is that the iPhone’s information-dense interface makes the user experience more efficient than that of the MWP7S. I agree with Wroblewski’s comparison, but I think he has the cause/effect relationship backward. The inefficiencies of the MWP7S interface aren’t due to the low density of information MS puts on the screen; rather, the screen is information-sparse because Microsoft has an institutional preference for layered, multi-step, inefficient interfaces. This preference goes back to the DOS days of character-based displays.

Back then, the menu of “user friendly” programs typically consisted of a strip of words running across the bottom of the screen. You’d choose one of these words through a set of keystrokes. If you were lucky, choosing that word would actually execute a command. More commonly, it would lead to a new set of words at the bottom of the screen and you’d choose one of them to execute the command. (If you were unlucky, this second choice wouldn’t execute a command, but would lead to yet another set of choices.) This layered approach wasn’t exclusive to Microsoft, it was a pretty common way of writing menu-based programs.

The Macintosh was a huge departure. Considered in the abstract, it didn’t seem like it should be. After all, its menubar was just a strip of words running across the top of the screen, and you had to choose commands from the individual menus. But somehow in practice, this didn’t seem like a two-step process. After a few minutes, you didn’t think “I’m going to click on the File menu, then drag down to the Save As… item,” you thought “I’m going to choose Save As… from the File menu.” The click and drag on the menu became a single step in your mind and in your hand.

The early versions of Word and Excel for the Mac worked like other Mac programs, with almost all the commands in the menus, but as Microsoft further developed Windows itself and the Windows versions of Word and Excel, the Mac versions began to take on the characteristics of their Windows cousins. More menu choices led to dialog boxes instead of actions. Buttons within dialog boxes led to other dialog boxes. It was the multi-layered, text-based interface all over again, just tarted up with a GUI. By the late 80s or early 90s, two clever Mac programs had been converted into clumsy oafs.

And the conversion was Microsoft’s choice. They’d already written programs that were Mac-like, and they could have used that experience to make efficient Windows programs. Instead they made awkward Windows programs and backported the awkwardness to the Mac side.1

That great advance in user friendliness, the Windows wizard, is another example of Microsoft using what is essentially a text-based interface in a graphical environment. At heart, a wizard is a series of multiple choice questions, something every beginning programmer learns to accomplish with write and read statements. The wizard just puts these questions in a dialog box with a (sometimes animated!) picture next to them.

Obviously, Microsoft has hundreds, if not thousands, of really smart programmers and designers on staff. I can’t believe that such talented people would make such poor decisions over such a long period of time if it weren’t an institutional requirement.

Update 2/17/10
I forgot to add that Apple is not immune to clumsy, over-layered interfaces. For example, if you manage two or more email accounts on your iPhone, you know how inefficient it is to go from the Inbox of one account to the Inbox of the other: climb two levels up, then two levels down.


  1. I’m pretty sure Apple’s “look and feel” lawsuit was under way, but I doubt that’s the reason Microsoft took the clumsy route. “Judge, if we had copied Apple, we wouldn’t have such a shitty interface.” 


S5 and Firefox 3.6 on the Mac

Following up on my S5 post earlier this week, I should mention that the recently-released Firefox 3.6 for the Mac has a full-screen mode that’s perfect for presentations. It’s not just that the window grows to the size of the screen, the content area takes over the whole screen—no window chrome, no Dock, no menubar, much like DVD Player. Firefox has had this on Windows for a while, but not on the Mac. Safari has never had it either, unless you installed a plugin like Saft.


The iPad checklist

Early on in yesterday’s presentation, Steve Jobs listed seven tasks the new iPad had to be better at, when compared to either a smartphone or a notebook computer, to justify its existence.

Every task on the list had its own little section of the presentation, and at the end Jobs basically said “We think we’ve done it.” Generally, I’d agree, but not with every item on the list.

Browsing

I give this one to the iPad. For what most people do all the time, and what everyone does most of the time (thank you, Mr. Lincoln), the iPad will be better than a notebook computer because of its direct manipulation of the items on the screen and its greater portability. There will, no doubt, be sites that won’t fit nicely into its 1024×768 screen, but those are few and far between. (I can say this with some authority. My notebook computer is an old iBook G4 with that same screen size; horizontal scrolling is very rarely needed, and when it is it’s mainly because I have my Dock on the side, eating up 50 pixels or so.)

That the iPad will be better for browsing than a smartphone should be obvious. The larger screen more than makes up for the reduced portability.

Email

For many people, the iPad will beat the smartphone and the notebook, but I’m not one of those people. Nor, I suspect, are most of the people who’ll be writing reviews of the iPad, so don’t be surprised to see the iPad’s email client get low marks. If your emails tend to have a lot of writing in them or tend to have multiple attachments, the notebook will always be a better email machine. The prospect of using a real external keyboard with the iPad doesn’t change this; adding a keyboard nullifies the iPad’s portability advantage.

There are, however, people for whom email is mostly a matter of reading and categorizing, with writing that is seldom more than a paragraph or so. For these people the iPad’s combination of portability and size will make it superior, although they may be scared off by reviews of the virtual keyboard written by people who type for a living.

Smartphones are probably still the best email machine for the constant traveler, but I wouldn’t be surprised to find the iPad beating out the smartphone for many of these folks. I often see these people eating lunch at WiFi hotspots, and if the iPad can take over for their Filofax/DayRunner it will also turn into their email machine.

Photos

To me, this isn’t even close. Smartphone screens are way too small and keyboards make notebooks too clunky. Unless its software is extremely badly written, the iPad will be almost perfect for viewing photos.

A sidenote: I like the idea, mentioned in the presentation, of having the iPad act as a digital picture frame when its not otherwise in use. But because the dock connector is on one of the narrow sides, the picture frame will always be in portrait mode, which

Maybe a third party will come up with a better way to use the iPad as a digital picture frame.

Video

Let’s start by stating the obvious: watching video on the iPad will not be better than watching it on a big screen TV or in a movie theater (if you can find a theater with a reasonably quiet audience). But the iPad isn’t supposed to be better than a TV or a theater, it’s supposed to be better than a smartphone or a notebook computer. And I think it is, because it has a better balance of size and portability.

The 4:3 aspect ratio has some people puzzled, and some are scoffing at the letterboxing of wide screen movies. But let’s say Apple was limited to 1024 pixels in the long direction, perhaps by the economic constraint of delivering a $500 product, perhaps by the geometric constraint of making a handheld device that’s less than 10″ in the long direction. Either way, your movie isn’t going to be more than 1024 pixels wide. Should Apple make a skinny device with fewer pixels in the short direction—1024×576 would give a 16:9 aspect ratio—or should it fatten up the device to be more usable for other applications and letterbox the movies? I think the right answer is obvious, and that’s what Apple did.

Update 1/29/10
Take a look at the specs for the 16:9 JooJoo (née CrunchPad).1 Yes, it’s 1366×768 pixels, but it’s also nearly 13″ long, more than three inches longer than the iPad and nearly a pound heavier (2.4 lb vs 1.5 lb for the WiFi-only models). That’s a big reduction in portability, a reduction that Apple clearly didn’t want to make.

Music

As with photos, I think this one isn’t even close, except this time I’d say the clear winner is the smartphone, and there’s no way a larger device could be better. A music player needs only enough screen space to help you navigate your collection; everything beyond that is a waste. The 250 million iPods Apple has sold so far is proof of that. Are you going to walk around town or work out at the gym listening to music on your iPad? Of course not.

Games

I’m not the right person to judge this one, because I’ve never really gotten into playing electronic games. I was in college before video games took off, and I think the mania has to take hold of you when you’re in your early teens at the latest.

I’m not even sure a winner can be declared in this category, because games can be designed—and are designed—specifically for the platform on which they run. For games that fit perfectly on the iPhone screen, the extra real estate of the iPad will mean nothing. The iPad, in turn, will certainly be able to play games that wouldn’t fit on an iPhone. I tend to think the direct manipulation available on touchscreen devices makes them superior to notebooks, but there may be games where the clicking of a few tactile buttons is essential to the experience.

eBooks

The iPad wins this category in a rout. It is the same size and shape as a book (in fact, its height, width, and weight are a very close match to a particular book on my shelf: the first edition of Matt Neuburg’s AppleScript: The Definitive Guide from O’Reilly), which will make it very comfortable to read. I use Stanza on my iPhone, and I like having a few books in my pocket at all times, but there’s no way it can compare to the iPad.

Final score

For me, the iPad would be the winner in 5 of the 7 categories. For a lot of other people, it would win in 6 of the 7. Given that there was really no chance of it being a better music player (what was Apple thinking when they added that category?) this is a damned good score.

Does this mean I’ll be running out to get an iPad in a few months? No. The 7 items on Apple’s list aren’t everything I’m looking for. But they did make a pretty good case.


  1. No, I don’t expect the risible JooJoo to actually be released. My point is that even its vaporous specs don’t look so good when compared to the iPad. 


Simple thanks

Like many people, I first learned of Simplenote through John Gruber’s Daring Fireball post from last summer. I bought the app and liked it from the beginning, even though it had some user interface problems. Using Simplenote paid off yesterday, when I became one of the WhySimplenote contest winners. (Twitter links to these two posts were my entries.)

Winners got a $30 iTunes gift card, which I’ll put to use immediately, and an upgrade to Premium service, which may give me the kick in the pants I need to start work on the syncing script I’ve had in mind ever since the Simplenote API came out. Thanks, Cloud Factory!

My favorite part of the winners announcement was the descriptions of what the other winners were doing with Simplenote. I was particularly taken with Andrew’s entry:

In my college share room, there’s five of us, but it’s my job to get the groceries. Each of us have access to the online component of Simplenote.

Whenever someone remembers something we/they need from the shops (often while daydreaming in lectures), they just type it onto the web app from their laptop.

Then, when I’m at the shops, I just take out my iPhone to look at the collaborative shopping list that’s been generated over the week. I never forget to get anything since I have a list, everyone has everything they need for the week, and there’s minimal stress since everyone can do it in their own time - not when I’m going out the door shouting to ask whether anyone needs anything.

Works great.

This is something I never would have thought of, but it fits Simplenote perfectly. Makes me sure there are more clever uses that I’m missing.


Simplenote, TextExpander, and the scale

Losing weight was not going to be one of my New Year’s resolutions. I just wanted to keep myself from gaining weight over the winter when I can’t ride my bike to and from work. But when I got on the scale a few weeks ago and found myself grazing the 200-pound mark, I knew that I’d already failed at keeping my weight steady and needed to start losing.

There are as many weight loss strategies as there are dieters. My plan is to simply think more carefully about what and how much I eat, and let the scale tell me how well I’m doing. I know that many people are dead set against weighing themselves every day; their theory being that your day-to-day weight fluctuation is too noisy to be a good measure of your progress. But for me, going a few days between weighings is just a license to lie to myself about my intake. I’m going to weigh myself every day and record it to keep myself honest.

I will not, as a general rule, be making the results public. I won’t be putting my weight up in the sidebar of the blog, nor will I set up a Twitter account for my weight as Leo Laporte has.1 This is not about shaming myself into losing; it’s about me keeping score for myself.

I’ll be using my iPhone to keep track of my weight. This is not just some nerdy love of technology, the phone is my most practical recording device. I keep my phone in the bathroom overnight to have it ready when I get dressed in the morning, so it’s already right where the scale is. And, like my car keys, my phone is something I have to pick up and pocket every morning. If I’m going to establish a habit of recording my weight, doing it on the iPhone seems like the easiest way to do it.

I’m sure there are dozens of iPhone apps that will help me track my weight. They’ll probably also graph it, calculate my BMI, and generate an autoregressive integrated moving average model. But I don’t want a new app, I just want to enter the date and weight as efficiently as I can. So I’ve decided to record my daily weight in Simplenote, an app that

  1. launches quickly,
  2. I’m familiar with, and
  3. can be streamlined with TextExpander.

Here’s what my note looks like so far.

I have to put three spaces between the date and the weight, otherwise the iPhone will interpret each line as a phone number and will turn it into a link—underlined and in blue.

I’m typing in the weight exactly as it’s displayed on my scale. It weighs to the nearest half pound, so eventually I’ll have some values that end with “.5” instead of “.0.”

I enter the date quickly via this TextExpander snippet:

The abbreviation is meant to indicate “date stamp”—I put a “z” at the end because “ds” is a combination that can appear in real words. I have TextExpander set to ignore the case of the abbreviation, so “Dsz” (which is what I’ll get at the beginning of the line because of the iPhone’s auto-capitalization) works the same as “dsz.”

The content uses the standard strftime format. Using two digits for the months, days, and years ensures vertical alignment.

There will, no doubt, come a time when I’ll want to graph my weight or do some sort of regression analysis. That’s when Simplenote’s automatic syncing will come in handy. I’ll copy the data from my Simplenote web page, paste it into a local text file or spreadsheet, and analyze to my heart’s content. For now I’m happy just to get into the daily routine of recording my weight.


  1. I know he’s an internet celebrity and all, but doesn’t it strike you as odd that Leo’s scale has almost 1500 followers? 


Why I won’t be switching to BusyCal

After reading Wolf Rentzsch’s review of BusyCal (which I was led to my this Daring Fireball link), I decided to download it and give it quick test run. My initial impression is that its improvements over iCal aren’t enough to justify a switch.

Let me start by saying that BusyCal’s greatest strength—the ease with which it syncs with Google Calendar and with other BusyCals on your local network—are of little value to me. Apart from some very basic information, I don’t share calendars with co-workers (who run Windows, anyway), and my wife uses a paper calendar. Keeping my iPhone up-to-date is about all the syncing I need, so I’m not exactly a prime target for BusyCal.

But one thing in Rentzsch’s review caught my eye:

Simple text box for entering times. You can actually type out “4:23p” into a new event’s start time instead of navigating iCal’s awkward segregated time field.

Entering events in iCal has always been a pain because the hours and minutes are in different fields, forcing you to tab from one to the other. Simpler time entry would be a significant improvement.

What I learned from playing with BusyCal is that time entry is even better than Rentzsch’s description. Yes, you can type “4:23p” directly, but you can also type just “423p” and get the same result. And for an appointment at 3:00 PM, you can get by with typing just “3p.” This is so good it makes the multi-step procedure in iCal seem criminal.

Another nice thing about BusyCal is how it displays holidays in month view—with gray italic text down at the bottom of the day box.

Just like a nicely printed paper calendar. And you can designate any set of events as holidays, so family birthdays and anniversaries will get the same treatment as Christmas and New Year’s Day.

BusyCal also has preferences for showing weather forecasts and the phases of the moon. I particularly liked the way the full moon on New Year’s Eve was displayed in blue.

But there are some downsides. I agree with Rentzsch that weekends are kind of crappy looking. I don’t mind the red date numerals so much, but I really dislike the gray background; it makes reading the text on those days a bit harder and it diminishes the distinctiveness of the blue-gray “Today” background.

I was also disappointed to learn that, like iCal, BusyCal has only one preference setting for the starting day of the week. When I’m looking at a monthly view, I like seeing Sunday as the first day of the week, but when I’m looking at a weekly view, I prefer to start with Monday. This is the way most, if not all, paper calendars are laid out, and I can’t understand why this wouldn’t be an option in any professionally made calendar software. If BusyCal had that option, they might have made the sale.

I say “might” rather than “would” because it’s not clear to me how well BusyCal syncs with the iPhone. According to the BusyCal Configuration Guide, the syncing would have to be done through either MobileMe or Google Calendars. I have no interest in buying a MobileMe account, and my experiments with Google Sync in the past have been disasters. So I have to say that the lack of a direct sync with the iPhone is another mark against BusyCal.1

Update 1/3/10
I’m now pretty sure BusyCal will sync with the iPhone when the phone is docked. I added a test event via BusyCal, closed it, and launched iCal. The test event appeared in iCal, which suggests BusyCal is saving to iCal’s files, which will be synced when the iPhone is docked.

Because I’m not at my office computer (the one I sync my phone to), I can’t take the last step and see if the test event added in BusyCal gets put on the iPhone. I’ll give it a try tomorrow.

This test is more to satisfy my curiosity than anything else. Whatever the outcome, I won’t be switching to this version of BusyCal.

Update 1/4/10
OK, now I’ve run a sync test with my iPhone, and it’s clear that:

  1. BusyCal reads from and writes to the same calendar data files as iCal.
  2. Syncing my iPhone via the USB dock and iTunes works perfectly.

My syncing concerns in the paragraph above were, therefore, unfounded, and I’ve struck them out.

So it looks like I’ll be sticking with iCal and wearing out my tab key as I enter events. Too bad. There’s room for a high-end Mac calendar application.


  1. I recognize that it isn’t BusyCal’s fault that it can’t sync directly to a docked iPhone; Apple keeps that syncing option to itself. But that recognition doesn’t make BusyCal’s syncing with my iPhone any easier. 


O Come, O Come, E-Manual

I spent a good deal of yesterday installing a new GE dishwasher. As always, when looking back on it, I’m dismayed that such a small accomplishment took such a long time. Some of the timewasters were:

But I have to say the most annoying timewaster was the installation manual. GE makes dozens of dishwashers of similar design, and they use a single manual to cover many if not all of them. Because the dishwashers aren’t exactly the same, it’s common to find sections in the manual that don’t apply to your model, so you have to read carefully to avoid following the wrong directions. This checking and rechecking takes up a surprising amount of time.

I’m not blaming GE specifically. In my experience, all manufacturers use generic manuals, and they do it for TVs, refrigerators, stoves—every type of appliance. I guess they think of it the same way they think of using the same motor or power supply across several models: a standardization of parts that leads to greater economy and efficiency.

But the efficiency is all theirs, not their customers’. And I doubt there’s any real economy today in using the same manual for an entire product line.

I can understand the reasons for have multi-product manuals back in the 70s and earlier. The world of printing was different then. It was much less automated, and keeping track of manuals for dozens of dishwasher models would have been a nightmare. Not that a company with GE’s resources couldn’t have done it, but it would have been very costly when compared to the benefit.

The cost argument doesn’t hold up today and hasn’t for years. There are SGML and XML/XSLT workflows that let you define conditional sections of documents. For example, things like “this paragraph and that illustration are included in the manuals only for models SKCK2832 through SKCK2837” are fairly easy to implement. It’s just like #ifdef sections in C source code. All the information for all the models is still kept in one big document, but each model’s manual can be printed with only the relevant parts.

I should mention that despite this post’s title (which I inordinately proud of), I’m not looking for an electronic manual. I still want a printed manual, just one that uses modern technology to make it specific rather than generic. And although my complaint this weekend is with an installation manual, the same complaint holds for user manuals; they’re always filled with instructions that don’t apply to the model I bought.

The cost of creating model-specific manuals is now trivial and certainly worth it in customer satisfaction. Companies are already writing the instructions necessary for all their models; it’s just a bit of programming to hide the instructions that aren’t relevant.

Most important, it would make my Saturdays easier.