Change of Tack
The only programming I have ever know has been programming for the web. Chiefly PHP and JavaScript (with a little RoR sprinkled in there along the way), but all loosely-typed languages where it is easy to be a bit sloppy with the code and still get away with it.
In contrast, I have just started learning a bit about iPhone app development. Primarily because I want another challenge, something a little different; and partly because I am really excited about the potential that the platform holds, and I would rather be in there making things happen then watching from the sidelines. So I have started getting stuck into a bit of Objective-C, and to be honest it is something of a shock! Coming from a PHP/JavaScript background, the language seems incredibly rigid – no more getting away with being sloppy about return value types! Actually, to start with the whole thing seemed incredibly anal, but I am slowly starting to see the advantages of doing things this way.
In fact, even though I have only just started looking at it, I am starting to understand how PHP is really a kind of facilitation layer plastered over the underlying core programming language – which makes things easier for sure, but lacks the fundamental power that scripting in C can give you. Of course PHP is really optimised for web tasks, and Objective-C in turn for mobile and desktop applications, so their intention is very different and they undoubtably each fulfill their roles very satisfactorily. But I can’t help the feeling that I have suddenly had a veil lifted from my eyes and can now see that I have been programming in Fisher-Price, child-friendly languages up until now.
I mean this as no disrespect to the people who code in PHP/JavaScript etc – I do so everyday and very much enjoy it. It’s just that within those languages you are very much shielded from a lot of the more ’serious’, lower-level programming issues (such as memory management and threading) that you have to deal with in languages such as Objective-C. This is a fact that I was aware of but never really understood until I started investigating iPhone development.
So I am realising how much I have to learn, all over again, but I am really quite excited about it all. Who knows where it will lead – 5 years ago I was doing a Master’s degree in Oceanography and would never have though I would be programming for the web in 5 years time! I certainly wouldn’t be sad if I was earning a living writing Mac/iPhone applications in a few years time. But perhaps I’m getting ahead of myself…