Live data from Hacker News

Ask HN: How do you manage one-off internal scripts?

news.ycombinator.com

1–10 of 17 posts

Ask HN: How do you manage one-off internal scripts?

#1
For a recent project, I've found myself writing quite a few one off scripts for database adjustments, SQL queries for analytics, etc. I've been manually running them myself in the command line, but it's a very messy process. New team members also don't know what scripts are available and where to look. Anyone know of any tools, or have any workflows to better organize these scripts?

Re: Ask HN: How do you manage one-off internal scripts?

#4

At a prior company we added them to a folder of misc scripts along with notes on what they were for. Not the greatest solution but it did ensure they never got lost.

As more engineers joined and people needed to reuse old scripts, was there some process to discover them on their own? My scripts are also dumped in a repo, but team members are having trouble finding them and running them especially since there are quite a few now.

Re: Ask HN: How do you manage one-off internal scripts?

#6

At a prior company we added them to a folder of misc scripts along with notes on what they were for. Not the greatest solution but it did ensure they never got lost.

As more engineers joined and people needed to reuse old scripts, was there some process to discover them on their own? My scripts are also dumped in a repo, but team members are having trouble finding them and running them especially since there are quite a few now.

A combo of group experience and manually reading them.

Most scripts were never re-used, so it was not a problem all that often.

Re: Ask HN: How do you manage one-off internal scripts?

#8
If they were truly one-off, you wouldn't need to manage them. Categorize and document. SQL queries for analytics go into something like Metabase. Database migrations go into git. Frequent adhoc scripts go into something like Jenkins so you can trigger them easily. So on and so forth. All of those documented somewhere, like the team's Confluence/Notion/whatever.

But don't just leave them at that, do work on eliminating their need. Sisyphean task but necessary nonetheless.

Re: Ask HN: How do you manage one-off internal scripts?

#10
post #8

If they were truly one-off, you wouldn't need to manage them. Categorize and document. SQL queries for analytics go into something like Metabase. Database migrations go into git. Frequent adhoc scripts go into something like Jenkins so you can trigger them easily. So on and so forth. All of those documented somewhere, like the team's Confluence/Notion/whatever. But don't just leave them at that, do work on eliminatin…

I'm curious about your workflow for reusable scripts with Jenkins. What are the advantages to putting it in Jenkins? How do you set up Jenkins to run these individual scripts?
Post reply on HN