Live data from Hacker News

If You Call Out Bad Code, Make Sure It's Bad First

naildrivin5.com

61–70 of 134 posts

Re: If You Call Out Bad Code, Make Sure It's Bad First

#61
post #6

I found this article helpful. I was very surprised by the quality of the code in the replace.js repo given the vitriol that surrounded it. I'm not a big contributor to open source, but I've recently made some modifications (improvements?) to a Haskell library I use and was planning to make a pull request soon. This event gave me pause. As someone who couldn't tell what was so eye-bleedingly bad about the replace.js c…

Likewise, I've been meaning to convert my local projects at some point and post them to one of the newfangled online git repos. I was going to use GitHub or Bitbucket to avoid saddling my crap on the git hosting I have available from the open source project I develop for, but now I'm not so sure GitHub is the best place for that. I don't mind the code being publically-accessible as the price for free hosting but I ha…

For what it's worth, I've been on Github for years and no one has even noticed that my code exists. Which I don't mind at all, given all of this.

Re: If You Call Out Bad Code, Make Sure It's Bad First

#63
post #18

I propose a solidarity movement: Heather Arthur day: On this special day we post useful code that we might otherwise be unwilling to post because of what other people might think of it. Because some people have the courage to do this anyway and when they do, it makes the world a better place. If just a few people do this, they might be considered crazy and laughed at, but if all of us do it, why then we'd have a move…

We'd run out of calendar days if we had a "solidarity day" made up everytime something like this happened.

That's why you pick one particular incident and then use it as an anchor point for all the other bad incidents to refer to. This is how all other solidarity days work.

Re: If You Call Out Bad Code, Make Sure It's Bad First

#64
post #50
post #14

Another issue in the "is Node right for this" is that it's very very portable, significantly more so that shell scripts (Mac uses BSD utilities, windows has nothing unless you have cygwin), and even slightly more portable than python.

slightly more portable than python Can you elaborate on this?

I don't have any great experience with Node, but my understanding is that its built around libuv, which is really good at abstracting this stuff. From my experience of writing python scripts, it looks like you'll occasionally see things like "this doesnt work on Windows". Only occasionally though, hence "slightly".

Re: If You Call Out Bad Code, Make Sure It's Bad First

#65
post #56

Earlier quoted context omitted.

Bullshit, sorry. I can't help feeling that this kind of attitude is what caused Heather to feel bad in the first place. I agree with your points, but the way you present them leaves a lot (of politeness) to desire.

Politeness? The reply might have be forceful, might have use the word bullshit, but it what way did he offend anyone? I thought he hit the nail on the head. It's no body else’s business but your own what you choose to put in GitHub.

Calling someone's writings "bullshit" is pretty much the same as calling someone's code "eye-bleeding" -> "your product is of such low value it's worthless"

Those that claim the genesis of this whole issue is offensive should take equal offense to the "bullshit" line.

Re: If You Call Out Bad Code, Make Sure It's Bad First

#66
post #6

I found this article helpful. I was very surprised by the quality of the code in the replace.js repo given the vitriol that surrounded it. I'm not a big contributor to open source, but I've recently made some modifications (improvements?) to a Haskell library I use and was planning to make a pull request soon. This event gave me pause. As someone who couldn't tell what was so eye-bleedingly bad about the replace.js c…

Likewise, I've been meaning to convert my local projects at some point and post them to one of the newfangled online git repos. I was going to use GitHub or Bitbucket to avoid saddling my crap on the git hosting I have available from the open source project I develop for, but now I'm not so sure GitHub is the best place for that. I don't mind the code being publically-accessible as the price for free hosting but I ha…

Bitbucket offers unlimited private repos, so you can stash your personal stuff there without fear of roaming assholes. They only start charging once you have more than 5 contributors.

Re: If You Call Out Bad Code, Make Sure It's Bad First

#67

I'd still like to know how these jerks even came across Heather's code in the first place. I suppose I should be grateful for obscurity. I even have a command-line utility written in C to count from 1 to 10. (Well it does a little more than that, but that's the general idea.) I'd hate to hear what they think of it. I'm not really a C coder so I'm sure it's fairly ugly, and I suppose they'd say it "shouldn't exist at…

Well, now I'm curious for that CLI. Why do you need an utility to count from 1 to 10?

Just shared this on a different thread[0], but here it is:

https://github.com/pjungwir/range

[0] "What is your dumbest project on Github?": https://news.ycombinator.com/item?id=5112546

Re: If You Call Out Bad Code, Make Sure It's Bad First

#68
post #14

Another issue in the "is Node right for this" is that it's very very portable, significantly more so that shell scripts (Mac uses BSD utilities, windows has nothing unless you have cygwin), and even slightly more portable than python.

> windows has nothing unless you have cygwin

A lot of the Unix tools (including SED) run just fine on Windows without cygwin:

http://www.zeusedit.com/zforum/viewtopic.php?p=2683

Re: If You Call Out Bad Code, Make Sure It's Bad First

#69

I just gave the code a quick look and I find this `eval` usage not too cool: https://github.com/harthur/replace/blob/master/replace.js#L4... It relies on the fact that you can provide javascripts String#replace a "replace function" (1). The author just evals the contents of a command line provided file into a variable called `replaceFunc`. Beside that, there's not a lot that can be pointed out as "bad", at least by j…

It might not be optimal but the set goal couldn't be achieved differently without much overhead. It's a valid use of eval in my opinion.

Re: If You Call Out Bad Code, Make Sure It's Bad First

#70
post #23

I see a lot of people saying you're going to keep personal projects to yourself (instead of putting them on GitHub or similar) because of this fracas. Please don't. The Twitter snark isn't normal, it's an exceptional case. It wouldn't be on the front page of HN if that kind of behavior were the norm. And it's the jerks on Twitter who came out looking bad here, not the author of the code. I really like how GitHub has…

Heh, I must not be following the right persons then cause it's pretty common among the people I follow.

That might be, actually! I do make a habit of unfollowing anyone on social media who's consistently negative (esp. in unconstructive ways). I recommend it.
Post reply on HN