Live data from Hacker News

How A Pull Request Rocked My World

clayallsopp.com

151–158 of 158 posts

Re: How A Pull Request Rocked My World

#151

Earlier quoted context omitted.

I'm fairly certain you don't think it's a lie, and you are just envious. Either way, I don't see how any of this matters. I explained why I criticized the guy, and instead of working on that, you tried to undermine the anecdotal part.

No undermining, I just think you're lying about being popular and confident and good at sports. It's ok if that upsets you.

It's really weird for you to jump to that conclusion.

Re: How A Pull Request Rocked My World

#152
post #17

Earlier quoted context omitted.

...I rarely trust these kinds of name-generation tricks. So you're probably not a big fan of Rails, then?

I'm actually not a huge fan of implicit name-generation tricks, but I'm also not entirely opposed to them. The trick here I think is consistency - is name-generated type dispatch the standard across the entirety of the codebase? If it is, go wild. If it's not then I'd be much more wary of it. Consistency and building correct expectations for future maintainers is pretty important. Doing a smart trick in one place but…

Agree. Names should not matter. You are going to have to document name construction. If your library users use IDEs you are going to have to get them to understand names.

Re: How A Pull Request Rocked My World

#153

Reading the comments in this thread is very interesting to me, because each programmer seems certain of the superiority of his own programming style. We have some comments that disparage the change, saying that it obfuscates the code and makes it more difficult to understand. We have others saying that this change is a basic technique and it's "shocking" that the author wrote a book without this simple knowledge. Wha…

Early in my career, a project manager said to me, "I've never heard one programmer praise another programmer's code. They always criticize!" I think that reinforced for me both that someone's approach might be good even if it isn't my own, and also that it's important to say when something is done well. Of course, there's also just a lot of bad code out there.... :-)

I maintain an old ircII script. The guy that originally wrote it (srfrog - the LiCe script) is just an amazing programmer. The whole thing is clean and beautiful.

I feel ashamed when I touch it I dirty it up.

Re: How A Pull Request Rocked My World

#154
post #110

Earlier quoted context omitted.

It has a couple of patterns that have been more or less rejected by modern OO leaders: 1. "Singleton" (enough said) 2. "Template method" is more or less "inheritance over delegation" There's also a couple like Flyweight that are of such narrow applicability that they hardly merit placement on the short list with classics like Composites and Factories, and a few new items like Dependency Injection are surely worth a m…

What is your recommended introduction to design patterns? I've been meaning to read the original but I do get that old-school clunky Java feel from it. I'd be very interested in an updated Design Patterns for OO languages with mild functional capabilities like C++11, C#, Python.

I liked Head First Design Patterns. It's fun and covers most of GoF patterns (with a brief overview of leftovers). The examples (although fairly trivial) are in Java.

Re: How A Pull Request Rocked My World

#155
post #110

Earlier quoted context omitted.

It has a couple of patterns that have been more or less rejected by modern OO leaders: 1. "Singleton" (enough said) 2. "Template method" is more or less "inheritance over delegation" There's also a couple like Flyweight that are of such narrow applicability that they hardly merit placement on the short list with classics like Composites and Factories, and a few new items like Dependency Injection are surely worth a m…

What is your recommended introduction to design patterns? I've been meaning to read the original but I do get that old-school clunky Java feel from it. I'd be very interested in an updated Design Patterns for OO languages with mild functional capabilities like C++11, C#, Python.

[deleted]

Re: How A Pull Request Rocked My World

#156

Earlier quoted context omitted.

It has a couple of patterns that have been more or less rejected by modern OO leaders: 1. "Singleton" (enough said) 2. "Template method" is more or less "inheritance over delegation" There's also a couple like Flyweight that are of such narrow applicability that they hardly merit placement on the short list with classics like Composites and Factories, and a few new items like Dependency Injection are surely worth a m…

Why has the singleton pattern been rejected? Similarly, why has the template method been rejected? Both seem entirely reasonable patterns to me - what is so wrong with them?

Never mind. The singleton pattern, I can see why it should be used judiciously - to my mind none of the arguments I've read are completely compelling.

However, the template method pattern I do understand now. Far better to define an interface, then inject an instance object that implements the interface and work on that.

Re: How A Pull Request Rocked My World

#157

Earlier quoted context omitted.

When people disagree that doesn't imply that the situation is highly subjective and all opinions are equally valid. In this case I believe they most certainly are not and I think you are drawing stronger conclusions than is warranted. There are objective ways in which to judge programming, by considering whether simple rules like the SOLID principles, low coupling, DRY, using composition over inheritance, keeping cod…

I can agree with some of your points; however, I believe you make too many simplifying assumptions. > There are objective ways in which to judge programming, by considering whether simple rules like the SOLID principles, low coupling, DRY, using composition over inheritance, keeping code complexity measurements low, favoring immutability, statelessness and referential transparency, etc. have been followed. Hardly any…

  but the question becomes: what is the best way to favor immutability [..]
To which my answer would be: it doesn't matter, as long as you consider it and try to apply/enforce it wherever it makes sense.

  I have found that age matters very little with regard to
  someone's ability to write code. [..]
I was thinking of their greater (life) experience; in my experience they tend to be more nuanced and open to different ways of doing things, which makes for nicer, constructive, conversation.

Re: How A Pull Request Rocked My World

#158
post #138

Earlier quoted context omitted.

My concern is the inverse of that: recommending something you either don't fully understand or haven't used long enough to speak to either its pros or cons. Being in a book usually is an indicator that something is a best practice or how the way things should be done, ostensibly being put forth by an expert. Perhaps we shouldn't hold such content to such a standard.

I checked out the self-published Object-Oriented Design Anthology that this Clay guy ostensibly wrote judging by the discourse in this thread. Instead, I found that he wrote from what I can tell the only book that introduces RubyMotion, published by PragProg, and endorsed by other authors. His blog post shows humility, an ability to praise the work of others, and an effort to add value to the world. All things that t…

While I understand the point you're trying to make, OOP is a pervasive concept that should factor into building Ruby and RubyMotion apps. My point is if he opts not to use polymorphism in a RubyMotion app, it's an indication from him as the author of a RubyMotion book that polymorphism should be avoided for whatever reason (maybe the dynamic dispatch is too expensive). My assumption isn't that the author simply doesn't understand OOP, but rather that this was a deliberate decision. But, now a hole in his knowledge becomes best practice for many, because as you pointed out, it's the only book on RubyMotion.

I appreciate the humility. I just wish it manifested in a crawl before you can run mentality. There is actual value in understanding the fundamentals.

Post reply on HN