This is going to be a short one to get me back into writing again. I just wanted to point out some interesting things I’ve noticed about Python inheritance that I’m (sometimes) sad that Java or C# don’t do. Continue Reading
inheritance
All posts tagged inheritance
Whoa! Two days in a row, I’ve found some good posts worth sharing! Today’s article presents somewhat of a counterpoint to an older blog post I’d read about classes never being named after what they do, but what they are; that they should always be actual objects in the real world. I never could quite bring myself to accept what this person had said, especially about Factories being a bad thing (I wish I could show you guys the article). Now, this new article actually articulates a defense against the opposite. I hope you all enjoy it!
Today, we’ll be talking about something controversial: static methods. I have yet to read anything that says static methods are good and useful, other than Effective Java recommending them in the use of static factory methods. There are some really interesting (and somewhat dumb) arguments out there against them that rarely, if ever, even get explained. Notably, I’m providing a rebuttal to the article, Utility Classes Have Nothing to do With Functional Programming.
Today, we’re going to look at the good and bad of static methods; what they’re good for and what they’re not.
Back in my delegate decorator article, I mentioned some weaknesses of the delegate pattern as a substitute to inheritance. The decorator solved one of those problems, but the other is still a problem. The problem comes when using something akin to the template pattern. Continue Reading
Sometimes, you may hear about dependency injection done via a getter method, which subclasses override or mock frameworks fake for testing. It allows the class to have a set dependency that is actually hard coded, but can be “injected” if need be. Continue Reading



