It seems redundant but it actually forces me to do a quick think-through of what's happening. Plus distractions get a lot easier to handle: I just need to read what I've written down to reload the context.
Paradoxically, I've found that this method of typing out _more stuff_ actually helps me finish much faster.
- I have an org-mode document with a TODO list and project notes always open. Whenever I'm stuck, I'll start decomposing the task into smaller and smaller TODO items, simultaneously with doing a written brainstorm. Sometimes I'll write out a hundred lines of text, but it does help me get unstuck.
- Similar to what you mention, I frequently write a TODO list in comment as a scaffolding in the file I work on, and I then proceed to fill the space between TODO items with appropriate code.
(off-topic) Org mode is really amazing. I've transitioned almost completely from Emacs to Vim over the last few years but I still have Emacs on my dock only because of `org-mode`. I've tried substitutes in vim but nothing really works.
(back on topic) Another advantage of writing comments is coming back to the code becomes so much easier. I can re-read the comments and understand what's going on much faster.
To do this properly I've developed a simple system of 'categories' that allow me to structure the comments properly. I think they works really well. For anyone curious - here's an example in my last weekend project: https://github.com/theproductiveprogrammer/luminate
Check out the comments in the code (`main.js`). I think they make the code much easier to understand and maintain. It's almost an alternative to TDD - Comment Driven Design (CDD!)
This is a modern version of an old problem, now with all the micromanagement tracking and Github stats, etc. But it's all equivalent to the practice of counting lines of code. And it's wrong for all the same reasons.
My answer to this is the same for the last 10+ years. Management needs to read The Mythical Man-Month and internalize it, and you need to find a new job.
Too many companies out there think they can run their bloated organization as lean as a startup with all the cruft a "best practices" operation has. Unit tests, end-to-end tests, proper QA, peer review, various code sign-offs, etc. etc. etc. Meanwhile, Joe Bob Developer at Startup Inc. has root access to the prod server and pushed to prod three times before lunch.
What I do different to other coders I have noticed when doing code reviews is I do a lot less copy/paste and like to think about how to put code together in a better way. I also find it hard to do boring work fast, I get distracted. I also find it hard to focus in a noisy office so that can slow me down too. Some joker comes up and makes some jokes and all the state I have built up in my head is lost.