3 ms·
Back in the 90s I had a high school summer job where I had to run some scripts against a production database. I was told, "You have to watch it in case there a
by dbg31415 8y ago
Back in the 90s I had a high school summer job where I had to run some scripts against a production database. I was told, "You have to watch it in case there are errors." Boring work. Essentially, I sat for 2-3 hours a day watching a status bar move.
I would run a backup script on a production database, then copy the backup over to a local storage drive, then run a sanitation script to clean up customer data, then copy the database again to a public folder where the devs could access it.
I would use the time to try and dissect the script and read up on SQL. A few months in, I added a few lines to the script that emailed me if there were errors (and of course this list of errors evolved over time...), and set it to automatically do the download and sanitation work.
Then I corrected a few parts of the sanitation script to block out a few more bits of customer data that whomever wrote the original script had missed, and then set it up on a schedule to pull a copy every hour... the devs loved that the data was coming down more frequently.
I was so proud of my little automation project, and I showed my boss. I was a little worried he'd be upset that I was running this script on production. He wasn't. He loved it. Then he told me to delete it.
"You cost me $8 / hour, but when you go back to school I'd have to hire someone who costs a lot more to maintain this. The budget is already approved for the year, I can't change it. This is great... and I know what I'm asking you to do is stupid... glad you're learning here... but really I just want you to sit and watch the status bar move."