Posted on Friday, 24th February 2017
Can you TDD in Scratch?
TL;DR: yes, you can!
In our team, we use a Test-Driven Development (TDD) approach when writing code. I’m a supporter of this approach and its many benefits. I won’t go into the benefits here — you can Google many articles on the subject (other search providers are available).
Scratch, from MIT, is essentially a visual programming environment that “helps young people learn to think creatively, reason systematically, and work collaboratively — essential skills for life in the 21st century”. There’s a growing movement around teaching kids to code, that will hopefully play an important part in solving the skills and diversity shortages our industry has.
One day, the crazy thought popped into my head: “Can you TDD in Scratch?”. I did a brief Google, and couldn’t find any examples of TDD in Scratch.
So, in my “10% time”, I looked into doing some TDD in Scratch. For my first experiment, I implemented the algorithm for the Roman Numerals Kata. I cheated a little here, by implementing the algorithm first and then put a test around it afterward (this isn’t TDD!).
This at least proved that it is possible to separate my algorithm logic and have tests around it. So next I decided to do some actual TDD in Scratch…
Read the full post in the GitHub readme… https://github.com/rossharper/ScratchTDD/blob/master/README.md
Posted on Saturday, 20th February 2016
This weekend I’ve been learning a little Kotlin — the (relatively) new JVM language from JetBrains.
Once I’d worked my through the “Koans”, I decided to try a simple Code Kata. I chose the Roman Numerals Kata for this exercise. Whilst doing this, I wanted to use a parameterised unit test, and had to figure out how to do that in Kotlin…
Posted on Monday, 23rd November 2015
This is a
quick post in response to a question related to my boiler control Github project: https://github.com/rossharper/boilercontrol
I intend to eventually perform a more comprehensive write-up of this whole project.
I had been looking to start tinkering with my Raspberry Pi and do some home automation for a while. We have a Siemens RCR10/433 wireless thermostat programmer that controls our boiler and I wondered if it would be possible to hack the radio signal and take control of the boiler myself. Thus, I could create my own smart heating system inspired by products such as Nest and Hive.
This post roughly outlines the process I used to sniff the signals sent between the thermostat and the receiver relay that controls the physical call for heat signal to the boiler.
Posted on Saturday, 31st May 2014
Easter weekend saw Liam and I head up to the Tweed Valley in Scotland for a couple of days mountain biking. Our base was the campsite at Glentress Forest Park, where we camped with my tent and “the van”. It was to turn out to be a fantastically enjoyable weekend of trail-riding in glorious sunshine (the locals informed us we were very lucky to have such weather!).
Posted on Monday, 28th January 2013
Last April, a friend and I went for a walk around Dovestone Edge in the Peak District and were greeted by a blanket of snow on some of the hills.
Below is the view from the opposite side of the reservoir basin, from Alderman’s Brow. A blanket of fog was just lifting as we arrived at this rocky outcrop, revealing the view.
Posted on Saturday, 19th January 2013
Britain has seen its first covering of snow over the last few days, along with all the overreaction, complaining, and infrastructure meltdown that comes with even the lightest spinkling of water crystals this little island receives. Our nation seems ill-equipped to deal with the rare and irregular arrival of the white stuff, and handles its effects comedically poorly compared to some of our Scandinavian neighbours and Canadian cousins, who are well experienced in dealing with winter-long coatings.
Regardless, I love the snow. I’m always delighted by the transformation it makes to the landscape.
Posted on Saturday, 7th April 2012
News broke that Jim Marshall, founder of Marshall Amplification, passed away this week. His iconic brand of guitar amplifiers have been used by many of the most famous guitarists around the world, and they have inspired many a teenager.
I had half an hour to spare before heading to the pub on Thursday night, so I knocked together this small tribute.
Posted on Sunday, 25th March 2012
Friday saw Queen Elizabeth II and the Duke of Edinburgh visit MediaCity:UK in Salford to officially open it, as well as BBC North. After a tour of the studio facilities and a visit to BBC North’s Quay House to see some of Research & Development’s current projects, she also presided over the start of the MediaCity:UK 2012 Sport Relief Mile.
Posted on Wednesday, 21st March 2012
Pinterest seems to have taken off hugely recently and has become the social network du jour. I had a dabble with it when I first got an invite and “pinned” some of my own photos there and some other links I found interesting. However, it never really captivated me and I have largely ignored it since.
While I, and many of my peers, may not have taken to this new way to share, others have. Lots of others have. It seems to have become very popular amongst the female demographic in particular.
I already had added support to share links to my blog posts via Twitter, Facebook, and Google+, so I decided to add a Pinterest “Pin-it” button too.
It’s a relatively simple thing to do.
Posted on Monday, 19th March 2012
I got the chance to go to Amsterdam for a couple of weeks back at the end of October last year. I’d been a few years before for a weekend, but I wasn’t really into photography back then and had other distractions. This time, the trip was for business, to do some work on-site with a supplier, and I had a spare weekend to get out and take some photographs of the city.