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.
Comment 1 written by todd sharp on 12 December 2008, at 3:06 PM
Comment 2 written by Nick on 12 December 2008, at 3:24 PM
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].
Comment 3 written by Raymond Camden on 12 December 2008, at 3:26 PM
Comment 4 written by Dave DuPlantis on 12 December 2008, at 3:34 PM
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. :)
Comment 5 written by James Morrow on 12 December 2008, at 4:08 PM
Comment 6 written by Raul Riera on 12 December 2008, at 5:05 PM
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.
Comment 7 written by doug boude on 12 December 2008, at 5:51 PM
Comment 8 written by Hal helms on 12 December 2008, at 6:23 PM
@doug I'm shocked --shocked --you would think this, Doug! ;-)
Comment 9 written by Rick O on 12 December 2008, at 7:07 PM
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.
Comment 10 written by Rick O on 12 December 2008, at 7:23 PM
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 --->
Comment 11 written by Hal helms on 12 December 2008, at 8:05 PM
Comment 12 written by Henry Ho on 12 December 2008, at 9:01 PM
Comment 13 written by Raymond Camden on 12 December 2008, at 9:03 PM
Comment 14 written by Adam Cameron on 12 December 2008, at 9:16 PM
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
Comment 15 written by Spike on 13 December 2008, at 2:19 AM
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.
Comment 16 written by todd sharp on 13 December 2008, at 6:44 AM
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 :)
Comment 17 written by Hal helms on 13 December 2008, at 7:41 AM
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.
Comment 18 written by Dan Sorensen on 13 December 2008, at 1:03 PM
I really loved the explanations at the end. I'm going to try again on Monday and see if I retained any of it.
Comment 19 written by Ben Burwick on 15 December 2008, at 1:48 PM
Comment 20 written by David McGuigan on 15 December 2008, at 3:08 PM
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.
Comment 21 written by David McGuigan on 15 December 2008, at 3:14 PM
Comment 22 written by Hal Helms on 15 December 2008, at 4:02 PM
Comment 23 written by Jaime Metcher on 15 December 2008, at 9:37 PM
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...
Comment 24 written by Hal Helms on 16 December 2008, at 8:18 AM
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.
Comment 25 written by Jaime Metcher on 16 December 2008, at 5:12 PM
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.
Comment 26 written by Hal helms on 16 December 2008, at 5:52 PM
Comment 27 written by Mike Steele on 29 January 2009, at 5:27 PM
[Add Comment] [Subscribe to Comments]