Inspired by this question, I ask the reverse: how much about programming do system administrators need to know? More specifically, what programming tools are useful for a sysadmin to have?
Inspired by this question, I ask the reverse: how much about programming do system administrators need to know? More specifically, what programming tools are useful for a sysadmin to have?
I'd start with:
System administration is just programming. A configuration management system lets you see your entire infrastructure as a distributed machine. As a sysadmin, your job is to program this machine.
Know one text editor. Usually vi for sysadmins, emacs for programmers.
Know how to script. Pick a scripting language. Perl is a perennial favourite, as is the shell/sed/awk combo. Ruby and Python can work, but for a lot of things objects are the wrong paradigm.
Know how to write readable documentation.
Version control. Crucial for maintaining configuration files and audit trails.
Learn to think in programming terms. Understand procedural, object oriented and functional programming paradigms. These may never be used, but knowing them makes you infinitely more productive.
Learn to use a debugger (or more) and logging.
Learn to use a RDBMS. There are plenty of data processing requirements which can be simplified by using a RDBMS correctly. Even being able to switch to a DBA role on demand can do wonders.
Test before deployment. See the test-driven development philosophy.
Pair programming is good. Have someone else watch over your shoulder to learn/advise/correct.
Learn to at least have a passing familiarity with a bunch of languages. Learn a new language every year.
Scripting is essential, but I'd second the advice that knowing some "real" languages is a definite bonus. You can do some very useful things with the .NET System.DirectoryServices namespace, for example.
I am a programmer and senior admin/integrator. To work where I do, you need to know the following things:
Most of the junior admins can look at one of our programmers and say (with authority), yes, I installed it correctly, here's where you have a leak which is why the code you just pushed is breaking. Or "No, its not our version of MySQL, look at your query here ..."
I think we're kind of different, when we hire a gifted administrator .. we half way expect for them to (eventually) find their way to programming, even if its just hacking something we use to work the way they need it to work.
In summary, being well rounded is never going to hurt you.
Many, many years ago (Windows NT 3.1 in fact) I started out as a programmer specialising in writing services and even the occasional device driver. This means you get to know the Windows kernel very well. In time I got a bit bored with the programming and switched to network management. I've found my background in programming has been immensley valuable over and over again.
It's not just that writing VBScript scripts is relatively painless. Knowing how the guts of Windows works, and particularly how IP works, helps greatly with detangling odd server and network problems. Also it's a mindset. Programmers are used to documentation and version control, and it horrifies me me to see how many Windows admins will just try something to see if it works and worry about untangling the mess afterwards.
All very well, but it isn't very useful advice to say go away and work as a programmer for ten years! However I think it would help most sysadmins to have some experience of programming in a "hard" language like C++ or C#. And if you have tame programmers in your organisation go drinking with them!
John Rennie
Bad things happen, your code will be around longer than you think it will. Fail gracefully, with useful error messages. You will run out of disk, ram, cpu, time, etc, deal with it.
Don't be so optimistic, that weird once in a million issue will happen far too often in production.
With all the descriptions here, I'm not going to say that I am a sysadmin. But the fact that I built and manage a couple of windows/linux server, I must admit something:
in linux, bash scripting is a must to know - if you know how to integrate it with perl/awk/etc, it's better. I found that many task became easier by using it.
Knowing to program in C/C++ helps a lot. Sometimes you have to modify a GNU source code (if you use one) to suit your needs because became a GNU product doesn't ensure you will always get the help you need on time - and many times they are written in C/C++.