Survey: Python vs Ruby Test Ecosystems

tl;dr Please help out and take the survey. It only takes one or two minutes.

In my spare time, I love to read up on many different topics that are happening in the modern world of software development. On many occasions, the initiatives that I find most interesting are happening in the Python and Ruby communities.

I immediately have to admit that I’m not too actively involved in the Ruby community yet. It is a language that I don’t have much “handson experience” with. Although I think the Ruby community is a bit more chaotic than Python’s, I also believe that more exciting things are happening there. Ruby definitely got the more snazzy and sexier appeal of the two, but I also think it’s the more naive brother of the two that gets in trouble in its teen years (think drugs and jail).

Lovable and Loathsome Language Features

I have always found it really hard to express what I dislike about Ruby. In my college years, I really enjoyed functional programming and I absolutely adore the influences Ruby got from that world. Solving programming problems with the typical Ruby language constructs like blocks is very satisfying and feels really elegant. Next to that, Ruby makes a gorgeous language for creating DSLs.

Yet, the “black magic” and the implicit behaviour that also accompany Ruby give me the eerie feeling that I’m not in control.

When I stumbled upon this video by Gary Bernhardt: Python vs Ruby: A Battle to The Death, all the pieces of the puzzle fell together for me. In this talk, Gary puts to words what my feelings about the two languages are to a great extent. Result: I love both and I hate both.

Uncovering Test Ecosystems

Especially the conclusions Gary draws about RSpec being a superiour specification language is something I share. There simply is no good equivalent of RSpec for Python. In fact, it’s impossible to ever create one in Python, due to Python’s inability to inject methods into object and its lack of blocks, and therefore, its lack of DSL capabilities. (Oh yes, there have been attempts. None of them are as good as the real thing.)

This made me think. Does Ruby have a more mature testing culture? If I browse around interesting projects on Github, for example, I always get the feeling that the Ruby projects have better tests and better coverage than the Python ones (sorry, no scientific proof here). <bait>Maybe they have to because of the magic in Ruby? ;)</bait> But most importantly, the Ruby culture seem to care more (or at least have higher awareness) about actually testing their code at all.

At the same time, I get the feeling that the Ruby culture has less testing tools available. Maybe this is because I simply don’t know the Ruby community as well as I know Python’s, but maybe there has been a lot more consensus and standardisation already.

Only one way to find out

This made me curious, so I decided to pull up a quick survey. I hereby invite all Python and Ruby developers out there to participate in it. Please help spread the word on Twitter to get as many participants as possible. The more answers received, the stronger the map of available and popular tools will be. I’ve also included a few questions on the use of continuous build and integration systems. After taking the survey you can see the results so far.

I’ll make sure to blog about any interesting conclusions that can be drawn from the numbers that I will gather with this.

If you want to get in touch, I'm @nvie on Twitter.