Broken Perl Quiz

davorg on 2005-06-15T12:33:51

Either I don't know as much Perl as I think I do or this quiz is pretty broken.

As far as I can see, at least one of the questions has no right answer.


wow

rjbs on 2005-06-15T13:06:33

The questions are not all entirely asinine, although the "correct" answers indicate some confusion on the part of the testers. More horrible, though, is that flash intro...

I found two without answers

lbr on 2005-06-15T13:28:04

$p = [ { a => 1, b => 2, c => 3 }, “ant”, “bat”, “cat” ];
Which of the following expression gives the value cat ?
$p[3]
$p->{c}
$p->[4]
$p->{bat}

$p->[3] would be correct, and

%x = qw(C Ritchie Perl wall C++ Stroustrup); print @x{C, C++}

Error : should use % instead of @ in print function
Displays Stroustrup
Displays Ritchie
Displays Ritchie Stroustrup

This doesn't compile, but of course, they didn't use " in a bunch of the other questions either.

Reminded me of the brainbench test - mostly using obscure perl4-isms, which is only relevant today if you get the unenviable task of maintaining some nasty code.

You forgot pseudo-hashes

runrig on 2005-06-15T13:44:04

$p->{c} is correct.

Re:I found two without answers

davorg on 2005-06-15T13:45:32

$p = [ { a => 1, b => 2, c => 3 }, “ant”, “bat”, “cat” ];
Which of the following expression gives the value cat ?
$p[3]
$p->{c}
$p->[4]
$p->{bat}

$p->[3] would be correct, and

I think you're forgetting about pseudo-hashes (but, of course, everyone should be forgetting about pseudo-hashes!)

%x = qw(C Ritchie Perl wall C++ Stroustrup); print @x{C, C++}

Error : should use % instead of @ in print function
Displays Stroustrup
Displays Ritchie
Displays Ritchie Stroustrup

This doesn't compile, but of course, they didn't use " in a bunch of the other questions either.

And even if you put quotes on print @x{'C', 'C++'} it prints "RitchieStroustrup", not "Ritchie Stroustrup".

But neither of those were the problem I was thinking of.

Re:I found two without answers

lbr on 2005-06-15T13:59:14

I think you're forgetting about pseudo-hashes (but, of course, everyone should be forgetting about pseudo-hashes!)

Ah, never bothered to actually learn about pseudo-hashes. Mark one up for laziness!

Re:I found two without answers

yDNA Barak on 2005-06-15T13:50:15

Maybe hiring someone to maintain some nasty code is exactly what they're going after. Of course, that doesn't jive with their claim of looking for the best Perl hackers. And why on earth would anyone put up a test like this claiming to be looking for the best-of-the-best? I know a few places I could go where I couldn't throw a rock without hitting one. And that Flash intro was just horrid. It must have been written by the winner of their test to find the world's best Flash composer.

Re:I found two without answers

merlyn on 2005-06-25T11:39:40

Maybe hiring someone to maintain some nasty code is exactly what they're going after.
I don't think so. I've been in touch with them, and even corrected 10 of their questions with various levels of LART application. They fully believed (a) their questions were satisfactory, albeit hard and (b) they weren't trying to trick anyone with impossible questions.

I presume they've updated the quiz by now, but I haven't had time to go back to check.

Very broken

ChrisDolan on 2005-06-15T13:38:57

The quiz is dumb. Most of them can be answered with perl -e. The broken questions:

1) None of the above. The answer is "\n", unless strict is on.

6) None of the above. The answer is $p->[3] or $$p[3].

11) Both b and c are right answers

14) None of the above. The answer is "\n" because "perl\n" is not equal to "perl"

15) Syntax error: Can't modify constant item in postincrement (++) at -e line 1, near "C++"

Re:Very broken

davorg on 2005-06-15T13:47:27

Those questions numbers don't help. I think the questions some out in random order each time.

Re:Very broken

Ovid on 2005-06-15T14:30:59

They randomize the question order every time you take it.

Re:Very broken

bart on 2005-06-25T10:24:49

The quiz is dumb. Most of them can be answered with perl -e.
But not in the allotted time!

Consider the source

wickline on 2005-06-16T01:32:55

The chosen ones can expect:
  • An offer letter from the worldwide leader in marketing automation technologies
  • A surprising (make that stunning) pay packet, benefits and possible stock options
  • A superlative work environment
Translation:
  • An offer letter from the worldwide leader in spamming
  • make millions selling our list of email addresses
  • while working in your spare time from home

The quiz sucks because the author sucks because only somone sucky would work for a spammer.

Camel alert

runrig on 2005-06-16T04:49:43

I wonder if they got permission from O'Reilly to use the camel (the bouncing camel on the "Perl Trivia" tab).

job offer!

lbr on 2005-06-17T11:30:35

Hah, got a mail from them now - because of my "excellent performance in the quiz", they want to offer me a "Hot Perl Job in Bangalore". Of course this offer was sent with 11 visible adresses in the To-field.

It's an interesting way to hire people, but maybe saying upfront that the job's in India would be smart ;-)

Email in full:

Dear Friend,

Thank you for taking on the Perplexer at www.hiddenPerl.com. We would like to congratulate you on your excellent performance in the quiz.

hiddenPerl is an attempt by a world leader in marketing automation (we would like to keep the name of the company secret, for now) to hire best-of-breed Perl / Open Source programmers. A sneak peak of the type of work involved has been provided in the hiddenPerl website.

Please let us know your interest in this Hot Perl Job in Bangalore.

If interested, please:

  • Send us your latest resume highlighting your Perl / Open Source skills
  • Let us know the day/time that you think is convenient for us to call you for an interview

We look forward to hearing from you.

Thanks and regards.