5 ms·
> That's elitist Wait, what?! I do think that every "sysadmin" who is able to write super-complex shell scripts with large sed/awk scripts is also able to lea
by vog 9y ago
> That's elitist
Wait, what?!
I do think that every "sysadmin" who is able to write super-complex shell scripts with large sed/awk scripts is also able to learn Python or Ruby. And I'm convinced that this knowledge will enable them to produce rock-solid tools (which they need!) more easily than with Shell scripts.
Splitting the world into admins and programmers - that is elitist.
You won't find this distinction in small companies, and you find that in large companies only because that's how they happen to be organized - and are heavily criticized for that, mostly by Agile and DevOps movements.
Moreover, removing that distiction is one of the core values of the Free Software movement. The early essays of RMS show this in a very clear way.
Many people are doing "real programming" without noticing, and this is why they are using improper tools for that, and should start to learn at least one general-purpose language to make things easier for themselves. It is all about using the right tool for the job, and for complex jobs, a generic programming language with proper libraries is the right tool - far better suited than a shell script gluing together highly specialized tools, which run in separate processes and communicate via ad-hoc text formats rather than proper data structures.
For every complex system (OS, games, 3D modelling tools), the emerging power users are also beginning programmers, and the more complex things you are able to build within one DSL or (embeeded) scripting language, the easier it is to jump to a general-purpose programming language. Some systems are so nice that they use a general-purpose programming language for scripting in the first place - such as Lua for many game engines, Python for Blender and Gimp, Scheme (Guile) for Guix package building, and so on.
- qznc 9y agoMy sysadmin at the university has explicit orders "not to program". Ironically, he is allowed to write configuration, e.g. Ansible playbooks. So I guess, the trick is to use a turing-complete configuration language which is "totally not programming".
- falsedan 9y ago> Splitting the world into admins and programmers - that is elitist. That's what you do when recommend people who program in a particular language should learn a new one 'to produce rock-solid tools (which they need!)'. You're calling the bash scripts shoddy, and saying they're incompetently wasting their (and their company's) time. > It is all about using the right tool for the job, and for complex jobs, a generic programming language with proper libraries is the right tool - far better suited than a shell script gluing together highly specialized tools, which run in separate processes and communicate via ad-hoc text formats rather than proper data structures. I think your viewpoint is unnecessarily limiting. If that shell script works, takes 15 minutes to write, fails loudly and obviously, can be fixed & deployed in 5 minutes, and generates significant revenue, then it is better than a unit-tested, versioned, documented package. I have seen too many tools that follow the approach you are recommending that overengineer a solution, take ages to release, and fail in obscure ways because they are trying to replicate a bash script's ability to say, "start this, then run that, then these ones in parallel, then wait for the first thing to finish".
- vog 9y ago> That's what you do when recommend people who program in a particular language should learn a new one 'to produce rock-solid tools (which they need!)'. Please refrain from strawmen arguments. You (deliberately?) left out the second part of my sentence that changes the meaning of your quotation by almost 180 degrees: "... more easily than with Shell scripts". I do assume that those shell scripts are rock-solid, because as a sysadmin you need them to be! But achieving that in shell language is so much harder than it needs to be.
- falsedan 9y agoIf you say these things, but means something else, that's on you to adapt your communication, not on me to intuit your message. > But achieving that in shell language is so much harder than it needs to be. So, as an exercise, how about replicating this pipeline in python: seq 0 9 | xargs printf "%02i\n" | xargs -I% -P0 ssh -A dev%-useast1 "docker ps -a | grep -vE '(second|minute)s ago' | tail -n +2 | awk '{ print $1 }' | tee >( xargs --no-run-if-empty docker rm -f ) >( xargs -I% echo -e 'USER docker-reaper guest mode :Docker Reaper\nNICK docker-reaper\nJOIN #channel\nPRIVMSG #channel :removing % on $(hostname)\nQUIT\n' | nc irc.example.net 6667" )" > removed_containers
- vog 9y ago> If you say these things, but means something else, that's on you to adapt your communication, not on me to intuit your message. It is socially unacceptable to misquote. For that, it doesn't matter if you "just" left out important parts, or actively changed words. That kind of behaviour removes not just the bases of an insightful dicussion, but of any other form of communication as well.
- falsedan 9y ago> It is socially unacceptable to misquote. No it's not. If your defense against writing a terrible thing is, "you have to understand it in context", it's still a terrible thing you wrote. Plus: it's ableist! You're putting the burden on the audience to hear/read your words without error, and to deduce your meaning correctly. I eagerly await your translation of that pipeline.