Mars Rovers: A Coding Problem Solved in Python

Lately I have been interviewing for jobs, and was sent a coding problem by one of my interviewers to solve. I thought I’d post my solution here, since it illustrates some aspects of my approach to coding.

The problem involves reading in a text file containing remote instructions for Rovers that are landing on Plateaus on Mars.

You can see my solution in Python 3, done with BDD using Mamba, on my public GitHub profile here: Mars Rovers Solution

I should probably mention that this is the first thing I’ve written in Python 3.x, and my first time using python at all in a couple of years. Writing this little app has reminded me how much I love python! What a language! 🙂

The Devil In The Details

Because this site is about the art and science of Software Development, it’s not enough for me to just publish the fruits of my labours without analyzing every little implementation detail to a disturbing degree.

So with that goal in mind, here are some of the technical artifacts from my development of “A New Dawn”, my WordPress theme, for those among you with an inclination to explore such things.

The two main modules I created while making this theme were The Loading Screen module itself and The CSS Notification module, a cross-browser module for invoking a javascript callback when a linked CSS file has finished loading. A cleaner source listing for both files is available under the HTML documentation link below. These source files constitute part of the code for the theme and can be re-used or extended in other contexts by themselves.

Artifact Loading Screen CSS Notification
API Documentation (YUIDoc)
Notes from Test-Driven Development (FreeMind)
Test Harness (QUnit)
Unit test listings
Changelist descriptions (Mercurial)