The main pillars of learning programming — and why beginners should master them.
The main pillars of learning programming—and why beginners should master them
The main pillars of learning programming—and why beginners should master them.

I have been programming for more than 20 years. During that time, I’ve had the pleasure to work with many people, from whom I learned a lot. I’ve also worked with many students, coming fresh from university, with whom I had to take on the role of a teacher or mentor. I’ve been programming for over 20 years. I had the pleasure of working with a lot of people during this time and I learned a lot from them. I also work with a lot of students who are fresh out of college, and I have to take on the role of teacher or mentor.
Lately, I have been involved as a trainer in a program that teaches coding to absolute beginners. Recently, I worked as a trainer on a project teaching programming to absolute beginners.
Learning how to program is hard. I often find that university courses and bootcamps miss important aspects of programming and take poor approaches to teaching rookies. Learning how to program is difficult. I often find that college courses and bootcamps ignore important aspects of programming and take a poor approach to teaching newbies.
I want to share the five basic pillars I believe a successful programming course should build upon. As always, I am addressing the context of mainstream web applications. I want to share the five fundamental pillars that I believe a successful programming course should be built on. As usual, I’m working in the context of a mainstream web application.
A rookie’s goal is to master the fundamentals of programming and to understand the importance of libraries and frameworks. The goal for newbies is to master the basics of programming and understand the importance of libraries and frameworks.
Advanced topics such as the cloud, operations in general, or build tools should not be part of the curriculum. I am also skeptical when it comes to Design Patterns. They presume experience that beginners never have. Advanced topics such as cloud computing, general operations, or building tools should not be part of the curriculum. I’m also skeptical when it comes to design patterns. They assume beginners have never had experience.
So let’s look at where new programmers should start. Let’s look at where new programmers should start.
Test-Driven Development (TDD) Test-Driven Development (TDD)

TDD brings a lot of benefits. Unfortunately, it is an advanced topic that beginners are not entirely ready for. TDD brings many benefits. Unfortunately, this is an advanced topic that beginners are not quite ready for.
Beginners shouldn’t write tests. This would be too much for their basic skill levels. Instead, they should learn how to use and work with tests. Beginners should not write tests. This is too high for their basic skill level. Instead, they should learn how to use and use tests.
Each programming course should center around exercises. I extend my exercises with unit tests and provide the students an environment which is already setup for running those tests. Every programming course should be exercise-focused. I extended my exercise with unit tests and provided students with an environment to run these tests.
All the students have to do is write their code and then watch the lights of the testrunner turning from red to green. The resulting gamification is a nice side effect. All students have to do is write their code and watch the testrunner’s light change from red to green. The resulting gamification is a nice side effect.
For example: If the selected technology is Spring, I provide the exercises and tests within a Spring project. The students don’t need to know anything about Spring. All they need to know is the location of the exercises and the button to trigger the tests. For example: If the technology of choice is Spring, I will provide exercises and tests in the Spring project. Students do not need to know anything about spring. They just need to know where the exercises are and the button that triggers the test.
Additionally, students must know how to use a debugger and have a Read-Eval-Print Loop (REPL) handy. The ability to analyze code during runtime and to have a playground for small experiments is essential in TDD. Additionally, students must know how to use a debugger and have a read-eval-print loop (REPL) handy. In TDD, the ability to analyze code at runtime and provide a place for small experiments is essential.
The main point is to ensure students don’t have to learn basic TDD behaviors after they’ve acquired core programming skills. Changing habits later in the students’ career will be much harder than learning those habits now. That’s why they should live and breath unit tests from the beginning. The point is to ensure that students do not need to learn basic TDD behaviors after they have mastered core programming skills. Changing habits later in a student’s career is much more difficult than learning them now. That’s why they should be tested in survival and breathing units from the start.
Later in their professional life, they should have an antipathy for projects without unit tests. They should intuitively see the absence of unit tests as anti-pattern. Later in their careers, they should resent projects without unit tests. They should intuitively view the lack of unit tests as an anti-pattern.
Fundamentals First Fundamentals First

