The long way through Software Craftsmanship

A basic working environment

Sep 8, 2015 - 2 minute read - Comments

Sometimes, when working out of somebody’s else computer, I won’t have my preferred IDE installed.

In this case, what I usually do –as long as the programming session is more than 5 TDD cycles–, is to configure my own environment. It includes:

  • text editor: $EDITOR is enough
  • test runner. A simple bash script executing the tests will suffice
  • git terminal: to commit, see differences, revert, etc
  • [optional] REPL if the language has it

If the system already has it, I will use screen to cycle around the sessions.

A simple test runner

More in depth, the test runner will be similar to this:

while [ true ]; do
    clear;
    date;
    runhaskell Spec.hs;
    read i;
done

This script will:

  • clear the screen (for better readability)
  • print the date
  • execute the tests
  • read from the console, effectively waiting for the user to interact (an enter is enough)

The date is useful for both detecting the pace of the cycles and for scrolling up and down in the terminal.

If this date is much too necessary, it might indicate the presence of the TDD antipattern “El Bocazas” / “A mouthful”, present in Diseño Ágil con TDD. I use when the output of the test runner is extensive (such as runhaskell).

If the test runner output is too verbose, a possible step forward is to silence output in when every test is green (fragment):

output=$(runhaskell Spec.hs);
if [ $? = 0 ]; then
    echo "OK";
else
    echo $output;
fi

Other test runners

As a side note, other test runners are quieter than others:

  • py.test will output the name of the file and “E” for error and “.” for OK
  • clojure.test will output the name of the file and a total of tests and assertions. Here to make it quieter
  • HSpec will output one line per describe and it. Inspired by RSpec
  • Jasmine will output one line per describe and it, as HSpec, as both of them are inspired by RSpec.
  • Junit and derivatives will produce the name of the file and total of tests and assertions. Also, on demand, a file containing test results so it can be interpreted by the IDE.

Disclaimer about AI/GenAI

As of 2026-05-06, the text in these articles and blog entries has been written without AI/GenAI, except I sometimes use a spellchecker to fix errors. Think Word's spellchecker, not ChatGPT.

Notes, as of today (2026-05-06):

  • No code snippet has been automatically generated, nor vibe-coded, nor generated and reviewed.
  • I don’t have any article with AI contribution.

For future entries:

  • I may have used GenAI for the code in the repo. The code I exemplify/copy in the article will always be reviewed and tested, not vibe-coded. I will specify it in each snippet or at the top/bottom of the article.
  • I normally don't use it for the text contents, although if I have used it for the article text, it would be indicated as such.

Any entry before 2026-05-06 does not contain any AI/GenAI.

For more information, read the AI/GenAI Policy

Brown-bag session: eXtreme Programming Navigating the GitHub repositories