6 ms·
A common two-bird-with-one-stone approach of experienced programmers is to rewrite the code to fewer lines, and to condense long-winded comments. This not only
by throwawaysalome 4y ago
A common two-bird-with-one-stone approach of experienced programmers is
to rewrite the code to fewer lines, and to condense long-winded
comments. This not only aids understanding, but also imparts
ownership to the rewriter.
This approach often generates ill will, but eff them.
- zubairq 4y agoYeah, I've done this a few times, and it really helps with my understanding of the code. Often I have found that colleagues or managers view the time as wasted, and I get comments such as "Why did you waste time rewriting that code?", and my replies of "So I could understand it and make the code clearer at the same time" falls on deaf ears. But definitely a good technique, thanks for tip :)
- sophonX 4y agoThat's a good suggestion for small to medium codebase. In huge codebase, it's not feasible but explaining to others (like colleagues or interns or friends(oss repos not proprietary stuff)) usually helps me a lot. Like talking to a duck.
- zubairq 4y agoMost colleagues (even developers) walk away in boredom as soon as the discussion gets too deep. I do understand though as they are happy to help me, but when it gets too deep they feel they are doing the work for me
- kwertyoowiyop 4y agoRemember: if you rewrite it, you own it.