Stop Writing Scripts

Thread Tools Search this Thread
The Lounge What is on Your Mind? Stop Writing Scripts
# 8  
Old 10-23-2013
Telling us to stop writing scripts is silly. There is "script hell" and then there is "architecture hell", when well-meaning environment designers deny you the ability to use something they think you don't need. Take away the shell and your users are forced to invent silly ways to hack it back in.

Control methods are always useful of course. What about existing, common workflow languages like make ? Much-abused, but at its core, uses very simple "destination:source" rules which I think can be used simply and effectively for lots of things.

Last edited by Corona688; 10-23-2013 at 12:28 PM..
This User Gave Thanks to Corona688 For This Post:
# 9  
Old 10-23-2013
Originally Posted by mikemazz
Please, I beg you, “Stop!” Yes, stop writing scripts and instead build workflows.
To put it briefly scripts:

1) Have little or no security
2) Lack of reuse
3) Not cross-platform
4) Hard to maintain
This argument seems to be flawed from the beginning.

"Scripts" is just a certain form of the more general "program". You either can explain the difference between these two (which is hard to conceive, because any commonly-used programming language today is Turing-complete or Turing-equivalent) or you have to admit that your assertion extends to "stop writing programs". While this may or may not convey a cultural benefit*) it certainly will not help the IT business within the parameters of its todays operation.

Workflows can never replace programs, for the same reasons why programs cannot replace workflows: programs are ways of automatically executing certain actions in a predefined way within computers. Workflows are quite the same but within organisations. They work on different (and ideally complementary) levels. While they regularly work hand in hand - given, with more or less success in attuning to each other - there are things a workflow cannot do (because it is happening inside a computer) and things a program cannot do (because it is happening in some organisational part). To try and replace one by the other is futile.

You might want to try and replace the OS on your computer (which is just another program) with a (any) workflow if you do not believe me. Chances are you end up with a non-functional computer and a non-functional workflow as well.

Just my two cents.


*) Programming, once considered to be and practised like an art is done like a craft today. This has an IMHO negative impact on programs and programmers alike. Compare the masterpieces of, say, Beethoven and the jingles used in commercials, compare a statue of Michelangelo to the design of a disposable bottle to understand the difference between something done as an art and something done as a craft.

Once we had programmers like Donald Knuth, who took a ten-year sabbatical just to create an adequate typesetting system for his book "The Art [sic!] of Computer Programming" - we all know TeX. Compare this way of dealing with emerging problems in completing ones task with the usual "we have to meet the milestone deadline next Tuesday"-approach. That does not only take different types of persons and different types of mindframes, that also results in different types of programs. Arts versus crafts....

Last edited by Corona688; 10-23-2013 at 01:16 PM..
This User Gave Thanks to bakunin For This Post:
# 10  
Old 10-23-2013
Hi mikemazz...

Satisfy my curiosity...

I, as a complete novice, am wondering why is shell scripting considered _complete_hell_ from your POV...

It is said that "there is more than one way to skin a cat" and shell scripting gives just that proverb's choice.
# 11  
Old 10-23-2013
Different tools for different purposes.
You will have difficulty explaining to clients that they have to wait for your workflow to be finalised, when the requirements can be met by just scripting it. And it doesn't even have to be a one-off: it can be embedded in a workflow later where it can be completely encapsulated (blackboxed).
Equally, I will not necessarily show sympathy when someone else argues a workflow is the best solution, where I know a script will do it.
# 12  
Old 10-23-2013
Originally Posted by wisecracker
I, as a complete novice, am wondering why is shell scripting considered _complete_hell_ from your POV...
I suspect it's not to do with the shell scripting itself but the management of it. "There's a bunch of script files on server x left by admin z, nobody knows what they do" kind of thing.

Which doesn't make shell scripting the problem as much as the lack of documentation...

Somehow making it all visual doesn't strike me as actually solving it. Whether it's text or diagrams, you have to know the tools.
# 13  
Old 10-23-2013
Hi, mikemazz.
Originally Posted by
A workflow consists of a sequence of connected steps where each step follows without delay or gap and ends just before the subsequent step may begin. It is a depiction of a sequence of operations, declared as work of a person or group,[1] an organization of staff, or one or more simple or complex mechanisms. Workflow may be seen as any abstraction of real work. For control purposes, workflow may be a view of real work in a chosen aspect,[2] thus serving as a virtual representation of actual work. The flow being described may refer to a document or product that is being transferred from one step to another.

Workflows may be viewed as one primitive building block to be combined with other parts of an organisation's structure such as information silos, teams, projects, policies and hierarchies.
Wikipedia isn't a definitive source, but it seems to me that scripts easily fit the description above.

Researchers, experimenters, students, hobbyists all use scripts effectively.
Originally Posted by mikemazz
1) Have little or no security
2) Lack of reuse
3) Not cross-platform
4) Hard to maintain
I find that scripts are one the most reusable solutions to problems precisely because they are portable among platforms.

Long scripts, badly written, without comments are hard to maintain. So might be spaghetti diagrams, text descriptions, and the highest of high abstract languages.

I agree with very little of what you wrote.

Best wishes ... cheers, drl
# 14  
Old 10-23-2013
Originally Posted by mikemazz
Please, I beg you, “Stop!” Yes, stop writing scripts and instead build workflows.
Your histrionic lead-in to a post bereft of concrete examples suggests that, instead of a genuine technical discussion, your primary goal is the promotion of your automation product. The fact that the post is cobbled from a blog promoting your product is not a surprise.

"The more they overthink the plumbing, the easier it is to stop up the drain."
-- Montgomery Scott


Last edited by alister; 10-23-2013 at 10:23 PM..
These 5 Users Gave Thanks to alister For This Post:
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 and other is 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 ./ start & nohup ./ start & nohup ./ start & nohup ./ 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