Why is learning to program so damn hard?

Original author: Erik Trautman
  • Transfer
Hello, Habr! When we took

up work on the Hakeslet educational project , we realized that we had a great responsibility. A lot of newcomers come to us with questions and comments, such as:

  • Where to start learning programming?
  • You have a Java course for beginners, but I heard you need to learn Python, is that true?
  • On other sites, everything is simple and clear, but you have some kind of compilation and tests!
  • It is unclear why this your course on algorithms is needed. In real life, all algorithms are already implemented in standard libraries.

But the hardest thing is to explain to a beginner, roughly speaking, what he gets involved in. Thanks to very simple, game educational projects, many people think that programming is very easy, and our virtual machines, where you need to run tests and compile code, are far-fetched difficulties. I have long wanted to find material that would prepare a beginner for a long and difficult path to a career as a programmer. And recently, our colleagues from Viking Code School wrote such material! And we translated it for you.




Quincy Larson was just an “office guy in a suit.” He decided to learn how to program. I started asking people around. He studied a little Ruby, then quickly looked at other languages ​​like Scala, Clojure and Go. He studied Emacs, and then Vim, and then the Dvorak layout. He stuck in Linux, delved with Lisp and coded on Python, and lived at the same time on the command line for more than a year and a half.

He was thrown back and forth like a leaf in a tornado. Every piece of advice he heard dragged him from one direction to the other, until he took “every online programming course in the universe”. In the end, even though he got the job of a software developer, Quincy:

... I was sure that at first glance, the normal programmers with whom I spoke were actually sociopaths who received, and then suppressed, the trauma of learning programming.

Oh. Sounds familiar?

Phase 1: Honeymoon


It's hard to blame a person who comes into the programming industry with some special expectations.

On the one hand, since childhood you heard rumors about the complexity of programming. Moms scared children to go to the humanities.

On the other hand, the Learn to Code movement did a fantastic job of removing barriers and showed that coding is actually quite simple. Tools like Codecademy , Treehouse and Code School lead you so softly and by the handle that you can be sure - I can not only learn how to program, I can become a full-fledged developer!

Suddenly, the problem is not fear, but excess expectations and high expectations.

In most cases, these tools actually do a great job of their job. They lead you as a child along a road full of scary variables and conditions, early phases of syntax. After each exercise in a game format, you feel more and more confident in your abilities. I can actually do it! I'm almost a developer already!



The problem is that you are in the “honeymoon” phase. It may seem that the end is near, but in reality you have passed only a tiny segment of the path. This is just the beginning ...

Drawing a route


Before moving on to Phase 2, let's take a look at the whole way.

In this post, I will guide you through all the phases of a typical coding trip and talk about what you need to know in order to survive on every stretch of the path. You will also learn about two key factors that determine the path - resource density and the amount of knowledge needed.

The road to the developer's working position can be defined as the attitude of your faith in yourself to changes in your skills:



This is an important attitude, because your faith in yourself directly correlates with a sense of happiness, and because where faith in yourself and skills meet, it’s the point when you are ready to work as a programmer.

We will look at the unique tests that await us in the following three phases, but to begin with, we will briefly review each phase:

1. A honeymoon is a very pleasant, very comfortable journey through a huge number of educational resources polished to brilliance, which show that at first glance the complex things are actually quite understandable, especially with such intense support. Roughly speaking, you learn the basic syntax, but feel like a hero.

2. The Rock of Confusion is a painful realization of real complexity after the assistant releases your hand. It turns out you can’t do anything yourself. The main tests are constant code debugging. It is not clear what questions to ask to at least start moving in the right direction.

3. Desert of Despairit’s a long and lonely road through impassability, where each new direction seems to be right, but often you just walk in circles and starve for resources that could help. Beware of “mirage mania” like desert sirens! They will take you nowhere.

4. The rise of reverence is the part where you finally find your way through the desert and begin to understand how to create applications. Your code is still holey and fragile like a house of cards. Belief in yourself is growing because your sites seem to work, you have learned several important patterns, your friends think your interfaces are cool, but you are scared to look under the hood and you don’t know how to make production-ready code. How from here to build a bridge to the state of "ready for real work"?

I interviewed hundreds of developers over the past few years and heard echoes of the same story over and over again. The purpose of this post is to teach you to move along the path of training with wide eyes and with such a compass in your hands with which you will cleverly go around all the holes that those who came before you fell into.

