It’s definitely something I suck at. At least for personal projects without too much planning.
The things I do usually start out as small little projects, a couple of files, neatly organized code, a joy to work with. But as time progresses, they get a little more messy. Files still not sorted into folders, code in desperate need of refactoring but also really hard to do so. And as it gets harder to organize, I am more and more likely to simply go “eh I’ll do that someday” and just silently shove it under the rug. And that’s terrible.
That’s really fucking terrible, and I mean it. For larger projects, proper good organization of things is super important for maintainability and, in turn, your sanity. With SSR2 I’m sort of in the right direction, giving files prefixes depending on if they’re for displaying things, logic, or a cron job to be run periodically. Still, I have so far refused to move them into folders accordingly, and until two days ago there were still a couple unused files, or pieces of script that set variables that were never used. All in all this mess is starting to become a bit cumbersome.
Thing is, keeping well-organized is hard. Sure, you can push yourself to refactor and keep your files in check, but I don’t think that’s all there’s to it. I wish I could list more things to do, but honestly I’m still learning myself. I’d say experience plays a decent role here, as it usually does. You can’t expect to be a master of neatness on your very first large project. It comes with time. Maybe experimenting with different methods is a good way to get to know what works best (for you)?
Oh and never forget to keep to-do and notes files. Hey, why not make proper documents out of those if they get big?