Top 10 Clean Code Rules
Onyedikachi Emmanuel Nnadi

Onyedikachi Emmanuel Nnadi @e-tech

About: A Computer and Printer Technician and a student of Computer Science and a Junior Front-end Developer

Location:
Anambra, Nigeria
Joined:
Aug 23, 2023

Top 10 Clean Code Rules

Publish Date: Jul 12 '24
0 0

An Image showing Clean Code book by Robert C Martin on top of a laptop keyboard.
According to “Clean code” book by Uncle Bob, he defined some guidances and rules that developers should follow. This is more imperative for the less experienced developers. With more experience, comes the possibility of breaking some rules or reinventing them with justifications.

No code comments.
A good code needs no comment. The variables, methods, and any other component of the code such as attributes should use easily identifiable and descriptive names.

“Code comments are smell, remove them.”

Dead comments or code should be deleted.
Any unused piece of code or comments should be deleted. The best place to find them is in the version control systems.

Incorrect behaviour at boundaries.
Boundaries should always be unit tested. No behaviour should be assumed.

Positive conditionals.
Positive conditionals are easier to read than negative conditionals.
click the link to read the full thread
https://x.com/_iamdikachi

Comments 0 total

    Add comment