Sharing the Code

Programming stuff that might be useful to others

Wireframes and iOS Click-Through Prototypes

I think wireframes are an important step at the start of a mobile app or website project. They can also be useful for working out a fixed quote for a project. Once yourself and the client have agreed on the wireframes you’re pretty clear what the project scope is. This is how I create wireframes.

Read more

A basic ajax form in Rails

This basic example shows you how you can submit a form without having to refresh the page. This might be useful, for example, when you want to do inline editing. The following example allows you to update the name of an item without affecting anything else that might be on the page.

Read more

CoffeeScript setup in Rails

I’ve just started using CoffeeScript with JQuery and Rails and I needed some system to organize my code. I’ve put all my classes and global variables in an app namespace, lets call it MyApp and for each controller I have a class and within that I have static methods for each action that is only run when that action is run.

Read more

Threads and handlers in Android

On iOS you can get away with not being too concerned about the responsiveness of the UI when doing things like saving to the database but on Android the slugishness is noticeable. This is the scenaro – the user taps on a UI control which starts an operation that takes a small but noticeable time to complete – you are basically trying to avoid a non-responsive UI. If the operation is fairly short you can get away with using a Handler. This allows you access to the main UI thread’s message queue. If the operation is a bit longer, say a second or more you would want to use a thread.

Read more