My epic year of learning at Forward

Last year was a big year for me learning wise. uSwitch has always had a good learning environment but since we became part of the Forward Internet Group the pace has stepped up a level. At the end of 2010 I moved back to uSwitch from uSwitch for Business. This coincided with the company transitioning from the .Net stack to the Unix stack – a transition I am happy to have made. I now find myself more enthusiastic about programming and technology. Best of all I got to work with some really smart people!


I had previously used Ruby for testing, admin sites and scripting, but in 2011 Ruby became my primary development language. Working on it day-to-day I was able to move from noob to vaguely competent pretty quickly. It is a great language whose flexibility and expressiveness really shines through. Many thanks to Siddharth Dawara, Marcin Ciszak, Andrew Nesbitt, Paul Ingles and Michael Patricios for all their patience with me whilst I struggled to get my head around the new stack. Also, a big thanks up to Fred George whose two Object Oriented Ruby boot camps helped a lot. Outside work Chad Fowler’s session at the Scottish Ruby Conference was also a big gap filler, as were the Ruby koans, and the Elegant Ruby book.

Ruby on Rails

Most of the sites I built last year were with Rails. It is a big framework with a lot to learn, but the conventions it teaches you are smart (and transferable). The new asset pipeline features in 3.1 pushed me into learning the basic of CoffeeScript and finding out more about website speed optimisations. Michael Hartl’s Ruby on Rails Tutorial and the Rails Way were my main learning resources.

Unix and Ops

The steepest learning curve of the year was becoming competent with the tools for our Unix infrastructure. At Forward, we have a couple of Dev Ops guru to help us with the hard stuff, but developers do a lot of the basic infrastructure tasks (such as creating servers and diagnosing deployment issues). I had to get my head around tons of stuff: living in the terminal, shell scripting, basic server admin, nginx/apache configuration, monit/upstart, puppet and our ec2/cloud infrastructure. Again massive thanks to Sid, for showing me how to setup my profile like a pro, Noah Cantor for helping me solve the stuff that was well beyond me and Tom Hall for his Upstart tutorial. I also found the two Unix peepcode screencast to be an invaluable introduction.

Clojure and functional programming

At the end of 2010 some of the developers at Forward ran a study group on the seminal Structure and Interpretation of Computer Programs (SICP). It was probably the hardest technical book I have read since college but also the most rewarding. We wrote the exercise in the book in Clojure. I had played around with higher order functions like LINQ before and learnt a bit of F#, but this was the first time I had learned a functional language in any depth. I even got to write a little bit of production Clojure code thanks to Mike Jones and Jon Neale who had to put up with me fumbling around in Emacs. The peepcode screencast on Emacs was a life saver here and I found Programming Clojure was the best beginners book for me.

Public speaking

I gave my first talk at a conference, speaking about how to do Ruby on a Windows/.Net project at the Scottish Ruby Conference! I also gave two talks at Forward’s regular monthly event First Tuesday. Some good presentation tips came from Presentation Zen, although my presentation style is still very rough around the edges.


The perks are pretty ace at Forward and last year free language course were on offer. I jumped at the chance to learn German. In school, I sucked at languages and hated being forced to do compulsory Irish classes. Happily German has being going really well. Maybe this is because I visit Germany so often and have become acclimatised to the language. The language courses are much more conversational than the rote learning I did at school. I find German to be very close to English and am fascinated by the linguistic similarities. Also, the straight-forward structure of German seems to have clicked with me.

There are some fantastic resources out there for learning languages. I listened to the Michel Thomas German audio course and Deutsche Welle Audio Tutor daily when walking to work. Repeating German to myself probably got me strange looks, but luckily in London you don’t know your neighbours. Recently, I have become totally addicted to Babbel’s free iPhone vocabulary trainer and Online course.

Statistics and R

Over the last few years my lack of statistics knowledge has stopped me in my tracks when approaching some data analysis problems. Last year I decided to do something about it and learn statistics and the R programming language. Here again Forward was the right place to be working. Alex Farquhar ran an intro to R session, and Abigail (the Forward Statistician!) ran a nice stats overview class. In August, I went to the useR conference at the University of Warwick. To be honest several of the talks went over my head but it was great to go to a conference outside my comfort zone.

Since then statistical techniques and thinking have come in extremely handy on recent projects. Statistics without Tears: An Introduction for Non-Mathematicians was my gentle introduction and I have been steadily working my way through the superb Khan academy statistics course. The RStudio IDE got me up and running with R and I got the basics from the Quick-R website. R in Action was the only book I could find that was wasn’t overload with statistics formulas.

Web development

Responsive web design was a big revelation for me in 2011. With so much internet usage now via mobile devices, having a site optimised for mobile is no longer a nice to have feature. I first heard about Responsive web design at a First Tuesday talk Luke Williams gave. At uSwitch, our front end guru Emma Sax did an amazing responsive styleguide which has made front end development work much easier. I recommend checking out Skelton which does a similar job.

