Monthly Archives: April 2012

When Do You Commit?

Git repositories hold a wealth of interesting metadata in addition to the code itself.  The number, frequency, authorship, longevity, etc. of commits  reveals a great deal about software and its development.  Depending on the content of commits and commit messages you may be able to infer the life cycle of software defects: when are bugs […]

Leave a comment

Tests are Part of your Product

Check out the slides from my Railsconf 2012 Lightning Talk on Speakerdeck: I’ll be expanding on these concepts and sharing my thoughts on how developer-written tests fit into a strong engineering culture over a series of blog posts in the next weeks.  Stay tuned!

Leave a comment

Installing Atexit Handlers On Module Load Considered Harmful

A common idiom in Ruby testing frameworks is the use of at_exit as a way to schedule interesting work. I am not a fan — it is an idiom that is ripe for abuse. The C library’s atexit(3) function that inspired Ruby’s at_exit function was originally intended to allow the registration of handlers to tear […]

Leave a comment

Handling JSON POST bodies in your Ruby/Rack Application

Want to post largish JSON objects to your web service? Merely think that using POST parameters as a transport is a little ugly? If your web service is implemented as a Rack application, take a look at this handy Rack middleware: All it takes to use it with Sinatra is a simple use statement […]

Leave a comment

Ruby Debuggers for 1.9.x

I don’t often use a debugger with Ruby, but when I do, I use…ruby-debug19? The ruby-debug19 gem has been the most common debugger for ruby 1.9.x for some time. Sadly, it is no longer maintained. What to do? We’re moving to the aptly named debugger gem and we recommend you do, too. As it happens, […]

Leave a comment

Code Coverage

Here at Solano Labs we believe in the importance of measurement.  This philosophy applies equally to the realms of performance and quality.  The fact is, even skilled  programmers are often wrong when they rely on their intuition to tell them where the slow path in their code is or where the technical risk is.  New […]

Leave a comment

3,000,000 Tests!

Tddium just ran it’s 3,000,000th test.  That’s a million a month, and we’re just getting started. Stay tuned for news of great new features and developments from Tddium and Solano Labs!

Leave a comment

Filesystems Directory Entry Order and Reproducible Testing

File systems are a ubiquitous abstraction in computing: they provide a natural way to manage raw storage and provide a mapping from file names to stored objects. Frequently we can leave the messy details of semantics to the poor soul implementing the file system.  The basic interface is very simple: a file system consists of […]

Leave a comment

Down the Rabbit Hole with UTF-8, YAML, and RSpec

I hope this post saves someone from a similar afternoon to the one I just spent, puzzling over what appeared to be an impossible test result. TL;DR: string.encode!(string.encoding, …) does nothing, even if string isn’t valid for string.encoding. To really force an encoding, hop through BINARY.  Regex matches on unsanitized binary data are common cases […]

1 Comment