Pro and Con: The case against scripting

RSS

Pro and Con: The case against scripting

Story by Kay Ewbank, 01-07-2009, 0 comment

Scripting is just too powerful for its own good.
There are some phrases that strike fear into the heart of any sensible IT manager, that make you reach for the whisky bottle or your prescription strength headache tablets. One such phrase is when the chairman says 'Old Fergy was telling me at the golf club about this wonderful new software that'll revolutionise our sales figures'.

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.


SHARE THIS.

Post new comment





500 characters left

Verification Image

SIGN UP.

Sign up to receive the latest news and updates from Server-Management via email.

News & Features Feed
Viewpoints Feed
FOLLOW US.
OUR SPONSOR.
Top 10 Most Popular Articles
Top 5 Jobs
I.T Sales Executive - Infastructure Solutions
Posted:
2010-01-07
Location:
Shoreham-by-Sea, South East
Salary range:
25000 - 40000
Salary period:
year
Description:

A leading IT Solutions Provider which focuses on advising and buying Information Technology solutions that best meet their customer’s needs. In business since 1998 the organisation has developed expertise in many technologies, enabling them to offer complete turnkey solutions. Specialising ... read more

Software Developer
Posted:
2010-01-07
Location:
Essex, South East
Salary range:
30000 - 40000
Salary period:
year
Description:

Senior Software Developer – C#, OO, ASP.Net, VB.Net, Postgres, Ajax, CSS, Java, IIS, Linux. Senior Software Developer - A rapidly growing worldwide communications provider, seeking an experienced Senior Software Developer to bring development in house. Our client is a a market leading pr... read more

Senior Software Developer - C#, OO, ASP.Net, VB.Net, Postgres, Java
Posted:
2010-01-07
Location:
Essex, South East
Salary range:
30000 - 40000
Salary period:
year
Description:

Senior Software Developer – C#, OO, ASP.Net, VB.Net, Postgres, Ajax, CSS, Java, IIS, Linux. Senior Software Developer - A rapidly growing worldwide communications provider, seeking an experienced Senior Software Developer to bring development in house. Our client is a a market leading pr... read more

IT Security Manager -FTSE100- Manchester or Cheltenham- £40-45k
Posted:
2010-01-07
Location:
Cheltenham, Gloucestershire
Salary range:
40000 - 45000
Salary period:
year
Description:

IT Security Manager – FTSE100 – Manchester or Cheltenham - £40-45k A prestigious FTSE 100 company is looking for a IT Security Manager. This is an exciting opportunity to join the business in one of its most exciting and prosperous times ever. This position is base... read more

Software Developer (C#, ASP.Net)
Posted:
2010-01-07
Location:
Chelmsford, Colchester, Essex
Salary range:
30000 - 42500
Salary period:
year
Description:

Senior Software Developer (C#, ASP.NET) How would you like to work for a leading technology company specialising in the development of leading edge fully integrated communications solutions? My client possesses a strong order book with a multitude of highly prestigious customers and is in a per... read more


Want to advertise here? Follow me!