Why you must learn what you’re coding before writing code

A very common beginner question is: “Why do I have to learn all this theory? Can’t we just jump straight to the code?”

Short answer: OH GOD NO.

One common misunderstanding is people often say, “Yes, but I’m a professional, I just want to learn what to do, I don’t care about why it works.”

This is totally not professional at all. Any engineering manager or coworker will regard you with strong suspicion if you have no idea what you are coding, and only copying something from an online course.

This is not a professional attitude. If I interviewed you, and you told me this was your approach, you will NOT be hired. If anyone I know interviews you, you will NOT be hired.

Sorry, but as part of a business that wants to make money, there is no place for such a lazy and incompetent attitude on my workforce.

Simply put: I’d rather pay someone who knows what they are doing.

The problem with such employees is they “don’t know what they don’t know”. They believe knowing any theory is useless (of course, those beliefs are wrong, because their lack of knowledge prevents them from understanding why that knowledge would be useful).

It would be like trying to tell LeBron James how to improve his basketball when you are not yourself a professional basketball player.

When it comes to pro basketball, you also “don’t know what you don’t know”. Maybe you can guess what it takes to become good, but you really have no idea.

Another way of saying they “don’t know what they don’t know” is they are “unconsciously incompetent”. They don’t even know that they are incompetent, which is why they actively try to deny it.

When you have “unconscious incompetence”, you are incompetent, but you don’t know that you are.

This is the lowest stage of competence in the “4 stages of competence” (source: https://en.wikipedia.org/wiki/Four_stages_of_competence).


Others might say: “Yes, but I already know the theory, I just want to learn the code”. This is illogical.

And usually it is a lie.

If they already knew the theory, then they wouldn’t have had so much trouble with it. 

If you just wanted to learn some code, why don’t you just copy one of the thousands of examples on Github?

If you already know the theory, then understanding the code should be easy (unless of course, you don’t understand it as well as you think you do!)

What’s the purpose of taking a course?

“Because I have X, Y, Z specific questions about the code.”

No, no course will answer your specific questions.

I hate to give you the bad news, but: no course is personalized to you.

Courses are for a general audience. In my case, courses will have thousands of students.

Courses cannot, and should not, be personalized to your specific scenario. That is absurd.

If you need specific questions answered, then the proper course of action is to hire a consultant or a tutor.

If you’re taking a course, then be ready for that course to be geared towards a general audience, not your specific questions and concerns.

As such, the most general format for learning a machine learning algorithm or topic is:

Step 1) Learn the “theory” behind the algorithm

Step 2) Implement that algorithm using computer code