13 December 2010

Reviews: Debugging and Write Portable Code

Two books I bought recently were ones I expected to be easy going. They were, but I think they were still worthwhile.

Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems by David J Agans is about, well, debugging. Anything, not just software. It’s full of war stories from many domains (including cars, houses, and Sesame Street). The rules are how to logically approach problem solving, and make sure the problem is actually solved (rule 9). Most of it is common sense, but it doesn’t hurt to see it distilled. And based on the war stories, it’s easy to get wrong. Of potential use to non-developers: there’s a chapter on applying the 9 rules from the Help Desk, when you can't observe directly.

Interestingly, one of his war stories was kind of mentioned in...





Write Portable Code by Brian Hook. I’d had some dealings with Brian when I was at GameHouse, so I knew he knew his stuff. This book too was largely review (I’ve had to deal with getting code to run on different processors and compilers), but again it’s nice to have things spelled out sometimes. And I’d never heard of compile-time asserts or #pragma STDC before. Some of it’s a bit dated (version control in particular — and it must have been written right before the Mac Intel transition), but much of it is stuff you’d still have to deal with when moving between Mac and Windows — or even Mac and iOS. (Scalability is one aspect of portability.)

12 December 2010

High-Bandwidth Sneakernet

I love the plan to deal with the huge amounts of data expected from a proposed black hole imaging project. Each station will create about 22 terabytes of raw data per day. “No imaginable link from remote mountaintops permits live telemetry of such a torrent. Astronomers will physically pull eight-pack cartridges of disk drives from the data recorders. ‘We’ll mail them,’ says Doelman. ‘You can’t beat the bandwidth of a 747 packed with hard drives.’”

09 December 2010

iPad Data Gotcha

Just spent way too much time on the phone with AT&T. I haven’t completely resolved problems I was having with cellular access for my iPad, but I can give a warning: be 100% sure your email address is correct.

If it’s not, you won’t be able to log in again (since it’s your account name). And you won’t be able to retrieve a lost password, even with the web form that asks for IMEI and ICCID, because it’s sent to the wrong address. Nor can AT&T change it for you. And you won’t be able to stop automatic billing.

The whole idea of having plans that purport to be by the month, but expire, seems pretty lame, and is ultimately responsible for my problems. But that’s perhaps the topic of another post.

06 August 2010

Predecessor to DiceBook

I had a reason to open up my Newton, and realized that I had written a dice roller for that platform. No PDF viewing, but it provided simplicity and easy configuration. (I apologize for the poor photograph — I can’t remember how to take a screen capture from the device.)

I don’t remember if this was ever distributed — there certainly wasn’t an App Store in those days!

29 July 2010

DiceBook Now Available for iPad

Just a quick note that I’ve finally gotten through the App Store approval process, and the ~4 hour wait to have the app show up in the store…

DiceBook is a specialized PDF reader that includes a flexible dice roller. It’s designed to be used with rolepaying games (like Dungeons & Dragons, HeroQuest, or Spirit of the Century). You can make dice rolls without leaving the app (so it should be useful even when iPad gets fast app switching).

Learn more from the DiceBook web site, or go right to the App Store.

30 June 2010

Apple Recycling Redux

I decided to upgrade my iPad to a model with 3G wireless (so I could access maps in the car if need be), so I was once again able to avail myself of the Apple Recycling Program. This time, I shipped off a Radius color pivoting monitor and another Power computer, both probably dating from 1998. Total shipping weight: 92 pounds. Shipping weight of the iPad: 3.3 pounds (about 1/28 as much).

So if you’re on the fence about getting an iPad, think about it as a great way to clean out your closet!

22 June 2010

Is the Future the Past?

One thing that struck me about John Siracusa’s interesting article on Apple’s language and API future: Apple did a high-level language once before. NewtonScript.

Whenever I see Python or Lua code, I think back to when I was coding in NewtonScript, which had a similar syntax and similar concepts. Here’s a bit of code from the original implementation of Jigami:


