Setters are evil like super evil.

The homework question had bogged down the student. He thought of many ways in which he could bypass the issues with square and rectangle. Not only was square different from rectangle, it also changed perimeter and area calculation based on sides accordingly. The student thought of many methods and finally decided to override the setters and getters in the square class. He decided that it was the perfect way to do it. He was happy and proud at his innovative solution.

The master was still learning Go. The student approached the master and showed him the beautiful implementation. Master saw the implementation and asked the student to get out of the dojo. The student obeyed.

After some time, when the master had his lunch he went out to see the student. The student was still outside the dojo, contemplating the beauty of his code. The master smiled and asked him to come inside. The student tried entering through the door. Master kicked him with all his might. The student was surprised and also angered. The student tried again. The result was always the same. The student sat outside the dojo and decided not to enter the dojo.

Master smiled. Master asked him to create a new door for entering the dojo. If he wanted to learn he should create a new learning door. If he wanted ramen, he should create a ramen door. He wanted to practice he should create a practice door, and so on. The only thing remaining should be a million doors and no dojo at all. Anybody could enter and take what they wanted. Anybody  could change what they wish.

The student was enlightened. Master smiled and allowed him to enter through the front door.

Written on July 14, 2015