Let's get back to phase 2 ...

Phase 2: Rock of Confusion


So, you are in phase 1 - “Honeymoon”. You fill in the gaps and complete the tasks associated with the code while your confidence and opportunities grow. This is not so bad ... Why bother? You climbed the "Mountain of irrational abundance" ...

Be careful! You are about to cross the abyss that breaks many strong students, forcing them into a camp called “coding is too hard”. The exact moment of this jump occurs when you sit down at the keyboard, open your text editor and try for the first time to create a project from scratch without any editors built into the browser, crutches of code or useful tips.

Pancake…

You can delay this moment a little while continuing to follow the textbooks, but no one has yet reached heaven without taking off the earth, and there will come a time when you will do magic in an empty text file. You have just entered the second phase of training, where confidence falls down to earth. Welcome to the Rock of Confusion:



So, you are compiling. You fight and pave your way to a more or less functional solution, but you feel that something is missing. You fight with bugs so that the "Starship Troopers" is resting. But it seems that every victory was won only by a lucky chance, thanks to Google, and the confidence that you will ever be able to understand all this inevitably falls.



This phase of disappointment is clearly visible to both teachers and all professionals in our field. Programming may not be ideal for everyone, but we want to make progress from you, because sometimes unpromising stories become tremendous successes.

When support ends and students are pushed off a cliff with the words “fly,” then too many frightened chicks fall down without learning to flap their wings.

The terrible thing is that you have not even reached the most “delicious” things. After you have finally eliminated a sufficient number of bugs to put an end to the eighth execution of the Egyptian one and have actually completed several projects, the second phase will come to an end. But everything is just beginning for you.

For those who really want to pursue a career in programming, survival on the Rock of Confusion is often the point after which they are fully prepared to immerse themselves in a new life. But too many are left behind. And, unfortunately, you are only going to enter the Desert of Despair.

Two key factors


So what exactly is the difference between the first and second phases? Why is phase 2 (Rock of Confusion) so awful compared to phase 1 (Honeymoon)? Understanding this will help you understand that your guilt is absolutely not that your trip looks like we just described.

There are two main points during each phase: the density of resources and the amount of knowledge. Let's see what it is before we study how they will lead you to phase 3.

Factor 1: resource density

As I said above, when you are just starting, it seems like a million third-party resources are trying to grab your hand and drag you into programming. This is because there are a lot of them!

Enter in the search engine "Programming Lessons", and a wall of necessary and useful tools, such as articles, videos and tutorials, will fall on you. And honestly, this is great! There have never been so many ways to start learning programming.



Unfortunately, in later stages, resource density drops rapidly. Anyone who has gone from the beginner stage to the middle level can confirm that there is a BIG difference between the amount of available resources at the very beginning and when you first seek help on your own, without outside support.

This problem is aggravated by the transition to the third phase, when the amount of knowledge increases rapidly, and there is one reason why we call this phase “Desert of Despair”. As soon as you go through it and begin to feel exactly what you need to look for, the resources will return, and you will be able to use more technical means, such as blogs and videos, in your work. This is partly just the ability to ask the right questions.

Here is how the density of resources looks in each phase (a large concentration of lines indicates a high density of resources):



Factor 2: volume of knowledge

Now let's talk about the second question, the amount of knowledge. It represents the general breadth of new topics that you master in each phase. Here's what it looks like:



When you first started training, the set of things that you need to understand is still quite narrow. Each person, regardless of learning objectives, language and prerequisites, needs to learn what the “for” cycle is, how to build the logic of a conditional statement and get acquainted with the basic structures of programming syntax. And often you don’t even have to deal with some of the above basic concepts, so the amount of knowledge at this stage is very narrow.

As soon as you move away from the basics, you notice a rapid expansion of the knowledge base, as you begin to face more complex issues, such as understanding the kinds of errors, or when to use the code that you know and how to use it at all. And these are two different things, because there is no “right” answer to the exact question ... So far, everything is very blurry.

As you move to the third stage, the amount of knowledge will grow. Now you need to understand what tools to use, what languages ​​to learn, how to write modular code, know the basics of CS and object-oriented programming, have a competent code style and be able to look for answers to questions (at least in several sources). Each visit to Google or to the Hacker News website immerses you in a huge number of rabbit holes and stuns you with things that you do not know, but feel that you should know them.

