Settings

Theme

How do you keep the files you are working on in your head when programming?

3 points by dickjocke 6 years ago · 2 comments · 1 min read


I find that this is the biggest pain point for me. When I am working on a task, it usually ends up spanning several files. And I just don't have very good memory.

I struggle to remember if I had some new variable in the Logger or the Worker, etc. It's usually trivial to see the list of files I'm working in and check between a couple, but I'd love to know if anyone has a memory palace kind of technique they use for programming.

thephyber 6 years ago

I think 2 things are helpful.

(1) Know that your memory and concentration will suffer if you are distracted or have lots of context switching. Try and change your coding environment (IRL) to suit this fact.

(2) Make sure you are using the tools provided by a good IDE. Many IDEs will autocomplete variables/functions/modules which are in scope of where the cursor is. Make sure you have convenient+relevant IDE extensions/plug-ins for your language+libraries running.

There are exercises you can do to increase your memory, but I think your programming ergonomics are bad if you have to resort to that.

gregjor 6 years ago

vim buffers and splits. And a paper notepad and pen.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection