Posts

Showing posts from 2013

Android logging put to bed.

I've been developing an android application recently, and I have had to scrabble around more than I should have in order to get logging working correctly so here's what I've learned. How to get logging working; The basics. Android has a Log class that you can use to make log entries. You can find that here; https://developer.android.com/reference/android/util/Log.html Here's an example of a log entry made from an Activity #import android.util.Log; class MyActivity{     private static final String TAG = "MyActivity";     @Override     protected void onCreate(Bundle savedInstanceState) {         Log.v(TAG, "savedInstanceState contains " + savedInstanceState.size() + " mappings");         ......     } } The Log.v call makes a 'verbose' log entry. Log levels (in increasing order of 'importance' are;     ERROR, WARN, INFO, DEBUG, VERBOSE These entries are made with Log.e, Log.w, Log.i, Log.d & Log.v.

Editing the hosts file on android virtual devices

I hosts several web sites on an Ubuntu server that I run at home, and I do this using Apache 2 name based virtual hosts. This allows me to host multiple web sites on the same server at the same IP address. This causes problems when trying to test how the websites look on mobile devices on the local network. To enable multiple sites to be hosted at the same ip address Apache2 will redirect the http request to correct web site files based on the domain name supplied with the http request. For example both site1.com and site2.com can resolve to the same ip address, but Apache will route requests to site1.com to the virtual name host files for site1 and requests to site2 to the virtual name host files for site 2. You can read more about this here . The problem with this set up is that I can't browse to the non-default virtual hosts using the IP address of my local server, and my ISP don't let requests from my IP address route back to my IP address, i.e. I can't browse to si

The importance of 'it'

Image
What is 'it'? It's incredible how many software organisations don't understand the importance of 'it'. By 'it' I mean the ephemeral 'it' that is 'the thing you are building'. The concept of 'it' is what holds the different engineering functions together. Without a clear, shared understanding of what 'it' is the software development process will not run smoothly. So how does 'it' relate to the various disciplines in a software company? It should be central to them all. From the above diagram we can see the importance of the Requirements Engineering discipline. They are the team responsible for defining the central concept of 'it' around which the entire software organisation should be centred. The health of this team is vital for the health of the entire organisation, and yet it is often underfunded, under-resourced or in extreme cases, non existent! Agile and 'it' No talk of requirement

Using an Ubuntu VM to connect to a VPN using juniper network connect.

Recently I've been using Ubuntu 12.04 running in a VirtualBox VM to connect securely to a VPN using Juniper Network connect. I've been doing this for years with a windows VM, but have recently worked out how to do it from Ubuntu. The benefits of using Ubuntu for this task are; No licensing requirements for OS. Smaller footprint for VM. - Windows 7 VM footprint was 120 MB Private Working Set. Ubuntu is as low as 70 MB Private Working Set. I haven't found any drawbacks yet. Step 1. Create an Ubuntu 12.04 LTS desktop 32bit virtualbox machine. It is important that you choose the 32 bit platform as the 64 bit version will install a 64 bit java, and juniper network connect won't work with this. If you have an existing 64 bit 12.04 install that you want to use see  here  for a work around. Step 2 Ensure openjdk-6-jdk and icedtea-6-plugin are installed by running this command from the Ubuntu VM's command line; sudo apt-get install openjdk-6-jdk ic