BlazeOrange.ninja

About Me Disclaimer Badges Contact Me

Automate The Boring Stuff

If your job is like mine, half of the code written is custom business logic and the other half is bog standard template code. Personally, I'd like to get the templates over with ASAP but it sucks the life out of me while doing so. The copying, pasting, and tweaking a couple things; it's all tedious and error prone but you gotta do it. It's like writing manual test cases, boring but necessary to prevent worse things from happening. But what if you could drop in the changes and let something else do all that for you!

Automation to the rescue!

No, I'm not trying to sell you a product. Every job is going to have different things they need automated and the most common things have already been covered by a generic tool. I'm trying to sell you on the concept of automation. Depending on how often you have to write template code and how long it takes each time, it may be in your best interest to just automate the process. There's a quick chart from xkcd to see if it might be worth your while. If takes longer to automate than you'll save, forget about that and move onto a different target for automation.

Say you've got a project that has 15 tables. Each table needs a blurb of SQL to create the table. It also needs keys, constraints, and statements (whether in your language of choice or in a stored proc) for inserting, updating, and deleting. All of them can be generated from a specification that you write that's quicker than writing all that template code each time. And best of all, it can be reused for future projects and modified when the standards for your organization change!

If time is constantly short at your job, it may take a business case to buy yourself the time to pull this off. Get an average of how much time it takes to do each time, how often you do it, and refer back to the chart. Sometimes spending time on this can save you more time in the future.

There remains the constant fear of automating yourself and/or others out of a job. If there is so little to do (and they can't find anything else for you afterward) that this is a danger, forget it and start working on your resume instead. There's no point working at a place where such skills will be punished rather than rewarded.

Day 3 of #100DaysToOffload


This website is designed to last.