Programming by coincidence and the boiling frog.
The journey for the ronin had just begun.The master was not pleasant but nor was he unpleasant, a shade of grey could possibly describe him. The TDD cycle was rigorously followed by the student, almost like the time he started off with a bicycle. But the student was not yet convinced why one needed the Test Driven Development and not any other methods like writing the complete codebase and testing it. Half of his dreams were revolved around this question. On one of those sleepless nights student wandered off to find the master to finally quench his thirst for answers.
The master was at the waterfalls checking out his macbook. He seemed at peace with the nature and was at ease with the howling jackals and the roaring elephants. He seemed to laugh sometimes and at sometimes it felt like he was crying. Student kept on looking at guru for some time. After a while he mustered enough courage to ask the master about the need for TDD.
When the student approached master smiled, and asked whether he also suffered from sleepless nights. Student replied with a nod. Master told the student that today he will tell a story about two frogs. Student remembered the story of Shehrezad and 1001 nights, nor was he interested in stories, neither had he got the time. But some times in life you just have to give in. This was one of those times.
Once there lived two frogs who were given a library and asked to build an application with it. The first frog called Dave was into trying stuff and learning from them, the second one called Mike was much more cautious and tested the library and made sure that program worked according to the specifications. While Dave spent days and nights in building stuff, Mike was interested in writing the tests and making them pass. Dave had a working application within days which did as was specified by the client, Mike was still half way through. Eventually both codes went to evaluation and testing. Mike's code worked but Dave's didn't.
Master knowingly smiled at the student. The ronin was perplexed, he was aware of Pandas which knew kung fu but was unaware of frogs who built applications. Master, seeing his student, started explaining about programming by coincidence. Programming by coincidence is where a developer have no idea why the code worked or why it failed. He just trys out all combinations and then makes it work. It was nothing but a love child of the "Hack culture" and utter "irresponsibility". Nothing can justify its existence, but it still does exist much like JAVA.With great power comes great responsibility
A programmer is nothing but a code ninja, he wields fancy weapons and nice girls are attracted to him(I said nice rest are all bad),but he must also adhere to the sacred oath of the secret school :
- Always be aware of what he is doing.
- Proceed always from a plan.
- Test both your assumptions and the code according to certain set of parameters or better put contracts.
- Always justify the existence of the code snippet you wrote to yourself and then to the world(Convincing yourself is tough if you are as argumentative as you are to others).
Student was enlightened. He was now one with the coding spirit. Wait, but how did master knew the answer before the question was asked? Master smiled and replied
I once stood at the banks too. But then I saw the boiling frog and learned to swim.
In an alternate universe, where frogs did not code, Dave was just happily feasting on a fly he just caught. He had just found the hot bathtub that he needed. Mike had told him it was no good, but Dave always knew better.