Live data from Hacker News

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

naildrivin5.com

11–20 of 134 posts

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

#11
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 movement.

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

#12
The way I see it, writing command-line utilities in Node is really no different than writing command-line utilities in Python. Both offer a nice scripting environment, and while Node is more web-oriented, there's still quite a bit of libraries out there to do stuff with, making it potentially perfectly suitable for writing an utility for doing X. Hell, I personally even consider it somewhat more attractive than Python in this regard because Node has no equivalent to the 2.X/3.X compatibility mess that Python has. (Python wins in having more "general purpose" libraries, though, making it potentially more suitable for not-directly-web-related-development in nature.)

And while this was mentioned a few times in the previous thread, it bears repeating again: There are quite a lot of people out there using Windows, which includes developers. Node is a first-class citizen on Windows, and grep, sed and friends won't be there out of the box for you. A properly done Node command-line utility is generally more cross-platform than a shell script using grep and sed would. And there's quite a bit of command-line utilities made with Node out there (most revolve around web development, such as build tools like grunt and things like CoffeeScript/TypeScript/etc compilers), so it's not like this one is unique in that regard either.

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

#13

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

Yes, the author came off as an Agile snob. Might be helpful to LivingSocial's plans (which lead nowhere BTW) but this attitude is toxic to the development community at large.

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

#16
I see many comments from people saying that they are more hesitant about participating in open source after this. That they have been working on some code and will now think twice before they put it out in the open. It makes me sad.

Please don't let this deter you! I know how it feels. I was literally shaking when I put my first project on GitHub. Literally. The second time too. And the third. Still am. Still scared of making a fool of myself, but I know what a great learning experience it is and that it benefits my career, so I force myself to do it. Add to that the fact that it is a ton of fun, and every single star a project of mine gets (and the stars are few) makes me proud.

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

#17

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

That is the weird thing about github though. On the one hand you have big important apps there such as Linux and Rails which have quality standards and where developers at large should take a look and make their voices known if they can find things that suck.

The argument I guess is, at what point does it become fair game for criticism?

OTOH it is also a place for your crappy bash scripts.

I've got plenty of hacky scripts that I would consider putting on github, just as a backup as much as anything else. I honestly wouldn't care what criticism they got, though criticism with accompanying pull requests would be vastly superior.

My main hesitation though would be if a prospective employer goes and looks through it and goes "oh, this guy's code sucks".

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

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

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

#20

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

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.

Post reply on HN