T
T
Titov_Riki2016-09-08 20:34:31
C++ / C#
Titov_Riki, 2016-09-08 20:34:31

How to improve your programming skills in C/C++?

I have fully (as it seems to me) learned two programming languages ​​(C and C++). I can read any program written in one of these languages, but I still can't write complex multifunctional (antivirus, web browser...) programs. Often in my code there are a lot of logical errors that are very difficult to find and fix. How can I improve my programming skills?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
D
Dark Hole, 2016-09-08
@abyrkov

Well... so.
A codestyle is literally a style of code. If you write according to the code style, then the problems will obviously become less. The code will become more readable and easier to read and maintain. And the code that is written with obvious violations of obvious rules... it's the same vyrviglaz as spaces before punctuation marks and ???.
Indeed. A debugger is literally an anti-bug. A bug , if you don't already know, is what they call logical errors. Well, I think once you master this tool, you'll be a much more successful hunter of pokemon... bug bugs.
Many IDEs or advanced editors have a bunch of goodies that will make your life easier to the point that creating code becomes pure pleasure. It's worth it.
Everyone makes mistakes. But if we learn and remember what the mistake was then, there is a higher chance that we will not make it next, and if we do make it, then we will find it much faster.
People have long understood that you can use the same code several times, and a particularly versatile code - the library itself - can be used in many projects. A well-chosen library will allow you to greatly speed up the development of typical things.
You probably think that as soon as cool coders come up with a brilliant idea, they immediately sit down and write code? No, they first come up with the structure of this thing, what they will use for it, an algorithm ... in a word, a bunch of things, and only after making sure that everything has been foreseen, they sit down and write the code.
And finally, remember two simple things:
Good luck with your projects!

M
Maxim Moseychuk, 2016-09-08
@fshp

If you have fully learned C ++, then you can safely apply for the Guinness Book of Records. Well, or at least pass the annual test for the Grandmaster.
Learn to use a debugger.

N
Nexeon, 2016-09-08
@MrNexeon

If I understand correctly, you want to take the first step towards building software, and do it smartly. To do this, I recommend the book Perfect Code , it will answer all your questions.
If you want to improve your C++ coding skills, read a book like Effective and Modern C++ , but it's better to read it while you practice, otherwise you'll forget everything in an instant.

A
abcd0x00, 2016-09-09
@abcd0x00

Often in my code there are a lot of logical errors that are very difficult to find and fix. How can I improve my programming skills?

If you have a lot of logical errors, then you have a problem with algorithms. You need to be able to develop algorithms even before they are written in any language.
You need to learn:
1) Verbally describe the algorithm from beginning to end.
2) According to the verbal description of the algorithm, draw a block diagram.
3) According to the drawn block diagram, write pseudocode.
4) According to pseudocode, write specific code in a specific language.
That's all and develops the right thinking when you are just thinking about the program.
Псевдокод - это такой код, который не требует заморочек с синтаксисом и вообще способствует быстрому обмену информацией с другими.
Нужно делать такой псевдокод, чтобы с него можно было записать на разных языках одно и то же.
Очень часто вместо псевдокода используют питон для обмена идеями. Но это как раз потому, что при создании питона его старались максимально приблизить к псевдокоду.

R
res2001, 2016-09-09
@res2001

Find a job as a programmer. In a team and on a real task, skills are honed much faster.

V
Vova, 2016-09-09
@JustMoose

Often in my code there are a lot of logical errors that are very difficult to find and fix.

I would suggest reading about refactoring and unit tests.
Refactoring will make the code somewhat clearer.
And unit tests will allow you to "practice on cats" - to make sure that there are no logical errors in a given piece of code, without running it in wildlife and with various difficult-to-reproduce conditions.
I recommend Fowler about refactoring ( www.ozon.ru/context/detail/id/1308678/).
About unit tests, alas, I do not know what to read. I've been banging my head against the wall collecting bits and pieces of information from the internet. Maybe someone will recommend some ready-made article.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question