4 ms·
Typing is cheap. Debugging, reverse-engineering and refactoring is expensive. Taking shortcuts just because you don't like typing a few extra characters is a b
by w0utert 8y ago
Typing is cheap. Debugging, reverse-engineering and refactoring is expensive.
Taking shortcuts just because you don't like typing a few extra characters is a bad habit to have, it leads to the kinds of code that has obfuscated variable names, no comments, 'clever tricks' that put way too much logic in a single line, etc.
I used to think like you, but I realized saving a few keystrokes is almost never worth it.
- icedchai 8y agoThe difference is name spacing is a feature of the language. It's not a clever trick or short cut. Would you fully qualify every reference then? I'd argue that would add more clutter and obfuscation.
- ifoundthetao 8y agoExcept when it comes to Vim. Amiright? jk But really though, this is solid, sound advice. And it's a great way to relate it back to business value. The extra half-second incurred when it comes to additional typing is going to be far less than the time saved when it comes to clarity gained from looking at the code again. Whether that be for future development, debugging, or whatever else.