Programming Help
Studying programming is not something you can do in between jobs. But you don't have to spend a lifetime to understand the basics. There are many ways to make learning easier for yourself.
Is programming hard?
The most common myth about programming is that it requires an enormous intellectual capacity. To start writing code, you don't need to be seven feet in the head: it's enough to have motivation, interest and discipline. If you are open to new things and ready to apply the acquired skills in practice, you will learn how to program, help you. For example, the intensive "Programming basics", which in 2 hours will give you the basic theory necessary to understand the basic modern programming languages, and the first experience of writing a program. But complex tasks may also require knowledge from specific industries.
It's not uncommon for beginners to start learning after they already know something about programming. At first everything goes well, but as they continue to learn, problems begin to arise. Why? Beginners quickly skim through the introductory part thinking they already know everything, but in fact this is rarely the case. They know some of the material, but not enough to understand the basics well.
At the same time, you can't stop developing. You can move slowly or quickly, but don't skip any topic. By mastering more material, you're building yourself a foundation for the future.
1. study examples of code
When we talk about reading, we usually mean reading words on a page, but programming is about reading code. When you're just learning to program, you should study and try to understand every example. You can even read and try to understand the code examples first, and then read the text. This doesn't always work, but it teaches you to look at the code carefully and understand every detail.
2. Don't just read the sample code - run it!
When you read a tutorial or a textbook, it's easy to look at an example and say, "I got it, I got it. Yes, that makes sense." Sure, you may have understood it, but you don't know for sure if you really understood it correctly. There's only one way to find out - do something with the code.
Digital Thaw V Conference.
April 1-2, Nizhny Novgorod and online, From 1000 to 3500 ₽
tproger.ru
Events and courses on tproger.ru
If you still haven't done so, install a development environment (IDE) that supports your programming language.
Then bring the example into the IDE - if you type it instead of just copying it, you'll really walk through it from start to finish. Typing the code will force you to pay attention to the details of language syntax, such as the semicolons each line must end with.
Now compile and run the code. Make sure it does exactly what it is supposed to do.
Finally, modify it. A program is the easiest mechanism on earth to change. You can experiment and see what happens. The changes will happen instantly, without risk of death or injury. The easiest way to learn a programming language is to take the code that works and change it.
3. start writing your code as early as possible
As soon as you understand something about the language - even if it already makes you dizzy - start writing programs in it. Sometimes it's hard to find ideas for programs. This is normal, in the beginning you don't have to come up with your own idea.
You can find sources of ideas in the article "Where can a beginner in programming find exercises and ideas for projects?"
You can also reproduce exercises from a manual or book you read without looking at examples. It's not as easy as it sounds. It's also a technique that works well if you modify the code from the examples slightly.
If you don't want to think about small programs, and you want to write something bigger like games right away, you should start with small pieces that you can then use to make a game. Whether you use them or not, you will gain valuable experience.
4. Learn to use the debugger
The debugger will allow you to move through the code line by line. You'll be able to watch variable values and see if a condition holds.
The debugger allows you to quickly answer questions about what the code is doing.
At first, fixing bugs with the debugger will take a long time. But as the number of errors in your code grows, the debugger will start to save a lot of your time. And the number of errors, believe me, will be measured in dozens.
Newbies are often reluctant to use the debugger. In fact, they make life difficult for themselves by spending years fixing very simple errors. The sooner you learn the debugger, the sooner you will be rewarded.
5. Look for more sources
If you don't understand something, look for alternative explanations first - the Internet is full of information about programming. We all perceive new information differently: maybe you need pictures to understand it, and someone else needs detailed instructions or lots of books with detailed explanations.
But if that doesn't work, the best way to figure out the problem is to ask someone else. However, if you say, "I don't understand, please explain," you are likely to get a link back to the same text you don't understand. Instead, retell in your own words how you understood the text. The more the question reveals your thoughts, the easier it will be for a knowledgeable expert to answer it. Programmers sometimes seem irritable when answering questions. But the reason is more likely because they want to move the dialogue forward, and that takes effort on both sides. If you ask an intelligent, detailed question that demonstrates what you're thinking, you'll get good results.