Commenting now open

Commenting is now available, primarily as a way for readers (if there are any?) to contribute and for myself to respond/post-script articles. Provided things don’t get too spammy, commenting should continue to be available throughout 2013.

Builder Pattern

In Joshua Bloch’s ‘Effective Java’, the author discusses the use of the builder pattern as a way to efficiently instantiate an object which has many parameters (some mandatory, some optional). We’ll first look at two alternatives (Telescoping and Java Beans) before looking at the builder pattern.
Read full article

Android JavaScript Interface

This tutorial will show you how to access native features from a WebView, and how to pass data back to a WebView from native code. The former part, invoking native code from a WebView, is achieved through adding a JavaScript interface and is documented in the Android API guide here. The example in the guide causes an Android Toast to be triggered from the WebView. All very well, but what about having an app or part of an app that runs in a WebView, gets data from the Android OS and, rather than simply calling a native function like Toast, returns the data to the WebView UI? Read full article

Customising an Android Button

The stock android button can look a little dull and basic, so today I’m going to look at making a custom button.
Start with a generic android project (my target is 16, min version 7 – this will cause Eclipse to include the android-support-v4.jar which is needed for some of the xml statements in this tutorial) and navigate to your res/layout/yourlayout.xml layout xml. Read full article

Compiling Blackberry Webworks on WinXP

Developing for Blackberry can be a hazardous task to say the least. As Matthew Baxter-Reynolds points out in a hilarious yet accurate article for the Guardian:

…there is absolutely no way that building software for BlackBerry is appreciably easier today than developing bank software was in the 1960s on punched cards.

I definitely have beef with Blackberry, ranging from the tools to the level of support, but let’s keep things positive.
Problem: Re-compiling your project after you have made changes and then deploying to either a device or a simulator is a time-consuming process. Between signing, loading to the device and waiting for the device to restart, let’s call it 5 minutes.
Solution: Work with remote HTML5, JS and CSS3 while developing.
Read full article

Phoenix

So, earlier on this week my wordpress was hacked. I went for a clean WP and database install, which seemed the safest option and have taken steps to harden this new installation.
The positives are that I am now a lot more familiar with the cPanel backup options, however I have lost my old posts. I will attempt to reconstruct these over the next few days.