“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” Martin Golding Writing clean code makes the code easier to understand going forward and is essential for creating a successful maintainable product. You are constantly reading old code in order to write new code. The ratio of time spent by a programmer reading code to writing code is normally 10 to one. Programmers are really authors, and your target audience is not the computer it is other programmers (and yourself). Programming productivity has an arccotangent relationship with time.Īs features are added and changes are made, time passes and the original developers move on or forget some of the project details, or if the quality of the code is not good, changes become increasingly risky and more complex. The quality of the code is directly correlated to the maintainability of the product. Some famous and (fairly serious!) examples include space rockets being mislaunched due to a badly transcribed formula (a single line was missing that meant the rocket had to be terminated 293 seconds after launch ultimately costing around 20 million dollars), or a race condition bug in a medical machine that caused the death of three people, when they were exposed to lethal radiation doses – and you think you’ve had a bad day! There are countless examples of bad code bringing companies down or making a disaster of an otherwise good product. Good programmers write code that humans can understand." Martin FowlerĪs eloquently noted by Robert Martin in his book “Clean Code,” the only valid measurement of code quality is the number of WTFs per minute as represented in the below diagram: "Any fool can write code that a computer can understand.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |