What do you do when you have a repetitive task to do?

  • Comments posted to this topic are about the item What do you do when you have a repetitive task to do?

  • Delegate 🙂 Failing that, headphones and some good tunes to help me through it!

  • I try pretty much the same tactics as yours. Sometimes, I share with my colleagues what I am doing and how; and seek their advise to see how they would have done it. 

    On a few occasions, I have challenged myself to do the same task quicker with same efficiency, to make it interesting.

  • My strategy is to turn a repetitive task into a programming one.

    Instead of manually running all of those tests, write a framework which runs those tests for you and reports on what succeeded and what failed.
    Instead of building 25 almost-identical SSIS packages manually, use BIML to create them from the destination tables.
    Instead of parsing thousands of rows in Excel to identify differences, write a macro to run through them for you.
    (all real work examples, by the way.)

    It's not about saving time -- sometimes it will take as long to write a program or script as it would to just do the task manually. But it's more fun this way, and sometimes you do save time. You also get better consistency to boot. By the end of a few hundred rows in Excel, can you really be sure you're not missing something?

    Those 25 SSIS packages? I created one manually and it took me an hour and a half. I figured I could do the others in 2/3 the time == 24 hours, or 3 work days. Instead I spent a single day learning BIML, and by the end of the day had all 25 packages. Plus I knew all of the variable, task, and parameter names were consistent and didn't have any spelling errors.I even rebuilt the original one from BIML to ensure it was consistent.

  • It's a lot easier to automate a process when it's been well defined (ie: the functional requirements don't change) and when the underlying physical environment is stable (ie: you don't have to deal with blocking or storage issues). When the business keeps tweaking the requirements, or when the process breaks midpoint, the return on investment for all the upfront automation programming is diminished.

    However, even if a scripted process isn't perfect, it's at least self documenting. If someone needs to know how the process works, they can follow the code from top to bottom.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • Currently in the process of re-processing folders where there was an error reported. As there are thousands of them, created some code to help me write the batch files for moving the files. Further code to split the information into batches, re-run the code, archive and remove log entries to be able to re-run the code etc. I am still tweaking the code (to keep myself from falling asleep). Changing the batch as there are different file sizes, check the outcome and sometimes re-run again as there has been another error this time. 
    All the while listening on headphones to radio Caroline, takes me back to my youth 😉

  • sknox - Thursday, May 11, 2017 5:57 AM

    It's not about saving time -- sometimes it will take as long to write a program or script as it would to just do the task manually. But it's more fun this way, and sometimes you do save time. You also get better consistency to boot. By the end of a few hundred rows in Excel, can you really be sure you're not missing something?

    Eric M Russell - Thursday, May 11, 2017 6:37 AM

    However, even if a scripted process isn't perfect, it's at least self documenting. If someone needs to know how the process works, they can follow the code from top to bottom.

    nitinbhojwani - Thursday, May 11, 2017 3:17 AM

    On a few occasions, I have challenged myself to do the same task quicker with same efficiency, to make it interesting.

    I completely agree with all three of you (including the non-quoted parts). I avoid mundane repetitive tasks at all cost because I know my mind is not up for the task! Other people (I have learned) feel at ease with this kind of work. I say: Let them! I can't drive cars on highways, because too little is going on and I need to take breaks every 20 minutes to avoid falling asleep at the wheel. I prefer to drive in the mountains - the sheer challenge of watching the bends in the road keeps me an active driver.

    Same as with working: Make it a sport! If the task is boring, I try to trick my mind into not thinking so:

    • I imagine why it could possibly be useful to someone (and feel gratitude that I can help out a fellow being/make a difference to someone if you like).
    • I take pride in fast execution without errors (and see the repetition as a kind of "practice" for the championship).
    • I invent tests to check myself (allowing me to relax a bit while working, so my brain don't get exhausted). 
    • Or I simply ignore how little time the task would actually take if I just did it - and deliberately spend more time than necessary by learning how to automate some or all of the parts, while documenting the thought processes.

    On a side-note: I have found many times that forcing myself to articulate the tedious process in written form reveals procedural errors that no-one has noticed for years on end! Because the task was so boring that everyone just did what they were instructed to do without thinking at all. Another byproduct of automating stuff: It is really hard to automate something stupid... Far easier to fix the logic first, and then automate it.

  • Just thought this was relevant.

    https://xkcd.com/1319/

  • I've identified some repetitive tasks here, which we do have to do fairly often. In this case its making modifications to several tables to fix mistakes the user entered. (For some reason, which I simply do not understand, there isn't a way for the user to fix the mistakes they make in the application. Once they enter the data, its fixed in concrete.) Using the SQL scripts we've gotten from the vendor I've written an ASP.NET MVC app to handle these mundane tasks. But getting it into place is a very lengthy operation. I've been working on that for over 2 months, mainly because time demands upon me don't allow me to focus upon that and of course I don't have the necessary permissions to set up websites on production servers, etc.

    Oh well, someday...

    Kindest Regards, Rod Connect with me on LinkedIn.

  • ZZartin - Thursday, May 11, 2017 8:55 AM

    Just thought this was relevant.

    https://xkcd.com/1319/

    I actually thought of this one:

    https://xkcd.com/1205/

  • I find that Excel and Notepad++ is invaluable tools for a developer. I have to for instance create a form/page/stored procedures based on a table and found that concatenating in Excel work nice. I have taught myself so far that I hardly do any coding. You must just set your toolbox up right.

    Manie Verster
    Developer
    Johannesburg
    South Africa

    I am happy because I choose to be happy.
    I just love my job!!!

  • manie - Friday, May 12, 2017 1:02 AM

    I find that Excel and Notepad++ is invaluable tools for a developer. I have to for instance create a form/page/stored procedures based on a table and found that concatenating in Excel work nice. I have taught myself so far that I hardly do any coding. You must just set your toolbox up right.

    I've started using PowerShell to do things like create DDL scripts for CRUD procedures or jobs. The way that PowerShell handles dynamic variable substitution in text strings blocks makes this simple and clean.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply