Categories
Groovy Java Test Driven Development

Why all Java devs should at least consider Groovy and Spock for testing

As a developer, testing is very important. Some developers have the mindset of “Meh, I write code, testing is a QAs job”, which is pretty poor. It’s much better for the developer to be test driving their code, generally if adopted well it produces better quality code, and of course the sooner issues are caught […]

Categories
Mathematics Project Euler

Project Euler, problem 1, multiple factors

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. To solve this in a brute force manner, we can count up […]

Categories
Javascript Node.js

An intro to Node.js, building a URL shortener

Node has been on my todo list of things to investigate for a little while now, whilst I don’t have much background in javascript, after constantly hearing about it when I was working at O2 Telefonica, I thought I better see what the fuss is all about. The best way to learn how to use […]

Categories
Android Raspberry Pi Robotics

Robots! Part 2, the android client

Continuing on from my previous post, I’ve created an android client that I can use to send commands to my python server. Ultimately I want to be able to control the robot remotely, the best way to do this would be to control the robot from a tablet or a phone which communicates wirelessly with […]

Categories
Java Python Raspberry Pi Robotics

Robots! (part 1)

Inspired by the android controlled lego robots I saw at DroidCon UK this year, and with difficulty finding a use for my raspberry pi, I’ve decided to have a go at building a robot that I can control via an android app. Having a 24 hour flight home from Australia at the weekend, I’ve had […]

Categories
Mongo DB

Selecting partial elements of mongo db documents

By default, when you find documents on mongo it returns the entire document, similar to what SELECT * FROM TABLE; would do in a relational world. You can retrieve partial document info by using something known as a projection (see mongo docs here). Use find() with an empty query, but specify the fields you want […]

Categories
Android Book Review

What I thought of “Instant Android Fragmentation Management How-to”

I was recently contacted by the marketing team from Packt Publishing and asked if I could write a review for one of their new ebooks, so here it is! This book gives a brief yet comprehensive overview of some of the processes you can follow to improve your applications chance of working on the varying […]

Categories
Java Test Driven Development Uncategorized

A few little tweaks to automate Android instrumentation testing via Robotium & Maven

Having recently revived an android project I haven’t opened in close to 6 months, I was left scratching my head as to why I couldn’t run any of my integration tests. Thinking back, I remembered having problems getting robotium to instrument the clicking of a button, as simple as it sounds, theres a few little […]

Categories
Grails Groovy

Bootstrapping a Grails application to prepopulate data on startup

I’ve been dabbling in a little Grails recently, and I found it quite frustrating having to re-enter some sample data everytime I restarted my application, in order to have the views look meaningful. Fortunately, theres an easy solution, just do all of your setup in the Bootstrapper class like so : Then, every time you […]

Categories
Cloud & Web Development Grails

Deploying a grails application to Cloudbees

I spent much of last weekend experimenting with the grails framework, so I wanted to deploy what I had in the cloud. Theres a big tutorial on the IntelliJ IDEA documentation (the screenshots don’t seem to match my installation of IDEA, even though its the same version number). There is a much easier way, providing […]