72 points · by traverseda · 10y ago · 77 comments
In all seriousness: this is a really cool article, thanks for sharing! I'm not very familiar with RPython or RPLY and it was really cool to see a "real-world" example of it. I actually just read through something similar in JavaScript (https://github.com/thejameskyle/the-super-tiny-compiler). I really should give language implementation a shot one of these days (closest I've come is writing a JSON lexer & parser); always like to read about it!
https://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_...
Nah, those articles tend to fizz out
Jeff Atwood on the other hand thinks it's a great way to filter out "developers" who can't program their way out of a wet paper bag:
One young person showed up with a resume listing about 10 programming languages. I simply went through the 10 and asked her how to write a comment for each language. We didn't have to go far before she admitted that she really only knew Pascal very well.
To be fair, there were a lot of people that would have made good employees be didn't happen to quite fit the job we were trying to fill at the moment. The matching process often involved a significant degree of luck and I sure that I missed out on many people I should have hired.
The side of hiring I find interesting is more on the behavioral side - many employers don't find enough ways to screen candidates on those grounds, and it is interesting the ways you find candidates filtering themselves out there if you ask the right questions.
> The goal is to sufficiently intimidate junior developers so they will know to steer clear of your organization.
We use fizzbuzz on senior devs claiming to be C++ experts and they stumble on it regularly.
I'm regularly intimidated by positions looking for capital s Senior C++ developers, because no matter how deep my knowledge goes, memory model, templates substitution rules and all, I realize there's dragons lurking behind every corner. Now, C is a language that fits in my head, C++ … not so much, but maybe that's because it is not part of my daily routine.
I'd suggest you look for _productive C++ developers_ that know their limitations. I think you might even get better candidates that way.
It sounds like they are. The "expert" is a self described one.
They were just way too good at playing the game and it took us way too long to get rid of the person - fired, not just dumped.
This outcome can be evidence of either condition:
1. There are a lot of expert developers who are actually not experts
2. The test is giving false negatives
Which do you think it is?
"No programming test these days is valid without full access to Google."
This is the opposite to conventional wisdom which says that programming tests must be done in an isolated environment without access to the web "please deposit your mobile phone at the testing room door".
No programming is done in isolation so the only way to effectively and realistically test someone is to see what results they get in a real world environment, which means full web access.
Don't get me wrong - I am very much against the idea that "I don't need to understand fundamentals cause I can Google everything" - only the misguided think that. What I do think is that recruiting needs to be about measuring real world results - that means full access to Google and StackOverflow.
THE most critical skill that is almost NEVER meaured - and in fact is generally avoided measuring - is the programmers skills in Googling to solve unfamiliar problems. The best programmers ride Google and StackOverflow like racehorse jockeys ride the ponies.
When I have asked interviewees to do anything on a whiteboard I've generally said 'pseudo-code is fine or whatever language your comfortable in or even diagram it'. What I'm looking for is an awareness of high-level concepts and ideas. People may not google for something if they don't know to google for it.
Note that I said Fizzbuzz, not an actual in-depth programming question.
FizzBuzz (and similar) questions tell me nothing whatsoever about your programming ability, but they can tell me everything about your lack of it.
In the limited time I want to spend interviewing, an hour on FizzBuzz is a massive waste of everyone's time.
I agree entirely that it doesn't prove anything about a candidate's likely success as a hire, but it is a reasonably strong signal about their likely failure.
When I experienced FizzBuzz as a candidate I was coding onto a projected screen, and the test involved writing unit tests and doing a final refactoring step into something "reusable". It took the best part of an hour. The instructions themselves required a good 5-10 minutes of reading/parsing to understand exactly what was expected of you.
If it takes a candidate an hour, something is wrong.
How could it possibly take an hour to write fizzbuzz for anyone of reasonable ability?
It forces the employer to create a test that is more real world and thus is a closer reflection of the actual work being done at that company.
Unless of course your company is doing alot of real world fizzbuzz.
FizzBuzz is not designed as a test of real-world programming skills; rather, it is a deliberately easy test to ensure that a candidate can solve an elementary programming problem from scratch.
The idea being, that somebody that can not solve a trivial problem is in no shape to tackle a harder problem.
Many companies overthink this. They add TDD, or try and test if a candidate can implement Dijkstra's Shortest-Path Algorithm, or any number of other complications.
But that all misses the point of what FizzBuzz does.
FizzBuzz is a first-stage filter, and exists only to screen out copy-pasta programmers that, while their resumes might look good on paper, can't actually code.
There are a lot of those programmers out there, even today.
FizzBuzz should take a candidate no more than five minutes in a language they are familiar with. It really should be that level of simple.
After FizzBuzz is when you can dive into the real-world problems, because the candidate has demonstrated that they can write code.
Now, admittedly, I have moved past FizzBuzz, and now prefer doing a simple pairing exercise over-the-phone, but FizzBuzz is still a useful tool in the interviewing toolbox for companies that don't use pair programming.
If you do use FizzBuzz, I do recommend changing it up. Don't just copy Atwood's FizzBuzz problem. Change the numbers, mix the conditionals around, that sort of thing. But keep it just as simple.
There is plenty of room for more open tests, but fizzbuzz doesn't require it.
from jobinterviews import fizzbuzz, redblacktree, irrelevanttheoreticaltest
fizzbuzz()
redblacktree()
irrelevanttheoreticaltest() all-1b4059b…-46d74bf1.js:5 Uncaught TypeError: Cannot read property 'length' of null* of 105 print 'buzzfizzfuzz' * of 35 print 'buzzfuzz' * of 21 print 'fuzzfizz' * of 15 print 'fizzbuzz' * of 7 print 'fuzz' * of 5 print 'buzz' * of 3 print 'fizz'
welp
(1..100).each{|n| p "#{'fizz' if n%3==0}#{'buzz' if n%5==0}"}
Fizzbuzz is one of those problems where there's really no clever hidden golfy solution better than the plain old first-reaction naive approach: an iteration with if/elsif/elsif/else.
There is if you exploit that monoid homomorphisms exist from any monoidal type to both the Optional and Function types.
My favourite solution is this:
let (m ~> str) x = str <$ guard (x `mod` m == 0)
in map (fromMaybe . show <*> 3 ~> "fizz" <> 5 ~> "buzz") [1..100]
This is extensible because you can stick as many rules as you want in there, or even factor them out and make it a function (m ~> str) x = str <$ guard (x `mod` m == 0)
fizzbuzz rules = map (fromMaybe . show <*> mconcat rules)
fizzbuzz [3 ~> "fizz", 5 ~> "buzz", 7 ~> "bazz"] [1..100]There are. With a funky calculation.
For example, taken from Rosetta C version:
for (int i=0;++i<101;puts("")) {
char f[] = "FizzBuzz%d";
f[8-i%5&12]=0;
printf (f+(-i%3&4+f[8]/8), i);
}
You might say the calculations are hidden if/else, but well...For me it's not about getting it 100% correct, its about showing that you can do basic programming and know how computers work, followed by the simple breaking down of a concept into a program.
The rest I consider details. Even if you implemented it 100%, its so simple that it doesn't nearly guarantee that you will do the same for a large program. And if you don't get it 100% correct, as long as you roughly indicate some fields where you're going to test for issues I'd be more than happy about it. Thereafter the human factor/generics, for example did it take you 30 minutes to think this up or was it pretty much rapid-fire? How learned of a response is programming to you?
But as to your question; people don't really like being showed up, but that works well for filtering for you as well. If he hated it then it might very well not be a place/person you want to work with.