regTile := {_proto: pt_Tile, _parent: self, viewBounds: RelBounds(11, 112, 34, 34)};
regTile.edges := pt_Tile.possibleEdges[tileNum];
regTile:CalcEdges();
regTile.symbols := NIL;

There was also a visual design tool, Newton ToolKit (NTK). The combination of a dynamic language, no pointers, and a graphical editor was quite productive. And NewtonScript was good enough to use for all of the system apps. Yes, there was a little C++ code in parts, but a lot of it was probably premature optimization (there was nothing like Shark or Instruments for Newton).

I don’t know what direction Apple is moving, but at the very least it’s an interesting proof of concept for something that works well in a mobile device.

17 June 2010

Phishing Is For Phones Now?

I think I just got a phishing phone call on my cell phone, from 707-703-4722 (though of course caller ID is easy to spoof). I think it was from Cascade Bank about my credit card. Thing is, I don't have one from them (to my knowledge at least). I didn't enter my credit card # when asked…

To make it even more suspicious, it was a computer-synthesized female voice, though they mentioned something about recording the call.

This has never happened to me before, so I reported it to http://phonephishing.info/report/.

13 June 2010

WWDC Thoughts

Others have reported already, and everything except the keynote is covered by nondisclosure. But here are a few random thoughts on Apple’s Worldwide Developers Conference, held last week in San Francisco.

Apple made it very hard to plan — about 6 weeks notice. Luckily my employer, Rogue Amoeba, was waiting to pounce, because the event sold out in only 8 days.

I’ve been to the conference a number of times (I think my first was 1989), so I knew I’d be getting a t-shirt, and packed accordingly. Except this year they no longer handed out a t-shirt and a bag (sadly I didn’t go last year, when they handed out a slim laptop backpack). This year it was a lightweight jacket. This was actually pretty useful, given the temperature, but meant I had to get my own WWDC shirt so I didn’t stink on Friday.

Oddly, unwashed developer wasn’t something I noticed. I did however have to sit through a session next to someone with bad breath, someone smelling of alcohol (in a 09:00 session), and a smoker.

It was pretty obvious from the event list going in that it was going to be an iPhone-centric show. Apple doesn’t release all the event names until after the keynote, so I had some hopes that there would be a little more Macintosh content. Sadly, there wasn’t. On the other hand, I did manage to get to one session (the last one as it happened) that was directly helpful to my current work on Pulsar.

More surprising was the number of women. There are never a lot (you inevitably hear someone joking about the lines for the men’s toilet and the lack of line for the women’s), but this year seemed worse than I remember. Perhaps I was especially surprised because the very capable programmer I hired to do an iPhone game while at GameHouse was a woman.

Overall numbers seemed bigger than I recalled from 2 years ago as well. I remember lining up for the keynote, but I didn’t remember having to line up for other sessions — and some of these lines snaked around two corners.

I believe the conference cost significantly more this year ($1600), but the amenities seemed cut back. I already mentioned the reduction in attendee premium. There was also no reception, and no espresso bars inside Moscone. And the Beer Bash didn’t serve sushi.

We also got nothing at registration except the jacket and badge. Going paperless seemed reasonable though, because there was a custom application (apparently this was first available last year). It had some usability problems, and crashed relatively often. It was handy to have on both my iPhone and iPad despite that.

Speaking of iPad, this year I decided to try leaving my laptop home and using just an iPad (with Bluetooth keyboard) to take notes. This made it the first year I didn’t have to worry about keeping my battery charged (although several of the session rooms had electrical outlets attached to the seats, a great feature I made use of 2 years ago). I plan on discussing this more in a later post.

All in all, I found the week worthwhile, though I would have liked more on Macintosh.

28 April 2010

Apple Recycling Program

One of the cool things about getting an iPad was that it qualified me for Apple Recycling. I can get rid of two computers, monitors, or printers in a responsible fashion.

