Where is your Mentor?

Back in the days when I had my lack of experience as an excuse to explain my mistakes I was sometimes wondering: “Wouldn’t it be nice to have a mentor?”

What I didn’t realize until a couple months ago was that my mentors were all around me all the time.

  • My cousin who introduced me to computers
  • A coworker who pointed out the limitations of VB to me
  • A coworker in California who tought me lots and lots of things about Oracle databases and how to have fun.
  • My boss(es) nudging me more or less toward project management
  • A coworker making it very clear to me that there are alternatives to project management
  • Another coworker who taught me even more about databases
  • Dozens, no hundreds of people writing blogs for me to read, questions to be answered or answered questions written by me in various forums.

Its just that I never realized they were my mentors (nor did they in many cases). By not realizing this I missed out on some greate opportunities to learn much much more, much much faster than I actually did.

So let me be your mentor for a second and give you a little task:

Think for a moment: Who in your vicinity is where you want to be in a couple of years? Who can help you getting there? Whom are you learning from? Whom could you learn from?

Now use my advice and just ask her to become your mentor.

Posted in: The Rest by Jens Schauder No Comments

Challenges in Requirements Analysis: Finding and Understanding the Correct Terms

There are lots of things that make requirements analysis difficult. For this article lets focus on one issue:

What is a Train?

At first sight this looks like a rather simple question and might be answered by having a look at wikipedia:

A railway or railroad train is a connected series of vehicles for rail transport that move along a track (permanent way) to transport cargo or passengers from one place to another place.

This is pretty much what most of us understand when we talk about trains. But when we talk with experts in the various domains that involve trains we might come along these definitions:

A train is a collection of wagons that is assembled during a given time before departure.

A train is the abstract thing that has a unique number and travels on specified weekdays at a specified time from one station to another.

A train is the thing that has a unique number and travels on a specific date from one station to another.

A train is the thing that at a given date and time arrives at a given station and leaves a couple of minutes later.

… and many more

Obviously the various possible definitions of the term train are somewhat related but different. Most of the time experts do have precise words to differentiate between these concepts, but since the different definitions are relevant for different groups of experts each expert calls the concept he is dealing with just ‘train’.

So when you try to gather requirements and designing software you must try to identify these different concepts. How would you do that?

Listen carefully: Often people use additions to a main term in order to differentiate between different concepts. Examples might be: “train in preparation”, “train at a station”

Look out for contradictions: Does somebody describe a train as something repeating every week while another one says something happens at departure? They are probably talking about two different kinds of train.

Collect constraints: What identifies a train uniquely? A number? A date + a number? A date and a track? How does a train relate to a station? 1:1? 1:2? 1:n? Ask the experts for such constraints, ask them if they agree with the constraints identified by others. Don’t stop when you have one answer, but verify it over and over again. It really sucks when 95% of your users use one definition and 5% use a different one. It sucks even more when you find out about it on deployment day.

Look at the documents and systems in use right now: Often header for reports or forms (paper or digital) give cues for constraints. But also intensely used comment field sometimes with obscure DSL  like syntax are pointers to a missing concept. The same holds for abused fields. For example when you have a field that contains mostly the number 10, 20, 30, 40, 50 and 60 sometimes the numbers in between and in few cases the value 999 or 998 I am willing to bet that the records are used for at least two different things and boths aren’t properly modeled as a number.

Find and use the correct termsDomain-Driven Design: Tackling Complexity in the Heart of Software

TDD, do we really have to do it?

Many really smart people tell us we have to use TDD if we want to create code that is worth a penny. For example take this article about TDD by Uncle Bob (one of the moderate ones). He describes the benefits of TDD in paragraphs like this:

If all your code works every minute, how often will you use a debugger? Answer, not very often. It’s easier to simply hit Ctrl-Z a bunch of times to get the code back to a working state, and then try to write the last minutes worth again. And if you aren’t debugging very much, how much time will you be saving? How much time do you spend debugging now? How much time do you spend fixing bugs once you’ve debugged them? What if you could decrease that time by a significant fraction?

But the one thing he does not provide is anything close to a proof. He offers his own experience, which might be distorted for all kinds of things.

Yet with a practice so simple (note: I didn’t write easy) as TDD and so many people advocating it one would like to see some proof of the benefits of TDD. After writing a little piece about opportunities for more research in software development I was recommended this the book: Making Software: What Really Works, and Why We Believe It. It is highly recommended for anybody interested in what works and what doesn’t work in software development. Just be warned it is a little harder to read than Harry Potter

There actually is a chapter about TDD in it. The result: Not a clear win. I’m not even trying to put the details in here, but the result is basically: Although they tried they couldn’t prove TDD to be as effective as many people claimed. But they also showed it is not as costly as many people claimed. And I think they mist at least one point: TDD can teach you a lot about software development and software design on the micro level.

So what is the answer to the question in the title: Do we have to do TDD?

Nope, don’t think so. There are alternatives, like writing your tests after the code. But I recommend TDD to everybody to try it at least for some time. Its a great chance to learn a lot.

Posted in: Softwaredevelopment by Jens Schauder 4 Comments , ,