Learning How to Program Part 2.5

posted by on 17th February 2012, at 2:01am

Since 2012 first started I’ve been doing things a bit differently as some of you will have noticed. I’ve been diversifying my programming time with another ventures aside from the same old RSBandB projects, don’t worry though. One of these projects is something I am working on for my own personal use, a todo application for OS X. This was exciting to me because I had never programmed in Objective-C before and it had been a while since I picked up a new language. Today I am going to review one of my own past pieces of work, specifically, “Learning How To Program” and of course part 2.

In the Learning How To Program series I set up a guide for readers to learn how to start programming in any language they had chosen. The guide was general enough so that it would work for any language and would work for anyone who knew how to Google and type on a keyboard. The guide also went through an example of setting up a Java programming environment which should still be useful today should you want to learn Java. I then suggested a few applications to make that were relatively simple and later provided source code for these applications. Overall the series works, so much so that I used it for learning Objective-C.

I started by deciding what I was going to build, the todo list application. I then decided that I’d need to learn a bit of Objective-C first. I dusted off a book I got for Christmas last year, “Programming in Objective-C 2.0” and combined it with “Cocoa Programming for Mac OS X.” Google and Stack Overflow for useful in finding answers to my other questions.

With my resources in place I headed into Xcode and started experimenting with the very basic UI elements available in OS X and connecting them to my own code. This didn’t take long to grasp since I already had a firm understanding of MVC (the design philosophy that Cocoa uses). I started by defining two tables, one for a list of task lists, and one for a list of tasks. These were simple to implement due to Cocoa’s helpful features. I was also aided by my resource list ensuring what I was writing was actually proper. I slowly progressed to more advanced topics such as a hierarchical tree based task list rather than a flat table (still wondering if it’s needed) and state saving to a file on the disk drive. As it stands right now my app just needs sync with Google Tasks implemented and a few UI tweaks around the edges.

Now that I’ve highlighted how I followed the process as defined in the first series I feel it’s worthwhile to talk about a few of my experiences along the way. As I previously mentioned it had been a while since I had picked up a programming language. This was actually a good thing since the target of the original articles was an audience who had never programmed before. It was also good that the Objective-C syntax is mildly different from C or Java, that ensured I wouldn’t fall into any traps of trying to code C or Java in Objective-C. There’s one final thing that should be highlighted, read the manual. After programming for a decent amount of time it becomes common to not necessarily read the manual in full detail, when learning a new language read every detail in the manual!

As I write this I am contemplating a few changes to make to my todo application as well as what I can do next. The next project may be an iOS application for personal use which would be a natural progression since OS X uses the same language as iOS. I’ve also come away with a good level of knowledge on Objective-C and the Cocoa framework for OS X. I feel that this level of knowledge is adequate enough for basic applications and as a launching point to more advanced programming features.

To hold you all over until I release this somewhere, here’s a photo of what the application (which is actually called Doer) looks like:

I hope that this has provided you with some insight into how the “Learning How to Program” series can be used to learn a new language. With a bit of practice programming could become a common hobby and who knows what kind of application you will write one day ;).

This article is filed under Tech. You can follow any responses to this entry through the RSS 2.0 feed. You can discuss this article on our forums.