3 ms·
One solution: Use fewer files. I try to keep the number of files and folders for a project to as few as possible. Then you spend much less time opening and se
by breck 17y ago
One solution:
Use fewer files. I try to keep the number of files and folders for a project to as few as possible.
Then you spend much less time opening and searching for files. As more people get involved with a project, you'll have more files, but you should make an active effort to keep the numbers minimized.
Here's a little script I wrote to give quick stats on a project's size:
http://breckyunits.com/metrics_for_programmers http://breckyunits.com/metrics_for_programmers
- viraptor 17y ago> Use fewer files. Why? What does that have to do with text editing capabilities? The number of files depends (or at least should) on what you do, not on how bad your tools are. If you limit the number of files to limit the file-opening time, you increase the fragment-searching time in the gigantic-file-of-doom. Also you lose the possibility to make local one-file changes which are self-explanatory if you look at the VCS history. I'm not sure why would I want to make my work harder just to make up for the tool's features...
- breck 17y agoThe OP complains that: > For most programming tasks, editing involves opening several files at once and switching between them (e.g. HTML/JavaScript/CSS). His idea of a solution is for better file navigation. My claim is that often the real problem is a bloated set of files and directories in a project. I find when the set of files is small, opening and switching between them is much faster and more productive. This applies particularly to the beginning of a project. As classes/files mature, then I recommend splitting them up into more files. For example, when starting a new MVC project I'll create one models file. All the models go in there at first because the project will be heavily edited. Once it's become more stable, I'll split it into a file for each model/class. This way when you make small changes you'll have the VCS history benefit you mention, but often you don't really need that at the beginning of a project.