I hear very often that rookies should immediately start with a framework. This is like teaching people how to drive by placing them in a rally car and asking them to avoid oversteering. This simply ignores the fact that they still mistake the brake for the throttle. I often hear that newbies should start right away with a framework. It’s like teaching people how to drive, putting them in a rally car and asking them to avoid oversteer. This completely ignores the fact that they still mistake the brake for the accelerator.The same applies when we start students with a framework like Angular. Beginners need to understand the fundamentals of programming first. They need to be familiar with the basic elements and what it means to write code before they can use somebody else’s. The same goes for frameworks like Angular. Beginners first need to understand the basics of programming. Before using other people’s code, they need to be familiar with the basic elements and what it means to write code.
The concept of a function, a variable, a condition, and a loop are completely alien to novices. These four elements build the foundations of programming. Everything a program is made of relies on them. The concepts of functions, variables, conditionals and loops are completely foreign to beginners. These four elements form the basis of programming. All components of the program depend on them.
Students are hearing these concepts for the very first time, but it is of the utmost importance that the students become proficient with them. If students do not master the fundamentals, everything that follows looks like magic and leads to confusion and frustration. Students are hearing these concepts for the first time, but it is most important that students become proficient in them. If students don’t master the basics, everything that follows can seem like magic, leading to confusion and frustration.
Teachers should spend more time on these fundamentals. But, sadly, many move on far too quickly. The problem is that some teachers struggle to put themselves into the role of a student. They have been programming for ages and have forgotten what types of problems a beginner has to deal with. It is quite similar to a professional rally driver. He can’t imagine that somebody needs to think before braking. He just does it automatically. Teachers should spend more time building on these foundations. But unfortunately, many people progress too quickly. The problem is, some teachers have a hard time putting themselves in the role of their students. They have been programming for so long that they have forgotten the types of problems beginners need to deal with. It’s very similar to a professional rally driver. He couldn’t imagine anyone needing to think before braking. He just does it mechanically.
I design my exercises so that they are challenging but solvable in a reasonable amount of time by using a combination of the four main elements. I design my exercises so that they are challenging but solvable in a reasonable amount of time using a combination of the four main elements.
A good example is a converter for Roman and Arabic numbers. This challenge requires patience from the students. Once they successfully apply the four elements to solve the challenge, they also get a big boost in motivation. A good example is the Roman to Arabic numeral converter. This challenge requires patience on the part of the students. Once they successfully apply these four elements to solve a challenge, their motivation will also increase significantly.
Fundamentals are important. Don’t move on until they are settled. The basics are very important. Don’t leave until they sort it out.
Libraries and Frameworks Libraries and Frameworks

After students spend a lot of time coding, they must learn that most code already exists in the form of a library or a framework. This is more a mindset than a pattern. After students spend a lot of time coding, they must understand that most of the code already exists in the form of libraries or frameworks. It’s not so much a pattern as it is a mindset.
As I have written before: Modern developers know and pick the right library. They don’t spend hours writing a buggy version on their own. As I’ve written before: modern developers know and choose the right libraries. They don’t spend hours writing buggy versions themselves.
To make that mindset transition a success, the examples from the “fundamentals phase” should be solvable by using well-known libraries like Moment.js, Jackson, Lodash, or Apache Commons. For this mindset shift to be successful, the “Basic Phase” examples should be solvable by using well-known libraries such as Moment. js, Jackson, Lodash or Apache Commons.
This way, students will immediately understand the value of libraries. They crunched their heads around those complicated problems. Now they discover that a library solves the exercise in no time. This way, students will immediately understand the value of the library. They grapple with complex issues. Now they have found a library that can solve this problem in a short time.
Similar to TDD, students should become suspicious when colleagues brag about their self-made state management library that makes Redux unnecessary. Similar to TDD, students should be suspicious when colleagues brag about creating a state management library that makes Redux unnecessary.
When it comes to frameworks, students will have no problem understanding the importance once they understand the usefulness of libraries. When it comes to frameworks, once students understand the usefulness of libraries, they will have no trouble understanding their importance.
Depending on the course’s timeframe, it may be hard to devote time to frameworks. But as I already pointed out, the most important aspect is shifting the mindset of the student away from programming everything from scratch to exploring and using libraries. Depending on the time frame of the course, it may be difficult to devote time to the framework. But as I have already pointed out, the most important aspect is changing the student’s mindset from programming from scratch to exploring and using libraries.
I did not add tools to this pillar, since they are only of use to experienced developers. At this early stage, students do not need to learn how to integrate and configure tools. I haven’t added tools to this pillar because they are only useful to experienced developers. At this early stage, students do not need to learn how to integrate and configure tools.
Master & Apprentice Master and Apprentice
In my early 20s I wanted to learn to play the piano. I did not want a teacher, and thought I could learn it by myself. Five years later, I consulted a professional tutor. Well, what can I say? I’ve learned more in 1 month than during the five years before.
When I was in my early 20s, I wanted to learn to play the piano. I don’t want a teacher, I think I can teach myself. Five years later, I consulted a professional mentor. What can I say? I learn more in a month than I did five years ago.
My piano teacher pointed out errors in my playing I couldn’t hear and made me aware of interpretational things I never would have imagined. After all, she instilled in me the mindset for music and art, both of which were out of reach for me as a technical person. My piano teacher pointed out errors that I couldn’t hear when I played and made me realize something interpretive that I had never thought of. After all, she instilled in me a musical and artistic way of thinking, both of which were beyond my reach as a technician.
It is the same in programming. If somebody has no experience in programming, then self-study can be a bad idea. Although there are many success stories, I question the efficiency of doing it alone. The same goes for programming. If someone has no programming experience, it’s probably a bad idea to teach yourself. While there are many success stories, I doubt the effectiveness of doing this alone.
Instead, there should be a “master & apprentice” relationship. In the beginning, the master gives rules the apprentice must follow—blindly! The master may explain the rules, but usually the reasoning is beyond the apprentice’s understanding. Instead, there should be a “mentor-disciple relationship.” In the beginning, the master gives the apprentice rules that must be followed - blindly follow them! The master can explain the rules, but usually the reasoning is incomprehensible to the apprentice.
These internalized rules form a kind of safety net. If one gets lost, one always has some safe ground to return to. These internal rules form a kind of safety net. If a person is lost, he can always find a safe place.
Teaching should not be a monologue. The master has to deal with each student individually. He should check how the students work, give advice, and adapt the speed of the course to their progress. Teaching should not be a monologue. The principal must deal with each student individually. He should check how students are working, give advice, and adjust the pace of the course according to their progress.
Once the apprentices reach a certain level of mastery, they should be encouraged to explore new territory. The master evolves into a mentor who shares “wisdom” and is open for discussions. Once apprentices achieve a certain level of mastery, they should be encouraged to explore new areas. The guru becomes a mentor who shares “wisdom” and is open to discussion.
Challenge and Motivation Challenge and Motivation