I went with some of the biggest and heaviest stuff, which has long been out of service (the computer was one we used on King of Dragon Pass, released in 1999, and the printer was introduced in 1993).

So by buying 2622 cc worth of tablet (by box size), I get rid of 222400 cc worth of obsolete hardware. For free (Apple pays shipping)! Not a bad deal.

17 April 2010

iPad Case

Whenever I get a new portable device, it seems like I have to get a new case.*

I just got an iPad, and while I suspect it will be pretty rugged, putting it in my laptop case seemed like overkill — it rattles around.

After a little online research, I decided on the “iPad Suede Sleeve” from CaseCrown.

And then I didn’t buy it, because their stupid web site makes you register. Hello CaseCrown! I want to buy one item for my one device. Just let me buy the damn thing!

However, I wasn’t able to find another case that I liked any better, so I finally bit the bullet and bought it. Sight unseen, but $20 with free shipping seemed like a good deal.

The case came promptly. It fits pretty well (it could be a little smaller) and seems well made. The sides are padded, though I imagine if I ever drop it, the corners will be what hits. There’s a side pouch, which ought to hold the charger or a paperback book.

I have used it once so far, and wonder if I made a minor mistake in not getting the similar CaseCrown Protective Sleeve, which has a strap. After 5 minutes of walking with the case in my hand, it started to feel heavy. On the other hand, a strap for such a small device seems a bit silly, and this case is small enough to toss in a backpack.

Obviously choice of case is a personal matter, but I recommend this one.

* The only exception has been my iPhone. It fits in my pocket so well that I don’t want to bulk it up with a case.

06 April 2010

Proper Names in SCRABBLE?

Supposedly the UK edition of SCRABBLE will allow proper names.

This seems seriously broken, because there’s really no way to know what’s legal or not.

Yeah, the argument about having to memorize SOWPODS has validity, but what will be the arbiter of what’s legal? More proper names get created all the time. And what languages are you restricting this to? Who’s to know what all the last names in Croatia (or Tonga) are.

Essentially, it will become a word game that has nothing to do with words. To me, those are a lot less fun because they’re totally arbitrary.

30 March 2010

Improving iPhone Security

Since my iPhone has email and a bunch of other sensitive information on it, I’ve always set a passcode. But I’ve always been a bit dubious about the security of a 4-digit code. In fact, one of my coworkers once saw what I entered as we were walking down the street. While I’m not really worried about coworkers, and 10000 possibilities might be enough given there’s an Erase Data option, I still wanted more security — especially once I get an iPad and may have more data on it.

Enter iPhone Configuration Utility. While this has a wide variety of enterprise options, it’s actually easy to make a simple profile.

Download and install the utility (there’s also a Windows version). Launch it, and click “Configuration Profiles” in the left pane. Click “New” in the toolbar. Enter a name and ID in the “General” section, then click “Passcode.” Now you can set up a more secure passcode — more than 4 characters, letters as well as numbers, etc. (You don’t actually choose the passcode here.)

Then attach your iPhone via USB. Click it in the left pane. Click the “Configuration Profile” tab, then click the “Install” button for your new profile. You’ll confirm this on the device.

Now you can set up a passcode as usual, in Settings > General > Passcode Lock.

Now when you unlock the screen, you’ll get a full keyboard instead of a 10-digit pad. Note that you’ll still be able to make emergency calls (911) without unlocking.

19 March 2010

Original Artwork from King of Dragon Pass

My computer game King of Dragon Pass won the award for Best Visual Arts at the second annual Independent Games Festival. I was really proud of this — we consciously went against the grain by creating quality watercolor art, and scanning it. The artists did a great job.

I’ve put a selection of the original watercolor & ink art for sale at daviddunham.etsy.com. I'll be adding more artwork (the game had over 400 illustrations), so if you don’t see something right away, subscribe to the shop RSS feed.

16 March 2010

How much data is enough for your iPad?

