📜 ⬆️ ⬇️

Why learn programming so damn hard?

Hi, Habr!

Having taken on the work on the educational project Hekslet , we understood that a great responsibility rests with us. A lot of newbies come to us with questions and comments, such as:


But the hardest thing to explain to a beginner, roughly speaking, is what he gets involved in. Thanks to very simple game educational projects, many believe that programming is very easy, and our virtual machines, where you need to run tests and compile code, are contrived complexity. I have long wanted to find such material that would prepare a beginner for a long and difficult path to a programmer’s career. 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. Started asking people around. 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, dug in with Lisp and Kodil on Python, and lived 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 one way or the other, until he completed “every online programming course in the universe.” In the end, despite the fact that he got the job of a software developer, Quincey:

... I was sure that at first glance, normal programmers with whom I spoke were actually sociopaths who got, and then suppressed in themselves, an injury when learning programming.

Oh. Sounds familiar?

Phase 1: Honeymoon


It is difficult to blame the person who comes to the programming industry with any special expectations.

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

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

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

In most cases, these tools actually do a great job. They lead you like a child along a road full of terrible 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 this! I am practically 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 ...

Draw a route


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

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

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



This is an important relationship, because your belief in yourself is directly correlated with the feeling of happiness, and because there, where belief in yourself and skills meet, is the point when you are ready to work as a programmer.

We will look at the unique challenges that await us in the following three phases, but for a start, we will briefly review each phase:

1. Honeymoon is a very pleasant, very comfortable journey through a huge amount of polished learning resources, which show that at first glance, complex things are in fact completely understandable, especially with such intensive support. Roughly speaking, you learn the basic syntax, but you feel like a hero.

2. The rock of confusion is a painful awareness of real difficulty after the assistant releases your hand. It turns out that you can not do anything yourself. The main test is the constant debugging of the code. It is not clear what questions to ask in order to at least begin to move in the right direction.

3. The desert of despair is a long and lonely road through off-road, where every new direction seems to be true, but often you just walk in circles and starve for resources that could help. Watch out for the “mirages of mania” like the sirens of the desert! They will lead you nowhere.

4. Raising awe is the part where you finally find your way through the desert and begin to understand how to create applications. Your code is still full of holes and fragile as a house of cards. Belief in yourself is growing because your websites seem to be working, you have studied several important patterns, your friends consider your interfaces cool, but you are afraid to look under the hood and you don’t know how to make a production-ready code. How to build a bridge to “ready for real work” from here?

I interviewed hundreds of developers over the past few years and have heard the 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 open eyes and with such a compass in your hands, with which you will deftly go around all the pits into which those who came before you fell.

Let's go back to phase 2 ...

Phase 2: The Rock of Turmoil


So, you are in phase 1 - “Honeymoon.” You fill in the blanks and complete the tasks associated with the code while your confidence and ability grows. It's not so bad ... Why the fuss? You climbed the "Mountain of irrational abundance" ...

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

Pancake…

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



So you compile. You struggle and work your way towards a more or less functional solution, but you feel that something is missing. You are fighting with bugs so that the "Star Troop" is resting. But it seems that each victory was won only by luck, thanks to Google, and the confidence that you will ever be able to understand all of this inevitably falls.



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

When support ends and students are pushed off a cliff with the words "fly," too many frightened chicks fall down, so not having learned to flap their wings.

It is terrible that you have not even reached the most "tasty" things. After you have finally eliminated enough bugs to put an end to the eighth Egyptian execution, and in fact have already completed several projects, the second phase will end. But you are just beginning.

For those who are really going to make a career in programming, survival on the “Rock of Confusion” is often the point after which they are fully prepared to plunge into a new life. But too many are left behind. And, unfortunately, you are only going to enter the "Dessert of Despair".

Two key factors


So what is actually the difference between the first and second phase? Why is phase 2 (“The Rock of Distraction”) so terrible compared to phase 1 (“Honeymoon”)? Understanding this will help you to understand that your fault is absolutely not in the fact that your journey looks like we just described.

There are two main points during the passage of each phase: the density of resources and the amount of knowledge. Let's take a look at what it is before exploring how they will lead you to phase 3.

Factor 1: Resource Density

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

Enter “Programming Lessons” in the search engine and a wall of necessary and useful tools such as articles, videos and tutorials will fall on you. And frankly, it's great! Never before have there been so many ways to start learning programming.



Unfortunately, at later stages, resource density quickly falls. Anyone who has gone from a novice stage to an average level can confirm that there is a GREAT difference between the number of available resources at the very beginning and when you first look for help on your own, without outside support.

This problem is exacerbated during the transition to the third phase, when the amount of knowledge is rapidly increasing, and there is one reason for which 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 tools, such as blogs and videos, in your work. In part, it's just the ability to ask the right questions.

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



Factor 2: knowledge

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



When you first started learning, the set of things that you need to understand is still quite narrow. Every person, regardless of learning objectives, language and prerequisites, needs to learn what the “for” cycle is, how to build the logic of a conditional operator, and get acquainted with the basic structures of the 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 you move away from the basics, you notice a rapid expansion of the knowledge base, as you begin to deal with more complex issues, such as understanding the types of errors, or when exactly to use code that you know and how to use it in general. And these are two different things, because there is no "correct" answer to the exact question ... So far everything is very blurry.

As we move to the third stage, the volume of knowledge will grow. Now you need to understand which tools to use, which languages ​​to study, how to write modular code, know the basics of CS and object-oriented programming, have a competent code style, and be able to search for answers to questions (at least in several sources). Each entry into Google or on the Hacker News website plunges you into a huge number of rabbit holes and stuns you with things you don’t know, but you feel you should know them.

