4 Feb 2015

Goals for 2015

2014 was a pretty miserable year for me. I lost my mother due to illness. I spent a large part of the year not working, and I was quite unfit, as I wasn’t running due to a recurring Achilles injury.  I well aware that there are far too many people who are lot worse off, and that I am actually very privileged, but I can’t help but look back at last year with a lot of regret.

2015 will be a much better year.  I am planning to marry my beautiful girlfriend, Mei, in September.  I’ve just started a new role that I’m very excited about, and I’m now starting to run seriously again, after a lot of physiotherapy and exercise to rehabilitate my ankle. 

These are my goals for the year ahead:

  1. To start running again!! Specifically, I want to:
    1. Run 80 miles per month by June.  I’m currently running around 25-30 miles per month, a very low mileage.
    2. Run every Parkrun in NI by the end of the year,  There are currently 19 Parkruns setup in Northern Ireland; I’ll be amazed if there isn’t 20+ by the end of the year.
  2. Get physically fit again!!  Starting to run again is one thing, but I also want to improve my overall fitness.  This will mean:
    1. Achieve a score of 250+ in the Five Minute Fitness Challenge (blog post to come)
    2. To weigh 70Kg at under 15% body fat by December 2015
  3. To develop a non-trivial side project using JavaScript. 
  4. Marry my girlfriend Mei. The most important thing for the year ahead will be my marriage to Mei in September. 

Mei & I

6 Jan 2015

Online Coding Tests with Codility

I spent several hours today on an online coding test for an employer.  This isn’t my first test using Codility. Not only have I done several of the tests before, but I’ve actually recommended they be used in a previous employer, when I was involved in interviewing, So I thought I share some thoughts around approaching these type of tests.  Before I start, please note – I won’t be posting any solutions to the tests I’ve done.  But feel free to try this useful link - http://bit.ly/1wSuukg. Winking smile

Codility is an online site that allows employers to set online coding tests for prospective developers.  It is effectively an automated screen to ensure that prospective developers have the necessary programming skills for the role. As it can take up a lot of time to arrange telephone calls for technical screening interviews, or onsite technical tests as part of the interview, Codility or the alternative CodeEval, can help save a lot of time.  Obviously, even when using something like Codility, you would still want to have a significant technical element to any subsequent interview.  Tools like Codility are an aid to the interview, but they certainly doesn’t replace it.

The actual test is sent to via an email with a personalized link to Codility.  Typically the link will only be valid for a set period (i.e. 24 hours).  On clicking the link, you are taken to landing page where you can choose to start the test, practice with a demo test or come back later.

Once the online IDE loads, you will be taken through a tour of the IDE features.

Some features in the IDE to be aware of:

  • Problem description (left hand panel).
  • Custom test cases (bottom of the left hand panel).  This allows you to define test cases for your solution, based on the problem description.
  • Code Editor (top right hand panel).
  • Countdown timer  (top right hand corner). Note, each task will typically take around 30-40 minutes.
  • Select the language to code your solution (top right hand corner). Note, this can be limited by the company setting the test.selection.
  • Various buttons to run and submit your solution
  • Console window (bottom right hand panel).  This will display the results of your code solution, including from your test cases.

Note, once the test starts, you can’t stop – the tests are time limited. 

The solutions require you to implement an algorithm described in the problem description. You may be asked to develop a solution with regard to performance, as expressed in the Big O Notation.  Check out this primer if it has been a while since you covered Big O notation!  Note, I have also seen a task that required you to correct an existing buggy implementation of an algorithm, so you may not always be starting a solution from scratch.

Now for my thoughts and tips for taking the test.

  1. Practice using the demo test and examples on the Codility blog.
  2. Refresh your knowledge on algorithms (i.e. sorting algorithm such as BubbleSort, or search algorithms such as BinarySearch), and specifically on Big O Notation.
  3. Use the problem description to define and breakdown your solution.  I typically break the problem statement into single sentences and use this as comments to outline and stub out my code solution.  Obvious, but it is easy to get flustered when taking one of these test for the first time.
  4. Use your usual IDE to develop your solution. The Codility site wants you to develop your code in their online IDE – I found this a real pain to use, and slow at times. My advice is to create a console application to host your solution code, and to develop in Visual Studio (or your IDE/code editor of choice) on your local machine. This offers a few advantages:
    • It is a familiar coding environment that you already know.  The Codility IDE is OK, but it has a few quirks.  For example, I found the custom test cases feature a bit of a pain to use.  There is no learning curve required when you are using your usual IDE editor.
    • You can benefit from automatic error highlighting and faster feedback on compilation errors.  The Codility IDE requires you to hit the Run button and then to read and decipher any errors in the console panel.  Your own IDE will typically give you more information about errors, and give it a lot faster.  This is important, as time is limited!
    • You can make use of a proper unit testing framework, such as NUnit. As noted above, the test case feature in Codility is clunky, and limits you to only 5 test cases.  Forget that, use NUnit and define as many tests as you need.

