Archive for the ‘Programming’ Category

Edgewise FREE

Friday, April 23rd, 2010

I made a free version of Edgewise for the iPhone. It hit the app store yesterday.

It’s just like the paid version except it bugs you to buy the game if you really like it. I thought about making the free one be ad supported, but I decided to wait. I may change my mind after I learn more about the various mobile ad platforms. Or after Apple’s announced ad service goes live.

Since I wanted the free version and the paid version to be mostly alike I used the same Xcode project and sources and added a new build target. It was even easier than I imagined it would be.

I have a couple of ideas for how to improve the game play that I may release soon. All improvements from now on can easily be shared between the free and paid versions, which is kind of cool.

Dilbert 2.0 Viewer released

Wednesday, February 4th, 2009

One of the presents I got for Christmas was Dilbert 2.0: 20 Years of Dilbert. It’s a very nice coffee table book with a few thousand Dilbert comic strips along with some history and commentary by Scott Adams. It sits on the shelf next to The Complete Far Side and The Complete Calvin and Hobbes.

Dilbert 2.0 comes with a neat addition: a CD-ROM containing every published Dilbert strip. Each one is a .gif file, organized and named by date (I’m assuming date of first publication). Viewing them is rather tedious.

The day after Christmas I wrote a little viewer app to let me browse through them. Simple, functional, but rather stark. Other things got in the way of working on it until a couple of weeks ago, when I went a little nuts on it.

I kept adding little features to make it look nicer or work better, or both. I indulged my inner geek for several days until I suddenly realized that I’d been spending my spare time working on the application and no time reading Dilbert.

It seemed interesting enough by this point to post it online. I gave it to a few friends to test it and then I incorporated some of their feedback.

So here it is, yet another application with a limited market and no commercial potential, but a heck of a lot of fun to work on.

Dilbert 2.0 Viewer

P.S. It’s targeted at Mac OS X 10.5 Leopard at the moment. I wasn’t really paying attention during development, so I have no idea if I’m using anything that really requires 10.5. If there’s a sudden giant demand for Tiger support I may revise it to be compatible. But maybe not. I’ve probably spent far too much time on it already.

Programming is like crack

Friday, October 31st, 2008

Many years ago, like 16 or 18 years ago, I was sitting around with some co-workers late at night waiting for a long software build to finish. I remarked that we were all addicted to programming. Eyebrows went up so I explained:

You spend most of your time frustrated. Seeking something. That Aha! moment that makes it all worthwhile.

You work for hours or days on a concept. Once you’ve got it straight in your head you start to try to implement it. It won’t compile. Then it compiles but it won’t link. Then it links but it won’t run. Then it runs but it misbehaves. You spend most of your time trying to figure out what went wrong.

You look things up in manuals. You examine your code and others’ code line by line running it through a large complex simulation in your head. When you think you’ve got the answer you run the code line by line in a debugger hoping to figure out which part of the code has the bug. Hoping there’s only one.

You change some code and run it and see that the same misbehavior remains. You change it again. And again. You finally try something radical only to realize you haven’t even been building and running the code you’ve been changing. Then you can’t remember the first four things you tried in order to apply them to the right copy of the code.

Then the inevitable happens while you’re looking at some part of the well established code. Something clicks, your head snaps up and you exclaim, “How could this have ever worked?!” My friends and I used to say that’s the point when you know you’re about half done.

Sometimes you get so deeply involved you start to lose touch with reality and begin to entertain fantastical notions. “Maybe there’s a bug in the compiler…” C’mon, admit it. You’ve all thought that.

Eventually you figure it out. You spot the flaw. You know deep in your bones this is it, the bug. That little voice in your head screams, “Aha!” Maybe you shout out loud and do a few fist pumps, “Gotcha, you son of a bitch!”

It’s hard to describe the euphoria. The intense frustration of the preceding hours or days melts instantly away.

Your co-workers come by and ask where you want to go to lunch. You tell them, “Not yet, one more bug fix and I’ll be ready to go.”

And that’s why programming is like crack.

Edgewise for iPhone

Monday, October 27th, 2008

Edgewise for iPhone (and iPod touch) was released on the iTunes App Store on October 25th.

Buy it, please.

It’s a solitaire card game. I’ve seen it called King’s Corners elsewhere (more on this below). You deal cards one at a time into a 4 x 4 playing field. Face cards must go around the edges in specific places. When the field is full you remove sets of cards that add up to 10. Rinse, lather, repeat, until you place all the face cards (win!) or until you can’t place a face card because there are no places to put it (lose!). You mostly lose, but for some reason people can’t seem to put it down.


Edgewise and I go way back.

I first wrote it in the early 90’s while I was working at a place called General Magic. All the engineers were asked to participate in a coding exercise. The goal was for the engineering team to take a few days away from our normal duties and to create some fun little games for the platform we were designing and building. (The platform was called Magic Cap and it was cool beyond description, so there is little point in describing it here. I’m not talking about the portable devices or the user interface, though they were cool in their own way. I mean the underlying software architecture. Man, was it ever cool.)

I thought and thought and thought and made up Edgewise. The name Edgewise didn’t occur to me until the game was almost finished and, well, it needed a name.

Edgewise was popular with the other team members, though not quite as popular as another game called Scramble invented by John Sullivan. Not that I’m bitter, or anything.

Imagine my surprise upon discovering that this game, or at least something very like it, had already been invented! Decades earlier! I thought I was so smart, inventing a popular game like that. I’m still proud of inventing it, even though I didn’t think of it first.

I’ve investigated the history of King’s Corners a tiny little bit, but I don’t know who (else) invented it or when. There is one significant difference and one minor one between Edgewise and King’s Corners. In Edgewise any combination of cards adding up to 10 may be removed from the board, but in King’s Corners only tens and two card combinations adding up to 10 may be removed. Oh, in Edgewise the Jacks are on the left and right sides of the board. In King’s Corners they’re traditionally on the top and bottom.

Porting Edgewise

I have ported Edgewise to several platforms over the years. It’s a useful start for me since I know it so well and can concentrate on learning the new system and tools.

It started in Magic Cap, of course.

Then PalmOS some time in the mid 90’s.

A few years later I made a version for Cocoa on Mac OS X 10.0.

Right about that time I took a job at Apple working on the secret project that became the iPod. A year or so after starting I made an iPod version. Since I was a manager and wasn’t doing any coding on that project, at least officially, I kept it a secret.

Much later came Cocoa, again, this time on Mac OS X 10.4, with 10.3.9 compatibility. That one was kind of fun. I guess they all were.

When the iPhone came out but only a lucky few were allowed to write programs for it I made a Javascript/Web version. This is the only version that comes with source code. :-)

And finally (yeah, until the next platform comes along) the iPhone version.

The iPhone version is the only one I have charged money for or widely distributed. I figured I should at least make back the money I spent on the iPhone Developer Program and the iPod touch I bought for testing. If it sells really well maybe I’ll spring for a new MacBook Pro.