I often find myself deep into a project, only to be pulled away and struggle to recall my original thought process when I return. I primarily use VS Code for various coding tasks and prefer its folder structure to help keep my ideas organized. I create designated folders like 'FINAL CODE,' 'SCRATCH CODE,' and sometimes even label abandoned code with a 'z' to push them down the list. For the files I consider final, I keep the names short yet descriptive. In my scratch files, I try to comment extensively about what I was experimenting with. I'm curious—what tips or techniques does everyone else have for naming folders/files or organizing code that might help us remember our intentions when we revisit after time away?
5 Answers
What works for me is keeping thorough comments in my code. I document each step and use unique tags like 'TODOCOMP' to leave notes about what I plan to do next. That way, when I review, I have a clear map of my thought process. And of course, give your variables clear names so you know what they’re meant for!
You should definitely start using version control! Commit messages are a great way to track your progress and thoughts. If you get pulled away, create a temporary branch with detailed notes about what you were doing. It really helps once you dive back in. Honestly, I sometimes end up with a ton of 'final', 'final-final', and even 'totally final' versions. It's a bit chaotic!
I recommend using the 'Better Comments' extension in VS Code. It helps a lot if you talk to yourself in the code with comments. When I'm finally ready for a pull request, I just ctrl+F through my comments and clean them up.
I usually just save whatever I'm working on as is and come back to it later without any extra steps. What about you—how long are you typically away from a project?
Totally get you! When I'm pulled away, I like to break my scripts into smaller functions. It’s way easier to refactor a tiny function instead of a massive script down the line. Plus, I make a habit of using version control. Schedule some dedicated time every month to tidy up or improve parts of your code—it really makes a difference!
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String