TDD stupid question

Ok, repost, too many mistakes.

I was watching a video with a guy very excited about TDD (a big mdeah from my side) – but mostly by the most inane part of it, which is ‘pair programming’.

Why is that a good idea? Doesn’t it sound like a “two stupid people put together might make as much as a good programmer, hopefully” thing?

Pair programming sucks big time – two people cannot write the same line of code, get the heck over it.

Comments

TDD stupid question — 1 Comment

  1. I've never tried it, but I can see how it could work in theory.

    I think the idea is that if you write it alone, chances are that only you will understand it. If there's someone else there, you will write better, cleaner, clearer, more elegant code (or risk being interrupted every 5 seconds with questions). The second guy can also give input, look at the "large picture" while you're busy with details, draw diagrams on a piece of paper (which you wouldn't do while typing, and which could help clear your thoughts) etc.

    Of course, you need a bit of synergy there. If you write code while the other is telling you about yesterday's football game… it's not going to work.

    But yeah, in *theory* one pair could produce more value than two programmers working separately.