The English-Likeness Monster Stalks a New Generation of Programmers

Reginald Braithwaite addresses “English-like” programming languages, including one of my major pet peeves, English-like tests:

And of course, the lessons continues to be re-learnt whenever someone discovers the joy of a “Domain-Specific Language.” DSLs are usually read-only. The fantasy of a business executive writing requirements directly in a testing DSL or model writing DSL always seems to require unicorn blood to lubricate the apparatus. This would be a reasonable requirement (A test might be written once but read many times), except that if it is hard to write, it might be buggy in subtle ways. Code has to be easy to write if you really want to trust it.

I admire the theory of having business people specifying the software. But they probably aren’t going to do write specs. The programmers do that.

If you chose a tool like Cucumber, the programmers write the specs in a constrained language sort of like English, then write regexps to parse out the parameters from the pseudo-English text, then write the actual tests.

If you choose to write your tests in code, you can still describe them in English (at least with Ruby tools like MiniTest or RSpec) but write them in code.