Wondering about the 3G plans that AT&T will be offering for the Apple iPad? Is 250 MB spread over a month enough?


If you already have an iPhone, you can find out. I just noticed that AT&T has added a “View Past Data Usage” button to their web site. For me, the cheapest data plan would be fine — I must do enough of my networking while connected to a WiFi network.

15 February 2010

Weren’t those my pixels?

As you can see at Microsoft’s Mac blog, Word 2011 will have (counting the menu bar) 8 horizontal strips of controls.

I love portrait displays, and have one, but I often use my laptop without one. And the laptop screen is wide, not tall. This seems like a terrible use of space, when they should be figuring out how to get more of my content visible without scrolling.

They say you gain vertical space compared to Office 2008, so maybe it’s a good thing I haven’t installed that yet!

I’m not even going to discuss visual clutter or whether you can find things — the ribbon may indeed make Word’s vast number of features more approachable.

For contrast, Pages has 5 strips of controls (menu bar, toolbar, format bar, ruler, and stuff at the bottom), and one of those is shared with the horizontal scroll bar so it doesn’t steal vertical space. Yes, there are palettes, but they use space on the side and don’t steal content area from typical documents.

14 February 2010

Coders at Work

I recently read Coders at Work by Peter Seibel. It’s a series of in-depth interviews with 15 noteworthy programmers, including Jamie Zawinski, Guy Steele, Ken Thompson, and Donald Knuth. Topics range from personal questions (“How did you begin programming?”) to occasionally esoteric discussion of computer science.

One thing I was continually struck by: that’s me! I don’t mean I’ve made a major impact on the world of computers, but so many of their attitudes and approaches were the same as mine. Perhaps that’s not surprising — a couple times it’s mentioned that perhaps 2% of the population are true programmers (who really understand and enjoy it), and I’m obviously in that group. And I’ve used some of the same computers (though one of them had a cutting-edge IBM 1620 in his high school, while our 1620 was obsolete and almost impossible to repair). But I don’t know what explains why we’re not fans of brainteaser interviews.

I’m not sure I use print statements to debug quite as often as most of them, though it is something I do often. I hadn’t realized how common it was!

Everyone (except Knuth) was asked whether they had read Knuth. I did read volumes 1 and 3 back in college, but haven’t referred to it more than once or twice since. That puts me about in the middle of the pack.

The book is marred by a few typos and formatting errors (e.g. an entire paragraph in bold), but is attractively set in Gill Sans.

I enjoyed it greatly. It was a nice mix of stories (such as what was going on at Netscape) and computer science (which as a practitioner I’ve gotten away from). Highly recommended to at least 2% of you.

12 February 2010

Switching Email

I just took a couple of steps in the email world: I switched both my server and client.

I blame Apple. They announced iPad, and I’m making sure I’ll be able to fully use it.

For various reasons, I have multiple email accounts. Until now, I’ve been reading some with Apple Mail on my Mac, and also on my iPhone. The accounts are set up to use IMAP, which means mail is on the server (or if you will, the cloud). I can get it anywhere.

But for my oldest accounts, I’d used Eudora as my client, and Eudora Internet Mail Server for the actual server I ran. And I’d set things up with the POP protocol (which is essentially client-centric). This meant that I needed a master device that sucked the messages off the server. I couldn’t retrieve mail from my iPhone, because my laptop was the master owner. And EIMS didn’t support SSL anyway. EIMS also supports IMAP to the standard, and Apple Mail is apparently buggy, and doesn’t play well with EIMS.

I thought about buying a mini with Snow Leopard Server and running mail off it. That would give me the cloud and the security. But it costs $1000. I might have been able to add SSL on top of EIMS, but I’d still be dealing with the mismatch between it and my IMAP client.

What I ended up doing was using Google Apps Standard Edition. I don’t care about the actual apps (Calendar, Chat, Docs), but they do provide what is essentially Gmail for your domain. In my case, domains (since my wife and I get mail at three different domains). Although they push for the Premier Edition ($50/year/user), the free Standard Edition provides domain aliases (so we can handle our three domains via the same site) and nicknames (so I can have app-specific addresses).

