The beer is about to get a lot colder..

When Tim first returned to the UK from his time at Moodle HQ, the first thing he did1 was to invite me to come to The Great British Beer Festival with him. Apparently i’d taunted him with reports of Real Ale whilst he was in Perth. Well.. it’s time for Tim to get his own back!

The view out of my office window today in LancasterAfter seven years working at LUNS and nine years living in Lancaster, I’ve decided to have a change of scenery and i’m going to be leaving many great friends and colleagues behind to move to Moodle HQ in Perth, Australia. Needless to say, this was not an easy decision to make. (Although the weather like Lancaster demonstrated today could convince me otherwise!)

My involvement with Moodle started with LUNS and it has been a great journey. We were newcomers to the Moodle community with a small project to move a few keen high-schools onto supported hosting platform in 2005. My first post to moodle.org was asking the theme forums for advice on how to do multiple themes on a single codebase and the first patch I remember getting accepted was to help us solve that problem six months later: MDL-6784.2 Today LUNS is one of the largest non-HQ code contributors to recent Moodle releases and have provided hundreds of thousands of people with access to Moodle through our various clients – primary school students3, university lecturers4, high school teachers, company employees and charity workers. I’ve thoroughly enjoyed that journey and the great people who have made it what it is.

I’m really looking forward to working for Moodle HQ! Despite being so close to Moodle as a developer, I continue to be amazed and motivated by how many people I can touch by working on Moodle. Friends from my days at school and university use Moodle as part of their job on a daily basis, my youngest sister is currently studying and supported with Moodle (unfortunately only at stage 1 of Martin’s pedagogical stages) and I meet more and more moodlers ever day! I’m hoping that my time working as external developer working on the other side of the world to Perth will be a great new perspective to add to the team.

I’ll be working for LUNS for a while yet, but it feels like a good opporunity to thank everyone i’ve worked with over the years at LUNS, clients and community members who accepted my patches. :) I’m touched by the kind post about my leaving. I expect to continue working with you if more indirectly at Moodle HQ. :)

Happy Moodling!

  1. Well, the first thing I knew about, anyway []
  2. Although the git history suggests my first fix was actually a horrible JS change which surprises me more than anyone! []
  3. Making their initial steps to learning how to use a computer []
  4. No comment []

Siri Interface to the Moodle Tracker

Earlier today I came across an interesting project which provides a ‘proxy interface’ to Siri on the iPhone 4S allowing custom plugins to be created to respond to requests from Siri.

Eager to try this I hacked together a Moodle plugin for the siri proxy which would do lookups to the Moodle tracker. So, welcome Siri – the newest aid to the Moodle 2.2 QA testing effort :-)

(The plugin I wrote is available on github. It is my first ruby script and its not particularly elegant as it was just for fun :-) )

 

Software Metrics and Moodle

This weekend I attended the phpnw11 conference in Manchester, a good conference with a lot of interesting talks which i’d highly recommend to any php programmer.

Not entirely accidentally, I went to a number of talks focused on testing and continuous integration and came home with quite a lots of bits and pieces I wanted to play with. Sebastian Marek gave an excellent talk on Software Metrics (slides available) as the first track talk of the day. Obviously I can’t summarise his talk, but he introduced us to the concept of the cyclomatic complexity, NPATH, C.R.A.P. as well as WTFs/min as well as tools which can be used to measure them and other assessments of code quality. Sebastian made the point quite strongly that you can’t just use these metrics on their own, but that they could be good indicators combined with analysis of the code.

This got me wondering if the modern parts of Moodle would be analysed more favourably that older parts of Moodle which developers tend to long to refactor away?

Testing 1.9 vs 2.2

So I conducted a test using php mess detector and its code size rules on the question engine in Moodle 1.9 and compared that with master (which includes the rewritten question engine that Tim spent a good portion of the last year working on1 ).

~/git/moodle$ git checkout MOODLE_19_STABLE
~/git/moodle$ phpmd question/ html codesize > question19.html
~/git/moodle$ git checkout master
~/git/moodle$ phpmd question/ html codesize > question22.html

Results

Moodle 1.9: 315 Problems Found
Moodle 2.2: 233 Problems Found

Moodle 2.2 has better metrics than 1.9!

Well, not quite – in order to get those results I had to remove all the unit tests, which weren’t present in Moodle 1.9 and also tend to be ‘long, dumb’ methods2 which trigger just this sort of metric and made the result larger. I don’t really know the code well enough but there may be other factors such as question/ including more code…

The results matched Sebastians point that these metrics can’t be used on their own, but some of the metrics which can be generated might be very interesting datapoints to look at with time. Sonar was a tool demonstrated which could be used in combination with a continuous integration system and tools which generate these metrics to evaluate and report over time – some of which looks really cool and I hope to play with soon.

  1. and I hope he doesn’t mind me using as an example! []
  2. Incidentally Laura Beth Denker also did a great talk at phpnw11 emphasising how you should write good test code avoiding things like conditionals- slides available []