Xcode is the software required to create iOS apps (and Mac apps as well). At the moment there are two versions available which are Xcode 4.5.2 which is designed for those running a Mac with OS X 10.7.4 or later.
Learning the Basics of iOS Developing – Week 1
Starting at the beginning in iOS developing can be quite overwhelming. My first thoughts were to just crack on with loading up Xcode and creating my first very simple app. The first hurdle I got to was that Xcode just has too many options that I don’t understand. On opening it you get to create a new project, but deciding what options to select is a challenge in its self.

The good news is that Apple doesn’t leave you guessing. It has some very nice resources to help you understand exactly what you need to create your first application. Rather than trying to jump in at the deep end, realising its actually quite difficult and then turning away from iOS developing, I first of all recommend that you read several of the official help series articles from Apple.
[Read more…]Xcode On the iPad – Not Likely
Now that the iPad is a few years old and people are using them more in day to day work, a common question asked in forums is that of being able to develop apps for the iPad on the iPad. The problem with this is that Apple has no plans that I know of to launch Xcode for the iPad. The reason for this is likely to be related to how tightly integrated the frameworks are with Mac OS X.
To develop for iOS devices while on the go typically requires that you have a MacBook running OS X along with Xcode installed. For some of us, we prefer to carry just an iPad around due to the impressive battery life, instant on and smaller form factor which all make it ideal to throw in a bag.
It Takes A Lot of Work
I started DevFright towards the end of 2012 with the aim to document what I learn when practicing to code. I started off jumping in to a book called “Objective-C for Dummies” and although the instruction was quite clear, I quickly found that I lacked some understanding of how a few of the basics worked.
Apple Guide on How to Create Apps
Apple has created a handy guide on how to begin learning to create iOS apps. The new guide goes over what you need, where to begin and what documents you need to read to get going. Currently, I am working through the Apple documents and an Objective-C for dummies book found in Week 1 and to be blunt… it’s a lot of reading.
On your path of leaning, expect to be doing a lot of reading and a lot of coding to practice what you are learning. I have found that one of the keys to learning is trying to stop and understand the challenge that you just did. That could be creating a new struct, typedef or even something completely different. If you don’t understand why you are doing something the way you are being taught, then step back and try look at the bigger picture of what you are doing.
CS106A Lecture 3 Notes
Lecture 3 of CS106A covers the last 3 chapters of Karel the Robot. In particular, it covers stepwise refinement, algorithms as well as gives more details about SuperKarel and what extras he can do. Karel is coming to an end after this lecture, at which point you will move on to specific Java rather than being stuck at Java with the limitations of Karel.
Although all lectures are important to watch and take note, this one provides some good examples of the top-down design approach and how you break a program down/decompose it with stepwise refinement. It’s well worth watching and paying attention to this part. [Read more…]
What are Pre-conditions and Post-Conditions in Programming?
I briefly mentioned in my post titled What is Top-down Design and Stepwise Refinement? about pre-conditions and post-conditions. In this post I want to explain the two essential points in greater detail.
These two principles are one of the keys to being effective in programming.
What are Pre-conditions?
Lets start with the first of the two which is titled pre-conditions. A pre-condition in its most simple form is a condition that needs to be “true” for a method to be called. This means that the method you are calling is expecting something to be in place before or at the point of the method being called. [Read more…]
What is Top-down Design, Stepwise Refinement and Decomposition?
Near the beginning of learning Java, you will hear something about top-down design, stepwise refinement and decomposition. This post today will explain what those terms mean as well as provide the reason why you need to tackle programming design with this approach in mind.
Just for the sake of clarity, top-down design is the process of stepwise design and decomposition.
Before you start writing any code for a new program you want to create, you first need to design the program or at least have a specification so that you know exactly what you need to create. [Read more…]
What is a Method? – For Beginners
I just wrote about what a class is, in basic terms for those beginning on the CS106A course at Stanford on iTunes U. The next item I want to cover is what a method is.
What is a Method?>
Java allows you to create methods. In simple and beginner terms (meaning those working on programming with Karel), a method is a set of instructions that can be called on by name to execute. In a few of my previous posts I have already written about methods although I haven’t taken the time to explain exactly what a method is. [Read more…]
What is a Class? – For Beginners
A class in Java can be thought of as a blueprint. If using Karel the Robot as an example, each time we “extend Karel” we are getting a copy of Karel the robot to utilise. The blueprint specifies exactly what Karel can do out of the box. In terms of Karel, the blueprint is held at Stanford and we are not able to modify him. Every person who takes the iTunes U CS106A course takes a copy of Karel each time the program runs. The reason we cannot modify the blueprint is that changes we make would likely break everyone elses programs.
So what we do is become a subclass of Karel… ie, we “extend Karel” which means that our programs make an exact copy. When I use the word subclass, this is the opposite of superclass which is what Karel is to our own implementation. This doesn’t mean that ours is on a lower level… in fact, it could be said that we have more power being a sub-class because we get a copy of Karel and can enhance him with a turnRight() private method. So, our copy of Karel can do more than the blueprint specifies.
How to Create a Karel Subclass
Creating a class of Karel is quite simple. Our code needs a few things for it to work though. The first important line is the import which lets the program know where the blueprint is stored. In the case of Karel, this is held at Stanford at the location on line 1 of the code: [Read more…]