Archive for September, 2005

Developing on the Mac – A Windows Developer’s Perspective

Thursday, September 29th, 2005

Good post here by Mac switcher Russell Beattie who isn’t entirely ecstatic with his switch. Some of his points I take lightly as he’s flogging his own company’s Mac alternatives (Konfabulator), but I agree with many of his sentiments.

I bought a Mac Mini back in the spring, mainly to play around with and/or port games to, but with the off-hand thought that if I really liked it, I’d buy a heavier duty Mac and make a full switch. I found it initially interesting, but not compelling. Now, after not using it for a while, I spent some time over the last few weeks porting my nearly complete casual game to the Mac, and am somewhat more negative on the Mac. Following Beattie’s lead, here’s some random kvetching:

1) X-Code

Most commercial Windows developers use Microsoft Visual Studio to make their programs. It’s a great program, but it costs about $700. On the surface, Apple’s development system X-Code, looks shiny and new and nice, and its free. But given how much Apple likes to charge for stuff that should be free, developers should be wary of their software that should cost money but is in fact free.

X-Code is a bad software development tool. Its unstable, confusing, and hard-to-use. When I changed the name of my current project from Writer’s Block to Bonnie’s Bookstore, it took me about 3 hours of hunting, compiling and things breaking before I found all the obscure nooks and crannies in which X-Code had hidden references to the older name.

X-Code’s debugger is just quirky. The ‘Step to next line’ function – pretty much the bread and butter function that a programmer relies on to walk through and debug code, doesn’t work. It drops into assembler code constantly, for no discernible reason. The debugger is slow, and has lots of other problems that I won’t detail here.

2) Cocoa

When Apple rolled out OS-X, they pushed developers to use a new API, Cocoa, in conjunction with a new language, Objective-C, that doesn’t really look very much like regular old C/C++ that programmers have been using for the last 20 years. Now when you’re Microsoft, with a 97% market share, you can introduce a new language (C#), that only works on your platform. But Apple, with a 3% market share, wasn’t too successful in convincing developers to write code in Objective C/Cocoa that couldn’t be ported to the other 97% of the market. So most developers on the Mac use the other API, Carbon. Now, choices in and of themselves aren’t bad – don’t like Cocoa, use Carbon, right? But Cocoa/Objective C is Apple’s baby. Most Mac example code is written in Objective C/Cocoa, and it eats up a lot of Apple’s rather limited development effort, making it harder for the rest of us developers to find help and information for the Carbon API that we actually use.

3) Hot Keys

When a programmer spends 10 hours a day for 15 years typing in text editors, he learns the keyboard macros rather well. Unfortunately, all those macros (CTRL-INSERT, SHIFT-INSERT, CTRL-PAGE DOWN, etc), don’t work on the Mac. Almost all keyboard macros are different. There is a way to change certain macros on the Mac, but not all apps obey it, and it doesn’t work very well. It would be helpful if, say X-Code offered an easy way to switch all key bindings to the default for Microsoft Visual Studio (where 90% of ‘switcher’ coders are coming from). Needless to say, X-Code has no such option.

Overall, my coding productivity is probably 40% lower on the Mac than on the PC, between X-Code’s clumsiness and my inability to use the macros that are hard-wired into my brain. This week, as I was working on the Mac port in X-Code, whenever I had a significant amount of code to write, I would save the file, switch to my Windows machine, do my coding there, save and switch back to test it. Ugh…

4) Apple’s high prices not only hurt user’s wallets, they also hurt Apple’s products.

Yes, I know X-Code is free, which is nice for the developer base that constitutes 1% of Mac users. But Apple likes to ding the other 99% of its user base in all kinds of ways, notably with very expensive OS upgrades. While Windows XP hasn’t seen a major, non-security patch update since its release in 2001, Apple has spit out a steady stream of major updates to Mac OS-X in that time (latest version is 10.4 – so 4 major updates since its 2001 release). That’s good. BUT…. for all updates since 10.2, Apple has charged consumers $129 – pretty steep for an upgrade. As a result, developers have to make the assumption that many Apple users are running old versions of the OS – as old as 10.1 if they’ve been reluctant to lay out $129 apiece for OS upgrades. And therefore, developers must write their code to the least common denominator – Mac OS-X 10.1, thereby reducing support many of the new features Apple has added since (widgets, internet-enabled .DMG files, and all kinds of other cool gizmos recently added to OS-X). That’s a shame, because, for free updates, Mac’s system works really well – better than Windows.

