Live data from Hacker News

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

naildrivin5.com

31–40 of 134 posts

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

#31
post #26

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…

It's a good start, but this shouldn't be a special day. It should be every day.

I agree, but the common problem there is you get people spouting all the "stop reinventing the wheel!", "looks like NIH syndrome" or "it has no tests so it's irresponsible to release" type lines. This sort of disdain is frequently done politely and seemingly accepted by the community at large even here on HN.

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

#32

> Now, I’m all for bad projects and bad code being called out. Bullshit, sorry. Questions to ask yourself before "calling out bad code". 1. Does this code belong to someone on your team? 2. Does your code rely on this code? 3. Does the code represent a risk to you or your business in some way? 4. Do you have the direct contact info for the developer so you can appropriately, discretely and professionally inform them…

How can we as a development community rationally expect to grow the open source ecosystem and encourage people with this type of snobbery? There's one lesson that I'm personally taking from this, after unsolicited ridicule, one sincere apology, one bullshit non-apology, and one arrogant I have nothing to apologize for! If I build a small thing to scratch my own itch (which I often do) I'm going to think twice about s…

This is in fact exactly why I use Bitbucket private repos.

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

#33
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.

Not sure I follow. OS X comes with the Bash shell and I have plenty of shell scripts (bash and perl) for automating my dev environment and numerous other tasks that run fine on both Ubuntu and OS X. OS X using FreeBSD as its Unix layer doesn't preclude it from interoperability with other *nix like systems.

There are differences between BSD and GNU utilities that manifest a lot. ps uses different syntax. find has a different output style. grep doesn't support -P.

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

#34

> Now, I’m all for bad projects and bad code being called out. Bullshit, sorry. Questions to ask yourself before "calling out bad code". 1. Does this code belong to someone on your team? 2. Does your code rely on this code? 3. Does the code represent a risk to you or your business in some way? 4. Do you have the direct contact info for the developer so you can appropriately, discretely and professionally inform them…

I guess it all comes down to how you present it (and yes, I'm ignoring the "replace" issue for the moment). I honestly don't think everything under the sun should be made publicly available just because you can or because it's easy. The reason being primarily because these sorts of things tend to be copied and re-used all over the place. So, a quick hack on a project you don't care much about can end up in many other…

[deleted]

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

#37
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…

The Twitter snark isn't normal, it's an exceptional case.

No, this isn't true. It's completely normal. It's been normal since long before Twitter. In exactly the same way high school bullying is normal, this is most definitely (a) prevalent, and (b) a problem. But it won't change, because people tolerate it.

You want me to open up my personal projects? It's not going to happen. It won't happen because we live in an ecosystem where the top dog is the one who barks the loudest, not the one who's most productive. People pay attention to what other people say. And there is nothing anyone could say about personal projects except "Pretty cool" or "Damn, what a steaming pile". The first is nice, but I'll get by without it. The second serves only to lower me and my ideas. I don't want my capabilities (ideas) to be constrained by others' lack of imagination.

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

#38
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 just reading it lightly (5-10 mins).

[1] https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...

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

#39
post #34

Earlier quoted context omitted.

I guess it all comes down to how you present it (and yes, I'm ignoring the "replace" issue for the moment). I honestly don't think everything under the sun should be made publicly available just because you can or because it's easy. The reason being primarily because these sorts of things tend to be copied and re-used all over the place. So, a quick hack on a project you don't care much about can end up in many other…

[deleted]

This entire forum exists for the purpose of sharing fact and opinion alike. If you don't want people to share opinions (or is it just the ones that don't align with your world view?), fine, but you don't need to be an ass about it.

Although part of me wonders if this is a joke, given the parallels to the situation at hand. Primarily, you clearly don't think all comments should be made public and felt the need to unhelpfully criticize mine. If so, well-played.

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

#40
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 all." In fact I've got all kinds of silly/pointless projects stashed up there--even a few that I'd say shouldn't exist. Heaven forbid I ever become famous enough for people to take a look! These guys seem to have all the maturity of kids egging someone's house. Who asked for their opinion anyway?
Post reply on HN