Take the OO Quiz - and prepare to be humbled...

Hal Helms has posted an interesting quiz to his site:

Are you OO Ready?

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.

Comments

todd sharp's Gravatar Humbling indeed.
# Posted By todd sharp | 12/12/08 3:06 PM
Nick's Gravatar Is it funny / ironic that when I take the quiz and click "submit" iget this?

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].
# Posted By Nick | 12/12/08 3:24 PM
Raymond Camden's Gravatar His site may be having issues. I'll email him. Thou shall not tease the Hal. Hal is the Great One. (And I say that with utmost respect. Hal is one of those smart, and NICE, guys that is a true rarity.)
# Posted By Raymond Camden | 12/12/08 3:26 PM
Dave DuPlantis's Gravatar 41.7%.

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. :)
# Posted By Dave DuPlantis | 12/12/08 3:34 PM
James Morrow's Gravatar You guys aren't posting your score on his scoreboard?
# Posted By James Morrow | 12/12/08 4:08 PM
Raul Riera's Gravatar That quiz should be titled "Are you Java ready" although a lot of question are OO related, some are Java specific.

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.
# Posted By Raul Riera | 12/12/08 5:05 PM
doug boude's Gravatar Uh, anybody else notice that the quiz is actually an advertising campaign in disguise??? You MUST have noticed this. :) Though I am calling the emperor naked, I must admit though that it's a very tasteful and palatable disguise for an ad campaign. Perfectly acceptable trade - receiving a quickie edumacation in exchange for me watching "these important commercial messages". Well done.
# Posted By doug boude | 12/12/08 5:51 PM
Hal helms's Gravatar @raul No, this is a CF quiz. My bad for not making this clear. I've revised it to make that plain.

@doug I'm shocked --shocked --you would think this, Doug! ;-)
# Posted By Hal helms | 12/12/08 6:23 PM
Rick O's Gravatar Meh. Roughly half of the questions are valid OO questions, while the other half are situation-dependent theory questions -- no one true answer anywhere but on a whiteboard.

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.
# Posted By Rick O | 12/12/08 7:07 PM
Rick O's Gravatar Dave:
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 --->
# Posted By Rick O | 12/12/08 7:23 PM
Hal helms's Gravatar @Rick: Good point about the "explicit" v. "static" typing. While most statically-typed languages are also explicitly-typed, that's not a requirement. I changed the question to reflect your correction.
# Posted By Hal helms | 12/12/08 8:05 PM
Henry Ho's Gravatar so what's your score, jedi? :)
# Posted By Henry Ho | 12/12/08 9:01 PM
Raymond Camden's Gravatar @HH: I'll share, although I didn't store it on the site. 46.9 - if I remember right. I need to take Hal's class. ;)
# Posted By Raymond Camden | 12/12/08 9:03 PM
Adam Cameron's Gravatar I got 61.2% which is round about what I'd expect: I'm lousy at remembering buzzwords, and OO really thrives on them. That's an equal indictment of myself and OO there ;-)

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
# Posted By Adam Cameron | 12/12/08 9:16 PM
Spike's Gravatar I haven't written any CF code in about 3 years, so I'm probably a bit rusty.

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.
# Posted By Spike | 12/13/08 2:19 AM
todd sharp's Gravatar I don't like to complain, but I will agree with Adam about the 'none of the above'/'pass' issue. Those are too different things, and more then once I was dissuaded from choosing that because of the 'pass' verbiage.

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 :)
# Posted By todd sharp | 12/13/08 6:44 AM
Hal helms's Gravatar I've removed the "or pass" part of the answer. I can see that it would be misleading.

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.
# Posted By Hal helms | 12/13/08 7:41 AM
Dan Sorensen's Gravatar I ran into a few "DUH, I KNEW that!" questions where I was dazzled by the choice of answers and then I hit some, "Hmm... this class would be really useful.." moments.

I really loved the explanations at the end. I'm going to try again on Monday and see if I retained any of it.
# Posted By Dan Sorensen | 12/13/08 1:03 PM
Ben Burwick's Gravatar Whew, I was worried you meant the *other* kind of football! ;)
# Posted By Ben Burwick | 12/15/08 1:48 PM
David McGuigan's Gravatar 58%. Yikes.

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.
# Posted By David McGuigan | 12/15/08 3:08 PM
David McGuigan's Gravatar Also, the abstract question is a little bit dirty. You can't specifically declare abstract CFCs in ColdFusion, so I felt weird selecting "cannot be instantiated". "Should not be instantiated when using using a CFC abstractly" or something more appropriate given the CF limitations might've made more sense.
# Posted By David McGuigan | 12/15/08 3:14 PM
Hal Helms's Gravatar Great idea about displaying all the explanations, David. And I'll look into changing the Abstract question.
# Posted By Hal Helms | 12/15/08 4:02 PM
Jaime Metcher's Gravatar Fun quiz. All my gurus scored higher than me, which is reassuring. Hell, anyone who scored higher than 85 is now my guru if they weren't before (Michael Steele, fess up - did you google any of the answers?).

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...
# Posted By Jaime Metcher | 12/15/08 9:37 PM
Hal Helms's Gravatar @jaime
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.
# Posted By Hal Helms | 12/16/08 8:18 AM
Jaime Metcher's Gravatar @Hal:

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.
# Posted By Jaime Metcher | 12/16/08 5:12 PM
Hal helms's Gravatar On the lazy loading issue, not all truth statements are transitive. All cats are animals but not all animals are cats. Lazy loading is, indeed, loading variables when they're needed, but loading variables when needed is not necessarily lazy loading.
# Posted By Hal helms | 12/16/08 5:52 PM
Mike Steele's Gravatar No I didn't google the answers. However, I had been doing a great deal of work creating some internal frameworks at my job and had been doing some research on OO design and had been following a lot of Hals discussions. I got lucky on a few, but kind of had a prep for the test so to speak.
# Posted By Mike Steele | 1/29/09 5:27 PM