Why I find Objective C a hard language to learn

Lots of methods get an NSIndexPath as the argument, and all the sample code that I’ve seen gets the current row out of the indexPath object using [indexPath row]. Sometimes they get the section number using [indexPath section]. Ok, that seems simple enough. Now look at the documentation for this class, which is what you see if you use the XCode research assistant to show you the documents:

NSIndexPath Class Reference.

I cannot for the life of me see any way to extract the information that you get the current row using “row” out of that document. It’s not there. No, instead you have to figure out that UIKit has added some methods to NSIndexPath, and find ‘row” and “section” in a different document called “NSIndexPath UIKit Additions”. Isn’t that intuitive?

iPhone app

I haven’t written much about my iPhone app, but now that I have some time on my hands, I’ve put some more time into it.

I’ve been watching the Stanford iPhone course on iTunes U. They had a couple of successful iPhone app developers come in to give lectures, which were very useful. One of the things that stuck with me was an insistence that you prototype the user interface. They recommended sketches, but my sketches are horrible so I decided to try Photoshop. I grabbed this Photoshop template which is really great except it’s missing some important UI elements, like the symbol that looks like a “Do Not Enter” sign that iPhone apps use to indicate “delete this element”. In spite of that, I managed to mock up some screens, get some feedback, try running through a few scenarios, etc. You can see my current iteration on my gallery. Keep in mind that I don’t think I’ve got the correct fonts or font colours for the standard iPhone UI, but I mostly did it for looking at layout and program flow.

As well as that, I was working out the data storage, including the SQLite tables and stuff. I was trying to figure out how to get the lazy load the data and only keep what I need in memory. That’s when I started reading about the 3.0 software and the Core Data API. It seemed like exactly what I need, so I paid my registration fee and downloaded 3.0 to see if it will be as useful as it appears. One unfortunate side-effect – all the code I’ve typed in from the iPhone book I’ve been working through has tons of “setText is deprecated” warnings. Oh well.

Well, that sucked

I know you’re tired of all those “good workout” blog posts, so I thought I’d have a lousy one just to keep it interesting.

I was intending to go out into the bay for another 5 miler and hopefully still have some energy left for a few miles on the creek. But I wasn’t counting on two things – one is that the thunderstorm that blew through yesterday is being trailed by a very strong wind (the airport is reporting winds gusting from 15 to 26 mph) and the other is that my right shoulder started to hurt after about a mile.

The waves weren’t so bad while they were coming right at me, but the wind was cold. And after passing “One Mile Point”, the wind started to swing to the one side and so did the waves. Because of my shoulder, I was wondering if I should turn around, but also wondering how I could turn around since that would involve going broadside to the waves at least momentarily. The shifting winds sort of made the decision for me – I was going to be broadside whether I turned or not. So I turned.

On the way back, I got good surf, but unfortunately my sore shoulder was preventing me from enjoying it. And the soreness got worse as I went on.

Oh well, maybe tomorrow.

Wake riding and race tactics

Most of the team is going to the “‘Round The Mountain” race this weekend, so it was a pretty light work-out.

5 of us set out from Dan’s dock and headed upstream. There were a *lot* of rowing boats and sculls out on the water at the boat house – a couple of coxed eights, and maybe three fours. We were paddling in a fairly tight bunch, and some of the girls in the boats called out. Maybe we should try to recruit some of the rowers over to the two bladed side – I certainly think we were making wash riding and pushing other boats rear ends out look like more fun that staying in your lane.

We paddled up a mile or so, and then decided to do a half mile interval while we waited for Dan, Steve and Doug. I was right beside Ken when somebody yelled “go”, and I managed to stay beside him for a tenth of a mile or so, and then stay right on his tail for another tenth. By then, Mike was moving up and he got into Ken’s wash, and I got into his, and rode it all the way for the rest of the half mile. I think he was pretty amazed that I managed to keep up with the group the whole way – he hasn’t been to many work outs and doesn’t realize I’m not the charity case I was last year. We headed back while Ken was giving us pointers on wash riding and race tactics, and the three stragglers caught up to us.

We broke into two groups of four, one lead by Ken and one lead by Dan, and did a whole bunch more on wash riding and race tactics. Ken and Dan switched groups so we got both perspectives. As we were finishing up, we paddled in our two tight groups of four riding each other’s washes right through the rowing groups, which didn’t appear to have moved much since our first appearance. But just before we got back to Dan’s dock, I interrupted him talking to somebody to point out that a gigantic boat was approaching fast. Last year, or even earlier this year, I would have been scared – as a matter of fact, last year when the same thing happened, I raced to the dock and got out of the boat as fast as I could so I wouldn’t have to deal with the wake. Call it confidence, call it bravado, but when the group turned around so we could try to ride the Colonial Belle’s wake, I turned with them as well.

The wake threw me around pretty good, but instead of fear, all I was feeling was exhilaration. I whooped and laughed a few times. I didn’t manage to ride it as far as the experts, but it was a fun ride while it lasted.

Afterwards, over beer and brats, Dan was talking about how far we’d come as a team. One of the things he mentioned was how they didn’t have to leave anybody behind – I took that as a direct compliment because last fall, during a lot of the workouts they’d left me to practice something on my own while they went ahead because I was too slow for them. Hurray for me – I don’t suck as much as I used to.

Geek Heaven!

I know I’m supposed to be saving money until I get a new job, but I’ve ordered my ticket to the StackOverflow Dev Day in Toronto. Right now my only question is how late to wait before ordering my SO Reputation t-shirt so my rep is in the right ballpark when I wear it there.

I think the networking opportunities there will be awesome. I wonder if I should print out a bunch of resumes?