Stop Writing Scripts


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? Stop Writing Scripts
# 1  
Old 10-23-2013
Stop Writing Scripts

Please, I beg you, “Stop!” Yes, stop writing scripts and instead build workflows.
Programmers, Sys-Admins, System Support, I'm talking to you.

Ok, I know in this community I'm going to get some serious backlash for my statements but I truly believe in my statement.

There was a time when writing scripts to help support IT infrastructures and changing business processes was the best option. That time is gone. Todays computing systems are rapidly growing in complexity and the need for easier integration and better automation to manage these systems is becoming paramount.

“So where do we go from scripts”?, you ask. “That is the right question”, making reference back to the movie “iRobot”.

I believe the answer is workflow and workflow automation. I don't think this is the right forum to share all the reasons for my answer so let me take another approach and talk about why script fail.

If you are an IT professional, you most certainly have written a script or two in your time. Scripts are written to automate tasks with the general objective to be more productive and reduce errors. In the early stages of an organization or while its environment is small, writing a few scripts seems to add benefit and meet its objectives. However, over time the environment changes, grows and becomes more complex. This results in more tasks, which in turn requires the need to write more scripts. Soon, the ability to manage these scripts themselves becomes overwhelming - welcome to script hell.

AND...

To put it briefly scripts:

1) Have little or no security
2) Lack of reuse
3) Not cross-platform
4) Hard to maintain
# 2  
Old 10-23-2013
Quote:
Originally Posted by mikemazz
2) Lack of reuse
I can't say I entirely agree with this. We have a directory full of python scripts (~ 15 MB) and they are magnificently modularised (and documented). Well written and highly reusable.

Quote:
Originally Posted by mikemazz
workflow and workflow automation
Could you please elaborate on this. (May be give an example, if possible)
# 3  
Old 10-23-2013
Moved to a more suitable forum...
# 4  
Old 10-23-2013
Quote:
1) Have little or no security
2) Lack of reuse
3) Not cross-platform
4) Hard to maintain
Will depend of the quality of the writing...and the person's knowledge and experience
For a company's point of vue, you get what you pay for... A truly experienced UNIX sysadmin script will not look the same as the one writen by a "highly qualified" IT consultant that left IT college 3 years ago with a 6 month shell class ...
# 5  
Old 10-23-2013
Balajesuri,

Certainly, there are individuals, groups, and organizations - like you - that will work hard to write good clean reusable scripts. And if you are primarily a Python shop then it makes that easier. Most of the time, when I tell people, "Stop Writing Scripts" it's to stop writing shell scripts. There is always a place for higher-level language scripting like Python.

To comment about workflow and workflow automation. I've spent a good part of my career designing and writing automation systems. And that's my primary focus today. I would recommend reading my blog post.

Workflows allow you to work at a higher abstraction layer. It let's a user focus on what they really need to accomplish by providing a great deal of the heavy lifting. It removes the need to understand things like: how can I run this on 10 computers, what if I need elevated privs, should I be logging for auditing purposes. Maybe a visual will help:
Image
# 6  
Old 10-23-2013
Over the top. You are making many assumptions and of course you are making several incorrect statements. With that said, nothing wrong with putting together your own "world"... as long as it works and is well supported. So if you believe a python workflows (or whatever) is the "right answer", certainly you are free to do that. If you believe a workflow paradigm is the way the world should be crafted (even if not python based)... again, you are free to do that. There are many ways to solve problems. So I have no problem with a workflow paradigm.... but solutions should be able to implement whatever style best fits the situation.

I will never tell someone to stop writing scripts. Python, shell or otherwise.

Btw, it's a valid argument to say that Python is a lower level language than (Bourne) shell script. Just saying.
This User Gave Thanks to cjcox For This Post:
# 7  
Old 10-23-2013
If I am going to have to write something that requires the complexity of a work flow, I am not going to write a script. I am going to write something that is an executable to take make it efficient in terms of computing resources. The complexity of the scripts you suggest are generally written with a work flow built in or some sort of logic beyond the requirment of a script. Take for example, the Nagios tool. It is a collection of scripts and it has an underlying work flow. I am not a fan of scripts that are complex, even with work flows.

Last edited by blackrageous; 10-23-2013 at 02:57 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Stop root from writing to directory

Is there a way to stop root from writing to a directory? I already tried chattr but that did not seem to work. chattr +i directory (12 Replies)
Discussion started by: cokedude
12 Replies

2. Shell Programming and Scripting

Linux startup and stop scripts using SSH

I have a question. Actually I want to make two scripts, one is startup.sh and other is stopscript.sh so for example, I have 5 servers. Each server has two instances :- abc111 - Masters -cra4 abc222 -middle tear -cra abc333 -middle tear -cra1 abc444 -middle tear ... (1 Reply)
Discussion started by: siddharthjain
1 Replies

3. Red Hat

[HA] Red Hat 7, pacemaker and start/stop scripts

Hi there, I am wondering if I could add start/stop ksh scripts provided by 3rd party to cluster... I read that script must be ocf/lsb compliant, however, in AIX I can just set up two separate scripts for starting and stopping application. Can similar be done under RH Linux cluster? Cheers, c (1 Reply)
Discussion started by: cyjan
1 Replies

4. AIX

HACMP version 5.4 startup and stop scripts

Hi My hacmp version is 5.4 and it is a active passive cluster. Where can I find the startup and stop scripts? Please assist. Thanks. (2 Replies)
Discussion started by: samsungsamsung
2 Replies

5. Shell Programming and Scripting

Services Start & stop scripts--help required

Dear All, Pls find my scripts for Agent services strat & stop. EAMSROOT=/opt/panaces export EAMSROOT cd $EAMSROOT nohup ./OracleAgent.sh start & nohup ./PFRAgent.sh start & nohup ./PFR.sh start & nohup ./SolarisOSAgent.sh start & exit 0 EAMSROOT=/opt/panaces export EAMSROOT cd... (0 Replies)
Discussion started by: starnaresh
0 Replies

6. Shell Programming and Scripting

Stopping Start/Stop scripts in reverse order

#Define the Start/Stop/Status Scripts to include SSS_SCRIPTS=( prog1 prog2 prog3 etc...... ) #Start the scripts StartScripts() { for SSS in ${SSS_SCRIPTS} do ./$SSS start done } #Stop the Scripts StopScripts() { for SSS in ${SSS_SCRIPTS} do ./$SSS stop #<---I... (1 Reply)
Discussion started by: madasafish
1 Replies

7. Shell Programming and Scripting

writing scripts

What would happen if I didn't use "./" before writing a script? (4 Replies)
Discussion started by: ebethea27703
4 Replies

8. Shell Programming and Scripting

Start and stop of an application thru shell scripts.

Hi, I just learnt the shell scripting and got working on that right now. I have one problem. Here i am having a java application that needs to be start and stop using two shell scripts, i.e., starting the java application using one shell script and stopping the application using another... (1 Reply)
Discussion started by: sadha
1 Replies

9. Shell Programming and Scripting

writing schell scripts

I am very new to Unix. I need to write a script that will grep some files, etc. When I write the script, do I need to know what shell I am using? If so, how do I do that? (1 Reply)
Discussion started by: ssmiths001
1 Replies

10. Shell Programming and Scripting

Help on writing scripts!!??

Hello, I don't know anything about scripting, and I want help on writing a script, which can help me doing my research. Actually I have some ASCII format files formatted in a way looks like this 6 lines of text that is not important for me File_header_name_number_1 <--... (1 Reply)
Discussion started by: geoquest
1 Replies
Login or Register to Ask a Question