<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Unboxing as a Java Interview Question</title>
	<atom:link href="http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/</link>
	<description>Programming is hard</description>
	<pubDate>Sat, 22 Nov 2008 11:32:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: stephan</title>
		<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-108839</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 12 Jun 2008 04:48:43 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-108839</guid>
		<description>@William: Good points, I'll think about them and incorporate my thoughts in my future questions.</description>
		<content:encoded><![CDATA[<p>@William: Good points, I&#8217;ll think about them and incorporate my thoughts in my future questions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William</title>
		<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-108728</link>
		<dc:creator>William</dc:creator>
		<pubDate>Wed, 11 Jun 2008 23:49:40 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-108728</guid>
		<description>I have a reasonable amount of experience setting supervision questions for undergraduates, where the goal is similar: eliciting the student's/interviewee's understanding of programming.  Generally, I've interview questions like the one you posed to be very bad questions because they are anti-cooperative.  To avoid giving away the answer, you have framed a very ambiguous first question ("what can happen") and the whole thing turns into "can you guess what I happen to want to talk about now, even though I'm trying to keep it secret?"  Many of your interviewees will assume that "do some stuff with i1" implies that the missing code is what instantiates i1 -- that is not a lack of Java knowledge, just a communication discrepancy about what your elided code intends to convey.  Some of the rest will spot the problem but still not tell you because they don't know they are being asked to find error with your code (you said "what can happen" not "what's wrong with this"), and they feel they need permission to tell the interviewer he has done something wrong.  If you just plain asked "could this give an NPE?" those same interviewees might well answer "yes, because the compiler will substitute code dereferencing i1, which could be null".

So generally, I find these questions select for "how well do you understand how artificial interview questions work?" rather than "how well do you understand the programming language".</description>
		<content:encoded><![CDATA[<p>I have a reasonable amount of experience setting supervision questions for undergraduates, where the goal is similar: eliciting the student&#8217;s/interviewee&#8217;s understanding of programming.  Generally, I&#8217;ve interview questions like the one you posed to be very bad questions because they are anti-cooperative.  To avoid giving away the answer, you have framed a very ambiguous first question (&#8221;what can happen&#8221;) and the whole thing turns into &#8220;can you guess what I happen to want to talk about now, even though I&#8217;m trying to keep it secret?&#8221;  Many of your interviewees will assume that &#8220;do some stuff with i1&#8243; implies that the missing code is what instantiates i1 &#8212; that is not a lack of Java knowledge, just a communication discrepancy about what your elided code intends to convey.  Some of the rest will spot the problem but still not tell you because they don&#8217;t know they are being asked to find error with your code (you said &#8220;what can happen&#8221; not &#8220;what&#8217;s wrong with this&#8221;), and they feel they need permission to tell the interviewer he has done something wrong.  If you just plain asked &#8220;could this give an NPE?&#8221; those same interviewees might well answer &#8220;yes, because the compiler will substitute code dereferencing i1, which could be null&#8221;.</p>
<p>So generally, I find these questions select for &#8220;how well do you understand how artificial interview questions work?&#8221; rather than &#8220;how well do you understand the programming language&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Torgny Andersson</title>
		<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-95885</link>
		<dc:creator>Torgny Andersson</dc:creator>
		<pubDate>Sun, 25 May 2008 09:51:42 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-95885</guid>
		<description>We agree yet again. :)</description>
		<content:encoded><![CDATA[<p>We agree yet again. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-95812</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sun, 25 May 2008 06:24:20 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-95812</guid>
		<description>@Togny: You're right, I forgot about Joels leaky abstractions. Yes, int should go out.</description>
		<content:encoded><![CDATA[<p>@Togny: You&#8217;re right, I forgot about Joels leaky abstractions. Yes, int should go out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Torgny Andersson</title>
		<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-95713</link>
		<dc:creator>Torgny Andersson</dc:creator>
		<pubDate>Sun, 25 May 2008 01:38:36 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-95713</guid>
		<description>Sorry, what I meant to say was that AutoUnboxingException inherits from RuntimeException.</description>
		<content:encoded><![CDATA[<p>Sorry, what I meant to say was that AutoUnboxingException inherits from RuntimeException.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Torgny Andersson</title>
		<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-95710</link>
		<dc:creator>Torgny Andersson</dc:creator>
		<pubDate>Sun, 25 May 2008 01:36:05 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-95710</guid>
		<description>The fact that int i = someIntegerObject; can throw NullPointerException is a classical example of leaking abstraction. The java people tried to make Integer behave like an int, but failed (too bad (for us)). I think that primitive types like int, double, and byte[], are more or less a bug in the language. A better approach is to treat everything equally... that is, everything is an object.

Of course, the compiles could optimize an Integer into an int if that is needed, but to a developer there should be no difference.

I totallt agree that NullPointerException shoud not be thrown when auto-unboxing fails... AutoUnboxingException (which, fo course, inherits from NullPointerExeption) is much better.

I must say that the more I use Java, the more I dislike Java as a language. On the other hand, the more I use Java, the more I like Java a platform (the JVM, and all the available tools, etc).</description>
		<content:encoded><![CDATA[<p>The fact that int i = someIntegerObject; can throw NullPointerException is a classical example of leaking abstraction. The java people tried to make Integer behave like an int, but failed (too bad (for us)). I think that primitive types like int, double, and byte[], are more or less a bug in the language. A better approach is to treat everything equally&#8230; that is, everything is an object.</p>
<p>Of course, the compiles could optimize an Integer into an int if that is needed, but to a developer there should be no difference.</p>
<p>I totallt agree that NullPointerException shoud not be thrown when auto-unboxing fails&#8230; AutoUnboxingException (which, fo course, inherits from NullPointerExeption) is much better.</p>
<p>I must say that the more I use Java, the more I dislike Java as a language. On the other hand, the more I use Java, the more I like Java a platform (the JVM, and all the available tools, etc).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-94404</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Fri, 23 May 2008 11:10:04 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-94404</guid>
		<description>"I think we simply use two different strategies to reach the same goal;)."

Think so too. We two talked about the DefaultServlet question some years ago, but I forgot. Might be good to try :-)</description>
		<content:encoded><![CDATA[<p>&#8220;I think we simply use two different strategies to reach the same goal;).&#8221;</p>
<p>Think so too. We two talked about the DefaultServlet question some years ago, but I forgot. Might be good to try :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: french_c</title>
		<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-94392</link>
		<dc:creator>french_c</dc:creator>
		<pubDate>Fri, 23 May 2008 10:26:53 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-94392</guid>
		<description>" ... So I cant’ see this as a Java question or “lower level programming skills” but more about thinking skills, communication skills, design skills and social skills."

It still remains a somewhat low-level entry point for a high level discussion. I usually prefer a top down discussion, while your question indicates a bottom up approach to me. (I might be wrong, though). 

So nowadays I start a second interview with a larger piece of code (such as the famous tomcat DefaultServlet) or a typical non-technical customer requirement. There might be a good chance we end up in a low-level discussion, but it’s up to the applicant whether we talk about requirements, software design and/or low-level implementation details.

It seems my interview strategy (that pretty much reflects our day-to-day business) makes it difficult to talk about low-level issues. And due to our business low-level focus isn’t always a plus.

I think we simply use two different strategies to reach the same goal;).</description>
		<content:encoded><![CDATA[<p>&#8221; &#8230; So I cant’ see this as a Java question or “lower level programming skills” but more about thinking skills, communication skills, design skills and social skills.&#8221;</p>
<p>It still remains a somewhat low-level entry point for a high level discussion. I usually prefer a top down discussion, while your question indicates a bottom up approach to me. (I might be wrong, though). </p>
<p>So nowadays I start a second interview with a larger piece of code (such as the famous tomcat DefaultServlet) or a typical non-technical customer requirement. There might be a good chance we end up in a low-level discussion, but it’s up to the applicant whether we talk about requirements, software design and/or low-level implementation details.</p>
<p>It seems my interview strategy (that pretty much reflects our day-to-day business) makes it difficult to talk about low-level issues. And due to our business low-level focus isn’t always a plus.</p>
<p>I think we simply use two different strategies to reach the same goal;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-93542</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 22 May 2008 07:54:57 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-93542</guid>
		<description>@french_c: Well when your development is Java-only it's usually a good idea to hire Java developers.

But beside that getting someone to know how he does error handling - in my opinion - has nothing to do with Java but with design and thinking skills -especially thinking about your co-developers who need to work with your code. So in the end perhaps it's mostly about social skills.

"[...] importance of communication [...]"

Excactly. But discussing Exception handling with me, and thinking about other developers, is about communication skills. Defending his choice, making concessions, seeing my points is all about communication.

So I cant' see this as a Java question or "lower level programming skills" but more about thinking skills, communication skills, design skills and social skills.</description>
		<content:encoded><![CDATA[<p>@french_c: Well when your development is Java-only it&#8217;s usually a good idea to hire Java developers.</p>
<p>But beside that getting someone to know how he does error handling - in my opinion - has nothing to do with Java but with design and thinking skills -especially thinking about your co-developers who need to work with your code. So in the end perhaps it&#8217;s mostly about social skills.</p>
<p>&#8220;[...] importance of communication [...]&#8221;</p>
<p>Excactly. But discussing Exception handling with me, and thinking about other developers, is about communication skills. Defending his choice, making concessions, seeing my points is all about communication.</p>
<p>So I cant&#8217; see this as a Java question or &#8220;lower level programming skills&#8221; but more about thinking skills, communication skills, design skills and social skills.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: french_c</title>
		<link>http://www.codemonkeyism.com/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-93540</link>
		<dc:creator>french_c</dc:creator>
		<pubDate>Thu, 22 May 2008 07:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2008/05/14/unboxing-as-a-java-interview-question/#comment-93540</guid>
		<description>It's not so much about being a good or bad idea. It's more about the kind of people and the kind of skill you are looking for. While I always enjoy having experienced (Java-) developers in my team I tend to believe the importance of language level knowledge is overestimated. I would even say that in most cases the importance of lower level programming skills is overestimated (especially if this is the only qualification you are interested in).

If I have to choose between someone with basic programming skills who understands the importance of communication and the importance of business requirements OR someone with (very) good programming skills who tends to avoid direct communication with their 'customers' and team members I would always choose number one. This is because I believe programming style and programming skills are more or less a team issue. Therefore it can be trained - while missing social skills (and pattern) can't. 

Of course this implies that you have at least one experienced team member who likes to teach and train (and management supports that strategy).  

So the unboxing (or better defensive design and programming) question might be a good question for your key (infrastructure) developers. And even in these cases I look for other - more important - skills first. Why? Because I believe even design philosophies depend your existing team members and require good social skills of your key architects/developers.

Disclaimer: I have to deal with typical business applications day by day. Everything I said might not apply for other types of software.</description>
		<content:encoded><![CDATA[<p>It&#8217;s not so much about being a good or bad idea. It&#8217;s more about the kind of people and the kind of skill you are looking for. While I always enjoy having experienced (Java-) developers in my team I tend to believe the importance of language level knowledge is overestimated. I would even say that in most cases the importance of lower level programming skills is overestimated (especially if this is the only qualification you are interested in).</p>
<p>If I have to choose between someone with basic programming skills who understands the importance of communication and the importance of business requirements OR someone with (very) good programming skills who tends to avoid direct communication with their &#8216;customers&#8217; and team members I would always choose number one. This is because I believe programming style and programming skills are more or less a team issue. Therefore it can be trained - while missing social skills (and pattern) can&#8217;t. </p>
<p>Of course this implies that you have at least one experienced team member who likes to teach and train (and management supports that strategy).  </p>
<p>So the unboxing (or better defensive design and programming) question might be a good question for your key (infrastructure) developers. And even in these cases I look for other - more important - skills first. Why? Because I believe even design philosophies depend your existing team members and require good social skills of your key architects/developers.</p>
<p>Disclaimer: I have to deal with typical business applications day by day. Everything I said might not apply for other types of software.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
