Thought Game: Duplicate Driven Programming

who wrote this piece of junk?

Here's an idea i had once. An idea too crazy to implement, but still an idea that's worth the time it takes to think about it.

Imagine a new programming paradigm: Duplicate Driven Programming.

continues...

In order to produce a piece of software, you don't write unit tests, like in test-driven development, and you don't sit programmers together, like in pair-programming. Instead you have two different teams who, write the exact same software as each other, independently. They probably even write it in two different but similar languages, C# and VB.net being a suitable pair.

And the code is the same from an outsider's point of view: the same functions, the same classes. They somehow share all of that interface information, and agree on that bit. But the inner workings of their functions are completely independent.

Some kind of software tool then automatically develops test cases for the two pieces of code, and determines correct output based not on some user's specification, but based on equality between the two code bases.

If AddNumber(3,7) returns 11 in one code base but it returns 12 in the other code base, then a warning is raised. An email is sent to the developer of each version of the function, something like "Somebody's got this wrong". Maybe you don't get to see what the answer was for the other guy's code. You only get to verify your own function.

Anyway, like I said, whacky idea.

While writing this down... I had a different and maybe not quite so whacky idea about verifying the output of your code.

I wrote it up last night and it'll appear in a moment.

 

My book "Choose Your First Product" is available now.

It gives you 4 easy steps to find and validate a humble product idea.

Learn more.

(By the way, I read every comment and often respond.)

Your comment, please?

Your Name
Your Url (optional)
Note: I may edit, reuse or delete your comment. Don't be mean.