See all glossary termsThere are a lot of beliefs about what is the best code, but almost all of it is subjective.
There are a many parameters that can be used to determine if a code is good or not. For example:
- Time required to write new features
- Development team happiness
- Market Revenue
- Amount of bugs
- Fitness to requirements
- Speed at fixing new bugs
- Customer satisfaction
- Running speed
- Amount of crashes
- ...
Programmers say that some methods increase such or such metric. Methods like:
- Object Oriented Programming is supposed to make code easier to read and more fitting requirements.
- Test Driven Design is supposed to
lower the amount of bugs.
- Functional Programming is supposed
to lower the amount of bugs too and make them faster to fix.
- Strong Typing is supposed to increase the comprehension
of code and make bugs harder.
- Diagrams design is supposed to increase customer satisfaction.
- Agile methods are supposed to deliver better features faster.
- ...
We've been studying all the metrics above, and others, and all those methods, more or less since programming exists. And in about 60 years of studies, the resounding answer is: we do not know.
There are no clear numbers demonstrating any method is better than any other, on any of those metrics. There are a lot of studies demonstrating programmers believe such or such method is better, but that is not supported empirically.
In other words, all methods seem relatively equivalent generally (some may be better in specific cases).
There are a few things we do know increase code quality (accross all metrics):
- Amount of sleep
- Pair programming and code reviews
These two elements increase all metrics. So make sure you get good sleep, and that you show your code to others!
See Also
Related terms in the Glossary
External Links
Handpicked resources on the internet
school.gdquest.com - 0.3.5-2024-11-18T20:36:29.840Z-