3 ms·
I think we should all make an effort to try harder with our comments. The author writes "this is for people who aren't 'devops' and who can't crank out a fancy
by escape_goat 11y ago
I think we should all make an effort to try harder with our comments.
The author writes "this is for people who aren't 'devops' and who can't crank out a fancy piped shell script using awk and sed."
Whatever we may feel about people who have inexplicably failed to learn to use awk or sed, or perl, or python, or ruby, criticism on the basis of these methods being "better" (if only one learns how to use them) is a waste of everyone's time.
If you really want to make a point about how less performant javascript is than perl, that's a different matter. If you want to critique the goals, concept, implimentation, or whatever, that's a different matter.
But it's simply too easy to write "why not do 'X'", especially if you're going to ignore the fact that the constraints on the problem have already ruled out 'X' in the first place. That takes less than no thought. It takes an active deficit of thought.
- eropple 11y agoWithout putting too fine a point on it, I think people should make an effort to try harder with their tooling. "This is for people who aren't 'devops'" can be just as easily read as "this is for people too aggressively incurious to step outside their sinecure for even the teensiest of seconds and maybe learn something." 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.
- Killswitch 11y agoIn the end, nobody cares how I renamed all the images from lolimag_{i}.jpg to 2015_05_20_img_{i}.jpg, they just care that I did it. 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.
- eropple 11y agoLearning to use sed for that kind of trivial task would take, what, a minute? Maybe two? If you know regex, you know enough of sed to do anything, and if you're not using regex in your JavaScript transform you're quite inarguably (and I don't use that word lightly, but regular expressions really are required knowledge) screwing up anyway...so what's the point? 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.)
- ams6110 11y agobasic regexp search and replace with sed is pretty simple, but it gets hairy VERY fast beyond that in my opinion. awk I love, I find it very simple and intuitive. 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.
- eropple 11y agoI'll use awk for that stuff when it occurs to me, sure. Most of what I do is pretty straightforward transforms, and chaining together a couple sed commands often comes to mind first. 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.
- jzelinskie 11y ago> Go people love doing this, too, creating bad solutions to solved problems. 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.
- escape_goat 11y agoWell, and in your comment here, you're writing something more substantive than "why not use...", which was literally the gist of several of the top level comments. 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.
- eropple 11y agoYeah, that's fair, I got a little carried away with that characterization. A thing that does shell piping is great. Where I get salty is the suggested use case of using it to replace bog-standard tools because they're not JavaScript. Monolinguists are bad hires in virtually any shop; at prior gigs I've dealt with loads of developers who honestly thought that anything that isn't the programming language they argue about and reinvent ways to concatenate and minify is "devops". People who push these mindsets are toxic and should be burned out of functional engineering cultures.