iTunes U and Online Learning

Update: This blog is now at and this post has been moved to here.

Apple have just released the iTunes U app. I think this has gotten a little lost compared to the attention on the new iBooks Author and its EULA. The iTunes U app looks to be an excellent app which puts some structure on the courses that were available through iTunes. Now you can watch the videos on your iPhone and iPad, and also download the slides to them. You can also use AirPlay to stream the videos to an Apple TV and the app will sync the progress of the course between devices.

The course I am currently looking at is the Stanford iOS Programming course. I’ve only seen the first few lectures but they are of excellent quality. There are about thirty of these new iTunes U courses at present but more should be added in the future.

While the talk was that the iBooks authoring app would revolutionize textbooks, I’m hopeful that the iTunes U app will do something similar for adult education. I’ve taken a few evening photography courses locally. These were great for me as a beginner but moving beyond that, it would be great to be able to subscribe to courses given by professionals. Remote learning can offer a wider range of courses than could ever be offered here in Cork. Courses that would be impractical to run locally due to small audiences don’t face that problem online. Imagine if you could subscribe to a landscape photography course with lectures by a series of landscape photographers. Or Portrait. Or Sports etc. And this would all come with slides that could be viewed afterwards at any time to refresh the memory.

Currently I’m looking into Graphic Design as I will need to create graphics for my app and I would like to do a course in this. However any real life courses would most likely not be suitable for me. I would need them to run in the evenings after work. Also I want a course that assumes I have lots of experience with computers. However what I’m more likely to find is a full time course aimed at school leavers which assumes no previous software experience. Remote learning offers the potential that multiple courses can be recorded, each aimed at different levels of experience. I could choose the one more suited to my circumstances and the scheduling would now not be an issue as I can do the course in my own free time.

It’s still early days but as more and more institutions put their courses up on iTunes U, I hope we start to see them not just put up their existing courses, but instead think about how they create and tailor courses for a wider audience. Although I’m not sure how likely that will be as currently the app doesn’t allow for paid courses. Still the free content is more than enough for the time being and I’ll look forward to see where iTunes U can go in the future.

Update: Just to clarify. The iTunes U app is separate from the desktop iTunes application. You can just download the iTunes U app on your device and never have to go near iTunes.


Accessorizer for XCode

Update: This blog is now at and this post has been moved to here.

One thing about Objective C that struck me is the amount of boiler plate code that needs to be written for variables and methods. Ideally Xcode would handle all this but unfortunately it doesn’t.

An app I found to solve this problem is Accessorizer. It can generate interface & implementation for properties plus a whole range of other code (all that KVO and coding stuff that I haven’t looked into yet). It’s only 4 euro on the Mac App Store and it’s well worth it. There are some videos tutorials on the site which show you how much can be done with the program.

Version Control in Xcode using Git and Dropbox

Update: This blog is now at and this post has been moved to here.

When I first created projects in Xcode, I just let it take care of the version control for me by creating a Git local repository for my code. This was working fine for me but I could see that in future I would need more flexibility. I think it’s better to build that (and good programming habits in general) in at the start of a project when the codebase is small rather than refactoring down the line when it becomes a bigger problem.

One issue is that the local Git repository could only be used by one computer. If I wanted to share this code I would need to switch to using remote Git repositories. I also wanted to incorporate some form of remote backup for additional security.

Github (recommended to me by Ian Hennessy) would do the job just fine but the free accounts are limited to public repositories. If I was working with other developers then it would make sense to pay for one of their plans. The collaboration tools e.g. issue tracking, code review look really good. It’s certainly a site I can see myself using in the future.

However for someone like me who is a solo developer, these features don’t add much value. I really just needed the backup functionality. So for this, I looked at storing the repository on Dropbox. It’s private and the free two gigabytes should be more than enough to host my code. Also Dropbox is available on pretty much everything and works well with firewalls. As for backups, it’s bullet proof. I’ve had my Windows PC hard drive fail recently. In the past this would have been a nightmare to deal with. Now I just installed a new drive, reinstalled Dropbox and saw all my documents reappear.

One issue that I think may arise would occur if Dropbox has conflicting edits on the same file from multiple locations. In that case I’d imagine it’s merge resolution would mess up the Git repository. Fortunately I don’t think that this will apply in this situation. I will be the only person with access to the repository and I won’t be editing the same files from two PCs at the same time.

To set up Dropbox I followed the steps on this post from This answer on StackOverflow is also a good reference.

  1. I created the project I wanted in Xcode and allowed it to set up a local Git Repository for me.
  2. I cloned the repository using the bare keyword to a Dropbox location.
    git clone –bare . ~/Dropbox/development/repositories/GCUtils/GCUtils.git
    The bare option is used as this will just clone the contents of the local .git directory to Dropbox. We don’t want to create a working copy of the code on Dropbox, as this may lead to Dropbox edit conflicts if that working copy is edited directly. In order to edit the code, a user should have to clone the repository to their machine, work on it locally and then push the changes to the Dropbox repository.
  3. I created a remote alias.
    git remote add dbGCUtils ~/Dropbox/development/repositories/GCUtils/GCUtils.git
  4. I restarted Xcode and in the repositories tab of the Organizer, it picked up the remote repository automatically.

And that’s pretty much it for the initial setup. From here Xcode can manage the commits to the local repository and also the push and pull from the remote repository. The Xcode user guide describes how Xcode can interact with Git here.

Learning Objective C

Update: This blog is now at and this post has been moved to here.

Here is a list of the resources I used when learning Objective C.

  • Apple Documentation. This is really good, especially the Javadoc like pages for the UI classes. There are load of documents here. Ones that I missed first time around are the “Your First/Second/Third iOS App” guides. I’ll have to catch up on those. (One tip which I completely missed out on for ages. For these webpages, on the right hand side of the second toolbar, is a button which gets the whole doc as a PDF. It’s worth building up a library of these.) The two main documents that I used were
    • The Human Interface Guide. This is a really excellent document for describing how to design an iOS app. It’s not code based but instead operates at a higher level explaining the UI principles and how the UI elements should be used.
    • Objective C Programming Language. I think this document is essential for learning Obejctive C. It details the extensions Objective C makes to the base C language and is really thorough.
  • Stack Overflow. This site is an absolute godsend. How did we ever live without it? The documents above are fine as an introduction to Objective C and app development. However when you start to create an app and run into practical issues, this site is fantastic. There has been no coding question that I have had that they haven’t been able to answer and the coding samples provided are normally top notch. I can’t recommend this site enough.
  • Google & Blogs. In general searching for Objective C questions on google brings up a list of blogs which detail people’s practical implementations of various issues. These are useful to read as they normally contain any design decisions and reasons why alternatives were rejected.

The main class of resources that I haven’t decided to use in learning Objective C have been books. There seem to be some good ones out there but I don’t think there’s much there that I haven’t been able to find on the web. Blogs and Stack Overflow have killed programming language books for me.

The other thing is that I think books about specific programming languages are the ones at risk of going out of date. My data structures and pattern books from college are still useful but any Java books from then have become outdated. The core object-oriented parts are still valid but you can say goodbye to vectors, Swing etc. I’ll have to keep an eye out for good Objective C pattern books.

To give a specific example, the ARC memory management recently introduced to Objective C has rendered the sample code in a lot of books obsolete. Not just obsolete but incorrect actually as the old code won’t compile with ARC enabled. On the web this can be updated, but the books are stuck with the older, invalid code. Maybe with ebooks becoming more popular there will be scope for having books that update their sample code automatically. Until then we have to wait for revised editions, if indeed they are released at all.

I just found this document (via @steipete) which is a guide from C++ to Objective C. This looks to be really good.

Beginning with Xcode

Update: This blog is now at and this post has been moved to here.

The main application for developing apps is Xcode. I’m not sure if there are any alternatives but at the moment I don’t think I really need any. Xcode is free, installs from the app store. What more do I need?

Ok, so first I installed Xcode. Or rather I installed an installer for Xcode. Seems a bit odd. I’m not sure how that will work with updates from the Mac Store. At first glance it looked the same as most other editors. Text area for writing code, tree navigator for files etc. My initial impressions are that it should be straightforward to learn to use.

Onto learning how to create apps. My first stop was the tutorials on Ray Wenderlich’s site They’re really comprehensive and I really recommend them. I began with the iOS Apprentice free tutorial which teaches you how to create a game called Bullseye. From that I think I gained enough knowledge to find my way around Xcode. From here, time for the next step i.e. learning Objective C.

Choosing a language

Update: This blog is now at and this post has been moved to here.

My initial thought was that I would obviously use Objective C to program the app. However a work colleague suggested that I look at Appcelerator as he had used it to create his app. (The app is for Irish Leaving Certificate students. It allows them to download past exam papers to their iPhone or iPad. If you’re a 5th or 6th year student check it out at

The technology basically allows you to use Javascript to create your application. This presumably will hide the lower level implementation details and allow you to create apps faster. Also the apps should be portable across mobile OSes so this would allow for Android ports.

I don’t think that this is the right approach for me though. I don’t know Javascript or much HTML5 so either way I’d have to learn a new language. My thinking is that Apple use Objective C and intend for it to be the official way to write apps. This means that there will be loads of help out there for writing in Objective C, e.g. Apple articles, books, Stack Overflow questions etc. One of my concerns is that when you start hitting road bumps in Appcelerator, I not sure there will be the same level of support available.

Another problem with these type of frameworks is that if Apple add new features, then you have to wait for your framework provider to update their product, to support the new features. In this case I think you’re better off using the standard language and APIs for the platform rather than a third party solution. Also the iPhone libraries seem fairly similar to the Mac libraries, so in future it should be straightforward enough to learn Mac programming after gaining an iOS foundation.

Given my C/C++ experience I think I will pick up Objective C quicker. I have no intention to support Android at this time so the cross platform support is not of any use to me. I’d also assume that, as most apps are developed in Objective C, that this will be more in demand by employers in future. So, Objective C it is then. How hard can it be…

Initial Post

Update: This blog is now at and this post has been moved to here.

Here’s my initial blog post. I’m creating this blog as I’ve decided to create iOS apps in my spare time. Up to now I’ve been working as a programmer for eight years in Java, C++ and C. I’ve never written an Objective C application before nor programmed on the Mac. Also I’ve never blogged before so this is a totally new experience for me.

Given the time of year, there is a lot of advice regarding New Year Resolutions and how to stick with them. One of the ideas is that by telling your resolution to other people, this acts as positive reinforcement to actually carry it out. My version of that is this blog. I am making a commitment to create and publish an app to the app store. After that, we’ll see.

I want to use this blog to document my journey to learn not only the technical aspects e.g. learning Objective C and Xcode, but also the other non software activities that come with creating and publishing software. This will no doubt change with time as (hopefully) I start to release apps but will do for a starting point.