Integrated Development Environments Are Making Us Lazy
Computer programmers are some of the laziest human beings alive. Fact. I know because I am. You know because, if you’re reading this tech blog, you likely are too. But, before you tut, gasp, roll your eyes, or perform whatever exaggerated go-to-reaction you have become accustomed to when someone mentions indolent software developers, you should understand one thing: it’s not your fault.
The very nature of laziness is embedded within human nature. For thousands of years, we have strived to create new ways to perform tasks that would surpass our original methods by reducing time or increasing efficiency. Fields were once cultivated by men until someone realised that you could attach a plough to a horse, recline in your chariot and simply direct your steed with a flick of the wrist - a glorious time for mankind, I’m sure. Even after this triumph, we soon became frustrated with the maintenance of all these new horses. The eradication of tired legs and broken backs wasn’t enough, so after we went about designing the first steam engine tractor. Humans went from hand planting to tractors in no time at all, simply to save themselves from the work. You may think that’s a cynical view to take, but the message that I’m trying to send is not one of antipathy. Actually, it’s quite the opposite. This desire to automate menial tasks is makes perfect sense. Why do things we don’t need to do? Why not save time and energy? We do it not because we are lazy in the negative sense, but because we’d rather have more time to do the important stuff. To research, to learn, to invent, to innovate. To have a life.
If you have stuck with me for this long, you may be wondering where the hell I’m going with this. Bear with me. There is a crossover in computer programming where the beneficial automation of tasks intersects knowledge of the programmer. Too little automation and the programmer may as well be coding blind. Too much and the programmer is faced with a lack of control. I’m specifically talking about modern Integrated Development Environments (IDEs). For those who may not be programmers, an IDE is a software application that allows a programmer to develop software within it. It usually provides facilities for compiling and interpreting, and can help assist to identify errors in your code. All good stuff. The knowledge of a programmer is, of course, essential to build a software application… or so you’d think. With the advances these new IDEs, it is now extremely easy to ‘code’ without much thought required on your part. Let’s take a look at a Java example from one of the newest IDEs, Android Studio.
If I want to instantiate a RecyclerView, mRecyclerView, using a previously defined rootView and want to access it’s attributes, I can simply type the following and be given a scrolling menu of all the accessible attributes: mRecyclerView = (RecyclerView) rootView.
Without considering what it is exactly that I want from this rootView, I can type a period and have a gander at the menu. This is laziness. Instead of relying on my tirelessly learned programming knowledge, I’ve resorted to letting an IDE think for me. It does have it’s pros, though. If I’m working a large scale project, I may not necessarily know all the attributes I need and so having a look down a menu to ‘refresh my memory’ is understandable. Just don’t use it as a means to find something that ‘fits the job’.
As I mentioned earlier, I’m all for speed and efficiency. Why wouldn’t you code faster if you had the option? If the same quality code or better is produced then it’s smiles all round. A new(ish) aspect of coding is tab completion and it’s designed exactly for that purpose. The ability to partially type a word and have the development environment auto-complete the word or statement works wonders when you’re often coding the same variables, getters, setters, and XML. I find myself utilising this heavily in Android Studio and I now couldn’t imagine programming without it. The effort required is minimal and saves a huge amount of time. This is different from the issue above as the word you have partially typed is exactly what you want to auto-complete. There is no guessing or looking through suggestions, just pure efficient coding. Another great feature of Android Studio is auto-imports. No longer do you have to sit down and work out what classes are required to be imported for your new code to run - just code as normal and Android Studio will ask if you’d like to import. With key-bindings you can do this in an instant.
Maybe it’s because I’m just a lazy programmer but so far I have enjoyed all the modern features. One thing is for certain though: it seems to be going down the route of nearly everything being automated. Programs are already writing programs. Soon programmers will be the janitors of the code world. Current IDEs tell you exactly where your error is down to the line, and some even offer suggestions on how to correct your code. Maybe one day a pop up will appear reading “You look like you’re struggling, how about I write it for you?”