⇥ Digital panhandling

March 31, 2009
No comments
 
⇥ Permalink

Couldn’t help but smile at this article:

A brave traveller has made it all the way to New Zealand without buying a single ticket along the way.

Clearly, I need to have a chat with the guy for arranging my family’s trip to Italy this summer.

⇥ Stephen Colbert scares me

From this article on Reuters:

The comedian’s supporters cast 230,539 write-in votes to name the new module at the $100-billion space outpost “Colbert.” The top NASA-suggested name, “Serenity,” finished a distant second, more than 40,000 votes behind.

I’ll be honest and say that I don’t like Stephen Colbert—I simply do not find him funny*.

However, in this particular case I can’t decide what’s scarier: that Stephen Colbert manage to get more than 230,000 votes, or that he’s showing us how irremediably screwed democracy really is, and we’re too busy guffawing at his stunt to notice.

*This is my problem, not Colbert’s. I simply do not like people who try to be funny at the expense of other people who are not in on the joke. It’s a fine line, of course—humour is always made at the expense of someone—but it’s not fun when the butt of your joke doesn’t know that he is, well, the butt of your joke. For this same reason, I’ve never been much of a fan of shows like Candid Camera, Punk’d and Just for Laughs.

⇥ Quickie: a drop-in replacement for NSLog()

March 27, 2009
2 comments
 
⇥ Permalink

I came across this blog post mentioned in a couple of places, so I thought I’d offer my two cents and offer an alternative method of creating a drop-in replacement for NSLog().

The way I see it, there are two limitations with the approach mentioned in that blog entry:
  • You need to define a new switch (DEBUG)
  • You need to learn to use a new function, which makes it inconvenient to drop in the replacement in an existing project that makes extensive use of NSLog()
These are, of course, minor inconveniences—adding a new define is minimal work, and a global search-and-replace can take care of any existing NSLog() calls that need to be converted over to the new name.
Still, I am lazy enough that I use a slightly different approach:

#ifndef __OPTIMIZE__

# define NSLog(…) NSLog(@“[%s:%d]: %@”, __FILE__, __LINE__, [NSString stringWithFormat:__VA_ARGS__])

#else

# define NSLog(…) /* */

#endif

This has a couple of advantages:
  • The name NSLog() is not altered—and you get to continue using a function you are familiar with without any changes whatsoever
  • __OPTIMIZE__ is already defined when you are building in the Release configuration, so you don’t need to create any new switches
Thus, if you drop these five lines of code in your .pch file, NSLog() will automatically be redefined to an empty line of code (just like in the post above) when building in Release, and be enhanced by printing the name and line of the source file where the call to it takes place as an added bonus.

⇥ Important lessons nobody is going to learn from Twitter

March 24, 2009
5 comments
 
⇥ Permalink
Just over a year ago, Twitter was the technical IT* industry’s favourite whipping boy—practically every talk about scalability and performance that I heard between, say, April and July of 2008 made it a point to deride Twitter for its apparent inability to keep up with its growth. I include myself in that number, as my keynote at last year’s DPC included a few sideways jabs at the Failwhale—although, to be fair to myself, most of them were directed at RoR (which, as far as I’m concerned, were entirely deserved and continue to apply today).

Fast forward to March of 2009, and Twitter is the cat’s own ass—if Jesus Christ were alive today, he’d have a Twitter account and would be complaining about Judas in 140 characters or less. Of course, the Twitter guys haven’t figured out how to make money yet—and maybe they never will—but they have figured out how to take an idea and turn it into a product.

The really important lesson that needs to be taken home here is one that developers, engineers and architects seem to forget all too often: development is secondary to design. The best technology in the world cannot fix a bad idea, and cannot be the idea itself. But a great idea backed by bad technology can be salvaged with the application of the proper tools.

A year ago, Twitter was at risk of severe failure because the technology on which it was based—whatever that was—was no longer able to keep up with the technological demands that the product was designed to generate. The fact that the Twitter team was able to fix things up and make it possible for the service to grow further simply shows that the original idea behind their product was so strong as to withstand all those difficulties and give them a chance to patch things up.

When you work on a new idea, your first job should be to take your idea to reality as quickly and efficiently as you can—remember, fail early, and fail quickly—and not to make sure that it scales to handle the 150,000 concurrent users that you will, most likely, never get anyway.

This doesn’t mean that good engineering isn’t useful from the very start: a smart developer knows how to build software quickly in such a way that it can be easily refactored at a later point to meet increasing challenges—as I said at my DPC keynote last year, there is no good reason why you shouldn’t be building your software with scalability and security in mind from the get-go. This doesn’t mean, however, that you need to go overboard and allow overzealous technical design to interfere with your time to market.

In other news: I have turned on moderation because of spam. I resisted doing so for as long as I could, but I can’t spend half an hour every morning attempting to keep up with people who obviously have nothing better to do with their time than posting bogus comments on my blog. Rest assured that, if your comment is topical, it will be moderated through.

Edit: fixed a typo (thanks to @jcarouth and @elazar for pointing it out).

* You know, the people who actually do something with computers, instead of just talking about them.

⇥ Proto™: a game with balls, coming soon to an iPhone (or iPod) near you

March 10, 2009
One comment
 
⇥ Permalink
Approximately three weeks ago, my longtime business partner Arbi Arzoumani was watching me suffer through a particularly angry green curry at our local Asian eatery (note to self: never challenge a Korean cook to “make things a bit spicier because I need perking up today”) when he said something along the lines of “we should write a game for the iPhone… a game with balls.” (The balls part might have been mine—spicy food tends to erase memories).
Lo and behold, even though it’s been well over ten years since either one of us has touched a computer game for reasons other than playing it (or throwing it out the window), I am proud to announce Proto, a puzzle game soon to be released by our newly formed AFK Studio for the iPhone OS.
The game is currently in alpha—currently being played by a “selected few” for feedback purposes, but we plan on submitting to the Fruit Company for App Store approval soon.
I plan on posting some gameplay movies soon—in the meantime, here are a couple of teaser screenshots.