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.
Archived Comments
Humbling indeed.
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].
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.)
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. :)
You guys aren't posting your score on his scoreboard?
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.
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.
@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! ;-)
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.
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 --->
@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.
so what's your score, jedi? :)
@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. ;)
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
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.
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 :)
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.
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.
Whew, I was worried you meant the *other* kind of football! ;)
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.
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.
Great idea about displaying all the explanations, David. And I'll look into changing the Abstract question.
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...
@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.
@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.
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.
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.