Live data from Hacker News

Ask HN: Shouldn't a recent CS grad know how to throw an exception?

news.ycombinator.com

21–30 of 41 posts

Re: Ask HN: Shouldn't a recent CS grad know how to throw an exception?

#21
The list of things a new graduate won't know is endless. What matters is what they do know, and even more what they do when they don't know.

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.

Re: Ask HN: Shouldn't a recent CS grad know how to throw an exception?

#22
post #10

Earlier quoted context omitted.

Agree, sad reality of most CS courses taught at school, the hw problems do not resemble real world professional problems.

In a good CS program, you learn how a CPU is built up from transistors to logic gates to ALUs and other components. You learn how machine code is executed on that CPU. You learn how higher level languages are compiled to those simpler instructions the CPU can understand. You learn how to write compilers and interpreters, then develop your own programming language that's compiled or interpreted by your own program, an…

So it's a simple concept that takes no time to learn, and they haven't yet learned it before showing up for an interview. Doesn't that tell me something right there?

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.

Re: Ask HN: Shouldn't a recent CS grad know how to throw an exception?

#23
post #22

Earlier quoted context omitted.

In a good CS program, you learn how a CPU is built up from transistors to logic gates to ALUs and other components. You learn how machine code is executed on that CPU. You learn how higher level languages are compiled to those simpler instructions the CPU can understand. You learn how to write compilers and interpreters, then develop your own programming language that's compiled or interpreted by your own program, an…

So it's a simple concept that takes no time to learn, and they haven't yet learned it before showing up for an interview. Doesn't that tell me something right there? 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 de…

That they don't know how to throw an exception in Java doesn't mean they don't know what an exception is and how it can be used to control program flow -- why not ask them about it? All it tells you is that they have no professional experience as a Java programmer... which you already knew before interviewing them.

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.

Re: Ask HN: Shouldn't a recent CS grad know how to throw an exception?

#24
post #7

Exceptions are not "thrown" but caused, raised at best... The way Exceptions are provided in Java are bad if you'd ask me. Anyway you should expect CS graduates with experience in Python, Ruby, C++, Java, ML, Haskell or similar languages to be able to handle exceptions. Anyway. The question remains why you even want a CS graduate to do Java? Also there are slight differences in the semantics of exceptions in aforemen…

>> ...C++ Exceptions are "thrown" without operator new...

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?

Re: Ask HN: Shouldn't a recent CS grad know how to throw an exception?

#25
It would be a good idea to make the phone screen more rigorous. Use some etherpad clone-du-jour and have them write code in the phone screen. This way you'll filter out the bozos more efficiently.

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.

Re: Ask HN: Shouldn't a recent CS grad know how to throw an exception?

#26
post #24
post #7

Exceptions are not "thrown" but caused, raised at best... The way Exceptions are provided in Java are bad if you'd ask me. Anyway you should expect CS graduates with experience in Python, Ruby, C++, Java, ML, Haskell or similar languages to be able to handle exceptions. Anyway. The question remains why you even want a CS graduate to do Java? Also there are slight differences in the semantics of exceptions in aforemen…

>> ...C++ Exceptions are "thrown" without operator new... 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…

Good point. I failed to mention that the coding exercise is done sitting at a computer with an IDE.

Re: Ask HN: Shouldn't a recent CS grad know how to throw an exception?

#27
post #8
post #3

My CS program focused strongly on OO and our core language was Java. Exceptions were a regular subject and part of assignments. It seems insane that someone could have a CS degree and not know something so simple and fundamental.

Java is not computer science

I would suggest most of us are engineers, not scientists.

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.

Re: Ask HN: Shouldn't a recent CS grad know how to throw an exception?

#28
post #22

Earlier quoted context omitted.

In a good CS program, you learn how a CPU is built up from transistors to logic gates to ALUs and other components. You learn how machine code is executed on that CPU. You learn how higher level languages are compiled to those simpler instructions the CPU can understand. You learn how to write compilers and interpreters, then develop your own programming language that's compiled or interpreted by your own program, an…

So it's a simple concept that takes no time to learn, and they haven't yet learned it before showing up for an interview. Doesn't that tell me something right there? 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 de…

> So it's a simple concept that takes no time to learn, and they haven't yet learned it before showing up for an interview. Doesn't that tell me something right there?

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.

Re: Ask HN: Shouldn't a recent CS grad know how to throw an exception?

#29

I can honestly say that in my course work I can't remember ever having to throw an exception. With that being said, I would think anyone who has done any work outside of course work should at least know how to throw an exception. I know I did.

I'm not so sure. It is not all that hard to write a moderate-sized Java program without throwing any exceptions yourself. (You'll probably need to catch an exception at some point, but throwing your own tends to fall on the "optional" side of the fence.)

Re: Ask HN: Shouldn't a recent CS grad know how to throw an exception?

#30
post #28
post #22

Earlier quoted context omitted.

So it's a simple concept that takes no time to learn, and they haven't yet learned it before showing up for an interview. Doesn't that tell me something right there? 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 de…

> So it's a simple concept that takes no time to learn, and they haven't yet learned it before showing up for an interview. Doesn't that tell me something right there? 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 t…

Are you saying that exception handling is trivial and so old that it's irrelevant to know how to do it?
Post reply on HN