Skip to content

Coding Standards and Best practics

Notifications You must be signed in to change notification settings

UserBug/codeGuide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Code Guide

This guide contains a set of guidelines for developers.
The purpose of which is to identify common patterns of bad coding
and suggest a better approach.

v2

Who can use these rules

If you are a junior or middle developer and want to improve the quality of your code,
you can apply all of these rules recklessly. This will definitely bring benefit you now
and help you understand the reasons for their existence and how exactly they improve the application in the process.

If you're an experienced developer, the rules can give you some new ideas or tools to automate.
You can improve the described rules yourself by adapting them better to your needs.

If you manage teams, these rules will help you easily get a unified set of rules for your developers.
This unifies the code, makes it more understandable and speeds up development.

The spirit of the law is above the letter

Although all rules are written as transparently as possible with clearly defined criteria,
it is still necessary to first understand their spirit.
Implementing a rule in your design is much more important than the absolute value specified in it.
For example, you may consider the limit on the size of a file more than 400 lines to be too harsh,
but you will definitely agree that its size cannot be infinite and requires a limit.

80/20

As much as we would like to curb chaos and bring structure to everything,
in real life it is almost impossible to achieve perfection. But we must still strive for it.
Most likely, due to constantly changing product requirements, limited resources and tight deadlines,
you will have to make compromises. But if 80% of your code is clean, you are already successful. (Pareto principle)
It is important that the remaining 20% be clearly identifiable
and the reasons for exceptions to the rules in them documented.

Old versions

Tools


Copyright © 2017 Stanislav Kochenkov