“Let’s create a Facebook clone!” This doesn’t come from a CEO backed by a horde of senior software developers and a multi-million euro budget. It is an exercise from an introductory course for programmers. Such an undertaking is virtually impossible. Even worse, students are put into wonderland and deluded into believing they have skills that are truly beyond their reach. “Let’s create a Facebook clone!” That’s not what a CEO backed by a team of senior software developers and a multi-million-euro budget says. It is an exercise in an introductory programmer course. Such work is virtually impossible. Worse yet, students are transported into a wonderland and tricked into believing they have skills that are truly beyond their capabilities.
No doubt the teacher is aware of that, but creates such exercises for motivational reasons. There is no doubt that the teacher knows this, but there is a motivational reason for creating such an exercise.
The main goal of an exercise is not to entertain. It should be created around a particular technique and should help the students understand that technique. The main purpose of practice is not entertainment. It should be created around a specific technology and should help students understand that technology.
Motivation is good, but not at the sacrifice of content. Programming is not easy. If the students don’t have an intrinsic motivation, coding might not be the way to go. The motivation is good, but not at the expense of content. Programming is not easy. If students are not intrinsically motivated, then writing code may not be the right choice.
Newbies should experience what it means to be a professional developer. They should know what awaits them before they invest lots of hours. Newbies should experience what it means to be a professional developer. They should know what’s waiting for them before investing a lot of time.
For example, many business applications center around complex forms and grids. Creating these is an important skill that exercises can impart. Building an application similar to Facebook might not be the best lesson for students to learn right away. For example, many business applications are centered around complex forms and grids. Creating these is an important skill that practice can teach. Building a Facebook-like app may not be the best course for students to take right away.
Similarly, a non-programmer might be surprised at how few code lines a developer writes per day. There are even times where we remove code or achieve nothing. Similarly, non-programmers might be surprised by how few lines of code developers write every day. There are even times when we delete code or do nothing.
Why? Because things go wrong all the time. We spend endless hours fixing some extremely strange bugs that turn out to be a simple typo. Some tool might not be working just because a library got a minor version upgrade. Or the system crashes because somebody forgot to add a file to git. The list can go on and on. Why? Because things always go wrong. We spent countless hours fixing some really weird bugs, only to have a simple printing error. Some tools may not work properly just because a library has undergone a minor version upgrade. Or the system crashes because someone forgot to add a file to git. The list goes on and on.Students should enjoy these experiences. An exercise targeting an unknown library under time pressure might be exactly the right thing. ;) Students should enjoy these experiences. An exercise targeting unknown libraries under time pressure might be in order. ,)
The sun isn’t always shining in real life. Beginners should be well-prepared for the reality of programming. The sun doesn’t always shine in real life. Beginners should be well prepared for the realities of programming.
Final AdviceFinal Advice
Last but not least: One cannot become a professional programmer in two weeks, two months or even a year. It takes time and patience. Last but not least: one cannot become a professional programmer in two weeks, two months or even a year. This takes time and patience.
Trainers should not rush or make false promises. They should focus on whether students understand the concepts and not move on too fast. Trainers should not rush things or make false promises. They should focus on whether students understand the concepts rather than progressing too quickly.
Original text: https://medium.freecodecamp.org/the-main-pillars-of-learning-programming-and-why-beginners-should-master-them-e04245c17c56
读完之后,下一步看什么
如果还想继续了解,可以从下面几个方向接着读。