I’ve found myself wanting the convenience of some Bash unit testing for the third time, and not wanting to develop yet another set of assertion functions I thought it was about time to find something reusable. I’m looking to do the basic asserts, with some regular expression matching and a sprinkling of self shunt (with command interactions intercepted by replacing commands like echo with functions within the scope of the test). I should credit Ross Beazley for starting me off on this approach. This time I’m resisting the temptation to start a new project and thought I’d find something to fork and improve. So here are a few of the projects I found and a bit of analysis.
Test Driven Development in Bash
27 March 2014Take your scripts with you
25 March 2014I often feel quite nomadic when using Bash. I’m somewhat a hobo developer, moving from home to home. Recently I’ve been working with OS X at work, and I’ve been on OS X at home for years. Yet still I had some machines where my bash history would drop off quickly, and where aliases I use a lot didn’t exist. When I worked out how to get hostname completion working with ssh I decided it was time to have a dotfiles project.
Using OS X at work behind a proxy
17 March 2014Here are some tools I’ve found useful recently to work effectively using OS X behind a proxy at work.
Free hosting with Github Pages
16 March 2014I’ve made the move from Wordpress to Jekyll, and Wordpress.com for hosting, to Github Pages which has Jekyll support built in. Combined with Github Pages (which is an awesome way to host HTML sites for free), this is a very powerful way to get an easy to manage blog with complete control and no sales pitch for extras.
That’s no moon: Visualising Go Delivery Pipelines Using D3.js
16 February 2014We’ve been doing quite a bit of work improving our Go environment recently, and correcting one or two continuous integration anti patterns we’d introduced. I wanted to find a way to see the effect of these changes, and it occurred to me that it might be possible to use D3.js to build the view. I have had good use cases for graph diagrams in the past but got bored looking for a good way to draw them programatically. I’d even lazily fallen back on the Neo4J console to program the graph and then visualise it (and amusingly I now see that that page is using D3.js behind the scenes).
Saving the world, one dashboard at a time
22 May 2013A colleague asked us recently to make sure we turn our monitors off overnight to save power. That’s all very well, but what should we do about our dashboard? We purposefully disable power saving to make sure that the display doesn’t turn off during the day, and since we never actually use it there would be nothing to wake it up! It turns out you can easily script this using Task Scheduler, which comes with Windows. You will need to download a tool called NirCmd, which allows you to control your monitor from the command line (amongst many other things). You already have a command called powercfg to configure the other Power Saving options from the command line.
Ascii Distribution Histogram—pivot your standard out
26 June 2012Update: I’ve rewritten this with more features and better code—take a look!
I spend literally hours a week just trawling logs, often wanting to visualise what I’m seeing. Yes, I could faff with Splunk or something else expensive (yes, I know there is a free version), but sometimes I just want to know what a column of response times looks like.
Simply Measure Anything with MetricLogster
25 June 2012Okay, so my previous post is a long overdue summary of how we are visualising application metrics using Graphite. We are writing custom Logster parsers which scan our log files and push interesting things into Graphite. This means that to get a new metric into Graphite we need to add it to our log files (unless it already exists), and adapt or create a python Logster parser to understand whatever we’ve logged. This parser then needs to be deployed to our server running logster and a graph built. The biggest blocker we’ve seen with this approach is the necessity for the engineer to understand how to write Python, where to find and test the Logster parsers, and how to deploy the parser to the Logster server. Personally, this means either doing the work myself or explaining the peculiarities of Python white space handling to yet another person. There must be a better way.
Meet Graphite
10 May 2012Last year i was fascinated by a presentation [slides] by Etsy about their approach of metrics driven engineering - see their blog post - Measure Anything, Measure Everything. They started with some questions: how many of us had access to our production logs (a reassuringly high amount), and how many of us could tell them how many hits our application was getting right now / how many hits it got this time last year.
Fast Feedback
15 February 2012My relationship with Ant has had its ups and downs. I hate writing a build file in a language that I’m unfamiliar with, and finding that the language seems designed to encourage and hideous result. Recently however I felt I achieved something, successfully reducing the duration of our teams pre check in task task from three and a half minutes to only 24 seconds.