All posts filed under: Dev

Run multiple Gatling simulations with Maven

comments 4
Dev

Gatling is nice load testing framework that uses Scala, Akka and Netty. It’s so much better than JMeter. It’s pretty easy to get started with scenarios written in a nice Scala DSL and it produces useful reports too. It also has a Maven plugin so you can incorporate continuous performance testing in your builds. The trouble is if you list multiple scenarios in a simulation they will all run concurrently which is probably not what […]

Generating random mobile numbers with Scala

comment 1
Dev

Sometimes in testing we need to generate random data. When it comes to generating mobile numbers it would be helpful if we could be sure they aren’t allocated to a real person, just in case we accidentally send 1000 text messages to random phone numbers. Luckily Ofcom has reserved ranges of numbers for dramatic use that are guaranteed not to be allocated to providers. Here’s a little random UK mobile number generator wrapped in an […]

Calculating distance with Scala’s foldLeft

comment 1
Dev

I wanted a way to calculate the total distance of a GPS track. A track is basically just a list of lat,long pairs – represented in Scala by the following: [crayon-5f2b56ae6fb50572987639/] One way to do this would be to iterate over the sequence, calculating the distance between points (using the haversine formula) and updating the sum in a variable but since this is Scala we can do it in a more functional way. According to […]

Garmin Communicator WordPress Plugin

comments 4
Dev

I run the ridemap.org website which is a collection of motorbike routes and I wanted a way for people to download the routes to their GPS devices. Originally I was just going to provide a downloadable GPX file but then I found that Garmin have a browser plugin that allows data to be transferred between your Garmin GPS device and your computer. After getting it working on my website I decided to wrap it up […]