Why learning to code is like learning to play Piano

I wrote this piece after a grueling review week of first code I ever pushed to a production system.

“The last work week had one of the steepest learning curve of my life. Full of disappointments and anger. Every line of code which I thought was right, was completely changed by reviewers. The way I wrote code was to run everything. But, there is significant difference between a code that runs and a code that works. The former is a lego-style construction of pieces that (almost) run together. The latter is holistically thought through and beautifully crafted. I think learning to write good code for me was similar to learning piano. You start out smooth, joining parts one by one, trying to fit them together. You start playing popular numbers, all by yourself. And you think, you are good at it. But, then you sit with people who have been doing it for a while. Their way of looking at it completely blows your mind. For them, its not just about playing songs, its about getting every freaking key-stroke right, down to level of pressure you apply on note. They are looking at code at ways you never looked before. They make a story out of it and then point out broken plots and abrupt twists.

You feel amused. Wow! this is one new style of doing things. But, then it becomes repetitive. You start to get a sour taste of the monotonous activity. You are breathing your work, sickened by the familiarity. Reading same lines of code numerous times, almost to the point that they are subject of your unconscious dreams. It makes you question the relevance of this. But, when you get to other side, you realize the gravity of the exercise. Congratulations, your code is a story now, and if someone can read it like a story, you can be sure you did a decent job.”