Archive for the ‘Uncategorized’ Category

The Importance of nil

Wednesday, January 14th, 2009

Take a look at these two nearly-identical pieces of code. Can you spot the difference?

UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:@”Choose Image Source”
delegate:self
cancelButtonTitle:@”Cancel”
destructiveButtonTitle:nil
otherButtonTitles:@”Camera”, @”Photo Library”];

UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:@”Choose Image Source”
delegate:self
cancelButtonTitle:@”Cancel”
destructiveButtonTitle:nil
otherButtonTitles:@”Camera”, @”Photo Library”, nil];

The first one will cause you untold amounts of misery as you futilely search with increasing desperation as the hours go by for the mysterious cause of your app’s sudden propensity to hang when a certain button is pressed. The second one has a “nil” at the end.

(The moral of the story is that variable length arguments need to be terminated with “nil”. Also, don’t program while sleepy.)

Programming with Friends vs Programming Solo

Monday, January 12th, 2009

I’ve got a number of friends who are also interested in programming for the iPhone. Even though we’re all working on our own separate ideas, it’s fun to work in a group because you can get feedback from each other, bounce ideas off each other, ask each other questions, etc. Sure, you can focus more easily on something if you’re working by yourself. But I think the benefits of working with other people far outweigh working alone … unless your programming session devolves into an epic game of Castle Crashers

Banned in Beijing!

Friday, January 9th, 2009

One of my friends from high school, Betty C Tang, is currently in Beijing. She mentioned that she can’t see my website and that it was possibly blocked in China. This, of course, has two very important consequences. One: any potential Mach Dice buyers in China won’t be able to get support for their product. Two: I can talk all I want about my friend Betty and she’ll have no idea because she can’t see this site!

Betty was the artistic one in high school. She drew a lot and she was really good. Soon after graduation, she landed a gig working as an animator on The Simpsons. We were all terribly impressed. Now she’s a supervising animator at a company in Beijing …

… where she can’t see my blog! What’s up with that? I mean, it’s not like I’m writing “Boobies, boobies, boobies!” everywhere or talking about Tianamen Square. I think they might just block all WordPress websites or something. Anyways, censorship is bad.

(Boobies, boobies, boobies!)

(Hmm … that could be an interesting iPhone app…)

Darn Cats

Wednesday, January 7th, 2009

We’ve got three cats. Sure, they outnumber us, but we outweigh them so we’re the boss, right? But then they do stuff like this guy’s cat:

See more funny videos and TBT Videos at Today’s Big Thing.

Distractions

Monday, January 5th, 2009

Sometimes it seems like it takes forever for me to get anything done on my next iPhone project. There are just so many distractions: responding to emails, browsing the web, playing with cats, catching up on TV shows, etc. I also have a real job, which, yeah … really kills the amount of time I can devote to iPhone stuff during the week. What I really need is more time.

I looked into polyphasic sleep patterns but upon deeper consideration, it’d be too difficult to incorporate into my normal work schedule. Besides, I’m not giving up my precious sleep! I’d rather die than lose my precious sleep (which is really just a loooooong sleep when you think about it) so maybe I should look into getting rid of distractions.

I made some progress in that direction when I removed digg from my RSS reader. Just imagine how much I could get done if I focused every fiber of my being into iPhone apps! I could finish my project in just days! Why stop there? I could write screenplays, draw comics, write novels, take over the — oh hey, is that an episode of Samantha Who on my TiVo?

Happy New Year!

Friday, January 2nd, 2009

As far as holidays go, Japanese people make a much bigger deal out of New Years than Christmas. New Years is the main family gathering event and like Thanksgiving in America, food plays an important part. There are traditional black beans that you eat for luck, crunchy fish eggs that you eat for health, and a bunch of other stuff that I’m not totally sure on. But it’s all good.

Another Japanese New Years belief is that whatever you do on that day is an indication of what the next year will bring. So, for example, if you’re a kid and the family is driving down to see relatives on New Years Day, it’s extra important that you don’t fight with your little brother in the car. Either that, or it’s just something my mom made up to keep us quiet that one day.

In any case, I did a bit of iPhone programming and figured out a minor issue I was having trouble with (getting my UITableView to properly shrink and grow when the keyboard appears and disappears using posted notifications) so I take that as a good sign for the coming year.

2008 Reflections

Wednesday, December 31st, 2008

This is the traditional time to look back on the previous 365 days or so and reflect on everything. Lots of stuff happened, but I think the biggest things for me were writing “Mach Dice” and starting up this blog. I’ve had lots of hobbies in the past, but this one is notable for a couple reasons. For one, it’s the first one that’s actually turned a slight profit! But more importantly, it’s one that’s given me a chance to interact with thousands of people all around the world. Well, maybe not so much “interact with” as “receive 70 cents from”. But I do get the occasional nice review, positive email, and kind comment on my blog. And that means a lot to me.

It’s funny, my full-time job is to work on a very tiny portion of movies that hopefully millions of people around the world will enjoy. But my hobby is to completely develop iPhone apps that hopefully hundreds (or if I’m lucky, thousands) of people will enjoy. Both of them are very rewarding. But I’ll tell you, getting a positive review for my iPhone app feels a lot more personally significant than getting a positive review on a movie I worked on. =)

In any case, this whole experience is something I totally would not have predicted at the beginning of the year. So, it makes me wonder what surprises the next year will bring. Only time will tell…

Baby Viruses

Monday, December 29th, 2008

See the cute little girl to the right? That’s my niece. Sure is a cutie, right? Looks completely harmless, right? But, no, that kid is a walking bio-hazard. One little “ech, ech” from her and Uncle and Auntie are knocked out with a cold for days. Then again, it might just be a big coincidence. Adorable little toddler or mobile super virus factory? I’ll let you decide. But if we ever get invaded by War of the Worlds type aliens, I think she could totally take them all out. Just sayin’…

D-i-a-l-u-p

Friday, December 26th, 2008

We. are. staying. with. my. mom. over. the. holidays. stop.

My. mom. only. has. dialup. connection. to. the. inter. net. stop.

My. 21st. century. brain. can. not. handle. the. slowness. and. I. must. make. it. stop.

Merry Christmas!

Wednesday, December 24th, 2008

Well, okay, it’s not Christmas yet. But tomorrow, Tracy and I will be driving to L.A. for a week to visit family and friends so I’m posting this a day early. From all of us at MachWerx (err… I guess that would just be me): Having a wonderful holiday season!