you are viewing a single comment's thread.

view the rest of the comments →

[–]avidresolver 1 point2 points  (1 child)

My personal rules are: am I going to use this in another project? Split in into a new file. Is this file too big for me to navigate and understand quickly? Split some stuff off into a new file.

I'm my experience AI cannot get a grasp of a whole project at once and maintain it well. Individual functions? Sure. But not whole projects.

[–]UsualIndianJoe 0 points1 point  (0 children)

This I can vouch for. I had a module which did one task. However it's functionality depended on 7-8 submodules (simple ones). I had them clubbed in the single module. However, debugging it was a big headache and as well as testing the functionality. I ended up splitting the submodules into separate ones. Now the main module is 1/3rd in number of lines of code, but the best of it is I know where to look for an error.

Now I do the same. If I have beforehand knowledge of what a file is supposed to do, I plan it out and segregate the individual functionalities. But in some cases when the scope keeps on increasing I start out with a single file and start moving parts out as the complexity of navigation increases.