I decided not to deepen and add something to the finished material, but to create a special chapter for this topic. Communication with you, with readers, with knowledge seekers, has incredibly expanded my view of the problem of teaching programming which turned to be really serious.
I'm afraid, the prevailing stereotypes are to blame here.
The first "type of a programmer" is a gloomy, asocial, lonely person who spends his life at the computers, always focused on something in his mind.
The second "type of a programmer" is people like Pavel Durov or Mark Zuckerberg. These people, in our view, are wealthy, drive expensive cars and generally lead a carefree life.
The truth is usually somewhere in between.
These stereotypes are just consequences of Programmer Path. They are something you can come to by acting in one way or another. Not all people who sit at a computer all day long are programmers. Most owners of expensive cars that can lead a carefree life know nothing about programming. So what makes a programmer Programmer?
Knowledge. Experience. The skill of creating new and improving known algorithms in a programming language.
SORTING THINGS OUT
In one of the negative reviews, I met the phrase "It describes general basics and standard algorithms, applicable to any language". Let's figure out why this statement is entirely unprofessional.
See beyond the surface: programming is writing an algorithm, not single commands, characters, expressions. The most important part in programming is algorithmization. If you don't imagine what is it about, you won't probably understand programming. (Stop! Don't panic! This course book contains everything you need, you will definitely understand!)
Now we are sharply getting away from the topic to consider real practical examples.
If you search "how to create app for android" on Google, you will find many links. Some of them are pretty decent, describing the whole process from scratch. Spending a week to read, install the necessary programs and practice, you will create a simple application in which there will be several buttons and input fields. And it will work, moreover, without mistakes.
In fact, to arrange controls in a program window on Android is not quite difficult. Write commands, drink tea and run the program from time to time to see the result and breath out, "Hey, mom, I'm a programmer".
The difficult part will begin when you ask yourself, "Hmm, what's next?". Nothing. That's all, the end of the story. You can't do any step further if you don't know how to apply algorithmization, how a computer processes data.
Imagine that you found an instruction that allows to insert Google Map into the app on Android. Magnificent! And here again goes the question, "OK, what's next?". Maybe create your own navigator? Cooler than Google's or anyone's.
Fine, you have the code of the program that inserts Google Map into our app... Um, erm... And here is dead end. You don't know what to do next!
If you knew algorithmization, you would know the algorithm of the shortest path between two points. It is based on the graph theory with using lists. If you knew it, you would define the problem: it was necessary to get coordinates of the points between which the route would lie.
Then you would allow user to select two points and, having received the data, run the algorithm of route finding. Notice that you can't copy/paste things like this from the Internet. It is a quite complicated algorithm, and they don't lie around everywhere. They make good money.
OK, boomer, you would say. Give me something easier. Alright. "Battleship". Do you member playing it in class? Oh, I member. It was on paper with two square 10х10 grids. After setting the ships, players started hit-or-miss game until someone's fleet was destroyed completely. Amazing pastime!
You will find through Google how to draw coordinate grid and ships on it. But what's next?
Next, you should properly organize data storing, for example, in two-dimensional lists, and design a processing algorithm of these data. No search engines will help you with that, the only thing you can rely on is your own mind. Even though you will be able to search and download code of working "Battleship", you won't be able to figure it out without understanding algorithmization.
The same thing is with chess, checkers, card games, and even with the simplest tile-matching games like Tetris. It is easy to draw an interface, but to organize data processing... oops. These are the problems, yes.
As the saying goes, "separate sheep from goats". Let's consider existing educational materials on programming. I divide them into "handbooks" and "systemic knowledge". Handbooks inform about the purpose of a command, the result of a program. For example, the program that calculates the sum of two numbers is shown below:
a = 10
b = 20
s = a + b
The result is 30. Easy? Let's go further. Here is a program inputting a string:
a = input("Enter a string: ")
The next program will display the "H" character of the "Hello!" word on the screen. It is counted as "null" character (pay attention to zero in the square brackets below), because there is a certain rule in Python:
s = "Hello!"
Now, attention! You have just learnt something about the tools that make up 75% of the Steam Guard program. Yeap, this is the very program that asks to type characters, when you log in Steam from another computer. Right, you are able now to write user verification by code, almost like in Steam.
Other 15% in Steam Guard are about working with time and date. You can simply google "How to get time and date in Python". But will you be able to write your own Steam Guard?
Unfortunately, the chance is very poor. But why? The key reason is algorithmization - rules and sequence of data processing for getting certain result.
No "handbooks" will give you exhaustive explanation.
Those who know how to drive a car will confirm that there is nothing overcomplicated in this process, especially, if there is an automatic transmission. I agree. Just spin the wheel sometimes, touch the pedals and you'll get somewhere.
But no one will let that driver on the road if the only thing he can do is to drive a vehicle. Why?
Because there are certain rules of the road! Notice that the rules do not pay attention at all to your driving skill, don't establish in what sequence which pedal to press. Traffic rules regulate your driving behavior. It is for your own safety, by the way.
To get driving license, it necessary to pass both practical and theory parts. These two things go hand in hand, they complement and increase importance of each other. The result is correct and safe vehicle driving in public roads.
This coursebook is combination of a handbook and systemic knowledge: here we will consider both technical aspects of program construction and the rules of data processing. By the way, we will talk a lot about data processing.
Therefore, the phrase "general basics and standard algorithms, applicable to any language" is an advantage of this material. Thanks for this comment, it is very important. Having learnt these basics here, you can switch languages with less effort!
Right here, in this coursebook, the lines are parallel, what leads to higher-quality studying and faster growth of you as a professional. Enjoy programming!
© 2019-2023 Viktor Trofimov