Skip to main content

Questions Answered 2

More answers to emailed questions.

Yes, I've definitely been getting work down. The jianqu version of MEWER is almost complete -- I reached the point where I know how to do all of the iphone interface stuff I need, so it's time to rewrite my project with proper software engineering practices, instead of throwing everything together.

On Friday, we were finally able to purchase the iphone developer license. It took Apple a full week to fix their Apple Store so that we could purchase it from Singapore. I could buy the license by ssh'ing into a computer at UVic that I still had access to and using lynx. Text-based SSL-encrypted web-browsing for teh win! But I didn't want to buy the license myself, since I'm leaving this group in four months. It's more useful if one of the PhD students here buys it.

Anyway, that prompted a flurry of activity on Saturday when we could actually begin testing. I immediately tried to do a trill -- none of the other people thought to try this, but it was obvious to me as a musician that this was the best way to test the overall system -- and was disgusted at the results. But after half an hour (with corrections to both the client and the server) we had it working quite well.

As a side note, I'm not impressed with MVC (model-controller-view). I definitely see the point in separating the logic from the interface, but I just can't see a separate Controller as being truly useful. I mean, how many people really use multiple interfaces for exactly the same code? I've written the rhythm game three times now, and each time I've had to use a different language (1. Qt - C++ (or java or python with bindings) 2. haXe (to create flash or javascript) 3. objective C (for iphone)).

I'm even less impressed with Objective C. "Hey, let's take a language with well-known syntax relying on () for functions, and add syntax which relies on [] for functions in objects!" Seriously, you have code like this:
for (int i = 0; i < exerciseString.length; i++) {
  int c = [exerciseString charAtIndex:i];
  if (c==49) {
    [arrayExerciseOnsets addObject:[NSNumber valueFromInt:1]];
    int x = (480 - xOffsetR - xOffsetL) / exerciseString.length;
    CGDrawRectangle (ctx, x, 0, 2, 50);

Yuck! Ok, my use of a "magic number" is bad, but '1' doesn't work due to the magic of UTF-8 string handling. Specifying the ASCII value *does* work. Also, I'm mixing Model and View stuff here -- I'm not actually doing this in my program; I artificially dumped them together so you could see the wonders of [objective C] with pure C object-oriented code... all directly from the Apple docs. I mean, the Objective-C [object method:parameter] syntax is silly enough, but when they encourage you to use CoreGraphics with the pure C-style CGFooBar( pointer_to_drawing_context, my, real, parameters); ... I'm left shaking my head in disbelief.

Back to normal life! The most complicated meal I've made so far is tuna-fish melt. Sliced bread, tuna, and a slice of processed cheese, into a microwave for 30 seconds, and then adding ketchup. If I could find macaroni and cheese here, or if the street food wasn't so cheap, I'd do more cooking. But there really isn't any point in it -- if all the stores weren't closed for the LNY, I wouldn't have even bothered with the tuna-fish.

Singapore TV seems to be sit-com-like dramas. I saw a TV schedule by reading a magazine over the shoulder of somebody in the MRT once, and it listed Battle Star Galactica as being on at 11pm, but I didn't stay awake to check. There's 8 or 9 channels, and every time I've tried to look for something all the shows have been news or been Asian dramas (mostly in Chinese (or maybe Malay?), occasionally in Indian (or maybe Indonesian?)). They have subtitles -- often in two languages, so I could follow along if I wanted to. Oh wait; once I saw that BBC comedy with the mute comedian. Mr. Bean? It was on air about 10-15 years ago.