Archive for October, 2008

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.

Greggy’s Bits Inauguration

Sunday, October 26th, 2008

Third time’s the charm, maybe

Welcome to the inaugural post for Greggy’s Bits. I’ve tried this a couple of times before, but I never really had the motivation to keep it up. Now with a fresh business just getting underway with the possibility of customers who actually want to know what’s going on… well, we’ll see.

Speaking of new businesses

Greggy Bits Software has been an almost business for a couple of years. The website’s been up for a while now. A few weeks ago I filed all the right papers with the state and the feds and now Greggy Bits Software LLC is a real, recognized, tax and fee paying entity in the state of Hawaii. It even has its own bank account.

Speaking of bank accounts

I’m a little annoyed at Bank Of Hawaii. The nice lady at the bank who helped me set up the account offered me a special business check card that accumulates frequent flier miles. Apparently there was a special deal, for which only sole proprietorships and single member limited liability companies (LLCs) were eligible, that would waive the yearly fee normally applied to business accounts. When the card and agreement came in the mail I was surprised to see a yearly fee, and some other various fees, too. I called the phone number listed on the little “activate me now” sticker to cancel the card and order the ordinary no-miles-but-no-fees-either card. The nice lady on the phone told me not to panic because even though the standard card agreement mentions the fee it would be waived for me. She promised. I’m annoyed that they didn’t warn me about this (what, it hasn’t come up before?) and preemptively annoyed for when I get charged the fee and have to jump up and down to get it refunded.

Enough for now

If you’re here you probably came in through the Greggy Bits Software website, so you’ve seen what I’m up to. If you got here some other way, go take a look so you’ll know what kind of stuff I’ll be talking about in the days to come.