You do not know what exactly you do not know.

Only when you finally made a breakthrough and left the desert, the amount of knowledge begins to narrow again. At this point, you have already identified your chosen technology and its place in the overall system. You finally know (and pretty well) what exactly you don’t know and can pave the way through these holes. You will continue to broaden your horizons as you move forward, towards the beginning of your career.

Phase 3: Desert of Despair


With an understanding of key factors, one can see that the “Rock of Confusion” is a critical point. The torment caused by a combination of rapidly growing knowledge and a decline in resource density has led to a phase that I call the Desert of Despair.

In essence, this is a desert where you know that somewhere there is an end, but do not know how to get to it:



The desert is long and teeming with dangers. You will catch yourself drawing the “Mirages of Mania” along the way, which are dozens of tempting resources that contain the desired solutions, but they again throw you where there is only you and sand that extends in all directions to the horizon.

You may be enrolling in several massive open online courses such as Coursera, Udacity, or EDX, or you may find a tutorial that promises to accompany you all the way. You thought you had learned a lesson from the honeymoon phase, that there are no simple answers, but the temptation to seek salvation is too great, and you again believe the promise that this time you will be delivered to the finish line, which others have not reached.

You cannot learn this material either in a week or in a month, or for one course of study, so that they don’t speak there, so stop falling into this trap!

There are MUCH more things to learn than you might expect. Even if you are able to make some applications work, it is very difficult not to feel like a weak link in the huge chain of becoming a real professional. It’s hard to measure your progress. How do you know what to learn if you study only the necessary things?

Even if you are moving in the right direction, it is difficult to determine your progress. You will feel completely lost until the very moment when you can finally create something that looks and acts as you expected. But, armed with perseverance and a good compass, you will end up with your first few “real” running applications and realize that you are finally starting to gain experience.

Of course, up to this point it was difficult, but perhaps the whole story with web programming is not so complicated, after all ... Everything's coming up Milhouse !



Phase 4: Raising Awe


You have passed through the desert and your confidence is growing. You masterfully master the art of google fu and, finally, understand what they write on blogs and talk about in videos. Perhaps you have already delved into a specific language or framework and you are sure that you can compile and run a working application.

This is the “Rise of Awe”:



From the outside, everything may look good, but deep down you know that you have not reached your goal.

You can create a working application, but what's going on inside it? Your code is written with ropes and electrical tape and, worst of all, you don’t even know which parts of it are terrible and which ones are really just great. Your periodic glimpses of consciousness alternate with stupid mistakes and, even worse, suspicions creep in that you still don’t understand a damn thing about what you are doing.

This phase consists of two poles: you feel that one of your half is a bulletproof developer, and the second is thin plywood with the wild eyes of a newcomer who drowned in his way. The further you advance, the more the tormenting feeling of uncertainty grows, as if someone is going to “expose” you as a deceiver.

You feel that you should already become a developer, but the distance between the code you write and the “professional” work environment is not narrowing ...

In the end, however, this will happen.So much effort cannot be wasted! The Desert of Despair is behind, and the Rock of Confusion has turned into a distant memory. You are finally truly on the rise. You learn faster and more intelligently than ever before, you have received enough of the necessary practice, and your fragmentary knowledge turns into a set of skills of a professional level.

“Raising Awe” always takes longer than you expect, and it seems endless because you are so close ... But you will reach it anyway. If you persistently go in the right direction (the topic of the next post), you can convince someone to pay you and calmly continue to study further. Your work.



What does it all look like


So now you have seen which road lies ahead and why it can be difficult. If we consider all four phases and identify the factors that separate them, we get the following picture: It is



one thing to know the path, and another thing is to follow it. Let's help you get started.

How to get to the end alive


Traveling seems difficult and, frankly, this is not uncommon. It is important to understand where you are going, especially if you are going alone. But you must not give up. There are ways that can quickly get around most of the problems encountered. Learning code is rarely given as simple as some pretend, but it is not as difficult as it seems to you in times of deep despair.

In this section, I will introduce the basic tactics that you can use to stay in the right direction.



I: How to Survive a Honeymoon

