These are some important qualities of good code
Cleanliness: Clean code is easy to read; this lets people read it with minimum effort so that they can understand it easily.
Consistency: Consistent code makes it easy for people to understand how a program works; when reading consistent code; one subconsciously forms a number of assumptions and expectations about how the code works, so it is easier and safer to make modifications to it.
Extensibility: General-purpose code is easier to reuse and modify than very specific code with lots of hard coded assumptions. When someone wants to add a new feature to a program, it will obviously be easier to do so if the code was designed to be extensible from the beginning.
Correctness: Finally, code that is designed to be correct lets people spend less time worrying about bugs and more time enhancing the features of a program.
No comments:
Post a Comment