Quick FAILs in code questions
Sometimes it takes very little time to know that a candidate is going to be pretty horrible. As you can probably guess, the sort of questions we ask tend to be “find me this data in this sort of file”.
Probably the fastest indication is when they send me projects like this:
Now, it is possible that someone skilled will send us real projects like that, but the experience so far has been that this isn’t going to be the case. If you have someone sending a UI project, it usually indicates that they can’t think about it in any other way.
The code they send pretty much justify this concern. Some code snippets from those projects:
Yup, this is the kind of error handling I want to see. Just for fun, if there hasn’t been an error, this function would return a comma separated string of values.
Which make it just slightly worse than:
And then we have this:
I guess someone really like O(N**2) on 15 TB files.
And then there is this:
I guess we have different definitions on what configurable means.
And then there was this person:
Yes, they did send me code inside a PDF file. That was the only way that they could find to send code around, I’m guessing.
Comments
@Ayende, This is insane, I'm lucky to say that I have never ever had candidates doing this sort of things. Sure the problem set was different and some people pulled out extremely weird things but at least the had the dignity to say "well I don't know I guess I'm not the right pick".
So all in all I had more skilled people then clueless :)
I think the next file down in the first example is also sending me warning signs.
@Oren: regarding the PDF, well... at least it wasn't a PPT :D
Does the quality of candidates have any relation to the renumeration you're offering?
What ever happened to JFHCI?
We once had a guy sending Java code (several classes) in one .docx. How do people come up with these? Needless to say the quality was not up to par :)
When reading your blog-posts, I sometimes feel like a fool. Now, I'm feeling like a boss :-)
I used to create MainForm.vb back when I was doing Winforms 10 years ago. Bring memories.
The last part, the pdf file thing. I have to point out that email filters can be highly aggressive at blocking anything that looks like software code. Many scanners even look inside zip files now at contents, sending zip files that are encrypted are another common thing intercepted. Code in the end, is text files, so delivering them in a text medium isn't that terrible.
Ollie, We pay somewhat above market rate, so no.
Chris, Yes, it is terrible. I can think of at least a dozen way to send in code. For example, a public github repository, sending them in a .not_a_zip_file_honest extension, sharing via dropbox, google drive, etc.
And, how much is the salary? In my opinion, it is good to know it. Thanks :)
Ayende how about doing some code review again? I loved your code review posts the best. I vote for this new 'reference app' - https://github.com/MarlabsInc/SocialGoal
Ok, I'll own up. What's wrong with
MainForm
naming convention? I've used it few times although I mostly used frmMain (following same convention for control names). Although I haven't done any WinForms development for few years. There's no denying, it's difficult to find good engineers. Candidates you've shown all seem like they just got into college or got out of a bad one. They're ready to cut as many corners as needed to have just one test case pass. There's no cheap way around it. Companies have to invest in employees and try to keep them when they realize their new skills can bring them more money.The problem isn't with the MainForm - the problem is that the prompt didn't necessitate any UI elements: so why include them? A console application would be more appropriate as a simple driver, with the logic of the application being contained in a class library. Bonus points for including a test class library.
Ayende says it best with this line: "If you have someone sending a UI project, it usually indicates that they can’t think about it in any other way."
If a person is asked to write some simple logic, and the first thing they go to is a WinForm template, it indicates that they perhaps don't understand the separation of code and UI framework. The logic that they use to find data within a text file should not have any dependencies on the user interface. The code should reflect, and enforce, that.
Maybe use paper and pencil instead. Thats the way I had to pass my exams :-)
You are forced to structure your programs.
I have a slight idea that once I had to embed my code in a Word document and comment it for passing an exam.
We have the same problem, I talk to other Dev Leads in the area and they all face the same problem :-(
I thought a good way to filter these people was to have a 10 minute phone interview first. It does filter the bulk of fiends but some still manage to talk big and then produce this tripe.
I wonder whether some sort of automated code scanner that reads homework is in order. Something that filters out applications that contain common calamities?
In-fact why even a Console App? I would prefer to send code with unit tests, ab easy to understand proof of what all scenarios were concerned when the code was written.
Well, I see that on Stack Overflow every day. Unfortunately, they removed the close reason "Must demonstrate minimal understanding of the situation". I hit that all the time.
@nelson, thanks, then I see the problem. I didn't know what the task was for the interviewee, so assumed problem was naming convention. Although, it's not necessarily indicator of something wrong.
@Nikola: if the prompt asks for an application that reads from a specified file, I wouldn't hardcode the file path itself into it in any way. In addition, tests are not really an "application." Of course, this depends on the prompt. If the prompt asks for a method that has a particular signature, or a certain kind of API, then a unit test project only would be appropriate. But from what I understood from the few details of the prompt posted, it seemed like it needed to be an application that can read from any arbitrary file that is in a particular format.
Sorry, that was a reply at Saurabh, not Nikola. Haven't finished my coffee yet :p
If I'm whipping up a quick-and-dirty prototype I will often create a WinForms app. Why? Because it's easier than writing a bunch of command-line parsing code that allows me to tweak settings and variables as I run through different testing scenarios. Try not being so high-and-mighty arrogant folks.
Craig, And would you send such quick & dirty code as the answer in an interview type situation? One where you have all the time in the world? Or would you clean it up before hand, knowing that this is what you are evaled on.
It's a shame you wrote this post in this manner rather than abstracting what you receive and trying to help people. Male sure you use the right project for the job, don't use bad error handling, know how to easily share solutions quickly because it might help you in interviews and definitely will help you day to day. This just comes across as "look at what I have to put up with" which I don't think you really meant.
Comment preview