The variety of resources available in Honeymoon brings a lot of fun. They do a great job to shape the type of logical thinking you need, which you will need to develop during the following phases. This is a great time to start learning code. So try it, enjoy it, but remember to keep these two tips in mind:

  1. Start trying different resources to find the ones that help you better in learning, look for the most interesting projects for you. These can be quick solutions from KhanAcademy , browser exercises from Codecademy , Chris Pine's Learn to Program book or Try Ruby code school . In the beginning, be open to everything and ignore the instructions in the style of "you should only learn this." At this point, all the code is the same.
  2. Next, select one suitable resource for you and try to stick only to it . Take the course from beginning to end to get all the basic knowledge that basic scripts and applications will help you write. In the future, get ready to start creating your own projects.


II: Survival on the Rock of Confusion

Almost every one of you will go through the Rock of Confusion, because the only way to become a developer is to develop. You can apply for this profession by subscribing to articles (or to tutorials that pass for “full” courses), but this will only put off the inevitable. Textbooks are a good way to solve the initial problems, but at some point you will need to wean yourself from the nipple and face the real world.

Here are three tips to help you get started compiling yourself:

  1. Work with someone in a pair , even if he is as new as you are. You will be surprised how much easier it is to debug a seemingly fatal error if you connect two more pairs of eyes.
  2. Read more of someone else's code to get to know the good patterns. Try to understand why the author did just that and not otherwise. You cannot become a writer without reading other people's books, can you? We will consider this in detail in the next post, and now, focus on small projects and tasks for which other people have already written solutions.
  3. Start small and program constantly . You should think about future large and interesting projects, but for this, your debugging should become smooth, and the search for resources should not be difficult. You cannot replace experience.


III: Surviving the Desert of Despair

After you started to cope with debugging, the biggest problem is the lack of necessary knowledge and the complete unknown where to get them ... Desert of despair. All you really need at this stage is a powerful move forward. Mirages of mania are opening up more and more interesting, but rabbit-hole, diverging paths, as well as quick learning schemes that ultimately only take you time.

So, here are the keys to getting out of the Desert of Despair:

  1. Set a specific goal that you want to achieve, because otherwise you will end up getting tired of chasing your tail, learning different kinds of interesting, but by and large unnecessary things. But if you have free time, you can omit this advice ...
  2. Find the right path that leads directly to your goal and make sure that it really directs you to it. You need to dig deeper and not look for the answer among the advertising slogans, dust jackets and smiling faces on the websites of various courses to the question “will this help me achieve my goal or not?”
  3. Concentrate all your attention and do not be distracted, because if you belong to those people who are interested in studying the code, you will also be interested in learning other interesting things. In those moments when programming is difficult, you should especially move forward, and not undertake to master other fashionable activities.


If you are able to determine the path and adhere to it, you will certainly reach the next phase and will not spend months or even years chasing mirages through the quicksands of this desert.

IV: Survival on the High Rise

Raising awe is one of the most difficult transitions. You know how to develop applications, but want to become a real web developer. Approaching this phase and work, you should do three things:

  1. Find the best programming practice and follow its recommendations . You should see the difference between a solution and a better solution. Best practices will show a big difference between your tortured code and professional high-quality code written in the workplace.
  2. Keep your ambition in check . Surely, you have such knowledge gaps that you do not even suspect. You must find and make up for them.
  3. Do not neglect routine work , it is rarely liked by someone, but it is very important for moving to a professional level. It includes things like testing, data models, architecture, and deployment. All this is very easily forgotten, but is fundamental to proper development.


The key to solving the above problems and climbing the “rise of reverence” is feedback. Students who are fully self-taught may be able to work, but they rarely have a legible, modular, and flexible code that characterizes their relevance in the professional field. You must work with other people who will challenge your assumptions, ask tricky questions and make you fix leaks in a bucket of your knowledge.

So ... is this even possible?


This all may sound overwhelming, but I assure you that many others have been stubbornly pursuing their goals and survived along the way.

Understanding what awaits you, you are already in a favorable position, it remains only to draw up a clear plan and provide access to the appropriate type of support.

Of course, the volume of this article does not allow us to explore each phase as deeply as we would like, nor to provide you with proper practical advice and instructions in detail, but, as mentioned above, this is the way we are familiar with and which we are working furiously, so we try help you in any way.

Good luck

Also popular now: