Employment 2.0: Business Owner

January 20, 2010 · Posted in Stuff · 3 Comments 

So this is weird. I own one third of a business.

Back in June of 2009, the repair shop that had employed me for the better part of nine years folded. For some this was good news, for some this was expected, and for the formerly employed this was very sudden (we had in fact just hired a new technician when the news hit). Repair shops tend to have a very polarized client base: some love you, some hate you, and both are usually deserved at some point. Still, myself and the core group of technicians tried our best to make it the most kick-ass Mac repair shop in Toronto, and while there were certainly challenges to overcome (that’s putting it politely), I feel like we succeeded to a degree. Diagnosed by the next business day? Check. Earn Apple’s Top 5% plaque? Check. Make every single person happy?

Well, there’s the point about a very polarized client base, but the number of happy people well outstripped the the unhappy. I never wanted to work in the sort of service centres they portray on TV or in Dilbert comics, or god forbid the actual real life service centres they’re satirizing. You’ve probably seen these, where workers and customers are bitter enemies struggling for dominion and witty remarks. No, we wanted to be awesome. The service industry is unforgiving, so believe me when I say that life is much more pleasant when you’re sending people home happy rather than cursing your name.

So as you can imagine, not being employed put a bit of a kink in things — but we got better.

This week, myself and two colleagues became self-employed. We opened our Mac repair business in the University of Toronto’s Campus Computer Shop inside the downtown Koffler Centre, taking over the repair operations from the former staff. Our philosophy is the same as ever: be awesome, make people happy. As expected, there will be hiccups as we get going, but so far we’re pretty happy with the first few days. So, tell all your friends, and even a few strangers! Despite the shop’s name, our scope is not limited to U of T students and faculty, so anyone at all is welcome to drop off their grievances with us. Ideally you’ll get something nicer back.

SwipeHead

January 6, 2010 · Posted in dev · 4 Comments 

Most of us, at some point, will apply a label of sorts to ourselves. Are we teachers, rocket surgeons, hippies, nihilists, or maybe middle-aged? A single label rarely suffices, and I’ve gone through a few myself. I’ve alleged myself to be a musician, a coder, a technician, a writer (hah), and had a few other stints. There’s a common thread here: I like making things. With that out of the way, in the middle of December I helped to make this:

This is SwipeHead, a sort of hybrid puzzle game for the iPhone and iPod touch. I’d explain how it works, but figuring that out is one of the more satisfying puzzles. It reminds me a bit of old LucasArts adventure games in which a challenge would be posed and various tools offered, but after that it was up to the player and their wits. SwipeHead, likewise, is meant to have an intuitive learning curve and once it gets going, is very enjoyable.

Though I might seem to be trumpeting my own horn, the real kudos go to the game designer, Leanne, over at Wizkeit Games, who designed and produced the whole thing. For my own part, it’s humbling to see my code executing on other devices and available on the iTunes Store. I know there iTunes Store is a pretty saturated market these days, but it doesn’t detract one bit from the glee. More horn trumpeting yet: it was accepted on the first submission, which Leanne and I were told doesn’t happen often.

If you’re looking for a unique experience among the many app clones on the iTunes Store, give SwipeHead a try. When I first saw the design documents, it wasn’t one bit like any other puzzle game I saw out there, and remains so even post-release. Though only a mere $0.99, there’s a free version as well to whet your appetite.

[UIImage imageNamed:]

December 10, 2009 · Posted in dev · Comment 
UIImage *myImage = [UIImage imageNamed:@"pony.png"];

This is probably one of the most convenient method I’ve ever come across. Feed it a name and it will return an image. Better yet, it handles caching for you automatically so that you don’t have to. Notice something about it though? There’s no alloc, meaning you shouldn’t call release. If you can’t call release, how do you get your memory back? This isn’t a big deal when using Mac OS X’s older brother, NSImage, since your average computer these days ships with several gigabytes if memory as opposed to the paltry 25MB or so that most iPhone apps are limited to. If you’re dealing with a lot of images on the iPhone though, this hands-off caching approach is going to cause problems.

