4 ms·
Stuff like this does a huge amount of unintentional damage. Every crappy company in the world thinks they're Google and tries to copy them. Google-caliber peopl
by cookiecaper 7y ago
Stuff like this does a huge amount of unintentional damage. Every crappy company in the world thinks they're Google and tries to copy them. Google-caliber people might be able to be reasonable about this, but ordinary employees come across something like this and interpret it to mean "bash is evil" and ostracize everyone who tries to write a bash script for anything, no matter how sensible.
At work lately, there's been a spate of contorted "just why?" Python scripts that could've been accomplished elegantly in a handful of lines of shell. While no one would select shell languages as the ideal for a lot of complex logic, data parsing, etc., there's no competition for a shell when you need to do what shells are meant to do: chaining invocations, gluing and piping output, and so on.
- Godel_unicode 7y agoJust because they write crappy Python doesn't mean they'd write good shell scripts. For me it indicates the opposite.
- samtheprogram 7y agoAs Gary Bernhardt said, and I quote often, it makes sense when it’s right half of the ass. https://youtube.com/watch?v=ZQnyApKysg4 https://youtube.com/watch?v=ZQnyApKysg4
- pmarreck 7y agowow, have seen many of Gary's talks but not this one until now; clearly I missed a gem
- DonHopkins 7y agoBut bash IS evil.
- cpach 7y agoWhy?
- pmarreck 7y agoIn most languages, you don't need to know/understand this much minutiae about string handling; as an example, I've been doing open source dev for years now in Bash and I never knew the distinction OP posted.
- cookiecaper 7y agoI mostly agree, but it's sometimes a necessary evil. There's a reason I praised shell languages in general rather than bash specifically; fish shell, for instance, is much more comfortable.
- pif 7y ago> Google-caliber people might be able to be reasonable about this... I'm not sure about that. Google certainly has some very talented people among their developers, but most of them are so bad at programming that they had to invent their own heavily watered down programming language.
- pjc50 7y agoShell is brilliant until you need to keep a filename in a variable. Or, worse, read filenames from the output of a command. Since basically everything except '/' and '\0' is a valid filename character, the potential for mishaps or exploits is huge. That's where we came in with the need to use "$@" vs the unsafe-by-default bare $@.
- TazeTSchnitzel 7y ago> here's no competition for a shell when you need to do what shells are meant to do: chaining invocations, gluing and piping output, and so on There is no reason this shouldn't be easy to do in Python too, if it is then it is something a library should fix.