Other great services like .MAC are underutilized because Apple overcharges for them.

5) Limited Developer Support

OK, so you already know that only about 10-30% of the software that is available on Windows is also available on Mac. But it gets worse – most of that ported software doesn’t work as well on the Mac.

My game needed a music library to play a special kind of music file. There are two main alternatives on Windows. Only one of these had been ported to Mac. So I used it, but found that some of my music files that played fine on the PC crashed on the Mac. Fortunately, the vendor was reasonably responsive, and in about a week I got a new build of the Mac libraries that worked. Still, it was irritating and could have been far worse had the vendor been unresponsive.

Even for my game, the issue exists. Yes, I’ve ported to Mac and tried to be fairly meticulous. But there are a few small details that work better on the PC, mainly because it wasn’t worth it to support them on the Mac. The PC version remembers where the window was positioned the last time you played the game. The Mac version could do this, if I could locate the appropriate API calls, but finding that help info is hard and time consuming, especially given the Carbon/Cocoa split mentioned above. For this, and a small number of other minor features, I just decided to skip them on the Mac. The Mac version still runs great, but there are a few polish details that I skipped on the Mac. When you know that one platform will generate >90% of your sales, that platform gets the most attention, at the expense of the minor platform.

6) Ending on a Positive Note

OK – one good thing. I’ve been sending out builds of my game to beta testers, and recently sent out a Mac version, too. I’d been getting a few reports of random crashes on the Windows version, which are really hard to track down. One of my Mac testers also had a crash, but he was able to send a full debug report that either the Mac itself or X-Code somehow generates, with a full stack trace down to the function that the game was in when it crashed. Getting this kind of debug data dump on Windows in MSVC is much harder. You have to roll your own at a non-trivial cost in blood, sweat, toil and tears.

—
Anyways, Mac OS-X is not the paradigm of perfect integration and ease-of-use that it’s been touted as. As a Windows developer who could switch if the Mac really impressed me, I was instead somewhat disappointed. That said, for, say, your typical high school or college kid, there’s a lot to like about the Macs – the solid free iLife suite, the cool aesthetics, the Unix underpinnings. I think I’ve learned from the experience of developing on and using the Mac, even if I haven’t been converted to a full-time switcher.

Baseball – Priceless

Saturday, September 24th, 2005

Loading Up At Sports Authority

I am not a jock. I never was a jock. Though I’m 6’1” and in reasonable shape now, throughout my childhood I was undersized (I grew late), which, when combined with physically slow and a bit uncoordinated, makes me very well suited for, well, being a computer geek, not an athlete.

But my two oldest children are now 6 and 4.5, and I’m starting to hear rumblings from other parents about little league, coaching, etc. Moreover, I fear that if I leave their athletic training solely to my wife, it will be nothing but ballet and gymnastics – fine for Katie, but for Danny, well…

Anyways, my kids have been watching a bit of the Cardinals fine season with me this year, so last week I broke out the whiffle ball and bat for my future shortstops. Following on that great success (not a single injury!), we went to Sports Authority today for a buying binge. We’ll practice on the warm days this fall, and they’ll storm the T-Ball league next spring – yeah! (and the German skinflint side of me was thinking that late September would be a great time to pick up baseball equipment on closeout)

At first I felt a bit sheepish when I told the sales woman at the cash register that I needed help figuring out which baseball equipment to get for my kids – did I miss that day at Fatherhood training school? My manhood was further jeopardized when they summoned from another department an athletic looking woman who could probably beat me at not only baseball, but pretty much any Olympic sport, all the way down to curling. But she knew her stuff, and promptly picked out the right size gloves and bats for my kids, and filled me in on the local little-league scene. Finally, I had her size me up for a glove for myself. The last glove I had was a gift from my dad at around age 10, and hasn’t fit me since about age 13. Now, though, I have a proper glove – but I need to make sure I scuff it up before I show up for any other dads-type little league event – you can’t show up with a shiny new glove that’s never been used.