I created my test console application when I was going through the demo test, to ensure it was working correctly prior to actually starting the test. For the demo (and also the test tasks), I simply copied the stub method to be developed from the Codility IDE into my test console application, and developed it there.  When I had successfully coded and tested it in Visual Studio, I then copied the completed method into the Codility IDE, and then re-tested before submitting.  Once the solution is submitted, you can modify it or resubmit.

When submitted, the solution is analysed by Codility, and a detailed breakdown of your solution is available to the employer who set the test.  You can check out an example here.  Your result obviously determines whether or not you get called for interview.

Previously, I’ve done quite well in the Codility tests, and actually enjoyed taking them.  They are a bit like code katas. Today’s test, however, was a disaster.   There were 3 tasks to be completed, instead of the usual 1, so that the total time for the test was 2 hours.  I took far too long on the first task, which meant I had to rush on the second task.  After spending some time on the second task,  I ended up having barely anytime at all for the last test, so I doubt I’ll get called back. Entirely my own fault.  Interestingly, the second task required the correction of a buggy implementation of an algorithm. I suspect this was deliberately added by the employer as the role I was applying for would involve dealing with legacy code.

Despite today’s cock-up, I still like the Codility tests, and would certainly like to see them more widely used – they’re a lot better than the usual FizzBuzz whiteboard exercise!

2 Jan 2015

A Base .NET Console Application

I often use use console applications to put together proof of concepts and demos.  So I was very interested in this base console application from John Atten. However, while John’s console template was built to be interactive, I wanted a simpler base console that I could use as a starting point for any project. 

The source code for the application can be found on GitHub

At the minute, the solution is nothing more than a skeleton application with logging, error handling and strongly typed configuration settings provided.  It also makes use of a command line parsing library to allow easy addition of new commands. 

This is just an initial draft of the base console application. As I’m working on a couple of projects that will make use of this base console application, I’ll update the solution with any improvements I can think of in the next few weeks. I'm also happy to take pull requests, suggestions, and ideas for ways it can be extended.

Also, when developing the solution, I came across a minor issue with the BizArk toolkit, used for the command line parsing. I submitted a patch for the issue (that can be seen here), following these instructions from Scott Hanselman. My first patch to an open source solution!

30 Dec 2014

Podcasts

A few weeks ago, Toby Osbourn and Chris Laughlin blogged about the podcasts that they were currently listening to. I thought I better do the same, so here are my current podcasts:

Programming

Hanselminutes – A weekly podcast hosted by Scott Hanselman that covers web development and technology, with a particular emphasis on Microsoft and .NET development (Scott being a web developer working as part of the Web Platform Team at Microsoft).  Always worth a listen, it covers the major new technologies from the point of view of a developer.  A good mix of guests, and a good length (around 30 minutes) makes it very easily digestible.

Herding Code – This podcast comes out every few weeks, and is hosted by K. Scott Allen (OdeToCode), Kevin Dente, Scott Koon (Lazycoder) and Jon Galloway.  The podcast format will typically have a guest being interviewed in depth on one or more programming topics, such as a new library or service, and the conversation will typically expand to include general programming topics and tech news.  Always entertaining and occasionally off the wall.

This Developer’s Life – This is another podcast from Scott Hanselman, along with Rob Connery.  This is more about challenges faced by developers (and many others) in their everyday lives.  The podcast titles give you a flavour – Cancer, Competition, Pressure, Management. Quirky, but interesting. Sadly, it looks like this podcast has come to an end. 

If you’re interested in more .NET podcasts, check out http://thesoundof.net/, an aggregator of a number of different .NET podcasts. 

CodingBlocks.NET – A podcast I’ve recently discovered, it is a programmers podcast, hosted by programmers for programmers.  The recent topics have included design Patterns, ASP.NET vNext, the static analysis tool, NDepends, choosing your technology stack, and SQL databases.

Tech News

Tech Weekly from the Guardian Technology team.  Great for keeping abreast of all the current Tech gossip. 

Miscellaneous

