When I talk with people about this, I hear two counterarguments over and over. Let me try to debunk them, once and for all.
“This costs too much performance…” Nonsense:
On our modern hyper-fast machines you won’t notice those few milliseconds for creating an extra variable or performing that additional function call. If it takes time anyway, because…
Compilers/interpreters are smarter than you imagine and optimize a lot of your troubles away.
There will always be exceptions, usually loops that iterate so often you have to squeeze out the very last millisecond. If that’s the case, of course, just do it. But please comment any weird, unusual or indecipherable construction lavishly, so it becomes comprehensible again.
“XML comments, lines and stuff like that are too many keystrokes, it slows me down…”. Nonsense:
In most IDEs you can put stuff like starting a comment, inserting a line or whatever
under some ctrl/alt/shift/apple combination. For instance, on my system inserting a
comment is just a single keystroke away and leaves the cursor in between the
<!-- -->
markers, ready to type!
It’s a matter of finding out how this works in your environment and spend an hour or so customizing things. Well worth the effort.