Live data from Hacker News

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

news.ycombinator.com

1–10 of 41 posts

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

#1
I'm looking to hire CS grads for an entry-level Java developer position. The general hiring process is this:

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?

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

#2
Granted, I know how to throw an exception, but the large majority of my undergrad career was about solving problems that were evaluated on 'well-formed' data. It was rare for the code to need to be able to handle exceptions. Perhaps this is the culprit.

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

#6
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.

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

#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 aforementioned languages though i.e. C++ Exceptions are "thrown" without operator new but is syntactically quite similar.

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...

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

#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

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

#9
Your expectations are really that unreasonable... if you're hiring CS grads without work experience. CS degree programs are not Java developer training, and it's unlikely any kind of classwork would require throwing an exception in any language; catching one maybe. For my own anecdoctal CS program experience, I wrote more functional code than OO, and was never required to use Java in any course.

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.

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

#10

Granted, I know how to throw an exception, but the large majority of my undergrad career was about solving problems that were evaluated on 'well-formed' data. It was rare for the code to need to be able to handle exceptions. Perhaps this is the culprit.

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