Pro and Con: The case against scripting
Story by Kay Ewbank, 01-07-2009, 0 comment
Scary, I agree, but more dangerous by far is 'I wrote this really useful script', usually uttered proudly by your system administrator in an IT department meeting about some problem or another. Believe me, while Old Fergy might cost you an arm and a leg, you at least have the vague hope that the chairman will come to his senses when you tell him just how much the wonder-kit will cost. There's no escape from the script of doom.
Now I'll be honest here. I am a serial script offender. Most of the regular contributors to Server Management are members of Scripters Anonymous. That doesn't make it any better. Scripts are the work of Beelzebub, and the road to Hell is paved with PowerScript.
The problem is that scripts are just too powerful and too uncontrolled, and human beings are too inventive. Most software these days is designed and written by committee, so any "adventurous" elements are suffocated because the rest of the committee votes the idea down. This does result in a lot of very boring software, but boring is good if you're an IT manager. Boring means no nasty surprises.
Scripts are the last resort of the maverick programmer. It's true that a good scripter will write scripts that save an amazing amount of time. However, it also means a bad scripter can write a short script that deletes all your backup files in a single click.
In reality, what's more problematic is the fact that scripts are (in most cases) horrendous to follow. You write it in a hurry to do some small task. Then you add a bit to take care of some alternative set of circumstances, then you add a bit to make it more general, and before you know it, the script is pages long, and you aren't really 100 percent sure what any particular bit does. So you can't ever take anything out, and the whole thing just gets more and more obscure.
Of course, things aren't helped by the fact most scripters don't use meaningful variable names, nor do they add useful comments. If ever you've come across a comment along the lines of
return 1; # returns 1
then you'll know what I mean.
In general, commenters fall into two groups - those that have mastered the Art of the Bleeding Obvious (see above), and those that don't bother at all. Neither is useful.
Another real risk in scripting is the fact that the wrong people do it. You'd never let someone from the sales department create tables in your database, but that same person may well decide to write a script to automate some task. The script itself may be fine, but the chances are you won't know it exists, so there's essentially an application running on your network about which you know nothing.
Worse is the prospect that flushed with success, that scripter will begin experimenting with more complex scripts. It's like giving a learner driver control of your sports car - they may be fine steering it down a straight stretch of quiet road, but what happens when they give in to the temptation to take it for a spin through the town centre?
So what's the answer? You could just ban all scripting. It's the easiest solution, and one that is hard to argue against. It's safe, and the only downside is that your users may have to manually do tasks that they would prefer to automate.
A less draconian policy would be to allow supervised scripting; have a company policy that any script has to be checked over and authorised before it can be used. Add training if people want to do more than the simplest of scripts, have clear guidelines on how far a script can go, and you may just be able to get a workable solution.
Read the case for scripting: Of course you should be in favour of scripting; it has the power to free you from an unbelievable amount of drudgery and tedium.
Sign up to receive the latest news and updates from Server-Management via email.
DrayTek Vigor 2820 router
LaCie 5big Network NAS
Network Monitor Tutorial
ZyXEL P660HN-F1Z
Dell Latitude E6400
MSI Wind X600
Lab: multifunction printers
Exchange Log Analyzer
Back to beta
- Posted:
- 2010-03-12
- Location:
- Derbyshire, Derbyshire
- Salary range:
- 55000 - 60000
- Salary period:
- year
Description:
On behalf of a large blue chip client we are looking for an IT Manager with an in depth understanding of WMS remote data capture, warehouse automation and the “black box technology” utilised to provide seamless interfaces. This is a challenging role which requires a number... read more
- Posted:
- 2010-03-12
- Location:
- 127, UK, London, London
- Salary range:
- 60000 - 70000
- Salary period:
- year
Description:
My London based legal client is looking to recruit an IT manager. The role of the IT manager will be both technically hands on and a managerial role, with 3 direct reports. The IT manager will have to present business cases to the partners, lead the current team, bring new ideas and vision for ... read more
- Posted:
- 2010-03-12
- Location:
- Sheffield, South Yorkshire
- Salary range:
- 20000 - 25000
- Salary period:
- year
Description:
PLEASE DO NOT APPLY UNLESS YOU HAVE A LEGAL BACKGROUND. IT Technician (Legal) Sheffield £20-25k The Job Role: We are looking for a network administrator who will be able to maintain and support the systems our client has in place providing services to their team. The Systems Administ... read more
- Posted:
- 2010-03-12
- Location:
- Basildon, Essex
- Salary range:
- 19000 - 20000
- Salary period:
- year
Description:
We our looking for an IT Support + Telephony Manager to manage the IT Support function to ensure that all objectives are met on a daily, weekly and monthly basis. Our Client is a customer focused business, entrepreneurial and flexible organisation whose people are seasoned in the various discip... read more
- Posted:
- 2010-03-12
- Location:
- Billericay, Essex
- Salary range:
- 25000 - 35000
- Salary period:
- year
Description:
The IT Managers performance will be measured on: · Responsiveness to user help requests, rapid resolution of most problems · Stable operating environment, high level of daytime system availability · Uninterrupted e-mail and internet access · Rapid turnaround ... read more
Want to advertise here? Follow me!