Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • For a lot of the HOP code, TDD would have been useful. My OSCON question was specifically about the "linogram" system of chapter 9.

    "Linogram" was a program that was completely unlike any other program I had ever seen. When i started, I had no idea what the input language would be like, no idea how it would work, even no idea of what the program's capabilities would be. If you had asked me "will linogram be able to draw a box with an arrow coming out of the side" I would have said "I think so, but I'm not sure about the arrow". And I also didn't know how a user would ask for such a diagram, or how the program would figure out where the box and arrow went, or how big they were, or how the user would specify those things, or how the actual rendering would be done.

    People at OSCON came up to me afterwards and insisted that it was possible, but it became clear that they did not understand what I was talking about. "There must be a specification," a couple of people said. "Just write the tests to check the requirements in the specification." There was an amazing disconnect here between what I was asking and what they were answering.

    Often there is a specification, or I at least have some clue what the behavior of the program should be before it is written. But very often the scope of the project is almost completely undefined, and my job, as engineer, is to find some reasonable balance between scope and cost and then implement it.

    If someone is still not getting my point, or thinks I should be using TDD anyway in such cases, I invite them to consider this example. I have a great idea for a new kind of word processor for writing philosophic research papers. It will not be a WYSIWIG word processor. Instead, you will draw a picture of the structure of your document and the relationships between the various arguments you intend to make. Then the word processor will let you fill in the details of each argument, checking to make sure that the relationships are as required and that the arguments are sound.

    I would love to see this program, and even more I would love to see the tests for this program. Advocates of TDD-everywhere are invited to work up the test suite and send it in.

    Or, if you are scratching your head and asking "what do you mean by 'relationships', exactly", then you begin to see the problem.