Get Up and Code – A podcast aimed at developers discussing fitness and nutrition, originally hosted by Iris Classon and John Sonmez

Kermode Film Reviews - Mark Kermode rants about the latest film releases, while Simon Mayo heroically puts up with his Trotskyite nonsense. Lively, controversial and un-missable movie discussion.

We’re Alive – The best Zombie serial podcast that you’ve never heard.  Absolutely addictive listening.

30 Sep 2014

Career Options for the Older Developer


I recently read a Hacker News post asking what happens to older developers, and thought it would be useful to summarize the various options discussed across the 60+ page post.  As I’m in my late 30’s is a topic I’ve been spending a lot of time thinking about personally.
  1. Become a Senior Developer/Architect - This is the route that majority of developers will follow. The main advantages are that you keep on coding (hopefully) and you continue to learn new skills and technologies.  The disadvantages are that as you grow more senior, you are increasing pulled away from development into team management (see below).  There are also the issues of burnout (seeing the same mistakes being made over & over again in new technologies).  You also need to beware of being side-lined into maintaining legacy systems, and having your skills and experience becoming less relevant. Senior developers will typically also see their pay plateau, and will earn significantly less than some of other career options listed below.
  2. Move into Management – Some developers will expect to move through the progression of team leader and project manager into an IT management role.  Indeed, many (too many) organisations encourage/force developers along this path, simply because they don’t have senior technical career path. The advantages are that is such a common career path, and will generally be associated with higher pay.  The disadvantages – the higher the management ladder you climb the less coding you do. Also, being a manager is an  extremely demanding role, requiring a very different mindset to that of a developer.
  3. Consultancy/Contractor – This option is particularly popular due to the current demand for programmers. The main advantages are obviously the higher salary you can command as a consultant/contractor. You get to work on the projects and technologies you’re interested in, generally for short engagements. In theory, you no longer need to worry about department politics. The major disadvantage is the greater risk you’re exposed to when you’re effectively self-employed. 
  4. Move into other Sectors - Some developers will step out of development and move into other IT related roles (System Security, Testing, Business Analysis), while others still will move into different fields where their skills and experience are relevant (i.e. sales, scientific and engineering roles). 
  5. Become an Entrepreneur – This is particularly popular at the minute, with a growing number of developers moving to startup their own company.  You build a product or a SaaS solution or service company.  You may gain financially, or you may not.  At least you are your own boss (or maybe you’re really at the beck & call of all your customers). It will definitely require a significant investment of time and possibly money to become your primary means of making money.
Know of a career path I’ve missed?  Let me know below in the comments, or ping me on Twitter (@AndyParkhill)

P.S. I tried really hard to find a gender neutral icon for a programmer, and the image of the Lego mini-figure above was the best I could come up with.  I’m not particularly happy with it, as it uses the usual lazy stereotype of software developers (male, geeky).  If you know of a better icon or image I can use, please get in touch!

* Photo by wiredforlego used under Creative Commons

29 Jan 2014

Tracking My Weight Over The Years

For the past five years, I have been recording my weight daily.  This year, I’ve finally given up on weighing myself daily, and have reduced it to weighing myself weekly.  As part of the change, I have finally combined the logs from the different years into one.  This has allowed me to track how my weight has changed over this time, and not just over a one year period.

You can draw a few conclusions immediately:

  1. Despite a plateau from March 2009 to October 2010, my weight has been rising over the past few years.
  2. Each year, my weight generally peaks at the end of December.
  3. Despite a number of periods of brief weight loss (generally due to illness), I consistently regain and gradually increase my weight.
  4. I need to lose weight.  And it is going to take time to lose it. After all, it has taken over 3 years to add it.

You can track how my weight changes via my bodyweight log.

17 Oct 2013

Quotes

A few quotes that I’ve came across over the past few weeks that have really spoken to me:

“I Do Not Intend To Die, Washing A Teacup”

Attributed to Margaret Thatcher, The Iron Lady 2011 (courtesy of Jack Monroe’s excellent blog)

“A man of words and not of deeds is like a garden full of weeds.”

Traditional English nursery rhyme, courtesy of a comment on Barry Adam’s fantastic article “How I’ve been shafted by Darryl Collins from Banjax and Gingerparts”.  Take the time to read the comments – they’re a revelation.

“First we form habits, then they form us. Conquer your bad habits or they will conquer you.”

Dr. Rob Gilbert, Sports psychologist.

I think you can probably see a trend emerging from the quotes above.  It is time I got off my backside and started doing stuff again.