Recently during my internship period at 99XTechnology I came across some leanings about clean coding practices. I think it is worth sharing some important facts about clean coding with you.
Three Principles of Clean Code
- Right tool for the job
- As software developers we have so many tools at our disposal. Selecting right tool for the job is very important. We have to recognize that every technology has it's place.
- High signal to noise ratio
- In science and engineering SNR refers to the level of desired signal to level of background noise. Clean code optimizes the signal and reduces the noise so that the reader can easily read the logic and understand the intent.
- The main contributor to the code level documentation is not comment but good programming style.
The right tool for the job.
- HTML - Semantic markup for the content.
- CSS - Separates styling from the markups.
- C#, PHP, Python - Used for implement business logic.
- SQL - Data storage, access and manipulation.
- Storing HTML in SQL databases. Databases should contain only the row data.
- Putting inline styles in HTML instead of a separate CSS file.
- Generating dynamic SQL in server side programming language instead of using an ORM or stored procedure.