MacKuba

Kuba Suder's blog on Mac & iOS development

Hello, iPhone!

Categories: Cocoa, iPhone 0 comments

For the last few months, I’ve been spending a lot of time learning how to create apps for the Mac. Since I’m slowly starting to run out of new tutorials to read, I’ve decided to find myself something new to learn ;) Well, not completely new, actually, as a lot of that knowledge about Cocoa is going to be very useful.

I’m talking about iPhone development, of course. I bought an ebook about iPhone SDK from Pragmatic Programmers some time ago, which looks very promising, but I didn’t really start learning, because I wanted to get the iPhone development certificate first, and that took some time. You see, Apple’s platform is so damn open that to install even a “Hello world” on your own phone, you have to have a set of certificates from Apple, which they give you only after you register for an “iPhone developer program” which costs 100$. Really, guys, this is not how you attract developers to a platform… :\

Anyway, I got the certificates now, so I was finally able to run the “Hello world” on my phone :) Here’s a proof:

Hello iPhone (screenshot of my first application)

When I started reading the ebook, I got an interesting idea. How about I do it differently this time? The way I usually learn new technology is: I get excited about something, I get an ebook about it, I learn it very thoroughly, cover to cover, making a lot of notes on the way, and then… instead of actually starting to write software, I find a new technology and the whole cycle repeats. I know, it’s stupid, but that’s the way it usually is. That’s the way it was with Python, Qt, now with Cocoa, and some other things. I’ve spent an enormous amount of time learning about every single function in Python that may come useful, rarely used features in Qt, and so on… but I’ve never really used that knowledge. So, maybe this time I could write something while learning, instead of trying to read every single tutorial first?

I’m also reading another Pragmatic Programmers' book at the moment – a very unusual one: “Pragmatic Thinking and Learning”. It’s a book that explains how your brain works and how to make it work much more effectively, how to learn better and faster, and how to be more creative. And if I understand this correctly, what I’m writing about is exactly what I should do in order to learn faster:

  • The book tells about something called “Shitty First Drafts”. It explicitly tells that you shouldn’t try to achieve perfection before you start creating – instead, you should start with a totally crappy first version, and make it better over time. Perfection may be your goal, but it shouldn’t be a precondition.

    Perfectionism is the voice of the oppressor, the enemy of the people. It will keep you cramped and insane your whole life, and it is the main obstacle between you and a shitty first draft. (…) A lot of people (…) are going to do a whole lot better than you, and have a lot more fun while they’re doing it.

  • It also says that it is good to learn theory and practice together, instead of starting with theory and putting off practice until you have a good knowledge of the subject. Doing some practice – even something really simple – gives you feedback that makes you understand the theory a lot better. The author gives an example of a rock climbing course he took, where the instructor first let them experiment with climbing on their own for half an hour, and only after that gathered them and gave them a lecture. That way they understood the lecture much better, because they could more easily imagine what the instructor was talking about.

So I’m going to change the strategy this time. I’m going to read the ebook, but after each chapter I’ll be working a bit on a real application. Not just an example, but something serious. At first, it’s going to suck: it will be a Shitty First Draft. It will look awful, be unintuitive, not very useful, and generally something that wouldn’t be accepted into App Store even if a blind guy was doing the reviews… But it will be refined piece by piece, and who knows, maybe this time I’ll actually end up with a decent application?

I have a few ideas for iPhone applications that I’d like to write. They’re usually things that I myself would like to use, but can’t find them in the App Store. One of them is a client for the Blip service, which is more or less a Polish Twitter. There are ways to use it on the iPhone via WWW, but they’re terribly inconvenient. It would be nice to have something that allows you to send messages to Blip or to read your dashboard with just a few clicks (touches? taps?). So I’m going to try to write that something.

And I’m going to use one more lesson that I’ve learned from one blog post: “Motivate yourself by doing it in public”. Apparently, it’s much easier to find motivation to work on a project, if you know that someone watches you and monitors your progress. That’s the reason I wrote this long and boring post: I want to do it different this time, and I want to do it in public. What if I fail? Oh well, at least I’ll have learned something…

So, in a few days expect a new post on my blog, with a screenshot, and also expect a link to a Github repo (if public, then public all the way :).


Leave a comment

*

*
This will only be used to display your Gravatar image.

What is the main framework used for building native iOS apps? *