Should All GIS Users Learn to Code?
First, let me answer the question I posed in the title. Yes, I think all GIS users should learn programming. Should they be able to write a fully functional GIS extension for the package of their choice? Not necessarily. Let me suggest this analogy: GIS users should be equipped to do the equivalent of swimming a few hundred yards, but need not look like or beat Michael Phelps. Some colleges require that students be able to cover 200 yards in the pool to gain a diploma; mine did.
Why do GIS users need familiarity with programming? I feel strongly that learning how to program, even at a very basic level, helps software users better understand their own dealings with software and their interactions with others who use it. An understanding of programming is also valuable when working with those who program. In short, the return on investment is very high for the individual and the individual’s employer.
Here are some lessons I learned from a single programming course (FORTRAN 77, circa 1987) and some years of fiddling with GIS and related software.
Use Tools for What You Need, Not Necessarily for What They are Designed
The first software program with which I became reasonably proficient was AutoCAD. One day I had to create arrowheads for my leader lines. I teased out that I could use the “line” command to draw a line on the screen and set properties for a starting width of “.5 inches” and an ending width of “0 inches.” A very short line would thus become a solid triangle. Was that why the “line” command had those properties? I don’t think so. Programming experience helps you think about, and use, tools in new ways.
First Things First, Second Things Second
Using GIS to solve a problem typically requires a series of steps. Users may or may not write out a work plan to accomplish the task, but in a program you must do so. If the program needs the length of a road to complete a calculation, that value must be assigned before the program can run to a successful conclusion. Programming experience helps you think logically and systematically.
Write for a Crowd
Writing programs for yourself is fine, but the ultimate thrill is to write something someone else can use. And, in many cases you want those users to be able to see, understand and reuse your code. That means you must write the code clearly and provide comments to explain your logic. That sounds just a bit like writing geospatial metadata, doesn’t it? Programming experience helps you share your ideas via the written word.
Speak the Language
All programming languages are a bit different, as are all programmers. But, there are many similarities. Once you “get the hang” of what you can do with one language, you have a better feel for what other programmers might be able to do with another. I do not know how to program the content management system we use to drive Directions Magazine. I do know that all of our content has a date on it, as well as some tags. Thus, I’m pretty confident it’s possible for someone who does know how to program it (Hi Jeff!) to ensure the article with the most recent date and a specific tag can populate a certain webpage. That type of familiarity with process and language makes it so much easier for users to articulate what is needed to their programming counterparts. Programming experience helps you communicate more effectively with peers and programmers.
Manage (and Document) Errors
When a software user does not get the expected result from executing a command, the next logical step is a question. “Is it me or the program?” Experience with debugging their own programs helps users determine the answer. (For me it’s 95% user error.) I find having my own debugging efforts on which to look back makes me less likely to toss the machine out the window and more likely to calmly look for my error. Further, debugging efforts help me document the gory details for those who can fix such a program, on the rare occasion it’s “the program’s fault.” Programming experience gives you insight into user and coding errors and how to address them.
These are just five things I learned from my limited programming experience. I know there are more. Will completing Code Year deliver these lessons? I can’t say. I can offer this advice: If given a chance to learn to code, all GIS users should take it.