I have steadily got into the habit of incorporating HTML 5 style markup into my work. Using the new input types like telephone lets you easily improve the user experience. I also hacked together a Wordcloud to learn about the canvas tag. Dive into HTML 5 is a nice introduction to the new features that are available.

Google Analytics

I had a basic understanding of Google Analytics, but last year I invested some serious time learning it properly. Teams at Forward take a lot of ownership over the work they do and the metrics in software like Google Analytics are critical to get insight into how customers are interacting with your websites. For nearly every feature I was involved in building, I made sure they was at some way to measure it usage (often by using custom events). I recommend watching the Google Analytics IQ Lessons which will give you a thorough overview.

The Environment

Most my work last year was centred around building new energy efficiency websites at uSwitch. I have always been interested in environmental issues so this was the perfect area for me to be working in. At the start of the year we built an energy-saving products shop on top of the great work Andrew Nesbitt and Michael Patricios did at Just Shops. I also ate my own dogfood and installed an energy monitor and a standby saver at home.

Later on in the year, Hemal Kuntawala and I built a Solar power website which lets the public find solar installers in their area. Hemal brought a lot of expertise from his side project Mixeeba along with an inspiring “just do it” attitude.

Side projects

I started a couple of little side projects mainly to learn Ruby, Rails and MongoDB. The main one was to aggregate content from Twitter links, but since I started using the amazing Flipboard application, I quickly gave up on the idea. As a learning technique I have found building my own stuff to be the most effective way to pick up new technologies. Only HTML to Hemal eventually saw the light of day!

What a year…

Coming up soon what I am planning to learn in 2012!

Opening github in your browser from the terminal

Here is my first ever bash function! When you run it from the terminal it opens the github page in your browser for the git repository you are currently in. In keeping with bash best practices it has a short simple name: gh. I find myself doing this quite a lot as I prefer the github log and history views to the gitx or command line views.

# Opens the github page for the current git repository in your browser
function gh() {
  giturl=$(git config --get remote.origin.url)
  if [ "$giturl" == "" ]
     echo "Not a git repository or no remote.origin.url set"
     exit 1;

  branch="$(git symbolic-ref HEAD 2>/dev/null)" ||
  branch="(unnamed branch)"     # detached HEAD
  open $giturl

Just type gh:
Opening github from the terminal

Boom! github!
The github page for the repository

How it works

It grabs the remote url via the git config command: Next it does some simple string replacements to get a github http url: Finally it open the github url in the default browser using the MacOS open command. As it uses the open command I imagine it only works on MacOSs.

Crazy Long C# Class Names

One of my colleagues, Michael Patricios, emailed a link to a funny Daily WTF article around the office yesterday. It made a passing reference to very very long class and interface names such as IEnterpriseAuthenticationProviderFactoryManagementFactory. This struck up both my curiosity and my desire to maser the Unix shell so I spent 5 minutes knocking up this set of commands:

admin ~ $ find . -name "*.cs" |  xargs  basename | awk '{ print length($0),$0 | "sort -n"}' 

What does it do? It find all C# files underneath the current directory, sorts them by ascending filename length and finally prints out the filename and its length. I was expecting all sorts of insane filenames, but in fact the uSwitch code base was relatively sane.

The results

NB: If you wrote any of these classes don’t be offended – this is only a bit of fun. I have been guilty of plenty of odd naming too!

Comment as class name

This longest non test class name was mine. I am a bit disappointed that I never went back to delete it though:

65 TemporaryClassSoThatExistingCmsContentWontBreakBetweenReleases.cs


This one scream of IEnterpriseAuthenticationProviderFactoryManagementFactory style patternitis :

41 DynamicUrlManagerDataRepositoryFactory.cs

(A handy web site exists if you fancy more names like this.)


Whilst this next one looks like a bad case of nhibernatisis:

37 NHibernateSessionFactoryRepository.cs


The longest filename were from our BDD test-obsessed phase a year or two ago:

57 specs_for_CustomerSatisfactionOverallSummaryController.cs
59 specs_for_LastLinkHasLastChildCssClassSiteMapTransformer.cs
62 specs_for_SendResultsEmailImmediatelyToMyFriendEventHandler.cs
72 specs_for_CurrentNodeHasCurrentCategoryCssClassSiteMapLinkTransformer.cs



At the other end of the spectrum, were some short and intriguing zen-like class names:

8 Party.cs
8 Smurf.cs
8 Water.cs
8 motor.cs
8 Logic.cs
8 Fresh.cs


And finally several cases where people just could not be bothered to either name or delete the file:


If you have a large code base why not run the command above? Let me know if you find anything interesting!