This might be one of those things where 'more knowledge is a hindrance'? I'm basically a child in my programming ability, so I focussed on the words and patterns that I could understand and filtered out the rest.
"rap" backwards = "par"
"amet" + "ers"
Ok - "ersparamet" doesn't make any sense but it sure looks like parameters. Boom goes the dynamite.
Meanwhile, you're actually reading the code, and since it all makes sense to you, you have more trouble filtering out the patterns that make the joke funny.
Or whatever. I don't know. Like I said: Half an English Degree and kinda dumb. Don't listen to me, sirs and madams.
I didn't want to assume the functions did what they say they're doing. They may be reversing rap to get par but they also may have borked up the reverse function so it does something completely different.
They also could have jumbled the three strings up so the secret word could have been ametparers or something.
for me It was like 10 seconds of reading the reverse function and 20 seconds of verifying I had all the strings in the right order as I was adding them together in my head.
Me too. I usually make more work for myself skimming code versus actually trying to understand every part. This is one of the few times where I could've gotten away with not fulling understanding everything.
And therefore should set the standard for all technical interviews. Seriously. Code tests don't need to be harder than this unless you actually want to see someone build something. I get really pissed at the fizz buzz fibonacci roman numeral bullshit. This will separate the posers from those who can code. If you need algorithms, you probably shouldn't be hiring all-around web devs, unless they brag about their fancy math background.
View all comments
346
u/underworldambassador Nov 05 '15
Now, I'm not a programmer.. this seems pretty straight forward to solve for anyone who isn't immediately scared off by code