V
V
Valeroncho2014-03-20 11:36:45
Programming
Valeroncho, 2014-03-20 11:36:45

How to achieve "ideal code"?

Hello.
I am a student. I have been programming for about 1.5 years. Recently, I began to notice that the code written by me is hard to read. For example, when teachers write their own code, I understand it well and it is easy to understand it. And in my code there is some kind of chaos. Can you please tell me how to properly organize the architecture of the code? Are there any books or articles on the subject?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
1
1001001 111, 2014-03-20
@IgorO2

I can advise, www.ozon.ru/context/detail/id/3159814

T
tugo, 2014-03-20
@tugo

Learn design patterns. For C++, here is a fundamental book . There are pattern books for every programming language.
Read about Software
Quality

V
v_prom, 2014-03-20
@v_prom

Robert Martin "Clean Code"

S
Sergey, 2014-03-20
@begemot_sun

Books have already been recommended. I'll say shit.
Good, correct code:
1. Easily changes itself (within reasonable limits)
2. Easily understands itself
3. In each procedure / function, it operates with a minimum of entities.
4. Speaks for itself (comments are needed, but to the point)
5. Easily tests itself (allows you to write automatic tests)
6. Interacts with a minimum of entities (not to be confused with point 3)
7. ..... Maybe someone else that will add ?
Good code is not written by itself, it is written by people. Practice. If old code (a year ago) seems bad to you, and you want to rewrite it, then you are on the right path of a programming Jedi.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question