3 ms·
Am surprised by all the negative comments about writing code by hand. Many of the comments here speak about moving or thinking faster, but where I have always
by eigenhombre 3y ago
Am surprised by all the negative comments about writing code by hand.
Many of the comments here speak about moving or thinking faster, but where I have always found pen and paper most helpful is when I've needed to slow down, focus, feel out edge cases, and give my intuition and experience more chances to engage with the problem. Occasionally for purely algorithmic things I've written out an entire function or loop, but more often it's a table of the program state during an iteration, or a diagram of how two things talk to each other, or what calls what in what order... just the little bits I need to think about, get clear on, before I go back to my editor for the next steps to address the problem. If you've ever driven a manual transmission, it feels a little like downshifting to get extra power on a steep hill climb.
It has been suggested ([1],[2]) that writing by hand helps with memory retention and probably other aspects of cognition; in my case, it may just be that writing [edit: by hand] "feels calmer," so, if I have a hard problem to think through, the pen usually comes out.
[1] https://pubmed.ncbi.nlm.nih.gov/33815075/ https://pubmed.ncbi.nlm.nih.gov/33815075/
[2] https://journals.sagepub.com/doi/abs/10.1177/0956797614524581 https://journals.sagepub.com/doi/abs/10.1177/095679761452458...
- cssanchez 3y agoI’m the same way. Different strokes for different folks, I suppose. I need to write down my thoughts for everything on paper, sticky notes or drawing boards if I want to be sure that Ive thought about it well enough. I find most people don’t have this immediate drive for quality, though. Most developers just want to splash words on the keyboard and see an initial result to see if it works. I work the opposite way, I need to see it work in my mind or on paper before coding it. But neither of us is right or wrong, we just work differently.
- trealira 3y agoOften when I can't think of a solution, and my attempts have failed, I inadvertently stop paying attention and just start messing around with words on the screen in the IDE. Pen and paper helps me focus on the problem. Also, when thinking of a solution, and I'm starting to form an idea in my head, typing it into an IDE can make me lose focus unless the idea is already very clearly outlined in my head. It's happened to me before that while I have a partially formed idea in my mind, I type it into the IDE, and a large window of completion suggestions, or a red underline from a typo, distract me and I forget the idea I was thinking about, and I have to start over. I was diagnosed with ADD; it could be I'm just more easily distracted than other programmers. And yeah, I draw tables, write pseudo code, draw outlines of the program, sketch data structures, etc.
- deleted 3y ago[deleted]