A Note on Documentation

Code documentation, it can be tedious to write and maintain, what’s a developer to do?

I was asked for my advice on documentation today and realised just how much my approach had changed over the years. In my eager early days of development I thought the mark of a true professional was someone who in addition to taking the time to write quality code, also took the time to document it beautifully. I documented classes and methods religiously and sprinkled my code with helpful inline comments. These days I take a very different approach.
Continue reading

iOS Beginners: How to Create a Simple Table View App

Using a Table View is a quick and easy way to setup a great-looking, albeit simple, form in iOS. Table views provide a fair amount of free functionality including styling, titles, section groupings and scrolling behaviour.

In this tutorial you will learn how to create a simple form using a static table view.

API Design for iOS and OSX by Matt Gemmell

API Design for iOS and OSX

I recently read a brilliant article about API Design by Matt Gemmell. The suggestions Matt makes seem so straight-forward that it is easy to pass them off as common sense.

However, many projects are not developed using these common sense suggestions. Clearly, this is a sign that there is much to be gained from formalising how APIs are written. Matt has also created a Cheat Sheet summarising his recommendations.

A worthwhile read. Thank you Matt.

Java Assertions

Overview

Java assertions are wonderful things which help define the desired behaviour of an application. For example the following assertion states that the variable number should be non-negative:

 assert ( number >= 0) 

Unlike exceptions, which can be caught and handled gracefully, an assertion failure indicates that something has gone terribly wrong within the application and causes it to exit. Thus, in the above example, if assertions are switched on and number is equal to -5 the application will crash. Continue reading