Live data from Hacker News

Rookies in the Bike Shed

david.heinemeierhansson.com

11–20 of 45 posts

Re: Rookies in the Bike Shed

#11

This post raises some interesting points about the difficulty of contributing to open source for the first time. Over the last year, I've taught myself to code. I want to contribute to open source, and I think I can provide value to smaller projects. But the public nature and unique culture of open source have left me feeling a bit overwhelmed. So I observe instead. What's the best way for a rookie to find small, wel…

Start your own project.

Open source is not strictly about contributing to existing projects. You can start as many new projects as you'd like.

My experience is that many big projects started out as personal (read small) projects that grew out of adoption.

What kind of projects should you start?

Pick something that you reason you can solve with your current knowledge, and get working.

Re: Rookies in the Bike Shed

#12

The Rails commit that spurred this post, apparently: https://github.com/rails/rails/pull/5329

To summarize it: Someone upgraded from Rails 2.3 and had an issue, since xhr? stopped returning a boolean but 0 instead (the regex index of the first match). But he used the return value of that predicate in javascript. In Ruby 0 is truthy, but in Javascript it is false. So he made a pull request to change the behavior back to a boolean instead of 0.

@fxn then said that's not needed, and the predicate did return a truthy value and the contract never specified that it would actually return a boolean, so no contract was broken, so there is nothing to fix. (The Rails documentation uses monospaced "true" and "false" for the singletons and normal "true" and "false" for truthy and falsey values.)

Then Tim Pope suggested an alternative solution that would actually return a boolean. It got merged by @tenderlove but quickly reverted by @fxn again.

And so the bike shedding continued...

Re: Rookies in the Bike Shed

#13

The Rails commit that spurred this post, apparently: https://github.com/rails/rails/pull/5329

I found this comment https://github.com/rails/rails/pull/5329#issuecomment-466968... interesting for the implications of keeping an instance variable around as opposed to true / false.

Re: Rookies in the Bike Shed

#14

Earlier quoted context omitted.

Bah, I can't be bothered to read the whole thing. Before the request was closed, if I understood correctly, the argument was about whether or not `xhr?` needed to return a boolean rather than what it's doing which is aliasing a regex match. Hmm, call it bike-shedding if you want, but I have to be honest part of the beauty and value of Ruby is how semantic it can be made when you follow some conventions. How hard or a…

This happens all the time, and I'd argue, is the source of what many consider bike shed issues, even when they're not. An essential element of a bike shed disagreement is that the matter being discussed must be trivial. That is, the color of a bike shed doesn't matter. It has no impact on the utility of the bike shed. This is a function before form viewpoint. Ah, but if real life were only so black & white. In practi…

Agreed. It all depends on perspective. That's why I've always found the term to be needlessly dismissive.

Re: Rookies in the Bike Shed

#15
post #12

The Rails commit that spurred this post, apparently: https://github.com/rails/rails/pull/5329

To summarize it: Someone upgraded from Rails 2.3 and had an issue, since xhr? stopped returning a boolean but 0 instead (the regex index of the first match). But he used the return value of that predicate in javascript. In Ruby 0 is truthy, but in Javascript it is false. So he made a pull request to change the behavior back to a boolean instead of 0. @fxn then said that's not needed, and the predicate did return a tr…

Indeed, it took me some 24 hours to revert. I reflected about it for some time.

After thinking about it for a day, I was convinced the commit was sending the wrong message, and felt it had to be reverted. The commit message explains the rationale.

Re: Rookies in the Bike Shed

#16
post #7

Earlier quoted context omitted.

Bah, I can't be bothered to read the whole thing. Before the request was closed, if I understood correctly, the argument was about whether or not `xhr?` needed to return a boolean rather than what it's doing which is aliasing a regex match. Hmm, call it bike-shedding if you want, but I have to be honest part of the beauty and value of Ruby is how semantic it can be made when you follow some conventions. How hard or a…

Dude, that's deep. You're bike shedding the bike shed. So meta. Turtles all the way down. Touché!

Upvoted you despite the slightly obfuscated phrasing, because it's essentially true. This turned into a bikeshedding discussion on bikeshedding the moment lucisferre misrepresented his own definition of bikeshedding as the canonical definition.

Re: Rookies in the Bike Shed

#17
And this is why people reinvent the wheel. If you disagree with the core teams decision here, you are at an impasse. So, you fork and move on. Or, you think about it, and decide to create your own framework that will be like Rails, but do things the way you want to do them, including making xhr? work the way you think it should.

Reinventing the wheel gets a bad wrap. People suggest you should contribute to existing projects. The problem is when that existing project's direction diverges from your needs. Reinventing the wheel is part of the power of open source.

On a side note, considering the sheer number of types of wheels, "reinventing the wheel" comes across as a bit odd.

Re: Rookies in the Bike Shed

#18
post #12

The Rails commit that spurred this post, apparently: https://github.com/rails/rails/pull/5329

To summarize it: Someone upgraded from Rails 2.3 and had an issue, since xhr? stopped returning a boolean but 0 instead (the regex index of the first match). But he used the return value of that predicate in javascript. In Ruby 0 is truthy, but in Javascript it is false. So he made a pull request to change the behavior back to a boolean instead of 0. @fxn then said that's not needed, and the predicate did return a tr…

It was my pull request. It was spurred by a compatibility break that took all of two seconds to fix in our app, but the principle of the matter is what irked me.

And it wasn't from passing it to JavaScript, it was from parameterization from Ruby to Ruby.

I didn't really care that much about it getting merged in, so long as the docs changed (fxn's argument about using a fixed-width font in html docs to indicate the singleton true vs a truthy value is something that really ought to change). That stance is unfriendly to developers and follows what seems to be the Principle of Most Surprise.

At the end of the day, it's not worth all the trouble for something so trivial. I'd rather rails-core deal with more important issues. And that's the last time I ever send a pull request on principle to a project I don't own.

Re: Rookies in the Bike Shed

#19

The Rails commit that spurred this post, apparently: https://github.com/rails/rails/pull/5329

Bah, I can't be bothered to read the whole thing. Before the request was closed, if I understood correctly, the argument was about whether or not `xhr?` needed to return a boolean rather than what it's doing which is aliasing a regex match. Hmm, call it bike-shedding if you want, but I have to be honest part of the beauty and value of Ruby is how semantic it can be made when you follow some conventions. How hard or a…

[deleted]

Re: Rookies in the Bike Shed

#20

The Rails commit that spurred this post, apparently: https://github.com/rails/rails/pull/5329

Thanks for the link. It wasn't clear to me, however, who was doing the bikeshedding.

If you read the original source for the term at http://bikeshed.com/, Kamp shows his respect for the submitter of the change:

  I bow my head in respect to the original proposer because 
  he stuck to his guns through this carpet blanking from
  the peanut gallery, and the change is in our tree today.
  I would have turned my back and walked away after less
  than a handful of messages in that thread.
This is how I feel about the pull request: a seemingly innocuous change that looks, to this outsider anyway, well worth making. It seemed to have been declined over a concern that people would come to expect Rails to formalize undocumented behavior that others had relied on. I've been consuming Rails docs for years (thank you to the contributors), and that doesn't seem that crazy to me.

(Edit: formatting.)

Post reply on HN