Basic setup was easy. I had to prove I owned my domain, which I could do by putting a file on my server. The domain aliases were a bit trickier — Google checks for “domain.com/file” but I’d set up Apache so it was actually at “www.domain.com/file”. There was no error message — and since it’s free, support is only via a forum (which I still haven’t gotten an answer from). But I eventually figured out what was going on. But then, one of the domains took, but the other did not. (After several hours, it finally did.)

Google provides a way to test things, so I created an account on my iPhone and made sure I could send and receive via IMAP.

I don’t do my own DNS so I had to contact my ISP. They threw the switch, and things pretty quickly were working!

While I get no spam on my Gmail account, I get a fair amount to my older addresses (the fact that it’s multiple addresses probably works against me). Google has so far filtered all of this about as well as SpamSieve did on the client side — I get a bunch that’s not blocked by the server, and (being paranoid) go through it for false positives on occasion. (I have gotten two false positives in almost a week.)

On the client side, I had to learn Gmail’s idiosyncratic approach to IMAP. You will need to enable the advanced IMAP controls via Gmail Labs, and expose the labels. Then the important thing, if you want things to look more or less like IMAP, is to ensure that any message has only one label. I had originally used the tagging model, and assigned labels liberally. After all, Google wasn’t duplicating a message in the In folder and the Developer folder. But IMAP (at least as implemented in the Apple client), does.

Luckily, it’s easy to set up your filters so that an incoming message that’s filtered skips the inbox. At this point, the IMAP client can move things between folders, and the right thing happens. Well, you’ll probably want to read Google’s documentation on how to set up for IMAP, since some of the system folders should be set up in a less intuitive way.

So far I’m pretty happy with this. As far as I can tell, it’s been totally transparent — I still get and send email with the same addresses. I can get mail via IMAP or the Web-based Gmail interface. And I’ll no longer need to administer my own server (as easy as that was with EIMS).

10 February 2010

Diaspora Campaign

I’ve been intrigued by the RPG Diaspora, a grittier take on FATE than the pulp Spirit of the Century. I began running a game earlier this year. Material from the campaign is now on my web site, including the cluster the players created in the first session, characters, and Rob Helm’s writeups of the next two sessions.

At some point I want to write up a review of the game, but in general I’m pretty happy with this version of the FATE rule system. The authors obviously began with Spirit of the Century, but tuned it for a more realistic feel, which also happens to play faster. A number of areas have been streamlined. I do have a nagging suspicion that had I not seen Spirit of the Century first, the rules would have been a big confusing.

07 February 2010

Super Bowl 44 Ads

Elise and I watched mostly for the ads (since we didn’t have any attachment to the teams). I think my favorite was probably Google’s: a short story, told entirely with words (there was a map but it was just an illustration; so were the sound effects). Who would have thought?

And we both hate talking babies. Boo, E*TRADE.

01 February 2010

Leaving GameHouse

After nearly 8 years creating casual games at GameHouse Studios, I’ve decided it’s time for a change. Thanks to Mike Ash’s blog, I stumbled into an opportunity to work on Mac applications from home. I’ve worked out of my house for about half my career, so I know I can handle the different work conditions.

I’ll definitely miss GameHouse, and all the people I worked with there. I’m staying until the end of the month, to help get our next game out the door.

03 January 2010

A Pun Generator

Back in the 1980s, my grandfather kept asking me when I was going to go for my PhD. I never did (and probably never will), but at the time I thought I might, and figured that my thesis would have something to do with puns. After all, lots of artificial intelligence research was involved with disambiguation. Why not turn that on its end, and revel in ambiguity!

It turns out that a team at the University of Aberdeen have created the Joking Computer. It basically creates puns: “Q: What kind of tree is nauseated? A: A sick-amore.”

So I’d probably need a new thesis…