Subscribe: Paul Hammond's Journal
Added By: Feedage Forager Feedage Grade C rated
Language: English
ben alpert  case  code  configuration file  configuration  data  file  files  it’s  json  new  simple  slack  small  time  working 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Paul Hammond's Journal

Paul Hammond's Journal

Updated: 2014-05-19T07:32:26-07:00


webkit2png 0.7


It's been over a year since the last release of webkit2png, it’s about time for a new one.

This is mostly a bugfix release. The new version does a much better job of handling both retina displays and local files, thanks to Ben Alpert, Sean Coates, and Jeremy Stucki

There are also a handful of new features:

You can see the full list of changes or download the code.



Today is my first day at Tiny Speck, purveyors of the awesome Slack.

A few weeks back I realized that almost all of the ideas I’ve been working on were incredibly similar to the tools that my friends over there were building. It turns out that most of the problems in operations these days are communication and coordination problems, that the challenge is not getting more data but finding ways to talk about the data you already have. The Slack team have been working on this problem for longer than I have and their approach seems to be working. They’re also really nice people, so when I got the opportunity to work with them the decision was obvious.

Initially I’ll be working on making Slack integrations easier. They’re already ridiculously easy but there is still more to do. I’ll be writing better documentation, adding new APIs, making the existing APIs better and doing whatever else is needed to help you write code that talks to people. If you have ideas, let me know.

After that, who knows? Whatever happens it’s going to be fun.

jp 0.2


Version 0.2 of jp is out. It fixes a small bug where significant whitespace was removed from invalid JSON documents. More importantly it also adds some color to the output:


Color didn’t make it into the first version of jp, but it was one of the reasons I built a new parser when I started writing the code. Adding ANSI Escape codes to one of the many existing general-purpose JSON libraries would be possible, but I’m not convinced it would be the right thing to do. Most JSON code is now part of the core library for any language and adding extra code to every JSON generating application to handle this one specific use case is a waste of CPU and future developer debugging time. Even if a patch were appropriate, it would take a really long time before I could rely on the functionality being on a system, so I wrote a new library for this use case.

In general it’s hard to argue against code reuse as a concept; none of the computers systems we use today would be possible without it. But sometimes we take that concept too far, and try to reuse code in a context it wasn’t designed for, or write code to handle every use case when just one is needed.

Greg Wilson’s “What We Actually Know About Software Development” is, in my view, one of the best presentations ever given about code. If you haven’t watched it, you should. Around 32 minutes in he talks about some research from Boeing that suggests “if you have to rewrite more than about a quarter of a software component, you’re actually better off rewriting it from scratch”. This seems like a small but useful example of that effect in action.

But I digress. If you want your JSON in color you should get the latest jp.



Logtime is a small service that makes timestamps human readable.

Anyone who's spent any time debugging production systems has had the frustrating experience of trying to correlate the timestamps in a log file with something that happened in the real world.

The log files are usually in UTC when you want them in localtime, or worse, the other way around. Even if you can remember that San Francisco is 8 hours ahead of UTC in the winter actually doing the mental arithmetic is annoying. And some log files helpfully use unreadable timestamps like @4000000052d7c9e300000000 or 1389873600. If you're lucky you can remember the right incantations to the date command to convert what you want; I can't so I made something instead.

It's not quite done. I'm sure I've missed a few common time formats, and I'd like to see how, and if, it gets used before working out what to add next.



s3simple is a small Bash script to fetch files from and upload files to Amazon’s S3 service.

It was written to help with a fairly common case: you want to download some data from a protected S3 bucket but you don’t have a full featured configuration management system to help you install the software to do so. Perhaps the data is part of your server bootstrapping process, perhaps you just want to download and run an application tarball on a temporary server as quickly as possible, perhaps this is part of a build script that needs to run on developer laptops.

Usually in this scenario s3cmd is used. S3cmd is great; it’s powerful, feature complete, flexible and available in most distributions. But it’s not set up to use in an adhoc way. To run it with a set of one-off IAM keys you need to create a configuration file, then run s3cmd with extra command line options pointing to that configuration file, then clean up the configuration file when you’re done.

In comparison, s3simple takes an S3 url and uses the same two AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables as most AWS tools. It only has two dependencies (openssl and curl) which are installed or easily available on all modern unixes. And it’s a simple bash function that’s easy to integrate into a typical bootstrapping script.

I’ve found it useful. I hope you do too.