Lost in Translation

Despite everyone owning one, computers still make people glaze over especially when it comes to the technical stuff! It also means the stereotypes of software developers won't be going anytime soon! On this page I have tried to briefly explain what software development is all about.

What are programming languages?

Programming languages provide a way to give instructions to a computer. They are surprisingly similar to natural languages: the instructions, equivalent to sentences, are only fully understood if the syntax (grammar), semantics (meaning) and lexical data (the words) are properly used. Whatsmore, most popular languages offer an almost natural English programming experience!

There are several different types of language although most fit into two categories: compiled or interpreted. In a compiled language, the code is converted (compiled) into binary (0s and 1s) before it can be run. Interpreted languages, often known as scripted languages, are where the code is run line by line as it is read. JavaScript is an example of an interpreted language and is used wiedely on web pages for interactivity, dynamic effects and loads more! Programs and apps on your computer and smartphone such as Microsoft Office, Google Chrome or Angry Birds are written using compiled languages. Windows apps are often written using C# or Visual Basic (the languages I specialise in), Mac and iOS apps in Objective-C and Android apps in Java.

My Programming CV

I have a variety of experience of different platforms and languages although I am most confident with the Microsoft .NET platform, a large software framework which comes as part of Windows and Windows Phone, and its languages of C# and Visual Basic. In addition to Windows apps .NET powers web sites via ASP.NET, another technology I am confident with and which also powers this site.

I have also had experience in development for Mac and iOS using Objective-C and for Android using Java. Whilst the tools and languages are identical, developing for a mobile device is very different from a desktop application, especially where user interaction and interface navigation are concerned. On the web front, in addition to ASP.NET I am "upgrading" my knowledge to the latest standards of HTML5, CSS3 and JavaScript. These latest standards offer greater versatility and power to web applications; where JavaScript used to be limited to annoying popups, almost anything can now be done using it! One similar language I have always found elegant is ActionScript, the language of Adobe Flash!

On the less practical front (but very useful for understanding how comptuers work!) I have some knowledge of the x86 and ARM assembly languages, the lowest human-readable and programmable level where each instruction is an individual command to the processor; a simple process of printing text to the screen, 1 line in the example below, could be up to 10 separate instructions in assembly!

A Coding Example

Let's look at a really simple code example: a computer program which asks the user for their age then prints the year he/she was born and whether he/she can vote. Tasks the program will perform include:

The code below is the program in BBC BASIC, a variant of the BASIC langauge developed in Britain in the 1980s for the BBC Computer Literacy project and BBC Micro computer by Acorn Computers. Visual Basic is another modern variant of BASIC developed by Microsoft.

INPUT "Please enter your age: ", userAge
birthYear = 2014 - userAge
PRINT "You were born in ", birthYear
IF userAge >= 18 THEN
    PRINT "You can vote!"
ELSE
    PRINT "You cannot vote yet!"
ENDIF

The following code is the same program but in C# (slightly simplified), a language developed by Microsoft and my main language!

Console.Write("Please enter you age: ");
int userAge = int.Parse(Console.ReadLine());
int birthYear = 2014 - userAge;
Console.WriteLine(birthYear);
if (userAge >= 18)
{
    Console.WriteLine("You can vote!");
}
else
{
    Console.WriteLine("You cannot vote yet!");
}

If a user entered an age of 25 then the output would be:

1989
You can vote!