Posted in Development | Posted on 12-12-2008 | 4,086 views
Hal Helms has posted an interesting quiz to his site:
It is pretty darn humbling. Here are some things to keep in mind. For a few questions, he assumes ColdFusion, but I read it as Java. This really tripped me up on more than one question. Also, I'm not quite sure a stack/heap question makes sense for an OO test, but that's probably just sour grapes on my part. (I won't tell you my score, but I've seen football games with larger numbers!)
Be sure to scroll down when you get your results. I didn't notice it under his ad, but he goes through every question and explains the ones you get wrong. This is where the really valuable advice is.


The web site you are accessing has experienced an unexpected error.
Please contact the website administrator.
The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
The index of a child element is out of range.
There are only 2 children under this node.
Index 3 is out of the allowed range [1-2].
I blame my poor performance on my Java background: close enough to interfere with ColdFusion answers, far enough away to prevent accurate recollection of certain concepts.
Also, I seem to recall being unable to chain method calls in ColdFusion, and it didn't seem to be an object issue at the time ... which probably means it was an object issue. :)
I didnt do the test because I ran into several Java questions so I skipped the whole thing, it would not give out a "true" result.
@doug I'm shocked --shocked --you would think this, Doug! ;-)
At least one of them he is dead wrong. (Hey Hal, go look at #25. You meant "explicit", not "static". There's a world of difference.)
My initial score was a 68.8, but I'd contest most of the Java vs. ColdFusion questions, as well as several of the design questions.
Chaining methods in CF is doable, but it isn't iron-clad. For example, you can't chain if the method name is the same as a reserved CF word. (Using the BigInteger class, for example, is a real PITA.)
<cfset b=a.add(c).and(d)>
<!--- boom goes the dynamite --->
It was an interesting quiz in its intent, but I found the it to be somewhat poor in a few areas:
- "none of the above" (the correct answer is that it's none of the other options presented) is a completely difference concept to "pass" (I don't know or am choosing not to answer the question).
- Some questions are based on opinion (and Helms' and my opinion differ).
- I claim my points for saying "equals()" in Q3, because the Q explicitly says "class", so it's clearly not a CF-oriented question, because CF doesn't have classes, it has CFCs. *A* "way of determining ~" is definitely to use the equals() method if one implements it in one's classes (say in Java, for argument's sake).
- it seems the questions have been updated since Rick's comment: Q25 says "explicit" for me.
But anyway... it kept me occupied for 5min, I suppose :-)
--
Adam
I got 64.something and I have to say that the explanations for the incorrect answers definitely come across as a marketing exercise.
I counted about 6 questions where I would genuinely agree with Hal that my answer was wrong. Pretty much all of the the rest of the *incorrect* answers were trick questions as indicated by Hal in the explanations. I don't put much value in a quiz that uses tricks to make you pick the wrong answer, so a few demerits for Hal on that front IMHO.
All in all, an interesting quiz, but very heavily weighted towards people who have read Hals writings and opinions. I'm not saying that Hal's opinions are bad. They are generally very good, but they certainly aren't necessarily widely recognized in the form and language he uses to present them.
I guess the point I'm trying to make is that the test is designed to make you fail if you don't subscribe to Hal's particular choice of language and perspective. That's fine, but it is important to recognize that Hal's perspective (while well worth listening to) is just that, a perspective not an immutable rule of OO programming.
And so what if it is an advertisement? Hal is a genius. If I could afford it, I'd take his class. And since Ben Nadel _has_ taken it and scored an 82, well... you must learn most of that stuff :)
I also removed a couple of the trick questions. I added them because I wanted to make a point in my comment and wasn't thinking so much about the actual scoring, but the point against them is well made -- and taken.
I really loved the explanations at the end. I'm going to try again on Monday and see if I retained any of it.
It kind of seemed like more of an "OO AND design patterns familiarity quiz" than just OO. I'm sure the argument can be made that part of an OO lifestyle is becoming familiar with standardized and popular OO design patterns, but at the same time if you're an incredible ColdFusion prodigy it's a lot more appealing to just use the design patterns without studying them, and therefore learning their standardized names.
Also, answering "There is no such principle" even when I knew there probably was one was REALLY REALLY FUN for some reason.
Great quiz. Thanks Hal.
Note: It would be awesome to be able to view the explanations for all of the questions, not just the ones you get wrong.
Coupla things suprised me:
Q5 decorator pattern: answer was #2 but this is also true for inheritance, mixins, composition, you name it, so it didn't seem specific enough to be the right answer. I chose #3. Even though I know that's not right it seemed righter.
Q9 lazy loading: of course you don't to use stub objects to do this, but "loading variables as they are needed" could almost be a definition of variable scoping.
Q11 Aggregation vs composition: don't get this at all. does this make sense to anyone else? I see what Hal's getting at, but firstly I thought it was the other way round (composition implies independant objects, aggregation implies strict lifecycle dependance - as in DDD's "aggregate root") and secondly it's the member that's dependant on the parent, not the reverse.
Q13 subclass madness: I'd never say a class is a "subclass" of an interface, I'd say "subtype". Is that just me?
Q44 what will this code do: LOL. Sneaky...
Q5. That's the point. To accomplish a goal, there are various paths. Understanding the trade-offs is important.
Q9. I don't understand what you mean.
Q11. Composition is a "stronger" form of aggregation.
Q13. Yikes! You're right. Of course, it's a subtype, NOT a subclass. Thanks for catching that. I'll fix that.
Q5: Ah so! Great food for thought.
Q9: If I read some data from a file into a local variable inside a function, that's "loading a variable as it's needed". Is it really lazy loading? I'd be thinking along the lines of partially instantiated object graphs backed by a non-object persistent store. Just musing here, I do see your point.
Q11: Cool, something learned - I had this totally the other way around.
[Add Comment] [Subscribe to Comments]