You do not know what exactly you do not know.

Only when you have finally made a breakthrough and left the desert, will the volume of knowledge begin to narrow again. By this moment, you have already determined your chosen technology and its place in the overall system. You finally know (and quite well) what exactly you do not know and can pave the way through these pits. You will continue to broaden your horizons as you move forward, to the beginning of your career.

Phase 3: Desert of Despair


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

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



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

You may register for several massive open online courses, such as Coursera, Udacity or EDX, or 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 taken to the finish line that others have not reached.

You can not learn this material neither for a week, nor for a month, and for one course of study, so that people don’t speak there, so enough to fall into this trap!

There are MUCH more things to learn than you might have expected. 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 true professional. It is difficult 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 eventually get your first few "real" running applications and realize that you are finally starting to get experience.

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



Phase 4: Raising Awe


You have passed through the desert and your confidence grows. You are masterful of the art of Google-Fu, and, finally, you understand what they are writing on blogs and talking in videos. Perhaps you have already gone deep into a specific language or framework and you are sure that you can compile and run a running application.

This is “Raising Awe”:



Outside, everything may look good, but deep down you know that you have not yet 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 are terrible and which parts are really different. Your periodic glimpses of consciousness alternate with stupid mistakes and, even worse, sneak suspicions that you still don’t know what you are doing.

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

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

In the end, however, it will happen. So much power can not be spent in vain! The “desert of despair” is behind, and the “Rock of turmoil” has become a distant memory. You are finally, truly, on the rise. You learn faster and more intelligently than ever before, you have gained enough practice, and your piece of knowledge is transformed into a set of professional-level skills.

“Raising Awe” always takes more time than you expect, and it seems endless because you are so close ... But you still reach it. 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 learn 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:



One thing is to know the way, and another thing is to follow it. Let's get you started.

How to get to the end alive


The journey seems difficult and, frankly, 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 to quickly get around most problems. Studying code is rarely given as simple as some pretend, but it is not as difficult as it seems to you during periods of deep despair.

In this section, I will introduce the basic tactics that can be used to steer in the right direction.



I: How to Survive in "Honeymoon"

The variety of resources available in Honeymoon gives you a lot of fun. They do a lot of work in order to form 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, enjoy, but remember to keep these two tips in mind:

  1. Start trying different resources to find the ones that best help you in training, look for the projects that are most interesting for you. These can be quick solutions from KhanAcademy , browser- based exercises from Codecademy , Chris Pine's Learn to Program book, or Try Ruby code school. At the beginning, be open to everything and ignore the “you have to teach only that” instructions. At this stage, the entire code is the same.
  2. Next, select one suitable resource for you and try to stick only to it . Complete the course from start to finish to get all the basic knowledge that will help you write basic scripts and applications. And in the future, get ready to start creating your own projects.


II: Survival on the “Rock of Turmoil”

Almost every one of you will go through the "Rock of Turmoil," since the only way to become a developer is to develop. You can qualify for this profession by subscribing to articles (or tutorials that give out for “full” courses), but with this you will only postpone the inevitable. Textbooks are a good way to solve initial problems, but at some point you will have to wean yourself from your nipples and face the real world.

Here are three tips that will help you move on to compiling yourself:

  1. Work with someone in a pair , even if he is just as new to you. 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 acquainted with good patterns. Try to understand why the author did this way and not otherwise. You can't be a writer without reading other people's books, can you? We will look at it in detail in the next post, and now, focus your attention on small projects and tasks for which other people have already written solutions.
  3. Start small and program constantly . You need to think about future large and interesting projects, but for this your debugging should be smooth, and the search for resources should not be difficult. Experience you do not replace.


III: Survival in the "wilderness of despair"

After you started to deal with debugging, the biggest problem is the lack of necessary knowledge and complete uncertainty where to get them ... Desert of despair. All you really need at this stage is a powerful advance. Mirages of mania are opening up more and more interesting, but also rabbit holes leading away from the road, as well as fast learning schemes, which in the end only take time away from you.

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 tired of chasing your tail, learning various 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 straight to your goal and make sure that it really leads you to it. You need to dig deeper and do not look for the answer among advertising slogans, dust jackets and smiling faces on the websites of various courses to the question “Will it help me to achieve the goal or not?”
  3. Concentrate all your attention and do not get distracted, because if you belong to those people who are interested in learning the code, you will also be interested in learning other interesting things. In those moments when programming is hard, you should move forward a lot and not take up other fashionable activities.


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

IV: Survival on "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 the work, you should do three things:

  1. Find the best programming practice and follow its guidelines . You should see the difference between the decision and the best solution. Best practices will show a big difference between your forced code and high quality professional code written in the workplace.
  2. Hold back your ambitions . Surely, you have such knowledge gaps, which you do not even suspect. You must find and complete them.
  3. Do not neglect the routine work , it is rarely like someone, but it is very important for the transition to a professional level. It includes such things as testing, data models, architecture and deploy. All this is very easily forgotten, but is fundamental to proper development.


The key to solving the above problems and to climbing the “rise of awe” is feedback. Students who have fully studied independently can be workable, but they rarely have a legible, modular, and flexible code that characterizes their relevance in the professional field. You have to work with other people who will challenge your assumptions, ask tricky questions and force you to fix leaks in your knowledge bucket.

So ... Is it possible at all?


This may sound overwhelming, but I assure you that many others have stubbornly reached their goal and survived on this path.

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

, , , , , , , .

Good luck!

Source: https://habr.com/ru/post/251411/


All Articles