When it's time to write code, developers may do the heavy lifting, but they don't do all the work. The fact of the matter is, if you're a system administrator and you aren't spending some of your time writing code, you may not be as good a problem solver as you'd like to think.
Paul Venezia writing for InfoWorld makes that point in an article in which he explains why administrators should know how to code. Though he doesn't consider himself a programmer, he does write short programs that become tools to deal with whatever random problem he's having at the moment. Often, in less than 50 lines, he can come up with an elegant solution.
“Admins need to be at least passable with some sort of scripting language for their chosen platform; ideally, they should be familiar with several,” Venezia stated. Why? “These are the pathways that open up all kinds of possibilities for problem resolution and the aforementioned elegant solutions.”
For example, Venezia pointed to a networking monitoring server he's been maintaining for a while and did an inventory of the scripts he's written to support its services and packages. He came up with 15,000 lines of code, scattered over 53 scripts. Of these, three scripts together accounted for more than 5,000 lines – but more than a dozen came to less than 50 lines each. “This is the nature of IT admin coding: crafting small, critical tools that hold everything else together,” he observed.
Sometimes an admin will find that he or she needs to write a short script or two because the actual tools necessary to solve the problem aren't available commercially. Venezia found himself doing that in order to track FLEXlm licensing across a company. At that time, he explained, there were no good third-party monitoring tools for it, and he wasn't happy with the commercial monitoring tools.
Venezia ended up creating a polling daemon in Perl to query each license manager daemon instance, collect the necessary information, and store it as a Perl hash. A very short companion script evaluated the licenses and helped warn when any of them was close to expiring. “Further, I attached a Web app to the same data that allowed developers to quickly check the license status of any of dozens of tools and to see exactly who was using them so that they could ask for a license release if necessary,” he summed up. How much code did this take, including the extended apps and plug-ins? Less than 500 lines.
Look, nobody expects an administrator to spend all of his or her time coding. But just as a fashion designer should know how to sew in a zipper, an admin should know how to write code. Knowing how to script in several languages may not be critical to your normal day-to-day work, but as Venezia puts it, “I see them as scalpels, saws, and hammers, not the primary focus of my mental efforts.” If you don't know how to script, you're missing some important tools.
This doesn't mean you need to be a coding wizard. You simply need to be able to write tight, secure code that gets the job done without becoming – or creating – more problems. If you can't do that, according to Venezia, and “limit yourself to working within the confines of code given to you, you'll find many problems seem to have no answer other than to purchase more software.” And there may not yet be any software that adequately solves your problem. That's why you need to be able to roll your own. Good luck!