678 reputation
59
bio website
location California
age 39
visits member for 3 years, 8 months
seen Apr 23 '11 at 14:04

Apr
5
comment Where does this concept of “favor composition over inheritance” come from?
There you go. My Delphi experience is exactly zero, so I can't speak to that. But the first few "big things" I ever built in Java relied heavily on inheritance and i paid for it later - much harder to adapt later on.
Apr
4
comment Where does this concept of “favor composition over inheritance” come from?
As others have pointed out, it's been around a long time - I'm surprised you're just now hearing of it. It's intuitive to anyone who has been building big systems in languages like Java for any amount of time. It's core to any interview I ever give and when a candidate starts talking about inheritance, I begin to doubt their skill level and amount of experience. Here's a good introduction to why inheritance is a brittle solution (there are many many others): artima.com/lejava/articles/designprinciples4.html
Apr
4
comment Structured programming versus OO programming
Right - that must be why "Favor composition over inheritance" is one of the core ideas of the GoF book among many others. I can't tell you the last time I relied heavily on subclassing and every time I do I feel like there must be a better design. It's a common misconception that subclassing is a core part of the original intent of OOP. It's almost always bad design to build a tree of subclasses. artima.com/lejava/articles/designprinciples4.html
Apr
4
comment Structured programming versus OO programming
In my experience, inheritance is best avoided in OOP. How often do you actually build a superclass as opposed to an Interface? Favor composition as a general rule.
Apr
3
comment Getting Overwhelmed: Tips for noobs
I guess in that case, just pick a place to start. The web is a pretty exciting space - write some services or learn to be do cool things with JQuery. Or pick a language or three and work through Project Euler. No matter what you do, there's nothing like just doing it. Best of luck!
Jan
22
comment Introducing Scala to a Technical Manager
Thanks for sharing your examples and congratulations that you work with Java developers open-minded enough to hear about Scala. I'll be sure to post the examples I come up with by the end of the weekend.
Jan
22
comment Introducing Scala to a Technical Manager
Great reply and good ideas. I definitely plan to steer clear of anything advanced like higher-kinded types, as I think that would work against me. My coworkers would definitely not see the appeal of Scala's more advanced functionality and would probably ding it with the "too complex" brand. I'm not sure about XML - I've definitely found it useful for quick one-offs. I'll give it some thought. In any event, some great thoughts here. Thanks!
Jan
22
comment Introducing Scala to a Technical Manager
Great reply! Thanks for taking the time to put this together!
Jan
22
comment Introducing Scala to a Technical Manager
Excellent point about audience - In this case the tech lead on my project and a top level engineer in the company. A person who still writes a lot of code (mostly C++) but also does a lot of architecture and design and has considerable influence on company technical direction.
Jan
22
comment Introducing Scala to a Technical Manager
I considered it, but I'm really very much hoping to compile a set of good code examples. This is not a PowerPoint pitch. I need to show concrete code examples.
Jan
6
comment What unit test frameworks exist for Java?
Yep - gotta say I love using Scala Specs to test my Java apps at work. Works with Maven, great to write, great output. And you can write the spec without implementing it to serve as sort of a checklist, and it shows up in Hudson for all to see as expected functionality.