Now I'm feeling a bit guilty for not having open sourced any of the code I've ever written, and I'm wondering what kinds of lessons I could have learned earlier on.
How A Pull Request Rocked My World
51–60 of 158 posts
Re: How A Pull Request Rocked My World
#52Reading 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…
Re: How A Pull Request Rocked My World
#53Re: How A Pull Request Rocked My World
#54Reading 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…
- the "bad" part is RowType.for(), where a type is dynamically called forth based on manipulations on some string. I agree that a more concrete mapping from string-to-type would be preferable (I'm assuming the use of a string is required for some reason).
- the "good" part of the patch is that he replaced a conditional with type dispatch. I agree that this is a basic technique of object-oriented programming.
Re: How A Pull Request Rocked My World
#55The article is very humble, but in my view, seems to go a little too far. "You can reuse code with inheritance. Absolutely crazy. Brilliant. All of this blew me away." Honestly?
It is as if the OP did not grasp what OOP is all about.
Re: How A Pull Request Rocked My World
#56Adept programmer: Discovers polymorphism. It's great, uses it for everything.
Master programmer: Realizes that in many cases, it makes the code less clear and more verbose, reverts back to if/else until the flexibility is actually needed.
Same story repeats itself many times on different fronts: metaprogramming, recursion, exceptions, macros, etc.
Re: How A Pull Request Rocked My World
#57Those who know this technique either discover it themselves, through "reading, learning, doing", or are shown,like this guy was. None of us was born knowing this. Clay has blogged about his experience of discovering this - that in itself is what makes this a great read for me. I wouldn't be surprised if every single tech book author, at some point after their book has been published, has learned something and thought…
Re: How A Pull Request Rocked My World
#58Earlier quoted context omitted.
How many books did you wrote ?
That's not an Ad Hominem.
Re: How A Pull Request Rocked My World
#59The classic "Replace Conditional with Polymorphism" design pattern, which took me way to long to realize that it also applies to Python.
Re: How A Pull Request Rocked My World
#60Earlier quoted context omitted.
That's not an Ad Hominem.
I assume you are responding to me. Yes, yes it is. From Wiki "Argumentum ad hominem, is an argument made personally against an opponent instead of against their argument." AlexeyBrin is implying that because greenyoda may not have written any programming books, that his argument is less valid. AlexeyBrin's argument is not refuting greenyoda's central point, that it's somewhat strange that the blog post author has wri…
Sorry for the confusion ;)