Answer the question
In order to leave comments, you need to log in
How to improve code quality?
Hi everyone!
My code is often called shit code and I completely agree with this.
So how can I improve the quality of my code?
I've read Bob Martin's "Clean Code" and Steve McConnelly's "Perfect Code", but even so, I don't feel like my code has improved.
Answer the question
In order to leave comments, you need to log in
Looked at your previous questions.
It will most likely be difficult for you to become a programmer. After Clean Code, 95% of your questions should have disappeared. If you still do not understand how to format the code and what you are striving for, then you are wasting your own and other people's time
. And yes ... 4 people have already told you what and how. Your code has already improved to the category of "my code will be understood even by those who do not fumble in it"?
See the code on github.
Here I am, for example, writing code in python. I often parse. I use the Beautiful Soup library. OK! I'm going to github. There I select advanced search, select "Python", specify the number of stars and a search string something like soup = BeautifulSoup
And I look at several large projects that also use this library. And the whole joke is that you don’t need to figure out how the whole project works. You need to select a part of the code you need, and watch how people write. Although in large projects there may be bicycles, with crutches instead of wheels. Well, this is so, a lyrical digression.
For the C++ language, Qt can teach code and thinking to a healthy programmer when it comes to program architecture. They write that the theory will not help. How? At a minimum, in theory, you can learn: language instructions, OOP principles (SOLID), domain-specific design (DDD), testing technologies, code auto-documentation (Doxygen), git ...
If you do everything yourself, then a habit will form, and then you will find out that there are many things that make life easier, and it will be sad (I was sad). Well, in general, if you solve algorithmically complex problems, then the code will always be clumsy, to one degree or another. Open the boost source, enjoy the quality of the code. The simplest thing is to use the functionality of the language, which is as clear as possible, gradually expand.
There is also the algorithmic quality of the code, the literature will help here - Kormen, Knuth (and in no case do we "grosk algorithms" - this is rubbish).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question