Code

Elegant code and Go

Writing elegant or readable code is a driving force for some programmers that have been around long enough to know that less code is usually better than more. We also know that less code is usually also less efficient than more, for various reasons. Depending on how you like your cat skinned, there are several ways to do things.

Read more

Outperforming MySQL by hand

There is this SQL table, right? This is the part where you knowingly nod and prepare yourself for a long story about how a database is as good as the person designing it. Let's call this table an access log. For the sake of argument, let's also say it's 30GB in size, has a 100 million rows, and only has an auto_increment PK ID field. Your task is, should you choose to accept it, to retrieve the last hour of entries in this log table.
Read more

So far there is a distinct lack of snakes

In the dashboard which I hacked together at MMC RTV Slovenia, I display a set of related flickr searches based on the current state of the system. So far, there's a distinct lack of snakes, volcanoes, lava, fire, explosions and other things that might freak an engineer out as much as a server outage. Thoughts: I like how the hosts are clearly marked when one of their metrics goes over a threshold.
Read more

Flickr API

I’m currently applying for a Flickr API key, and this is what I put into the description for “HQ Dashboard”: “I’m building a monitoring dashboard which includes statistics data from internal sources, some tweets and, hopefully, an assortment of Flickr backgrounds based on current monitoring conditions (ie., search for fire/destruction/storm/tornado when servers are being overloaded, and grass/meadows/happy/coffee if the monitoring says everything is fine). In this way I plan to use the Flickr search to provide a visual representation of the severity level currently being experienced.
Read more

A venture in continous integration

Green lines are code deploys and red ones are requests going to a part of the cluster. I had a big deploy today, and I'm glad to come out of it relatively unscathed. Frameworks now use Composer packages, more code reuse now Updated structural framework, base classes Relatively smart and simple dependency injection Proper exception handling and notification Obviously there was some breakage. I had to fix about 5 incorrectly implemented interfaces, out of which one was affecting work (3 minutes to fix in production!
Read more