Coding Priorities
If you were to ask three different friends to drop by the supermarket to
pick up some asparagus, green beans, and corn, would it surprise you to
find that one friend bought canned vegetables because were the
cheapest, another bought frozen vegetables because they were easiest to
cook, and the third bought fresh vegetables because they were
organically grown and tasted the best? Can you at least imagine such a
thing happening?
The three friends buy different types of vegetables for the same reason
one programmer will emphasis speed in his code, another will emphasize
small size in hers, and a third will emphasize simplicity--their choices
differ because their priorities are different. (p. 17)
From book: Debugging the Development Process
I frequently refer to the section titled "Know Your Coding Priorities" (p. 18).
- Size: memory, storage, or bandwidth
- Speed: execution time to complete a task
- Robustness: resilience to bad input, i.e., hard to "crash"
- Testability: effort needed to verify expected behavior
- Maintainability: effort for someone else to fix a bug or add a feature
- Simplicity: experience another developer needs to read and understand the code, dependencies, and interactions
- Reusability: you or other teams use the code in other use cases
- Portability: effort required to migrate to another platform (e.g., database, browser, mobile OS, cloud provider, etc)
- Readability: time another developer needs to correctly understand the intent by looking at a section of code
Concise and useful knowledge nugget — with source link no less.
ReplyDelete