A full interview with the Dean of the Python Department at GeekBrains - how and why beginners learn language
Yesterday, we published the first issue in the series "By whom to work in IT." For him, I talked with two former students and the dean of the Python faculty at GeekBrains . When I “mounted” the stories in one story, it was a pity that much remained in the drafts.
Therefore, today I post the full transcript of the interview with Alexei Petrenko, Dean of GeekBrains - almost without editing or taking it out of context. Perhaps it will be even more applied, useful and concentrated than the main issue.
Here's what, for example, remains behind the scenes: Why is Python no worse than other languages? What frameworks should I watch besides Django? Where is it better to learn to write - in a modern IDE or in a notebook? Which sites and books are worth learning on your own and much more.
- What are Python developers doing now?
- A Python developer can do a lot of things - from simple scripts to data analysis and building neural networks.
Speaking about development, this is a backend for web servers. The hidden part of the Internet, the one that ordinary users do not see. Server, its logic, interaction with databases.
- Python is not worse for server development than other languages?
- Actually no, no worse. For example, in C, a developer spends a lot of time writing code. This is a grandfather language. Writing in C # is easier and faster - but this is the brainchild of Microsoft - they promoted the language for the Windows system. But Java is universal ... In fact, you can debate which language is better.
Python has a low entry threshold, it is very easy to learn the basics of programming on it. Python is an interpreted language. Accordingly, if two identical programs are written in Python and C, then on Python the program will work more slowly. It has a very large audience, an extensive library, plus many external libraries that developers around the world make. And due to this, it becomes a language that is suitable for everything.
- Could it be that knowing Python is easier to get into specific professions, such as AI and analytics, and guys with Java will be more likely to take a regular backend?
- If we look at the statistics a few years ago, then the PHP language occupied 80% of the backend of all servers. But PHP is starting to lose ground. Python has released various web development frameworks on this wave, and the most popular of them is Django. It is gaining popularity, and many employers are looking for developers who know this particular framework.
There is always competition. But a novice student should understand that no matter what he devotes himself entirely to - Python or Java - he will in any case find a job.
- Learning Python as a first language is a good solution?
“I think good.” 20 years ago, my first language was Basic. And then it seemed to me how fun and easy to program on it. When I first saw the Python syntax, my first thought was: "It's the same as BASIC, only cooler." It gives the same sensations - easy, fun, everything is instantly clear. That is, Python is the best language for the first.
“Precisely because of simplicity?”
- Yes, because of the simple syntax. It forgives minor developer mistakes, unlike compiled languages, where if it is sealed up, the program no longer compiles.
Although I hope the developers will not hope that the interpreter will correct all their errors.
Most importantly, the developer understood that after an easy base he would have to make an effort to master more serious aspects. Libraries and frameworks that make Python an even cooler and more advanced language.
- How complex and voluminous is the syntax?
- In the basic configuration of Python there are about 70 functions (but even a cool programmer does not necessarily use all of them) and several dozen reserved words. That is, to learn a hundred words and understand what they are doing, you can spend one to three weeks if you want and work hard.
- Dynamic typing is not a minus?
- Dynamic typing has opponents whom they initially taught at the university to write in C, they drove in, that this is the basis of all languages and everyone should be equal to it. Therefore, they are extremely negative about dynamic typing. In fact, dynamic typing is more plus than minus. It speeds up development.
But if you are used to static typing, then the language has the ability to prescribe the types of variables that you use. Typing will remain dynamic, but you can realize your habit.
- But now Go and TypeScript are growing in popularity due to just strict typing.
- Yes it is. But languages always come and go, and Python has been alive for 30 years and still continues to gain popularity. Go language is young and good. Perhaps he will develop, or maybe we will forget about him in a few years.
If we compare the programming language with a reservoir, then, for example, language C is the ocean. You dive from a cliff to a great depth, and you either swim or drown. The Python language is a beach with clean sand where you can go far, swim calmly, and if you understand that you want to move on, then there is a huge depression in depth behind the beautiful beach, comparable to C and Java.
“Knowing Python, is it difficult to switch between professions, where is it used?”
Python has a wide library. If you suddenly realized that you do not want to deal with sites and backends, but want to switch to artificial intelligence, then knowing the base, you need to spend several months to tighten the math and learn several additional frameworks.
A similar situation with big data - you need to recall the course of statistics, analytics and look at two or three new libraries. That is, labor costs will be significantly reduced if you already know the language.
- What is more difficult?
Analytics and big data are programming plus math. If there is a predisposition to it, then why not deal with neural networks, recognition systems. If you just like to program, but not at a high level, then it's better to go write servers. They also need mathematics, but at least not higher. No integrals and factorials. Elementary addition and subtraction.
- What do you need to know before entering courses?
- It would be nice to know in advance whether you like to program or not. I would advise you to try to write several programs, try free lessons. It’s better to already understand what a variable is, how to add two variables.
- If a person has not even begun, where and how can he understand this?
With Python, Java, and other languages, it’s a bit more complicated - you need to install a development environment. But if you understand that you like it, then why not. You can spend ten minutes and slowly become a programmer.
- How to learn so that the course does not become a useless crust?
- One word is practice. If you just watch and listen, nothing will come of it. For a novice, it’s even practice to rewrite the code that the teacher displays on the screen. Rewrite and think about how it works. It is necessary to carry out practical tasks - as part of the courses, to search for yourself on the Internet. If training is for the sake of employment, then practice is needed all the more. It’s hard to learn, easy in battle.
The required minimum practice is four hours a week. Two days under two hours of practice. But I would recommend spending an hour a day writing your own code.
- What is better to learn - fundamental things or popular and applied?
- It is better for a beginner to understand the syntax. And when - for someone after a week, for someone after a month - a person will say “I know the syntax and can write elementary constructions and algorithms”, only then it’s worth considering where you want to go further. The more you study, the more you move away from syntax to individual libraries, design patterns, individual templates.
The main thing is not to dive into programming with your head so that there is no riot of magic. When you learn everything for three days, and you get porridge in your head.
- What subtleties do you need to know in order not to immediately turn the wrong way?
- There is such a standard Pep8 - this is the agreement of programmers who write on Python. It indicates how to write correctly, and how wrong: if you want to write a construction with conditions, then write it in a similar way. If something else, for example, to create a function, then call it in such and such a style.
If you want to work in a team and show the code to someone else, if the code needs to be supported in the future, then you must know the generally accepted standard. It would be good for a beginner to read it along with the study of syntax.
Novice programmers, not knowing Pep8, write a program that also works. But when after another time another person tries to read it, then difficulties arise. They write the code once - they read it ten times.
- Something else? Versions, for example?
- A few years ago, a split occurred in Python. There was Python 2.7, and then version 3 came out. The second version is still used, but only in older firms to maintain legacy code. If you get a job in such a company, then you will have to learn Python 2, but I would recommend learning the third version. All modern projects and third-party libraries are written under it.
I will give an elementary example. Payton of the third version, a command to display a message on the screen: we write print, open the bracket and pass the text and variables inside the brackets.
In the second version, we write print, no brackets, then a space and a variable. That is, in one case, a space, in the other curly brackets. It’s not important for a person to understand this, but the interpreter is important - a space or brackets
- What are the best ways for self-education would you name?
- In parallel with training, you can try to implement your ideas and projects. While learning the basics, you solve puzzles and write simple programs. For example, I studied cycles, and why not write a program that displays the multiplication table.
Next, you learn the Django framework, which allows you to create sites. Why not immediately try to write your own site, which I have long wanted.
There is still such a site - the Euler project. There is a set of tasks for building programs.
A person who knows how to program can realize the task, but if he writes low-quality code, even a modern computer will solve it for several minutes, hours, or even days. That is, the project makes you think about optimization. Because the right code solves the problems from the Euler project in seconds.
From the book: “Learning Python” by Mark Lutz and “Pure Python”. Dan Bader.
- What tools and frameworks should I start with?
A novice programmer can take Flask for example. It is simple, does not carry unnecessary information, it is easy to learn. In fact, this is a small box in which there is nothing superfluous. And she will write the simplest sites.
If you think about the future - then the monster among the frameworks is Django. This is no longer a small box, but a huge box in which there is a lot of everything. Gradually understanding all of its capabilities, you can write good, scalable sites that can serve thousands of users every minute.
- Packages, libraries?
- For beginners, I would advise you to get acquainted with the standard Python library. These are the same modules that are installed on the computer along with the interpreter. In fact, the standard library is so big. that even its study will take more than one week.
Some modules of the standard library will never be needed, but it is necessary to have an idea about them so that one day you do not start reinventing the wheel. All bikes are assembled there.
In programming, a data structure such as “queues” is often used. And if a person has just learned the syntax, he understands that there are no queues in Python. Although in other languages, queues are actively used and allow solving large volumes of tasks.
But it’s worth digging into the standard library, and we find the collections module there. Inside this module lies the data structure “queue” and it turns out that it has been implemented for a long time, just a little bit hidden. It is optimized to the maximum and will work anyway better than if you write yourself.
- And elementary things? What IDE to take?
- On this occasion, opinions differ. Some people think that a novice programmer should write in notepad (not in the standard course, but at least in notepad ++).
The idea is that when you start programming, you have to write all the code manually. This will allow you to remember the description of structures, basic functions. But the problem is that the notebook does not tell you where you made a mistake. If a beginner does not see where the errors are, he may despair that nothing is working and quit this business.
Therefore, there is an opinion that it is better to take modern IDEs. Here you have to give credit to jetbrains. They made PyCharm IDE which has absolutely free Community version. She tells about all the elementary errors.
- What approach do you take?
I am for the second approach, so as not to discourage the beginner from writing code. When the code works, there is a desire to develop further. But if you see a mistake, figure out how you made it and how to fix it.
Although, to be honest, I myself started with old notebooks.
- What should be the minimum level to get a job?
“My experience at Geekbrains shows that some students find work before they finish their one-year course.” It all depends on how the student studied, what motivation he had, how actively he invested.
If we talk about the skills that the employer wants to see with the server developer, this is an elementary job with syntax, knowledge of how sites, backend, Django work. The programmer must know how to write code faster and more correctly.
I would also add teamwork and knowledge of databases, because any backend of any site is inextricably linked with the storage of information.
- What money can be counted on at the initial level?
- Depends on the region. Someone get a job for 40 thousand as a beginner, someone can for 100 thousand. Watching how it manifests itself. To do this, you need to prove that you can write not only code, but you also understand architecture, you can sketch out the whole project scheme, modules, services and their interaction schemes.
- Perhaps this is a rarity among beginners?
- We go through design in the fourth quarter, almost at the end of training.
- How much do you need to swing at work to happen level-up?
- You can pump to the middle during the year of study at Geekbrains. There are compulsory courses and additional. The student himself chooses when to take them, but the main and additional courses must be completed in order to honestly call himself middle. That is - the year of the main program and another six months of parallel ones.
- Who then is the signor developer?
- This is a person who has rich experience. This is someone who understands different frameworks, is able to scale tasks, understand what resources they require. A man who does not invent bicycles. Who, from my own experience, understood all aspects and nuances of work.
“If you meet a man who did not know anything three years ago, and now calls himself a signor, what do you think?”
- Why not. Depends on the company, aspirations and skills. If a person is gifted, then I will believe. If he says that he knows Python, not Python, then probably he still got a shot.
- And if you are not so genius, then how much on average is experience?
- If a person is not purposeful, then he can comfortably work at the level of middle and five, and ten years. Perform the volume of tasks that give, enjoy it.
- That is, the middle is just someone who does not take responsibility?
- Yes, Signor is ready to take responsibility for decisions, lead teams. Let's be honest - there are leaders, there are followers. Someone is ready to take a chance, take part in a startup, and if he shoots in a year, then the person will immediately call himself a director, signor and whatever else.
And there are programmers who just like to program, but they are not ready to make global decisions.
- It sounds like the junior middle middle graduation is not entirely about knowing the language.
- This gradation is generally arbitrary and differs from company to company. If absolutely elementary - a junior is a person who knows the syntax. Middle - knows all the additional libraries, frameworks, knows how to use all this. Signor - not just knows how to use, but has rich experience in developing different things.
- What kind of job to look for, so as not to immediately be disappointed?
- We must immediately make a note in my head: "If nothing works out, I will not be upset." It is worth practicing on freelance or doing joint projects during training.
- How can you not face dirt during an interview?
- Firstly, do not be silent. If they give a task that cannot be answered right away, then reason aloud, show how you think you are capable of moving towards a solution. At interviews, they can also give basic questions. Students talked about how they were given the tasks that we sorted out with them. That is, do not listen to courses past the ears.
The main thing is not to despair if the first interview was unsuccessful. Going to two or three interviews you will notice that the questions begin to repeat. And then you yourself will choose where to get settled, because at three regular interviews one day you will go everywhere.
- On what issues would you understand that it is better to run away from this company?
- Perhaps if they show the code, and you understand that it is unreadable. There is a so-called "spaghetti code" when you have to read not from top to bottom, but to jump along the lines. If such code is shown, then either they are specifically trying to infuriate themselves, or they really write like that. It’s better not to work with these guys.
- And if you do not see the code?
- In addition to general questions, there should be tasks for writing code. Even if on paper with a pencil, this is normal. But if you came to an interview with a programmer and did not receive a single question about programming, then you either were interviewed by an incompetent person, or you will be doing something non-programmatic at all.
Programmers must be checked for programming.