Learning to Love Code

Posted by fattyduck on March 7, 2017

There is a Chinese teaching originating from the Analects of Confucius, 知之者不如好之者 好之者不如乐之者。 In English, that translates to “One who is has knowledge of such is inferior to a practitioner of such. A practitioner of such is inferior to one who derives pleasure from such.” Is that to say, one who enjoys a subject will innately be more skilled that one who only participates?

I am a programmer, thus coding is the subject in this matter. I would have to admit I started off learning Java two years ago for the prestige of being able to program. That was my starting point, from gaining knowledge about Java to being a practitioner of Java. Two years and more later, I have decided to ask myself this question, do I love coding?

As I spent more time on that thought, I understood more about the teaching from Analects of Confucius. To be a practitioner of coding, you first need knowledge of coding. Thus to enjoy coding, you also need to be a practitioner of coding. You simply can’t truly appreciate what you do knot know.

I remember my journing into coding. I started off with the Hello, World! program, just printing things on the console when I ran javac on the code and java on the classfile. I progressed to using the console to solve a problem, I written a program to calculate compounding interest. From there, I moved to making applications with a graphical user interface. From learning to code for prestige, to learning to appreciate the art of coding.

def learning(affection_points, fun_value)
  while reason_to_learn && affection_points > 0
	  affection_points +=  fun_value
	end
end

In essence, as long as there is a reason to learn, you don’t already hate a subject, and a positive fun value, learning will increase your passion for a subject. Having a strong passion will give you a reason to learn, thus it will put you in the infamous infinite loop.