Coding principles every developer should follow:

Before starting this article I’d like to tell a bit about my background, I am a programmer and I’m coding for the last 5 to 6 years now. I started with Java and C and in my initial years there’s has not been that much boom of YouTube and everything, the primary source of knowledge was books. In my initial years I was not a good programmer part of the reason was I knew how to code but not how to code efficiently. I have learned these principles overtime once I came to the industry and started learning how simple lines of code change can ease our lives.
These principles helped me a lot, hope they’ll also help you in one or another way
KISS(Keep it simple stupid)
This principle states that you should always keep your code simple. If you have a complex piece of code, always try to break it into smaller and more maintainable code.
The same goes for when you are designing a logic always think through what should be the smallest building block then move ahead.
YAGNI (You Aren’t Gonna Need It)
This principle states not to implement something until it is necessary. This is a piece of advice every developer should follow.
Always follow this whenever there’s a deadline and in the free time keep exploring.
DRY (Don’t Repeat Yourself)
This principle states that a piece of code should be implemented in just one place in the source code. If you notice the same chunk of code being written over and over, you’re breaking this principle.
Helps in decreasing the size of code makes it more readable and easier to understand also.
SoC (Separation of Concerns)
This principle advises you to partition your complex code into different sections or domains. Each section is independent of the other, and that’s why each section can be tackled independently.
The must-have thing in your pocket make your code loosely coupled and highly cohesive one piece of code should never affect the other.
Avoid Premature Optimization
This principle states that you should not optimize your algorithm at the early stage of development.
Always follow these rules before you optimize your code:
a. Make it work.
b. Make it readable because you are coding for humans and not machines
c. Make it modular.
d. Make it efficient.