The first obvious solution is to just avoid the convenience method and manually alloc and load each image with its full path:

UIImage *myImg = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/pony.png", [[NSBundle mainBundle] bundlePath]]];

That’s not awful for loading an image or two, but if you’re going to load many images, why not encapsulate this in something more elegant? Since such a method would be useful application-wide, it furthermore makes sense for the method to exist in its own application-wide class, rather than just stuffing the method willy-nilly into whatever class you’re working in. Actually, if you’re going to go to the trouble of creating a new class just for a convenience method, why not make it do other neat things? Let’s do that.

Hey Dave!

September 16, 2009 · Posted in Stuff · 1 Comment 

Hey Dave! is a social experiment/exhibit/event being run by some good friends of mine at Nuit Blanche. If you know Dave (or especially if you don’t), mark October 3rd on your calendar and go visit him at Bay and Queen Street.

Move Over Tic Tacs

September 12, 2009 · Posted in Stuff · 1 Comment 

Now, I’m not the sort of person that goes out and buys a giant screw driver set on a whim, but this weekend I had need for three uncommon drivers. Thus, it was off to the hardware store, that special place where you can find gardening tools and chain-saws under the same roof. The most important driver, a phillips 00, usually only comes as part of a larger set and in this regard I get pretty lucky: a 75-piece driver set on sale for $35. To put this into perspective, a respectable screw driver tends to retail for $5-10 on its own. Phillips 00? Check. Torx T8? Check. Hex drivers? Check, and we’re done.

Here’s where it gets crazy. On my way to the register I pass another box, this one almost identical save for that it has 95 pieces and it’s not on sale. Instead of doing the rational thing and laughing my way past it, I stop and begin to wonder if this larger set is a better deal. Sure, it costs more, but it has more tools, and it’s favourable to grabbing the (marginally) smaller kit and topping it up with twenty more tools at $5 apiece. Wait! There’s a problem: I only need three screw drivers. What good are twenty extra tools that I don’t actually need? Maybe I’ll build a rocket ship one day and need a reverse-robertson 2.8x wireless hammer, but that’s still nineteen rocket hammers short of a good deal unless I actually end up using every piece.

Fortunately the madness passed and I left with the smaller set, but I had to wonder: what sort of person impulse-buys a 95-piece screw driver set?

Snow Leopard: Defeated

August 28, 2009 · Posted in Tech · 1 Comment 

After spending years professionally beating irrational computers into acting rationally again, it’s a humbling experience to almost get beaten by a simple software update. That’s not to say software updates are without their eccentricities, but you can at least count on the problems to begin either after the software has finished installing, or right in the middle (ideally at a critical and irrecoverable point). It’s not often that problems begin before the installation takes place, or so I thought until I was staring down Snow Leopard’s missive that “You cannot install Mac OS X on this volume.”

“Can’t, or won’t?” I thought, in my best Kevin Conroy voice.

The problem, it turns out, is somehow related to the destination drive’s partition map, about which a few theories are being floated by others who have been affected. I hear you, PowerPC veterans, exclaiming “Of course! He must have an Apple Partition Table. How 2006.” Not so fast: the issue affects the requisite GUID Partition Table, and while there seems to be a few different causes, you’re more likely to run into this problem if you’ve chopped up your hard drive for a dual or multi-boot machine, or say installed Fedora and added a 2GB swap partition.

At least the solution is simple: pop open Disk Utility and resize your destination partition a couple times. Whatever the reason, most users are back in business after this digital flexing. My computer understands that I’ve made a profession out of fixing far worse nightmares, and would have none of this quick fix nonsense. Disk Utility managed to ratchet up the difficulty level by arbitrarily hating the ext3 file system upon which Fedora was installed, and crashed whenever asked to modify the partition map.

