Automate, Automate, Automate

As a programmer, I always encourage myself and others to be lazy.

No, I’m not kidding. Programmers should be lazy.

In my early days as a professional programmer, I worked like crazy. I like to do something manually. I like to type a command like javac happypuppy.java, java happypuppy.class and if there were errors, I also like to type setenv CLASSPATH ... happily. Manually. Without doubt.

When it comes to web development, I would zipped all the php files needed, sent it through ftp or scp (manually or by using tools like FileZilla or Cyberduck), unzipped it on the server side and opened the browser to test whether it’s worked on the server or was something broken there.

Building Android application was a little bit messy. I tested the code against my environment (and my emulator), I compiled and built the code manually using Eclipse and then take the individual apk file to be signed using command line. After that, I uploaded the apk to the server and let others to try. If bug was found, I would fix that bug on my local machine, re-compiled and re-built it using Eclipse. Take the individual apk file to be signed, uploaded the apk and let others to try again.

I might not realize that someday I would be terminated from this world knowing that the cause of my termination is an infinite loop. I hope not.

I learned very much in those process and I would never regret that I have ever been a ‘diligent’ programmer. I might not knowing anything if I just jumped over the process and using some tools that were just made to make my life easier. I might just said that I learned the hard way.

I started to understand the SVN and Git. I started to use bash script and Python script as much as possible. I started to learn Ant as part of Java build tools (you guessed it. It solely for Android). I started to get my feet wet with Hudson and Jenkins. I started to play with JUnit, Robotium, and Selenium. Bunch of tools I learned that makes me what I am today.

After all those things, I arrived at the conclusion that programmers should be lazy.

Reasons?

1. By being lazy (and automate all the process I can automate), I am more focus on something important rather than doing exactly the same thing everyday. Programmers tend to be the easily-bored species so be careful when you felt something was boring, you might want to automate it (but yes, it’s still limited to machine-related. You cannot automate a meeting with clients).

2. Being lazy and automating the process of compiling/building software or deploying a web application surprisingly can save you times on repeating the process again and again as doing it manually is prone to human error (I’m looking at myself as a programmer. And you. Yes, you.)

3. Automating unit tests and being lazy not to run the application everytime I want to test the new functionality also saves me a lot of times on debugging so I can focus on the algorithm and solving current problems instead of worrying that my new code will introduce bugs to the previous code and to the whole application.

There are more and more reasons to be lazy and at a higher level, I can save my company’s time and money working on something more important and move forward (instead of stuck doing the same thing everyday).

At this point, I just want to clarify one thing: What I meant with being lazy is just being able to invest more time as early as possible to do the automation and enjoy the rest of the time doing something that matters most.

Also read...

Comments

  1. You might be interested in http://xkcd.com/1205/

    Be aware that using automated tools has also a cost : you have to maintained them to keep them up to date. I have often worked in places where plenty of half-working script where used, and it was not really efficient.

    Reply
  2. I might say that automating 4 steps or less to be just one step is probably useless since your productivity wouldn’t increased that much. Yes, you will definitely save your time and avoid unnecessary human error, but it isn’t worth it.

    5 steps or more to be one step is what I called automation. I recalled building Android apk from the source code until the final signed apk need at least 6 steps and it’s very annoying to do that everytime.

    Anyway, thanks for sharing. More devs should learn from you, Chris.

    Reply
    • Thanks, auto_guy. The amount of steps indeed a consideration when we need to automate something. Automating the Android build process is probably a must since it’s prone to human error. Everyone should learn from everyone :)

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *