Tag Info

New answers tagged

0

By "module", do you mean app? Django already has a pretty standard structure for where to place files. I suggest you consider using that structure. For one thing, just about all help you will get will have examples with this structure. As for your structure, it looks pretty sprawling to me. It's up to you, though. In particular if it fits the business ...


3

It depends of technology that you are working with. Names should identify items, and paths should identify context. I agree good naming is important but hey, paths are names too. But from practical point of view, if you are using something like Javascript it is probably better to keep more precise names for end items. If you are working with tools that take ...


12

There is a clear deciding factor here: DRY (Don't Repeat Yourself). Every file name doesn't have to be different; that's what paths are for. Can you imagine how many different system or program files are on your computer? What if each of them had to have a unique name? At some point, we're just making the file name a copy of the path. If the best ...


23

Just as a practical matter, if your IDE shows file names in tabs, if you use the same name for each file, you'll end up with tabs that all show the same name. That can be very annoying. One project I took over maintaining has that problem, and it is a major pain to have 15 tabs open, half of them with the same file name. So... use more descriptive names. ...


32

Consider the cost/benefit ratio of your two options: Would reusing the same name cause confusion or naming conflicts? Probably not, since they're in different folders. The name "player_stats/generator.js" is equivalent to "player_stats_generator.js". However, if you see, in the future, a reason to merge your js files into a single directory (deployment? I ...


7

Always use descriptive names over short names unless it's something like a mathematical constant or loop variable where conventions of the language in question favor short names. For instance, if you call a variable "pi" and have it be some appropriately precise value of pi, then the name is good and gets the point across. On the other hand, if you have a ...



Top 50 recent answers are included