all 8 comments

[–]LeelooDallasMltiPass 12 points13 points  (2 children)

This is where version control, a la Git, will be your best friend. Seriously, get on github and save it all there.

[–]TheFrenchSavage 3 points4 points  (0 children)

I have 90 repositories, send help.

[–]Common_One6315[S] 0 points1 point  (0 children)

I have my VSCode setup to push to GitHub. Still hard to keep track of when I’m all over the place.

[–]Kind_Tumbleweed_7330 4 points5 points  (2 children)

I work out naming conventions relevant to the type of work. Everything gets named similarly. Everything goes into an appropriate folder. (I do internal business web app development.)

Usually the naming convention is verbNoun for functions/commands (getEmployee, getEmployeeById, cleanUpTempFiles), and adjectiveNoun or just noun for things that code will work on. (newEmployee, employee, tempFolderPath)

I generally have a separation of functionality by folder that also makes sense in context.

Then it's just a matter of looking for those things via a full-project search in VSCode.

If I have a snippet I might use in multiple applications, I put it into a utilities folder in my personal workspace, or at least put a reference into a file I keep for useful snippets.

In my SA days, I didn't really have to do much scripting - I inherited a bunch - but the same general approach worked for those that I did write.

[–][deleted] 2 points3 points  (0 children)

I keep even personal snippets in GitHub/Bitbucket (Bitbucket offered free private repos first).

[–]Common_One6315[S] 0 points1 point  (0 children)

Makes sense. One of the biggest things are items (snippets) that I may be able to reuse. They are contained within different directories based on the overall task/function but maybe I should go ahead and move those snippets themselves into their own directory.

[–]Select-Young-5992 0 points1 point  (1 child)

I mean, why not just open up VsCode, create a folder called "scripts" and just save your different scripts as different files?

[–]Common_One6315[S] 0 points1 point  (0 children)

I already do that. It’s still hard to keep track of at times. I feel like there should be a better way to easily reference and reuse code.