5 ms·
I can't help but feel like I'm missing context here. The project (https://github.com/harthur/replace https://github.com/harthur/replace) seems like a vaguely re
by csande17 4y ago
I can't help but feel like I'm missing context here. The project (https://github.com/harthur/replace https://github.com/harthur/replace) seems like a vaguely reasonable "grep with a simpler interface and a regex syntax I'm already familiar with" kind of utility. It's far from a central example of the dependency bloat that people usually mock about Node.js--it uses the standard library for all the actual filesystem and regex work, and just has a couple dependencies for normal things like command-line parsing and ANSI color codes.
Has the project been significantly rewritten and cleaned up following these posts? Was there some absurd hype cycle for this thing that didn't deliver? Did the Internet get mad at this person for some unrelated reason? What happened here?
- blueflow 4y agoWould the bad code quality justify the snarkiness on Twitter?
- csande17 4y agoIf the code was exceptionally bad, it might not justify the snarkiness, but it would maybe explain it at least. The current code looks fine though; I could definitely see me and my Big Tech colleagues writing something like this and getting some value out of it. Maybe people just had way higher standards in 2013, and code that seems fine now would have been farcically terrible back then. I kind of doubt it, though!
- dusted 4y agoI just read the source and I don't think there's anything notworthy about it, it's not bad. It's just javascript as written in 2013.. I don't think the snark was justified in this case.. Someone writing a quick little thing because they didn't want to use sed is absolutely great! The entire idea about computers is that they're meant to be programmed.. That also means lots of overlap in functionality and it means some programs are more specific than others.. and more polished than others.. And that's just how it should be (imo). > Would the bad code quality justify the snarkiness on Twitter? I think it should, because the other extreme is that any criticism is banned, no matter how polite, and everyone gets to be a special genius snowflake who can do no wrong, and our software will degrade at an even faster rate because of it. I think think there should be more public ridicule of slow and inefficient code, especially when it comes to things like drivers, operating systems, browsers and web frameworks which play a large role in our everyday lives.. Imagine how much electricity we'd save if we were a bit more scared of the long-beards showing our dirty underwear to the world in a torrent of spite and sarcasm.
- eajakobsen 4y agoOne can provide feedback and encourage people to learn about more efficient coding practices without ridicule and comments like "my eyes are bleeding".
- dusted 4y agoOne certainly can, and should. However, if I have to chose, I'd rather there be room for people over-reacting than risk there not being room for polite suggestion.. I do believe that the occasionally harsh tone fosters a resilience and readiness to accept ones mistakes. I don't like the way we're policing conversation, the bar for what's deemed acceptable is constantly raised, and while I agree with the general sentiment of "not being an asshole" I disagree with the growing tendency of virtue-signaling through condemnation and indignation in every sentence that I feel I'm being increasingly exposed to.. So, if I have to chose between grown men writing apology blog-posts for a random unthoughtful remark in a tweet, or the space where unthoughtful remarks in tweets are simply ignored.. I'll chose the latter.
- Dudeman112 4y ago>I'd rather there be room for people over-reacting than risk there not being room for polite suggestion That's the thing. Usually the snark isn't followed by suggestion or anything useful at all People being mean often do it for its own sake
- jasonlotito 4y ago> I'd rather there be room for people over-reacting There is. > I don't like the way we're policing conversation, We aren't. We are having conversations about public posts. > the bar for what's deemed acceptable is constantly raised, That's good. I mean, I believe that the occasionally harsh tone fosters a resilience and readiness to accept ones mistakes. Think of this as code review for words. > So, if I have to chose between grown men writing apology blog-posts for a random unthoughtful remark in a tweet, or the space where unthoughtful remarks in tweets are simply ignored.. I'll chose the latter. I don't get it. You choose the latter, which amounts to someone being "censored." i.e. If I write something and no one reads it or it's ignored, does it really matter? It's not seen. It's not read. But more importantly, you are okay with someone unprofessionally and childishly critiquing someone's code, but not the same being done with those same words? And you are okay with someone writing something unprofessional and childish, but not those same people writing something professional and thoughtful? I cannot fathom the leaps of logic it takes to make sense of all of this.
- politelemon 4y agoI went through the code, some of the tweets, and I'm trying to figure out what they are thinking. The best guess I can come up with, is if someone were to make their own tool similar to the ubiquitous "curl" or "wget", there would be a kneejerk reaction from some people (lol it's curl but worse), while most people would be happy to simply ignore it, and a few would be curious about it. The problem with Twitter is that it gives an equal platform to everyone's opinions even if it is without merit or reasonable discourse.
- robertlagrant 4y ago> The problem with Twitter is that it gives an equal platform to everyone's opinions even if it is without merit or reasonable discourse. Isn't that the problem with communication in general? Wouldn't, say, HN have the same issue?
- endorphine 4y agoHN has moderation (with a higher bar than Twitter) and downvotes, so I wouldn't say it's the same issue.
- robertlagrant 4y agoTrue, although Twitter allows self-directed moderation through blocking and following.
- dan-robertson 4y agoI would guess a mix of ‘reinventing the wheel’ complaints (except sed kinda sucks for the common task and it’s annoying having n different regexp syntaxes) and ‘nodejs for everything’ complaints. But it doesn’t really make sense to me.
- IshKebab 4y agoYeah the existing wheels suck so I don't blame them for reinventing it. Often it is easier to write a proper program to do exactly what you want than to figure out the arcane `sed | xargs` command from the 70s that nobody has ever bothered to make vaguely usable. Here's a program I wrote to count matches in a very large file. I wonder how long it would take to work out the equivalent bash command. use aho_corasick::AhoCorasick; use std::fs::File; use std::io::BufReader; fn main() { let args = std::env::args().collect::<Vec<_>>(); if args.len() != 3 { eprintln!("Usage: ./count_occurances 'pattern' <filename>"); return; } let f = File::open(&args[2]).expect("Error opening input file"); let reader = BufReader::new(f); let patterns = &[&args[1]]; let ac = AhoCorasick::new(patterns); let count = ac.stream_find_iter(reader).count(); println!("{}", count); }
- NateEag 4y agogrep -c $pattern $file Half a second, unless I'm missing something? No objections at all to people building simpler UIs for common tasks. The classic Unix tools are like table saws without labels or safety features - confusing and rightfully intimidating. You have to read the manual carefully to avoid chopping off digits. ... but they're also like table saws in that once you know them well and are comfortable with the usage patterns that protect you from the dangerous parts, they let you achieve things with a minimum of fuss and ceremony.
- IshKebab 4y ago> unless I'm missing something? Yes. $ echo aaaaaa | grep -c a 1
- sgentle 4y agoIf you're a real Linux user, you can build such a system yourself quite trivially by combining xargs, sed and grep. You see, nodejs is the pumpkin spice latte of languages. I, a sophisticate, insist upon the fine single malt whiskey of Perl, paired with a delectable shell script charcuterie. Anything less is the fare of unsophisticated lusers, who are often (purely coincidentally) women or other outgroups.
- machinawhite 4y agoA real Linux user can build their own xargs, sed and grep in an arbitrary environment, be it node, windows scripting host or the python interpreter in some washing machines firmware
- acdha 4y ago… and the subtle errors in my simple example were, of course, left as an exercise for the student so you’d learn how to fix them.
- imtringued 4y agoI once used cygwin to accidentally create files with binary data as their file name that couldn't be deleted in the windows file explorer. I wrote another cygwin program that deleted these files. The only difference between me and the author of this blog post is that I didn't upload my program to the internet where people could ridicule it for its simplicity.
- jonnycomputer 4y agoWas this supposed to be a command line tool used in a Linux environment, where grep, sed, etc. are already available? Doesn't excuse their behavior, not at all, but I can see exactly how that might provoke their derision. The mistake was quite worse than I thought. But it is foolish to be provoked by the foolishness or ignorance of others. They could have remained silent, or could have reached out constructively (e.g. by introducing them to those widely distributed set of really powerful command line tools). Or is there some JavaScript additional functionality that I'm missing?
- 4y ago
- pinkcan 4y agofor proper context you'd have to look at the repo has it was when the tweets went out https://github.com/harthur/replace/tree/431b1e183a4bd43046af3fb2ad9c11b06d43d8af https://github.com/harthur/replace/tree/431b1e183a4bd43046af... but it doesn't matter as those tweets are trash, specially coming from other OSS devs
- forgotpwd16 4y agoEven looking at the repo back then still cannot see why people will mock the author.
- untech 4y agoMaybe the reason is that is a command-line utility written in JS? This is quite normal today, but in 2013 it might be shocking for some people. I think there’s still some hate towards JS now, and in 2013 it definitely was much more rampant. Also funny to think that this project probably received so much hate because of being ahead of its time.
- csande17 4y agoThe whole command-line tools in JS trend was, I think, in full swing in 2013. I mean even in the 2013 version that another commenter linked, they're relying on the built-in NPM support for installing command-line tools and the existing popular NPM packages for command-line parsing and output. And if people were trying to fight that trend (which to be fair is a bad trend; I refuse to run software from the NPM ecosystem to this day), this is a weird example to pick because the point of the tool is to use JavaScript's regular expression syntax.
- bdhcuidbebe 4y agoby 2013 we already had piles of js tooling anyone remember babel, webpack, browserify, gulp, grunt?
- tex0 4y agoSame here. In fact I've built a very similar tool because sed/awk/grep/find didn't quite cut it and it did help a me lot to get sh* done.
- j_mo 4y agoYou also can't see any replies for the tweets that are still up (one of the three in the screenshot was deleted) so there's no context. I guess Twitter has some data retention policy going on for 9yr old tweets? Or they never actually got any attention in the first place
- ksherlock 4y agoThe third is a reply to the first so clearly it did get some attention.
- Merad 4y ago> I can't help but feel like I'm missing context here. I think the main context is simply that people suck sometimes. I'm not a huge fan of writing scripts or command line tools with node, but I've done it before, even in projects where js wasn't the primary language. It's a useful tool. Yes, the functionality overlaps with sed and grep, but speaking for myself I can never remember how to do anything more complex than the basic `grep text_goes_here`. If I found myself needing to do a lot of command line find and replace operations I certainly might make a little tool like this.
- jasonlotito 4y agoSomeone made a childish and unprofessional critique of the code, and followed it up with a thoughtful and professional response. It's odd that people are okay with a childish and unprofessional critique of code, but not a fairly civil and well thought-out critique of the "code review."