by eropple · 11y ago · 0 comments
Reinventing every wheel "because $my_pet_language" is fractious, generally worse than the alternative, and creates fairly unproductive noise--I think it's reasonable that people should catch at least a little flak for doing it. I mean, if criticizing anti-cooperative behavior is a waste of time, what was engaging in it? The idea that bash and GNU coreutils are "devops" tools, instead of the tools of basically competent Unix-based software developers, is so ludicrous as to be worth a little roasting. (And it has been a little. Nobody here, not even me in this post, is being more than mild.)
HN doesn't go for gratuitous negativity, and that's pretty cool, but if this thread's any measuring stick, negativity at this sort of behavior is a long way from gratuitous.
Yeah sure if you mastered perl, grep/awk/sed and can whip up what you need in a few seconds, more power to you, but I'm not going to waste an hour of my time googling and reading man pages when I can take 3 seconds to write a quick function in JavaScript to do what I need for that one task.
Polluting the global namespace with yet another tool that's worse at its job than the existing ones because of a particular breed of aggressive incuriosity and epistemic closure is real weird. (This isn't a failing unique to the JavaScript community. Go people love doing this, too, creating bad solutions to solved problems. You used to see it a lot in Ruby, but the community seems to have grown up a little.)
My anecdote: most "Go people" doing this are actually "Go beginners" that are still learning the language and attempting to write something familiar to cement their understanding. I imagine this is often the case for other languages.
I'll admit, I've written a few of these myself to help nail down both my knowledge of Go and the basic toolset I use every day. It was quite useful as a learning tool, even though they'll never replace the originals.
Heck, I'd even recommend re-creating `dc` to anybody who is interested in learning a language, or writing a parser/interpreter for a language.
Also gnu awk, sed, and grep are not the same as BSD variants. The gnu versions have (some would say suffer from) a lot more features.
For me, anyone who uses unix and doesn't have working knowledge of how to use find, xargs, sed, awk, and grep is missing out on a lot and very likely wasting time reinventing wheels.
I use the GNU tools for consistency, as it's easier to install them on a BSD system than the reverse, but your point is well-made.
Let's look at it briefly from the flip side. I'm in Devops myself, and I am quite confident chaining together seds, awks, and greps. Those didn't help me when I had to troubleshoot a Node application, though. What did? I also learned enough about Javascript to be able to not only navigate code, but debug what was happening.
Artifically limiting yourself by not taking these opportunities to learn about an OS you seem to spend a fair bit of time in is only hurting you.
Heck, awk is two generations removed. Even Perl one-liners are fading into history.
I'm not sure I would characterize it as a "because my pet language" tool; rather, it allow one's main production language to use shell pipes, which can be quite handy for a variety of uses.