Conventions
Most programming languages have conventions. These could be for naming or code patterns.
How does this help?
A simplistic view is that it helps to keep code consistent, especially when multiple people work on it.
A deeper way to look at this I believe is in reducing the cognitive load.
In cognitive psychology, cognitive load refers to the effort being used in the working memory.
If you have conventions, it is one less thing to think about. You do not have to spend mental capacity on thinking whether to name variables small case, capital case, camel case, with hyphen, underscore etc. You blindly rely on the convention. Same applies to code patterns. You look at the pattern and automatically grok the idea; without expending grey cells.
I strongly believe that all tech teams should have conventions wherever possible; outside code too. Freeing up any amount of working memory for things that matter will go a long way towards increasing productivity.
Linked from
-
Idiomatic code
Learning a programming language is not just about learning the syntax, it is more about learning the idioms and standard conventions of the language and the community behind it.
-
Deviation From Expected
Documentation, common conventions and putting in the right processes are some of the ways to mitigate this.
-
Naming Things
Goes without saying that names should adhere to the conventions that your team has adopted.
Subscribe to get new posts by email