The Castle of Javascript

Moral story for every Javascript programmer.

thevinayysharma
4 min readJun 22, 2020

Ben, a small boy in France has a terrible way of writing Javascript programs.

He was used to give bad names to every variable he declared and often wrote hooker code.

On one day an error occurred on his console, the boy moved his cursor to copy paste it into Stack Overflow. As soon as he hovered his mouse over the error, his body was dragged into the Computer. Being half conscious upon waking he discovered himself inside a castle with a big door in front of him, over which four words were written “The Castle of JS”.

Ben pushed the door with his trembling fingers. All of a sudden, a scaring face emerged from the door and whispered.

“Cross the castle with right Strikes,

or become a dead-program that tells no lies.”

“Wit and intelligence will be tested harshly,

else the boy will render eternal in castle till lifely”.

The door advised the boy to be brave and allowed him to enter. He witnessed a dead silence loom over the dark surroundings with voices all over the place. A floating screen emerged with seven buttons imprinted on it named: API, Async, Arrays, Promise, Regex, Datatype and Quit with a message at the top “You only choose once”. The boy touched the Array button to find his path to the end of the castle, a long trail of continuous blocks emerged and the button disappeared. Ben started waking and saw a deadly bug with mighty claws ahead of him.

The bug ordered the boy to be his food or bring it from someplace. Ben in no-time pressed the API button and the food started coming out from the air in the front of the bug and he allowed the boy to go past him. The boy started walking and found chunks of floating ice over an area, he pressed the button Datatype and changed the behavior of ice to a constant, rigid like body and walked ahead and kept on walking for a long time. Being tired of relentlessly walking, the boy accidentally touched the button Promise, frightened of what he had done, he began crying. After some time, Ben remembered that being patient and not giving up is the quality of a good programmer, he stood up and started his quest again in the hope of coming back to his real life.

Time elapsed, he saw a mystical spine-chilling figure covered with blood colored streaks. The figure told the boy, if he wanted to live, bring back her spells from the deep shallows of the castle where they got lost. Ben having no choice asked, “what your spell is called & what does it seem like”. The figure screamed, I forgot those young boy but I know the first and the last part of my spells.

Ben went into the deeps and pressed Regex on his screen to bring back the spells of the ghost. Upon getting her spells back, the figure got away in the darkness. Ben started again and found the exit door but now between him and the door were three boats floating in air moving in a synchronous sequence. First boat next to him was made up of the wind, the second boat was of wood, and the third one of fire.To get the wooden boat he pressed Async on the screen and the three boats aligned themselves parallel, he climbed upon it and reached the door.

His quest was almost over, a beautiful smile fixed all over his face. He pushed the door but nothing happened. He tried again & again but nothing moved and finally sat on the ground. The smile changed into the frowning lines all over his head, he closed his eyes and chanted some Github spells. All of a sudden a bright light struck at his face, the door opened and he jumped back to his real life. The Promise worked.

Patience and intelligence are the two most important arrows for a programmer quiver. Keep them in balance and you won’t face the defeat.

--

--