Tuesday, 24 May 2011

A Very Simple Hello World iphone app

So here is the simplest program you can create for an iphone using xcode (the IDE) and objective c. The all time classic that is hello world!

Step 1 - Download Xcode:

Go to the apple dev centre, register and download the latest version of xcode.

Step 2 - Open Xcode:

Launch Xcode, found under /Developer/Applications/. You will presented with a window like the one below. Select Create a new Xcode project.

Image and video hosting by TinyPic

Step 3 - Create the project:

The next window will present options for the various different types of projects you can create. Select "View based application". You will be prompted for a location to save the project and a name, call it "HelloWorld". Anywhere is fine, but I don't recommend putting it under the /Developer/ folder as apple have tendency to wipe that folder when you upgrade xcode.
Image and video hosting by TinyPic

Step 4 - Select the Simulator:

You should now have your "solution" open, with all the appropriate files pre-setup for you to launch your application in the simulator. Notice the drop down in the top left of the IDE, this lets you determine how you launch your app - via the simulator or onto your phone. Make sure Simulator is selected.

Image and video hosting by TinyPic

Step 5 - Open Interface Builder:

Ok, now we will actually modify our code to show "Hello world". If you look in the solution explorer ( on the left) and navigate to the /Resources/ folder. Double click on MainWindow.xib (pronounced nib files). This will launch a program called "Interface Builder". It should open at least 3 windows:

  1.  Library - a list of all components you can use on your interface
  2. Controller Window - The view which we will we modify - it represents the screen.
  3. Attributes Inspector Window- Used to alter properties of items on your interface ( fonts etc)
Select the Library and scroll down the list of components and select Label. Drag it onto the controller window like below. 

Image and video hosting by TinyPic

Click on the label that you have just dragged onto the controller. Select The Attributes Inspector Window and change the text property to "Hello World". Save the File by pressing cmd + s.

Step 6 - Launch Your App:

If we navigate back into Xcode and select the "build and run" option in the middle of the IDE, it will now launch your app in the simulator. If you select the breakpoints button ( just to the left), it will put you in debug mode and you can debug just like good old visual studio.

Image and video hosting by TinyPic

Ta, da! Hope someone finds that useful.

Sunday, 1 May 2011

What makes a good agency developer?

Having worked at a couple of different agencies now, I thought I might share my opinion on what I look for when hiring developers. I generally look for a couple of different things:

  1. Self motivation 
  2. Communication Skills
  3. Understanding of the key principles (TDD, SOLID, DRY, KISS, Design Patterns)
Self Motivation

This is probably is most important requirement. As well all know, every few years, the whole industry landscape changes and if you are not prepared to keep learning, you may as well give up now.  If you are not motivated towards continual self improvement, you will always write the same old sloppy code, you will become bored and the amount of bugs you write is only going to increase.

Communication Skills *

Finding a committed and knowledgeable developer who can articulate them selves well, to project managers, client service and clients is hard, but vitally important. We all know the stereotype, but it can so often be true. In the old days, the developer would often just be given a big requirements document and locked in a room until it was done. The role of a developer has changed somewhat since the advent of agile methodologies though. It is all about constant feedback and refinement. If you can not sit in a planning meeting and help create the stories and acceptance criteria, your career progression will be limited. You will just be seen as an obstacle to the people you are trying help.

Understanding of the key principles

The most common misconception is that knowing the minutiae of some framework / language is the most important thing. It is perhaps the most irrelevant. I consider myself to be a reasonably competent developer ( I am sure some would disagree!), but I still continually have to look up things on a daily basis. It does not make me any less proficient. Perhaps 20 years ago before the emergence of every developers best friends, it was, but not any more.

Forget syntax, once you know the majority of the (current) principles and patterns, I know you will write good code. The last stage of the interview process where I am now requires you to take a small practical technical test. It will be a reasonably trivial problem to solve and there is no time limit. I don't care if you can not get it working completely. I'm more interested in how they started to abstract it and whether they wrote any tests.

* I am well aware that there are probably hundreds of grammatical errors in this post. I assure you, they are all deliberate.