<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Megatome &#187; interview</title>
	<atom:link href="http://www.megatome.com/tag/interview/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.megatome.com</link>
	<description>Just another idiot&#039;s ramblings</description>
	<lastBuildDate>Thu, 12 Jan 2012 00:45:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>The Phone Screen Works Both Ways</title>
		<link>http://www.megatome.com/2009/09/08/the-phone-screen-works-both-ways/</link>
		<comments>http://www.megatome.com/2009/09/08/the-phone-screen-works-both-ways/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 21:06:08 +0000</pubDate>
		<dc:creator>iamthechad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Living]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jobs]]></category>

		<guid isPermaLink="false">http://www.megatome.com/?p=74</guid>
		<description><![CDATA[A phone screen is typically used to screen applicants for a job, but it gave me enough information to make a decision about not wanting to work for the company.]]></description>
			<content:encoded><![CDATA[<p>I recently applied for a position through a recruiting service. I jumped through the requisite hoops and was told that the prospective employer was very excited to talk to me.</p>
<p>The standard procedure for this employer is to give candidates a simple phone screen before arranging an interview. Personally, I feel that having one person make a decision about whether or not I&#8217;ll &#8220;fit well with the team&#8221; after 10 minutes on the phone is ludicrous, but that&#8217;s the game I had to play.</p>
<p><a href="http://www.flickr.com/photos/nichollsphotos/2906834393/"><img src="http://farm4.static.flickr.com/3254/2906834393_e4ef4ae70e_m.jpg" alt="Tin Can Phone" style="float:right; margin: 5px"/></a></p>
<p>During the phone call, I was asked several generic questions about Java. I gave what I felt was correct answers to the questions, but the interviewer wasn&#8217;t happy with my results. Every time I answered a question, I heard &#8220;Well, I was looking for&#8230;&#8221;, with the expected answer simply being a different wording of what I had said.</p>
<p>I chalked this up to the interviewer simply being used to different terminology than I for the same concepts, so I was a bit surprised when I wasn&#8217;t called in for an in-person interview. It wasn&#8217;t until a few days later that I realized that the answers I was expected to give told me quite a bit about the company, and that I wouldn&#8217;t have been happy working there had I been offered the job.</p>
<p>The particular question that stuck in my mind was a simple one. &#8220;What are some of the benefits of the introduction of generics in Java, especially in collections?&#8221;</p>
<p>I gave the answer that pretty much anybody familiar with Java generics would give: compile-time type checking, no need for casting objects, etc. What I got from the interviewer was &#8220;Well, I was looking for the fact that you don&#8217;t have to do <code>instanceof</code> checks all over any more.&#8221;</p>
<p>On the surface, this may seem like another way of saying what I said, but it&#8217;s actually quite different.</p>
<p>Before generics, you would need to cast objects to the proper class when retrieving them from a collection. This does not mean that you would be using <code>instanceof</code> to do this. The only situation I can think of that requires using <code>instanceof</code> with a collection is if there are a lot of heterogenous objects in the collection.</p>
<p>There are limited situations where storing different object types in the same collection makes sense. Most of the time, however, this is a sign of either lazy development or not understanding the collection mechanism very well.</p>
<p>
<a href="http://www.flickr.com/photos/davesag/8519770/"><br />
<img src="http://farm1.static.flickr.com/8/8519770_e9043bc645_m.jpg" alt="More Bad Code" style="float:left;margin:5px"/></a></p>
<p>It&#8217;s generally a good idea to only put one type of object into a collection. This makes it much easier to work with and avoids any need for <code>instanceof</code> checks. By &#8220;one type of object&#8221;, I don&#8217;t mean that all of the objects need to be the exact same class. Chances are good that all of the objects being placed into a collection have some relationship; perhaps they will all implement the same interface.</p>
<p>I may have completely misinterpreted the interviewer, but I have a very strong impression that he and perhaps others on his team are used to using collections as grab bags of widely different things. Personally, I wouldn&#8217;t want to maintain that code. I can hope that the addition of generics to Java has forced the interviewer to change at least one practice for the better. I&#8217;m glad I wasn&#8217;t called in for the job &#8211; who knows how many more &#8220;well, at least it works&#8221; practices are being followed? I&#8217;ve got enough of those at my current job; I don&#8217;t need to learn a new set.</p>
<p>Images:</p>
<p>Tin Can:
<div xmlns:cc="http://creativecommons.org/ns#" about="http://www.flickr.com/photos/nichollsphotos/2906834393/"><a rel="cc:attributionURL" href="http://www.flickr.com/photos/nichollsphotos/">http://www.flickr.com/photos/nichollsphotos/</a> / <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.0/">CC BY-NC-ND 2.0</a></div>
<p>Java Code:</p>
<div xmlns:cc="http://creativecommons.org/ns#" about="http://www.flickr.com/photos/davesag/8519770/"><a rel="cc:attributionURL" href="http://www.flickr.com/photos/davesag/">http://www.flickr.com/photos/davesag/</a> / <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/">CC BY-NC-SA 2.0</a></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.megatome.com/2009/09/08/the-phone-screen-works-both-ways/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