Baseball Spree at Sports Authority: $197*

Two Hours Later, Your Daughter Says Baseball Is “Boring”: Priceless

OK, while she did say that, it was after our first baseball practice of the day ended in an 0 for 9 slump by my daughter. A bit later, both kids wanted to play again, and this time, they got better pitching by Dad. Where did she swing last time – ok if I can just pitch it to exactly that point… Still, it was a lot of fun, and I had to turn down my son’s request for a 4th baseball session late in the day.

As bad as I was/am at baseball, two of my uncles played minor league ball back in their time. Maybe the baseball talent skipped a generation sideways and down, and my kids will surpass their dad at this one. In the meantime, at least my kids will appreciate the Cardinals games a bit more…

* 2 bats, 3 gloves, 3 balls, a batting tee, and glove ‘moisturizer’ – yeah, like I’m really gonna follow through and use that regularly, plus a Nerf football and a Scooby Doo basketball. And no, the baseball stuff wasn’t on closeout – don’t they know baseball season is over in 3 weeks? Ahh well…

Best Sports Writing I Saw This Week

“If you believe what the White Sox manager told Copley News Service columnist Mike Nadel the other day, he might just up and retire if the Sox win the World Series this year. The way things are going for the South Siders, the qualifier seems a tad out there. It’s like starting a sentence, “If Paris Hilton becomes a nun…””

(Rick Morrissey via The Sports Economist)

E-Lance – Thumbs Up!

Wednesday, September 14th, 2005

A while back I wrote about my mixed experiences with Google Answers. Google’s service allows you to get answers to questions that can be easily researched with a search engine (i.e. Google) Prices are modest ($5-$50 in general, with a maximum of $200), but results for me were a bit spotty, and there were significant flaws in the service’s design and execution.

Last week I had a rather unusual need. I have a list of 125,000 words that I’m using in my casual word puzzle game. The list comes from the ENABLE public domain word list. For better or worse, it includes not only words one might find in Webster’s but also a fair amount of slang, and of particular concern, a variety of profanity and even a few racial slurs. The list makers were evidently trying to be comprehensive, and obviously not passing judgment, but nonetheless, for my all-ages targeted game, a lot of the words on the list were not suitable.

I started scanning the list from ‘aah’ to about ‘absorbencies’, but that’s only the first 500 words, and I quickly realized that this task was going to take multiple hours (about 5, by my estimate) to do right, and was something I could perhaps off-load.

So I decided to try www.elance.com. Unlike Google Answers, E-Lance is more oriented at actual jobs, that require programming, writing, editing, and so on. Price ranges for E-Lance seem to be much higher than Google Answers – indeed the lowest category at which you can put a job out for bid is ‘under $250’ (whereas $200 was the absolute upper limit for Google Answers). So I posted my project ‘Find the objectionable words’, in the under $250 category, with a 3 day window for people to bid.

To my surprise, I had 26 people bid on the project! Most seemed like relatively experienced editors and users of E-Lance. Among other things, with each bid you can see the dollar value of all work each bidder has done through e-lance recently – several bidders had done in the low $thousands.

Most bids were between $150-$200 – not cheap for 5 hours of work, but not ridiculous either. However, I decided to take a chance on the lowest bidder, who had come in at $50. I sent him the word list on Friday with detailed instructions, and got back the edited lists today. He did a great job – more thorough than I expected. I paid him (a little extra, actually), left glowing feedback, and am looking forward to using E-Lance again.

Downsides? The site is rather slow, and the navigation links are not as clear as I would like.

But if I can consistently put small jobs on this site and have them expertly completed in under a week, I will become a steady E-Lance customer. It’s very useful when you’re working solo like me, and don’t have an intern/junior associate to hand off the grunt work to. Thumbs up for E-Lance!