PDA

View Full Version : why are there many step-by-step linux how-tos but few dialog based script wizards?


code_grey
06-27-2011, 12:04 PM
e.g. let's consider the task of installing driver for wireless adapter device rt2070 on a linux system. Google searching returns plenty of instructions such as see here http://ubuntuforums.org/showthread.php?t=1285828 . And there are lots of other such articles on the same topic (not sure if there are difference of opinion) suggesting that many people out there know how to do complex installs on Linux.

So this makes me wonder, if there are many people willing to take time and effort to write such articles, why doesn't even a single one of them publish a dialog-driven (or maybe command line question-and-answer driven) script that would do all this stuff that they recommend people (including n00b victims of Ubuntu evangelists) to do by hand? If Linux is an environment where everything can be done through command line and shell scripts, just how hard would it be to make a user friendly installer script instead of writing a hundred forum how-to articles?

Is this a case of me being ignorant of certain inherent complexities of getting things done on Linux in a semi-automated way with the clueless human only supplying a few configuration strings? Or is this a case of the Linux community collectively telling the n00bs to go drop dead for the greater good of keeping the lazy and ignorant out of the neighborhood?

blindboyard
06-27-2011, 12:32 PM
Doesn't jockey-gtk do all that on Ubuntu?

I don't think this has a factual answer, but it's probably difficult to do because there are so many different systems which need so many different things installed.

echoreply
06-27-2011, 05:06 PM
Probably because many advanced users, who are the ones writing up those how-tos, feel just the opposite. I often am confronted with commercial or binary only Linux software which comes with a script/binary/java/etc. to install it. I then say, "what is this script doing, why can't they just give me a step by step telling me what to do so I know exactly what is happening on my system?"

code_grey
06-27-2011, 05:13 PM
Probably because many advanced users, who are the ones writing up those how-tos, feel just the opposite. I often am confronted with commercial or binary only Linux software which comes with a script/binary/java/etc. to install it. I then say, "what is this script doing, why can't they just give me a step by step telling me what to do so I know exactly what is happening on my system?"

fair enough, so why not write a well-commented batch file type script where it is very clear what is happening if you bother to open and read it? That way the advanced users could understand it (and detect Dr. Evil's machinations, if any), and n00bs could at least get things done easily.

Absolute
06-27-2011, 05:23 PM
fair enough, so why not write a well-commented batch file type script where it is very clear what is happening if you bother to open and read it? That way the advanced users could understand it (and detect Dr. Evil's machinations, if any), and n00bs could at least get things done easily.
Because that's a lot of work, it's somewhat tedious and boring, and people don't like doing tedious and boring work, much less when they're doing so for free.

Fubaya
06-27-2011, 05:49 PM
In this case, there is no dialog needed, it's just a list of commands. You can put them all together into a script to automate the install, and add a few lines to explain what it's doing, but there's no option that can be changed, at least in this how-to. To do it right, you'd have to do a lot of experimenting and fully understand all the possibilities and make contingencies for all of them. But chances are, that how-to probably fixes the problem without all that. It essentially puts Tab A into Slot A and Tab B into Slot B. Scripting it wouldn't accomplish anything except saving people from typing "put Tab A into Slot A and Tab B into Slot B, please."

In general, if it's something that a lot of people use, it will often be incorporated into the system somewhere given a little time. I remember the days of patching kernels and performing elaborate installs to get a DSL modem running. Then when I updated the system a couple of years later, it just worked out of the box. You might want to check out the program called wicd. Chances are it will make your wireless just work.

When how-tos are written like this for the command line, it's usually because it's just easier to write and to understand. You could say "Open a file manager, navigate to /home/[YOURNAME], now open another file manager or, if your file manager supports it, split the view left and right, navigate to /etc/foo with either the second file manager window or in the second split view, now select file.txt from the first file manager and drag it to the other." Or you can just say "cp ~file.txt /etc/foo". It's a very basic, very concise, nearly foolproof way of explaining things.

minor7flat5
06-27-2011, 07:08 PM
Is this a case of me being ignorant of certain inherent complexities of getting things done on Linux in a semi-automated way with the clueless human only supplying a few configuration strings? Or is this a case of the Linux community collectively telling the n00bs to go drop dead for the greater good of keeping the lazy and ignorant out of the neighborhood?My vote is for the former, and I am not being facetious.

There are just too many different variants of Linux out there, with too many different variations of where somebody likes to keep stuff for there to be an easy way to script it all.

What you are asking for is someone to make a package script like rpm or apt uses. Those work well because they are written for one carefully managed system, and they handle their own dependencies (don't have mysql version blah? I'll install that too while I'm at it.)

But those package installers work so well because all of the dependencies are managed by them. And they don't offer much in the way of customization: apt-get install mysql might get you a particular configuration of mysql, but it is probably installed in a very specific way that might not be to your liking. Occasionally, a package manager might prompt you for something ("Please enter a root password for mysql:"), but they just don't get too flexible.

As soon as you try getting fancy, things get hairy fast.

Now, take that problem outside of the sheltered bubble of rpm or apt and it gets even worse. Imagine if I am trying to run your magic script on a highly customized embedded version of FreeBSD running on a Soekris fanless network device.

One area of scripting difficulty is exception handling. When things go off of the rails, the user will still need to be involved. Do you really want to write your script to detect whether a file path represents an NFS directory on a remote server, in order to tell the user that your app doesn't support NFS? What if you didn't know that your app doesn't play well with NFS?

All of those how-to guides always gloss over some of this tricky stuff, specifically because it is not rocket science, but automating it and handling edge cases would be far too much work for a developer to bother with.

Send questions for Cecil Adams to: cecil@straightdope.com

Send comments about this website to: webmaster@straightdope.com

Terms of Use / Privacy Policy

Advertise on the Straight Dope!
(Your direct line to thousands of the smartest, hippest people on the planet, plus a few total dipsticks.)

Copyright 2018 STM Reader, LLC.