I caught a wonderful article on Dzone today by Jonas Gauffin titled “How Resharper rocks my average work day“. In this article Jonas talks about a tool he uses regularly called “Resharper” that makes common tasks a bit more automated when coding in C#. This article reminded me that we are continuously developing better and better tools that help us write code. But is there a point where we are going to go too far? If you think about it, in a bit of a paranoid type of way, this might even be the beginning of computers writing code on their own without us. For fear of being labeled as some kind of Amish coder who is stuck on the ways of the past, I assure you nothing is further from the truth. I do however like to reflect from time to time on where we are going in our coding evolution.
You will be hard pressed to find a programmer who won’t admit that coding can be just as much of an art as a science. I for one believe that only the legendary among us will be those who are just as creative in problem solving as they are a scientist following the scientific method with programming. This artistic side of us is much like being a wood worker who carves masterpiece sculptures out of wood (we use code). This wood worker has a set of hand tools, and perhaps the occasional use of a chain saw, which they use to carve every curve and shape every surface until they have their vision realized. It is a long age-old process but some of the best work takes awhile and is hand made.
Sure there are electric tools like sanders, saws and drills but this wood worker prefers to use some of the tools of the past to create something unique and one of a kind. More importantly, they practice their craft as they do it. They gain experience which they will take into their next project and eventually becomes a master. Much is the same with programmers. I think we need to keep using the basic tools even if there are perhaps a few tools that do everything for us. We learn this way and if we continue to have tools that do everything for us we will eventually be writing programs where we know as little as 10% of what the code does. When problems arise, now what? Call in the specialist! Yeah the guy who is surgical and probably writes this stuff by hand.
I often think we should be looking into tools that advise us versus generating for us. One of the things that Resharper looked like it was doing was generating syntax and plopping in code. Now I could be wrong about this, but I have seen tools that do just that. Granted Resharper was asking questions to confirm what we wanted to do and gave us a few choices. But what I have discovered over the years is that these tools slowly make us lazy and not want to think. I have had quite a few programmers come to me asking about code that was written by them… well was actually written by their tools. Then of course at the first sign of major trouble they have no clue where to find the bug, it was all generated.
Most of us roll our eyes when we see someone come to us with code generated by Dreamweaver. We already know that the generated code is not up to snuff and is often full of useless div tags or styling that almost contradicts itself. This is an extreme case of what I am talking about, but tools that do things for us automatically should always be met with skepticism or at least peer reviewed. I guess what I am asserting here is that tools that automate too much make us lazy and stupid simply because we often don’t take the time to understand everything it did. We are already off to the next function or the next project. At least it got rid of the red squiggles right?
Should we go back to using a text editor only and compile through command lines rather than IDEs? No, but what I am saying is that you should take the time to write a bit of code even if it seems mundane and takes longer. Going through the basics of writing code by hand helps keep concepts sharp in your mind and help you understand their role in software design. If you are doing things properly you should find that most code you write you are writing once (DRY principle) anyways and at the same time you reinforce what you know. It may take longer for you to do it now, but at least when a generator breaks down in the future, your hand craftsmanship skills will be strong enough and you can get in there and fix it. I have written a lot of tedious and time consuming code that might have been done instantly through some automated process, but at least I know what it is doing and with enough practice I will still have enough time to help you with your broken generated code.
Thanks again for reading!