Heh, job teasers are getting simpler and simpler. I remember in the late 90s they were "compile with GNU/Sun/SGI/HP toolchain, call the phone number that gets printed when you build on a big/small-endian machine".
The early ones were funky C compiler weirdnesses that exploited word size, endianness, binary format and other machine quirks. This one is practically readable.
Well you can't use it as a function. You can however combine the parsing of the "print" keyword, and the "(" and ")" taking precedence around the string to form KEYWORD STRING that looks a hell of a lot like a function call though.
I went back to find specific things for you and couldn't. The idea of "tricky" "test" is off putting. Making me jump through hoops just for the "honor" of being a possible candidate.
I appreciate the concept but it's too readable. If you're going to do something like this as an actual test, why not funkify it a little bit to challenge the candidates?
Still, great idea! Coming up next -- Job Description as an infographic!
I think they're searching hackers who like clean code and who appreciate tests. It would be strange if they wanted to recruit this kind of people by writing obfuscated code.
Also, it's more for fun then anything else. I mean, this could have been simply written on a pdf with: Django experience, >10, etc.
Yeah, truth in that. I'm needing to write a couple more like this, this is the first one. Next one will be an job description for a DB guy with interest in databases in the broadest sense. Not sure how to go about that one yet.
I like the infographic idea, any other suggestions?
Also, why are you attempting to recruit people who are interested in a subject "in the broadest sense", as opposed to people who live and breath the damn thing?
Recruiting people of marginal interest and passing familiarity sounds like a recipe for mediocrity, imo.
Maybe my bad choice of words. In the "broadest sense" I meant that we're looking for a DB person who's interested in both relational DBs as well as the complete other side of the spectrum.
Still, I think a tongue in cheek infographic could be pretty cool as a job description. True, maybe not so much for databases.
That reads like "10 years or less" rather than "10 years or more"; I'd be wary of applying to a place that can't even get that right (although maybe your first job can be fixing their ad).
Edit: Reading more closely, perhaps years_ago(10) returns the numeric year that was 10 years ago now, and 'started_programming' is an absolute year as well, in which case this test makes more sense. However, it's not intuitive to read this way...
It's weird to me that the "candidate" referenced by FoundationEngineerTestCase is the same candidate instantiated at the bottom of the file, without ever being explicitly passed into an instance of that class. I would have expected:
test_program = CandidateTestProgram(candidate)
Furthermore, how is CandidateTestProgram connected to FoundationEngineerTestCase? Does it do a global search for subclasses of unittest.TestCase, then instantiate and execute them?
Referencing the 'candidate' variable from within the test case is not a good approach as it's referencing a module global instead of an attribute. Additionally, it only exists when the module is executed directly, so if it's imported and run in a different manner a name error will result for every test that references.
As for the TestProgram, it's inheriting routines from the base class in the unittest module that do introspection to find all test fixtures.
The early ones were funky C compiler weirdnesses that exploited word size, endianness, binary format and other machine quirks. This one is practically readable.