Ask HN: Shouldn't a recent CS grad know how to throw an exception?
1. Apply (or get referred by a recruiter) with resume
2. Provide one- or two-sentence answers to some simple prescreen questions
3. Do a phone interview with member of dev team
4. Visit office for a face-to-face interview, and complete a code exercise while in office
5. Receive offer of employment
Now what has happened several times is that a candidate will do well enough on #1 and #2, talk a good game on #3, come in for #4 and totally bomb because they don't know how to throw a freakin' exception!
I am completely dumb-founded by this. How do you get through a complete CS program in college and expect me to hire you as a professional Java developer without knowing one of the basic principles of the language?
Are my expectations really that unreasonable, or do CS programs in general neglect exception handling when teaching OO?
40 comments
[ 3.1 ms ] story [ 78.4 ms ] threadLearning the specifics of a programming language some employer uses on the job is about as hard as a salesman picking up a new industry's jargon. It takes a few days, but it's nothing any capable graduate can't handle at that point. There's nothing sad about this reality.
Should I expect them to be knowledgeable of complicated concepts if they are not knowledgeable of simple concepts?
I'm sorry, I know I'm being obtuse here. I just didn't think that being able to code `throw new Exception();` in an interview for a Java developer position was too much to ask. I guess I'm wrong.
Well, why didn't they look that up before the interview? Because they didn't know that'd be the one detail out of thousands of bits of syntax and library knowledge you pick up when you do work in a certain language. The only way to pick them all up is experience -- and again -- you already know they don't have it.
If you don't want to hire college graduates for a junior developer position without work experience, then take junior off the title and bump up the pay. Add a work experience requirement. It sounds like you'll be a lot happier with that.
A developer that cannot take basic requirements and codify them into working software is not a developer. A logician, scientist, or mathematician, maybe, but not a developer. And our hiring process is designed to help distinguish the developers from the non-developers.
You can test whether someone can turn requirements into working code without testing for specific bits of trivia. Simply saying "solve this in the language you're most comfortable with" does away with that flaw in your process, while still allowing you to see whether they can code, whether they write tests, whether they think of edge/corner cases, whether they handle errors or malformed inputs, how they think about problem solving, etc.
There are plenty of companies that hire developers without finding out they hired people who can't code only after investing in them. They don't do it by adding language trivia to the interviews. If it's too difficult for you, you can outsource that part: https://www.interviewstreet.com/recruit2/
It tells you that it's trivia. There is a world of trivia surrounding any topic, and 100% of the time you will be able to nail somebody on not knowing something that's simple to learn if you just pick the right piece of trivia.
> Should I expect them to be knowledgeable of complicated concepts if they are not knowledgeable of simple concepts?
OK, so Cocoa has this OO IPC technology called Distributed Objects. It's really brain-dead simple (like four lines of code to set up), but it's pretty archaic. I have more than a decade of experience in Objective-C/Cocoa at this point and feel pretty confident saying I have a solid understanding of the language and framework — but if you asked me to write some code using Distributed Objects, I would have to go look it up. I'd have it down in a couple of minutes once I knew it was needed, but I could not produce it on the spot because you can't hold every piece of trivia in your mind all the time, and this particular bit of trivia has never been needed for the things I've done.
Focusing on the precise reason I don't know Distributed Objects is really a red herring. I was trying to give a personal example of where I could be criticized for not knowing something simple. The point is that it's simple to learn, just like the syntax for throwing exceptions. But I don't know it because my experience just hasn't taken me there yet.
Basically, what you're seeing here is just a lack of experience with real-world Java programming. It's like knowing all the cross-browser compatibility gotchas in JavaScript. Not knowing this doesn't indicate a deeper problem with their education, because the point of a computer science education is not to teach every piece of Java trivia. As they gain experience, they will easily pick up all the trivia that's relevant to their job, and the other trivia (like Distributed Objects) will remain unknown.
Google doesn't use exceptions at all, at least in C++ code (http://google-styleguide.googlecode.com/svn/trunk/cppguide.x...), so according to you, their problems don't "resemble real world professional problems"? (Whatever "real world" and "professional" means - whenever I see these terms, it's red warning lights all over for me.)
And, on that note, I would say that learning to build robust systems is important. I split my time between CS and EE at college, and in many ways the EE stuff was more useful because after a certain point it wasn't enough to create an amplifier with a few transistors - you had to design an amp that did common-mode rejection, handled noise, dealt with normal tolerances of parts, and so on.
Exceptions are a way of building robust code (not the only way). I would say I'd want that mode of thinking taught. Very, very few graduates are actually going to go on and do original research into algorithms or teach. An engineering education goes a long way in my book.
Java is not computer science. Exception handling is not computer science. "Something so simple and fundamental" yes, but again, completely unrelated to computer science.
Anyone with half a brain can learn a new language via self study. I would be royally pissed if that's what I was taught in college. I'd go back and ask for a refund.
try { doSomethingBad(); } catch(Exception e){ }
Rarely did we have to think about throwing exceptions, just capturing them.
I know I did.
So. Do you think throwing exceptions is a must have for entry-level Java development? I don't. It is not important during most simple projects (which you'd do in your curriculum), is most often ignored or rethrown, or looked up and understood in a few minutes. Aren't patterns more important? Or general ideas? Java is just another language which will become a burden (Luke COBOL). Just my thoughts...
Reading this reminded me how dependent I am on intelisense for a lot of languages. I work in C++ and Java all day every day, and if you asked me how to throw an exception in either, without sitting at a computer (where I'd remember or grope for it), I'd give the syntax for the wrong language 50% of the time.
Maybe assessing people by putting them in front of a computer with an IDE would be useful?
You're expecting specific professional experience from people that don't have any. Exception handling is not an academic topic. It doesn't help students learn about data structures, algorithms, language development, compiler theory, etc... it's just a control flow construct used by some languages and not others. It's something they'll learn on the job if their job requires it -- easily enough, I'm sure.
If you want that specific knowledge, then require a year of work experience with Java in the job listing. Graduates don't have that by default.
I did a few internships in college. I interviewed with Microsoft. They looked at my resume, code samples I gave them (in C++, Python and PHP), and ran through a phone interview where I solved some problems over the phone in pseudocode. They hired me into a product team as a C#.NET software developer with no experience in C#, .NET or Windows programming. I learned the syntax and libraries on the job and was solving bugs on the second day.
I'm pretty bad at analogies, but this is the best I've got: You want to hire a mechanic. You're a Ford dealer. You're refusing to hire young, trained and certified mechanics because they can't tell you about a specific quirk of the 2009 Ford Escape brake assembly. They weren't trained with Ford-specific knowledge, and they'd figure out the brake thing within 20 minutes of seeing it, but you're balking that these mechanics applied to a Ford dealer without that Ford knowledge.
Exceptions are not some obscure, theoretical language construct and Java exceptions aren't an arcane, experts-only part of the language. If I'm hiring for a "Jr. Java Developer", I expect them to know Java. Not every detail, not the edge cases, the really weird stuff, the 3rd party libraries, the frameworks. But they should know the core language features and syntax. If he's told me he knows Java, and I have to give him a pass on exceptions, is it cool if he can't create a derived class? Doesn't know the type system? Operator precedence? How little competence is okay?
I have an expectation that if you are applying for a "Jr. Java Developer", no matter what you did or did not learn in school, you'd better have picked up a book or cranked up Google and gotten familiar with Java. Why? Because as a programmer, that's going to be the rest of your career. Good programmers are always going to need to be learning something new, often quickly, and usually doing it on their own. If you aren't willing to do that to get the job, why would I expect you to do it once you have the job. And if you can't pick up a passing level of competence in the core language features in a couple of days of prep, then you probably don't need to be working in programming.
Unless it's Lisp. Totally cool if it takes months to wrap your brain around that.
Aside: At least in some (advanced?) compiler courses, we do teach students how to implement exception handling semantics in a compiler. This is of course very different from learning how to use exception handling facilities in a given language.
I think, "What do you know about exceptions?" is the sort of question which can indicate both. Probably makes for a more interesting interview as well.
You shouldn't expect somebody hired for an entry-level Java position to even know Java. I mean, at least if you're trying to hire somebody who'd be good, they'll have experience in other languages, and the cost of them catching up on Java is miniscule compared to the cost of them catching up with your codebase, with being a professional programmer in general, and it's certainly less than the cost of searching for somebody who's not quite as smart and talented but has better Java-specific knowledge. If you find somebody who has weak knowledge in _everything_, they might still be okay, but if you find somebody who has fairly good knowledge of other aspects of programming (be it another language, or data structures, or HTML or web programming or some protocols and such) then it's a sign that they're not dumb and are worth considering. You should be comfortable simulating how quickly they'd pick up Java when starting.
Edit: Of course, there _are_ a lot of fresh graduates who are scrubs that can't code, signed up for the video games or the money, and thought they'd just focus on grades and they just suck in general. People with general Java background knowledge who just don't know that Java has exceptions are one thing, people who mess up the exception-throwing syntax or forget about checked exceptions are another. What kind of person are they -- did they go to film school or did they go to "films"? People who went to film school will know what their professors told them to know, people who went to films might not have looked at Java specifically but will have a bunch of other knowledge about programming that they looked at outside of class.
Personally i gained more in my own time / placement however university gave me the tools and direction.
I would recommend finding grads that have completed time in industry, the difference between those that did and those that didnt shocked even myself on returning for my final year.
I *would expect to grad to be able to throw and exception and catch them tbh.