My computer forgets who its dealing with: someone who keeps a full back up and isn’t afraid to erase the partition map. Long story short, the software is installed.

Media Clouds

August 17, 2009 · Posted in Stuff · 4 Comments 

It’s time. In my last post I mentioned Danny’s discovery of Wordle, and after playing around with it for a few minutes I started wondering what would happen if you fed a whole news site at it. Would it be possible to quantify how much attention a story gets? Better yet, would it be possible to quantify the language used by different media sites if they all ran similar stories and you could compare the coverage? What type of stories does a news site prefer over its competitor?

Wordle may not be able to answer these questions, but perhaps it will provide a starting point. Wordle’s function is to absorb whatever text you throw at it, determine what words appear the most, and then create something that is at once pleasing to the eye, and full of useful information. Words that get repeated are made proportionally bigger, and since we’re visual creatures, the results may speak louder than a simple word count.

Of course, the news doesn’t stand still, so it trying to find answers from only a single day of stories would be inaccurate. Using five days worth of material would be better, and though it would probably be better still to take a whole year worth of samples (slightly difficult with the constant 24-hour news cycle), five days seemed like a sane way to start before committing to a schedule of daily copy-and-pastes. The following are tag clouds generated from five days worth of news site front pages, July 13th, 14th, 16th, 21st, and 23rd. Read on to kill your dial-up modem…

Litmus Test

June 26, 2009 · Posted in Stuff, dev · Comment 

The other night Danny and I were talking about tag clouds and a possible experiment that could be done using something called Wordle (see this post for more info about Wordle). The experiments requires that the news cycle be on “autopilot,” i.e., a general representation of what’s going on in the world over a long stretch of time. The recent swath of high-profile celebrity deaths has thrown a kink into the works (to put it lightly), so hopefully I’ll be able to put up some results in a week or two.

In completely other news, I’ve located another excellent source of OpenGL ES tutorials, this time from Simon Maurice. Jeff Lamarche, whose tutorials I posted a few weeks ago, has also added some new content and updated his project template to work with the new iPhone OS. Good stuff.

Phantom Functions

June 10, 2009 · Posted in dev · Comment 

Not that they’re very spooky, but function calls that don’t do anything can be a real time-sink. The call in question: glPolygonOffset(), a terribly useful function which I was using to prevent Z-fighting. Everything worked as expected in the iPhone simulator, but nothing happened when run from the real hardware! After an hour of searching through the code and documentation, it turns out the answer is pretty straightforward: polygon offset is not supported by the hardware.

The fact that the compiler didn’t kick out a warning or error would seem to suggest that the feature is available in later models. My test platform uses PowerVR’s MBX Lite 3D GPU, as do all models up until Monday’s announcement. Still, Apple is able to tailor the SDK’s header files exactly to their devices capabilities, so it’s a touch frustrating. On the bright side, there’s a workaround for coders who needed glPolygonOffset to draw edge geometry:

        #define EDGE_OFFSET 0.00001

        glDepthRange(EDGE_OFFSET, 1.0);
        /* draw all non-edge geometry */

        glDepthRange(0.0, 1.0 - EDGE_OFFSET);
        /* draw all edges */

There’s a couple more good ideas actually, but the above code works fine for a low-power device.

I am an Idiot

June 2, 2009 · Posted in dev · Comment 

Learned two things today:

1). An array of pointers is possible without stuffing it inside a struct. GLuint **texturePtr; creates a pointer to a pointer, and since a pointer can easily point to an array allocated with new, it follows that such a pointer could point to an array of pointers pointing to more stuff. Lesson learned.

2). The statement int allocSize = n * 16 – 8; GLfloat *vertices = new GLfloat[allocSize]; is only useful when n > 0. Whoops.

 

Update: It’s done! This most productive weekend has turned out a mostly-functional lightweight OpenGL-based sprite library.

Next Page »