<?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>devnulled &#187; Computer Science</title>
	<atom:link href="http://devnulled.com/topics/disciplines/computer-science/feed/" rel="self" type="application/rss+xml" />
	<link>http://devnulled.com</link>
	<description>devnulled provides news, tips, resources, and articles about various topics that software developers and engineers enjoy.</description>
	<lastBuildDate>Wed, 18 Aug 2010 06:20:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>The Most Efficent Way to Increment A Map Value in Java</title>
		<link>http://devnulled.com/content/2009/09/the-most-efficent-way-to-increment-a-map-value-in-java/</link>
		<comments>http://devnulled.com/content/2009/09/the-most-efficent-way-to-increment-a-map-value-in-java/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 19:47:26 +0000</pubDate>
		<dc:creator>Brandon Harper</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[Disciplines]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Tips, Hacks, & Tricks]]></category>
		<category><![CDATA[efficent]]></category>
		<category><![CDATA[increment]]></category>
		<category><![CDATA[increment value]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[value]]></category>

		<guid isPermaLink="false">http://devnulled.com/?p=768</guid>
		<description><![CDATA[Finding myself in a situation of needing to increment values in a map in Java, I was curious to see what the most efficient way to do so. Said piece of code will be looped over thousands of times and I wanted it to run as quickly possible. Yes, I know that pre-optimization is the [...]]]></description>
			<content:encoded><![CDATA[<p>Finding myself in a situation of needing to increment values in a map in Java, I was curious to see what the most efficient way to do so.  Said piece of code will be looped over thousands of times and I wanted it to run as quickly possible.  Yes, I know that pre-optimization is the root of all evil, but in this case it was something I needed to be conscious of.</p>
<p>I found a <a href="http://stackoverflow.com/questions/81346/most-efficient-way-to-increment-a-map-value-in-java">question/thread on StackOverflow</a> where someone else had already pondered the same thing and got a long list of possible answers to compare to each other, including using <a href="http://commons.apache.org/">Apache Commons</a> and the <a href="http://code.google.com/p/google-collections/">Google Collections Library</a>.   After testing all of them, the fastest way ended-up being implementing a "MutableInt" class and using it as the value data type in the map:</p>
<div class="igBar"><span id="lcode-2"><a href="#" onclick="javascript:showCodeTxt('code-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-2">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">class MutableInt <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; int value = <span style="color:#800000;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; public void inc <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> ++value; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; public int get <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> return value; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Map&lt;string ,MutableInt&gt; map = new HashMap&lt;string ,MutableInt&gt;<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">MutableInt value = map.<span style="">get</span> <span style="color:#006600; font-weight:bold;">&#40;</span>key<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">if <span style="color:#006600; font-weight:bold;">&#40;</span>value == null<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; value = new MutableInt <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; map.<span style="">put</span> <span style="color:#006600; font-weight:bold;">&#40;</span>key, value<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> else <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; value.<span style="">inc</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Pretty interesting stuff!  Note that the above code snippet is not very cleanly formatted, but you'll get the idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://devnulled.com/content/2009/09/the-most-efficent-way-to-increment-a-map-value-in-java/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Advice For Managing Your Career: 50+ Resources For Programmers &amp; Software Engineers</title>
		<link>http://devnulled.com/content/2007/11/advice-for-managing-your-career-50-resources-for-programmers-software-engineers/</link>
		<comments>http://devnulled.com/content/2007/11/advice-for-managing-your-career-50-resources-for-programmers-software-engineers/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 13:13:30 +0000</pubDate>
		<dc:creator>Brandon Harper</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Disciplines]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[Tips, Hacks, & Tricks]]></category>
		<category><![CDATA[career-advice]]></category>
		<category><![CDATA[career-management]]></category>
		<category><![CDATA[career-resources]]></category>
		<category><![CDATA[career-search]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[getting_started]]></category>
		<category><![CDATA[good_resources]]></category>
		<category><![CDATA[job_search]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[programmer]]></category>
		<category><![CDATA[programming_job]]></category>
		<category><![CDATA[resume]]></category>
		<category><![CDATA[resume-advice]]></category>
		<category><![CDATA[software-developer]]></category>
		<category><![CDATA[software-engineer]]></category>
		<category><![CDATA[software-resume]]></category>
		<category><![CDATA[software_development]]></category>
		<category><![CDATA[software_engineering]]></category>
		<category><![CDATA[writing_a_resume]]></category>

		<guid isPermaLink="false">http://devnulled.com/content/2007/11/advice-for-managing-your-career-50-resources-for-programmers-software-engineers/</guid>
		<description><![CDATA[Having came across several interesting stories within the past week or two which were all career related, it reminded me of all of the good resources I've came across over the past few years related to the craft of Software Engineering. Maybe you're just looking to get started in Software Development and aren't sure if [...]]]></description>
			<content:encoded><![CDATA[<p>Having came across several interesting stories within the past week  or two which were all career related, it reminded me of all of the good resources  I've came across over the past few years related to the craft of Software Engineering.   Maybe you're just looking to get started in Software Development  and aren't sure if it's for you, or maybe you're a manager wondering why your employees are leaving-- all of these items and more are covered here.  </p>
<p><strong>1.  Getting Started</strong></p>
<p>Not sure if you were cut-out to be writing code for the rest of your days? <img id="image705" src="http://devnulled.com/wp-content/uploads/2007/11/1074376370_bc002c4577_m.jpg" alt="Career Cat - cat reads article about how to improve his career"  style="margin: 20px" align="left" />  Are you feeling different than your peers?  <a href="http://blogs.techrepublic.com.com/programming-and-development/">Justin James</a> wrote an interesting list-- <a href="http://blogs.techrepublic.com.com/10things/?p=255">10 signs that you aren't cut-out to be a developer</a>.<br />
Now that you've decided you are genuinely interested in becoming a programmer, there are many, many ways to go about this.  If you don't have any idea what direction to head to, a good starting point is <a href="http://www.pvv.ntnu.no/~stig/where-to-start.html">Getting Started in Programming</a>.</p>
<p><strong>2.  Get Your Resume In Shape</strong></p>
<p>Resumes are yet another major thing to get right.  A resume is what can get your foot into the door into the company of your dreams, or put you in an infinite job search loop with very little feedback.  There are many opinions and guides to creating the perfect programming resume, and here a couple which I've found to be the most helpful are <a href="http://blogs.techrepublic.com.com/programming-and-development/?p=521">Writing a Resume That Will Land You a Programming Job</a> and <a href="http://blog.reindel.com/2006/09/04/resume-pitfalls-every-programmer-should-avoid">Resume Pitfalls Every Programmer Should Avoid</a>.  Most programmers are notoriously bad at presentation and should also think about <a href="http://www.lifeclever.com/give-your-resume-a-face-lift/">giving their resume a face lift</a>.  It also might not hurt to take a look at the <a href="http://marketing-jobs.theladders.com/toprecruiterkeywords?et_id=438302017">100 most searched for resume keywords</a> and add them to your resume if they match your skills and experience.</p>
<p><strong>3.  Starting your Job Search</strong></p>
<p>One of the best ways to get jobs is to reach-out and network with people you know to see what jobs they know about.  The most natural and unobtrusive way to do this is to sign-up for <a href="http://linkedin.com">LinkedIn</a> and import your address book.</p>
<p>A good way to see what sort of jobs are out there and what the market is like is to use a job aggregator and search engine like <a href="http://indeed.com">indeed.com</a>.  There are also some other sites to take a look at which it doesn't have permission to index such as <a href="http://craigslist.org">craigslist</a>.  You may also find out about jobs through local mailing lists or user groups.  You could also check into companies that you like and are interested in by going to their website and seeing if they have any open positions which fit your skills and experience.</p>
<p>There are of course many large and popular job sites which you might want to hit individually if you aren't finding what you're looking for via indeed.com-- sites like <a href="http://monster.com">Monster</a>, <a href="http://hotjobs.com">HotJobs</a>, and <a href="http://dice.com">Dice</a> are all good places to start.</p>
<p><strong>4.  Prepare For The Big Interview</strong></p>
<p>If you've been in the industry for awhile you know that what you can expect during the interview process is it being completely unexpected.  There are a wide variety of interview techniques used by companies, and none of them seem to be the same.  I think one really good overview on what to do is <a href="http://ofb.net/~niniane/interview_howto.html">Preparing for a Software Engineering Interview</a>.  While that is a good overview, you have to prepare for a very wide variety of questions.  Here are a lot of resources to prepare you for an intense Software Engineering interview process including some general interview tips as well:</p>
<ul>
<li><a href="http://paultyma.blogspot.com/2007/03/howto-pass-silicon-valley-software.html">How To Pass a Silicon Valley Software Engineering Interview</a></li>
<li><a href="http://savenseek.com/page/Microsoft_Google_Algorithm_Interview_Questions__brainDead">Google &#038; Microsoft Algorithm Questions</a></li>
<li><a href="http://bhuvans.wordpress.com/2006/08/19/50-common-interview-qa/">50 Common Interview Questions &#038; Answers</a></li>
<li><a href="http://blog.guykawasaki.com/2006/08/the_inside_scoo.html">Everything You Wanted to Know About Getting a Job in Silicon Valley But Didn't Know Who to Ask</a></li>
<li><a href="http://maxnoy.com/interviews.html">Programming Interview Questions</a></li>
<li><a href="http://dev.fyicenter.com/interview/index.html">Developer Job Interview Questions and Answers</a> - This is probably the most exhaustive list of technical questions I have ever seen! </li>
<li><a href="http://www.wisebread.com/how-to-answer-23-of-the-most-common-interview-questions">How To Answer 23 Of The Most Common Interview Questions</a></li>
<li><a href="http://www.techinterview.org/">Answers To Technical Interview Questions</a></li>
<li><a href="http://tihomir.org/crazy-questions-at-google-job-interview/">Questions At A Google Job Interview</a></li>
<li><a href="http://www.geekinterview.com/">IT Interview Open Questions Database</a></li>
<li><a href="http://computerworld.com/action/article.do?command=viewArticleBasic&#038;articleId=298362&#038;intsrc=hm_ts_head">"Why Should I Hire You?" and Other Favorite Interview Questions</a></li>
<li><a href="http://hotjobs.yahoo.com/interview/How_To_Answer_The_Toughest_Interview_Questions___2003915-1702.html?subtopic=Interview+Preparation">How To Answer The Toughest Interview Questions</a></li>
<li><a href="http://steve.yegge.googlepages.com/five-essential-phone-screen-questions">Five Essential Phone Screen Questions</a></li>
<li><a href="http://www.goodrecruits.com/2006/04/25_most_difficult_job_intervie.html">25 Most Difficult Job Interview Questions (and their answers)</a></li>
<li><a href="http://blog.reindel.com/2007/06/23/the-top-ten-questions-every-programmer-should-ask-on-a-job-interview">The Top 10 Questions Every Programmer Should Ask on a Job Interview</a></li>
</ul>
<p>Although you should be prepared for a wide variety of potential interview questions, you should also be prepared to ask plenty of questions of your own.  Bruce Eckel provides a good <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=178034">list of questions which you should ask</a> during an interview, and you should also be<a href="http://weblog.raganwald.com/2006/11/take-control-of-your-interview.html"> prepared to take some ownership</a> during the process as well.</p>
<p>You should also make sure to dress appropriately for an interview-- it is not the time to break-out your DEFCON 1999 shirt, nor should you make an unnecessary trip to your local department store for a suit. Unlike most other white-collar professions, you are actually <a href="http://blogs.msdn.com/jobsblog/archive/2004/04/01/105933.aspx">at a disadvantage if you wear a suit to an interview</a>, but you should at least take the time to clean yourself-up and look like a well adjusted adult.</p>
<p>If  you happen to be on a team trying to land a new developer and you experience great candidates turning you down over and over again.  One thing to be conscious of is <a href="http://ww.management-issues.com/2007/8/9/research/poor-interviewers-driving-away-talent.asp">how poor interviewers drive away talent</a>.</p>
<p>If you didn't get the job, it wouldn't hurt to read <a href="http://freelancefolder.com/25-reasons-you-didnt-get-the-gig/">25 Reasons You Didn't get the Gig</a> to brush-up on your interviewing and presentation skills before you give it a try again.  Or maybe it's just a sign that you're ready to <a href="http://money.cnn.com/magazines/business2/startups/index.html">start your own company</a> or <a href="http://howto.lifehack.org/wiki/Work_From_Home">do freelance work from home</a>, there are <a href="http://www.stevepavlina.com/blog/2006/07/10-reasons-you-should-never-get-a-job/">plenty of reasons you don't need a job</a>.</p>
<p><strong>5. Got The Job?  Improve Your Situation</strong></p>
<p>There are many things you should be doing to improve your career and general well being even while employed.  For one, you should always continue learning-- whether this be new languages, frameworks, or even learning more of the classic Computer Science topics in depth, don't forget to prevent yourself from becoming stale.  The one constant about technology is that it's always changing, and you will need to keep-up on your own time to stay competitive.  </p>
<p>At the same time, being the master of a particular domain is not all it's cracked-up to be-- make sure you spend plenty of time outside of programming as well for a balanced life.   I try to learn as much about as many topics as I can, and from time to time find some interesting lessons in life you can later apply to what you do.  Travel to new places, try things you normally wouldn't do, try new cuisines, and in general find ways to grow your mind.</p>
<p>Programmers aren't known to be the most extroverted, gregarious people in the world (myself included), but you should make an active effort to meet new people in your field.  Whether that be at user group meetings, conferences, chat rooms, mailing lists, message boards, etc, you'll find that having connections in the industry is a very good thing to have.  I've mentioned it before, but LinkedIn (no affiliation other than a user of their service) is a really great place to keep in touch with your network.</p>
<p>A topic that many programmers overlook is budgeting and investing-- we've all been guilty of it at one time or another!  It's easy to be wasteful when making a decent salary as many software developers do.   Here are a few resources which will help you get a handle on your money and start making it work for you by doing more with less, and investing more:</p>
<ul>
<li><a href="http://www.readersdigest.ca/mag/2004/08/money.html">15 Ways To Keep More Of Your Money</a></li>
<li><a href="http://www.getrichslowly.org/blog/2007/10/17/the-spending-plan-budgeting-for-non-budgeters/">The Spending Plan: Budgeting for Non-Budgeters</a></li>
<li><a href="http://consumerist.com/consumer/how-to/the-9-step-guide-to-budgeting-for-noobs-245303.php">9-Step Beginner's Budget</a></li>
<li><a href="http://www.getrichslowly.org/blog/2006/06/01/healthy-food-on-an-unhealthy-budget/">Healthy Food on an Unhealthy Budget</a></li>
<li><a href="http://www.iwillteachyoutoberich.com/blog/2006-makeover-step-2-budgeting-and-saving">2006 Makeover, Step #2: Budgeting and Saving</a></li>
<li><a href="http://www.gettingfinancesdone.com/blog/archives/2006/08/how-to-create-a-zero-based-budget/">How to Create a Zero-based Budget</a></li>
<li><a href="http://www.getrichslowly.org/blog/2006/05/17/budgeting-for-non-budgeters-the-60-solution/">Budgeting For Non-Budgeters</a></li>
<li><a href="http://money.cnn.com/magazine/investing/smartest/">50 Smartest Things To Do With Your Money</a></li>
<li><a href="http://money.cnn.com/galleries/2007/moneymag/0705/gallery.5000_dollars.moneymag/index.html">Where to Put $5,000 Now</a></li>
<li><a href="http://biz.yahoo.com/weekend/millionretire_1.html">How To Save $1 Million For Retirement</a></li>
<li><a href="http://www.fool.com/dbc/qa/qa03.htm">How To Invest $20, $100 and $1,000+</a></li>
<li><a href="http://www.investopedia.com/university/20_investments/">20 Investments: Introduction</a></li>
<li><a href="http://moneychimp.com/">MoneyChimp: learn Stock Market Investing, Index Funds, Valuation Models, and more.</a></li>
</ul>
<p><strong>6.  All Things Must Come To An End</strong></p>
<p>Once you've been in a job for awhile, it's pretty much inevitable that you will leave for greener pastures for a variety of reasons, or be forced to move for various reasons.  You might even find yourself alone after many of your co-workers leave via a mass exodus in which management has no control over.  If you feel that you're in a salvageable position, some links which might help you analyze what the problems are in hopes of fixing them include: </p>
<ul>
<li><a href="http://www.dumblittleman.com/2006/09/why-top-employees-quit.html">Why Top Employees Quit</a></li>
<li><a href="http://www.dumblittleman.com/2006/08/50-ways-manager-can-get-employees-to.html">50 Ways a Manager Can get Employees to Quit</a></li>
<li><a href="http://www.management-issues.com/2007/9/18/research/how-to-lose-half-your-new-recruits-within-a-year.asp">How To Lose Half of Your new Hires Within A Year</a></li>
<li><a href="http://ww.management-issues.com/2007/10/23/research/managers-fail-to-find-out-why-staff-leave.asp">Managers fail to find out why employees leave</a></li>
<li><a href="http://www.management-issues.com/2006/11/7/research/one-in-five-employees-quit-within-the-first-two-years.asp">1/5 Employees Quit Within The First Two Years</a></li>
<li><a href="http://leadershipconsulting.com/why-great-employees-quit.htm">Why Great Employees Quit, And What You Can Do To Keep Them</a></li>
<li><a href="http://www.businessknowhow.com/manage/whyquit.htm">Top 10 Reasons People Quit Their Jobs</a></li>
</ul>
<p>Perhaps you're tired of your job for various reasons and are weighing whether or not you should stay?  A couple of articles which might help you make the decision on what to do include <a href="http://ww.management-issues.com/2007/8/17/opinion/what-to-do-when-the-thrill-is-gone.asp">What To Do When the Thrill is Gone</a> and <a href="http://ww.management-issues.com/2007/10/24/advice/do-i-stay-or-do-i-go.asp">Do I Stay or Do I Go</a>.</p>
<p>Although this is quite an exhaustive list which took me quite a long time to write about and assemble, I'm sure I've missed plenty of tips or resources to pass-on. If you have any to add, be sure to leave them in the comments!  </p>
<p>Thanks to <a href="http://flickr.com/photos/mcbeth/">Flickr user McBeth</a> for the <a href="http://flickr.com/photos/mcbeth/1074376370/">perfect photo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://devnulled.com/content/2007/11/advice-for-managing-your-career-50-resources-for-programmers-software-engineers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Interesting Details About the Space Shuttle Operating System</title>
		<link>http://devnulled.com/content/2007/08/interesting-details-about-the-space-shuttle-operating-system/</link>
		<comments>http://devnulled.com/content/2007/08/interesting-details-about-the-space-shuttle-operating-system/#comments</comments>
		<pubDate>Sat, 18 Aug 2007 22:06:04 +0000</pubDate>
		<dc:creator>Brandon Harper</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Disciplines]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[Tips, Hacks, & Tricks]]></category>
		<category><![CDATA[embedded-systems]]></category>
		<category><![CDATA[operating-system]]></category>
		<category><![CDATA[redundancy]]></category>
		<category><![CDATA[space-shuttle]]></category>
		<category><![CDATA[space-shuttle-os]]></category>

		<guid isPermaLink="false">http://devnulled.com/content/2007/08/interesting-details-about-the-space-shuttle-operating-system/</guid>
		<description><![CDATA[One great thing about the blogowebs is that you never know what sorts of posts you might run across, and this post about self-modifying code and the Space Shuttle OS is a prime example of that: And it reminded me of my days during the early 1990s working as a software engineer on the Space [...]]]></description>
			<content:encoded><![CDATA[<p>One great thing about the blogowebs is that you never know what sorts of posts you might run across, and this post about <a href="http://weblog.cenriqueortiz.com/computing/2007/08/18/on-self-modifying-code-and-the-space-shuttle-os/">self-modifying code and the Space Shuttle OS</a> is a prime example of that:</p>
<blockquote cite="http://weblog.cenriqueortiz.com/computing/2007/08/18/on-self-modifying-code-and-the-space-shuttle-os/"><p>
And it reminded me of my days during the early 1990s working as a software engineer on the Space Shuttle operating system (FCOS). Many people don’t know that the Space Shuttle OS implements self-modifying code for the purpose of “fault-tolerance”. The Shuttle computer systems consist of four primary computers running the same software, and a fifth backup computer running different software that is equal in functionality. The goal is to be Fail Operational if one or more computers fail, and Fail Safe if all primary computers fail; this is called a Fail Operational/Fail Safe system.
</p></blockquote>
<p>An interesting read, especially if you're a software developer who doesn't work in embedded systems but likes to read about them.</p>
]]></content:encoded>
			<wfw:commentRss>http://devnulled.com/content/2007/08/interesting-details-about-the-space-shuttle-operating-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Good Java NIO Tutorial</title>
		<link>http://devnulled.com/content/2007/04/a-good-java-nio-tutorial/</link>
		<comments>http://devnulled.com/content/2007/04/a-good-java-nio-tutorial/#comments</comments>
		<pubDate>Tue, 10 Apr 2007 18:21:06 +0000</pubDate>
		<dc:creator>Brandon Harper</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Disciplines]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Tips, Hacks, & Tricks]]></category>
		<category><![CDATA[io]]></category>
		<category><![CDATA[nio]]></category>
		<category><![CDATA[non-blocking]]></category>
		<category><![CDATA[non-blocking-io]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://devnulled.com/content/2007/04/a-good-java-nio-tutorial/</guid>
		<description><![CDATA[One of the newer features of Java as of 1.4 is non-blocking IO, yet it's very hard to find decent documentation about it or even a simple tutorial. NIO is a very powerful feature but easy to get wrong given it's complexity. However, James Greenfield, an engineer for Amazon, recently announced that he'd put up [...]]]></description>
			<content:encoded><![CDATA[<p>One of the newer features of Java as of 1.4 is <a href="http://en.wikipedia.org/wiki/Asynchronous_I/O">non-blocking IO</a>, yet it's very hard to find decent documentation about it or even a simple tutorial.  <a href="http://java.sun.com/j2se/1.4.2/docs/guide/nio/">NIO</a> is a very powerful feature but easy to get wrong given it's complexity.  However, James Greenfield, an engineer for Amazon, <a href="http://javablog.co.uk/2007/03/29/a-practical-introduction-to-nio/">recently announced</a> that he'd put up a <a href="http://rox-xmlrpc.sourceforge.net/niotut/index.html">tutorial for NIO</a>, including a lot of important details of using NIO with SSL.</p>
]]></content:encoded>
			<wfw:commentRss>http://devnulled.com/content/2007/04/a-good-java-nio-tutorial/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tomcat 6 Surpasses 16,000 Simultaneous Connections</title>
		<link>http://devnulled.com/content/2007/04/tomcat-6-surpasses-16000-simultaneous-connections/</link>
		<comments>http://devnulled.com/content/2007/04/tomcat-6-surpasses-16000-simultaneous-connections/#comments</comments>
		<pubDate>Thu, 05 Apr 2007 17:41:11 +0000</pubDate>
		<dc:creator>Brandon Harper</dc:creator>
				<category><![CDATA[A Day In The Life Of]]></category>
		<category><![CDATA[Apache Tomcat]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Disciplines]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[Tips, Hacks, & Tricks]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[glassfish]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[load-testing]]></category>
		<category><![CDATA[nio]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://devnulled.com/content/2007/04/tomcat-6-surpasses-16000-simultaneous-connections/</guid>
		<description><![CDATA[Fillp Hanik recently posted a blog entry about a load test comparison he did using Glassfish, Jetty, and Tomcat 6 using the new NIO (non-blocking io) connectors in which Tomcat 6 was able to handle 16,000 connections. As always load tests should always be taken with a grain of salt, but it certainly did produce [...]]]></description>
			<content:encoded><![CDATA[<p>Fillp Hanik recently posted a blog entry about a <a href="http://blog.covalent.net/roller/covalent/entry/20070308">load test comparison</a> he did using <a href="https://glassfish.dev.java.net/">Glassfish</a>, <a href="http://www.mortbay.org/">Jetty</a>, and <a href="http://tomcat.apache.org/">Tomcat 6</a> using the new <a href="http://people.apache.org/%7Efhanik/http.html#Connector%20Comparison">NIO (non-blocking io) connectors</a> in which Tomcat 6 was able to handle 16,000 connections.  As always load tests should always be taken with a grain of salt, but it certainly did produce some interesting results (especially when compared to other servlet containers).  </p>
<p>I've been working on a sizable project at work that uses <a href="http://java.sun.com/j2se/1.4.2/docs/guide/nio/">NIO</a> under the hood, but luckily I'm using a 3rd party library which provides the network connectivity for me.  It seems that NIO is very hard to implement correctly, but if you can, the performance advantages are definitely worth the effort.  I'm only a few days away from starting to do some load testing on my work, so I'll be interested in seeing the performance improvement over the section of code I'm replacing which uses standard IO (not to mention the various synchronization and thread consumption problems I'll be fixing).</p>
<p>Being able to quickly handle a large number of concurrent connections is definitely a requirement for today's AJAX applications, and it's good to see an NIO based connector from someone other than Jetty.</p>
]]></content:encoded>
			<wfw:commentRss>http://devnulled.com/content/2007/04/tomcat-6-surpasses-16000-simultaneous-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Correcting Logical Fallacies: Why Java Is Not Slow</title>
		<link>http://devnulled.com/content/2007/02/correcting-logical-fallacies-why-java-is-not-slow/</link>
		<comments>http://devnulled.com/content/2007/02/correcting-logical-fallacies-why-java-is-not-slow/#comments</comments>
		<pubDate>Thu, 08 Feb 2007 18:49:51 +0000</pubDate>
		<dc:creator>Brandon Harper</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Disciplines]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[fallacies]]></category>
		<category><![CDATA[hotspot]]></category>
		<category><![CDATA[jit]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://devnulled.com/content/2007/02/correcting-logical-fallacies-why-java-is-not-slow/</guid>
		<description><![CDATA[Not to directly pick on Peter Bell at all (he's a very smart guy and I really enjoy his blog, so this is nothing personal at all), I just noticed something he mentioned in a recent comment on a blog entry and felt that it was something I should address in a blog post rather [...]]]></description>
			<content:encoded><![CDATA[<p>Not to directly pick on <a href="http://pbell.com/">Peter Bell</a> at all (he's a very smart guy and I really enjoy his blog, so this is nothing personal at all), I just noticed something <a href="http://www.boyzoid.com/blog/index.cfm/2007/2/7/Premature-Optimization--What-is-it-and-why-does-it-sound-bad">he mentioned in a recent comment on a blog entry</a> and felt that it was something I should address in a blog post rather than a comment.  Also, writing this entry gives me a good reference point later to send to people when they present the same talking point to me.</p>
<p>Anyhow, here is the comment that Peter made which inspired this blog entry (which in context, is a quip):</p>
<blockquote><p>
I also have to question why you'd even consider using CF for a performance critical app - even Java is a little sluggish. If you want bare metal performance and think your time is worth less than the cost of a server, go for it and write the darn app in C++!
</p></blockquote>
<p>I wanted to point out and correct a common fallacy that I see repeated over and over again are statements rooted in comments like "If you need speed, you could convert your Java application to C or C++".  I don't claim to be a Java expert by any means, but I do think I have a good enough understanding of the Java platform as well as basic operating systems &#038; compiler theory and the like to explain why this is a false argument. The answer is actually more along the lines of "it depends on what you are doing", and I'll explain why.</p>
<p>It's very easy to see where this misconception started-- pretty much every software developer or system administrator has encountered a slow Swing/AWT based Java application which took forever to start, and generally seemed pretty sluggish.  Not to mention it probably looked terrible. One of the best Java based desktop applications, <a href="http://eclipse.org">Eclipse</a>, even takes awhile to start.  On the contrary, C++ desktop applications typically start very quickly, and are very responsive to user input.  Generally speaking the symptoms of running a Java desktop application match the reality-- C++ is almost always faster for short running programs such as desktop applications.</p>
<p>Another common assumption is that it would seem that the <a href="http://en.wikipedia.org/wiki/Java_Virtual_Machine">JVM</a> itself is an abstraction above machine level code because it acts as an interpreter, and that C/C++ will always be faster because the resulting compiled code is "closer to the hardware" which is also false.  In the early days of Java, the JVM did in fact interpret code, but eventually it started using a <a href="http://en.wikipedia.org/wiki/Just-in-time_compiler">Just In Time compiler</a> in Java 1.2 to compile the code down to the machine level.  Different implementations of the JVM use various JIT compilers, but the Sun JVM uses the <a href="http://en.wikipedia.org/wiki/HotSpot">HotSpot JIT</a>.   Not only are Java programs compiled down to machine specific code, but the longer a program runs, the better it gets optimized.</p>
<p>The HotSpot compiler monitors and analyzes an applications performance over time, and uses adaptive optimization to eliminate bottlenecks in the machine code, known as "hotspots".  It essentially looks for pieces of code that are ran time and time again, and marks them for optimization.  Those pieces of code are then recompiled again into machine specific code for performance.  This allows for ongoing performance enhancements that you would never get from machine code produced by a C or C++ compiler such as <a href="http://en.wikipedia.org/wiki/Branch_prediction">branch prediction</a> hints.</p>
<p>All of these things are not just unfounded theory, there have been several independent studies about this including <a href="http://www.idiom.com/~zilla/Computer/javaCbenchmark.html">this one by the University of Southern California</a>.  </p>
<blockquote><p>
Java is now nearly equal to (or faster than) C++ on low-level and numeric benchmarks. This should not be surprising: Java is a compiled language (albeit JIT compiled).
</p></blockquote>
<p>This study is several years old now and doesn't include testing against the many performance enhancements which were made available in the 1.5 JVM, so I'd be interested in seeing an updated study.</p>
<p>That said, Java is probably much faster than you think.  One way I've seen the Hotspot compiler in action (and you can try at home) is when working on a simple "Hello World" JSP and keeping track of it's execution time.  Typically on the initial run or two, the JSP page is pretty quick, but then after a few calls of the page the Hotspot compiler kicks in and makes it wicked fast so that it's execution time is effectively nil.</p>
<p>Now that we've spoke to the "Java Is Slow" audience, we should cover the answer to the earlier question of "Is Java slower than C/C++?".  This is more of an "it depends" answer. Generally speaking C++ has the advantage in short running applications, and Java is as fast if not faster than C/C++ in long running applications such as servers, web applications, etc.  It also might surprise you to know that Java is also very good in real time systems, but that is another blog post of its own.</p>
]]></content:encoded>
			<wfw:commentRss>http://devnulled.com/content/2007/02/correcting-logical-fallacies-why-java-is-not-slow/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->