<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Javatron's Weblog</title>
	<atom:link href="http://javatron.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://javatron.wordpress.com</link>
	<description>Hello world!</description>
	<lastBuildDate>Thu, 06 Aug 2009 16:08:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='javatron.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Javatron's Weblog</title>
		<link>http://javatron.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://javatron.wordpress.com/osd.xml" title="Javatron&#039;s Weblog" />
	<atom:link rel='hub' href='http://javatron.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Emperor’s New Code (a Story)</title>
		<link>http://javatron.wordpress.com/2009/08/06/emperor%e2%80%99s-new-code-a-story/</link>
		<comments>http://javatron.wordpress.com/2009/08/06/emperor%e2%80%99s-new-code-a-story/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 16:08:36 +0000</pubDate>
		<dc:creator>javatron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javatron.wordpress.com/?p=27</guid>
		<description><![CDATA[Emperor’s New Code (a Story) Once upon a time there lived a project manager (named, curiously enough, Fred Emperor) whose only worry in life was to keep up with the latest trends in development techniques. He changed methodology almost every project and loved to show off his knowledge to management. Word of Emperor’s habits spread [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=27&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Emperor’s New Code (a Story)</p>
<p>Once upon a time there<br />
lived a project manager (named, curiously enough, Fred Emperor) whose<br />
only worry in life was to keep up with the latest trends in development<br />
techniques. He changed methodology almost every project and loved to<br />
show off his knowledge to management.</p>
<p>Word of Emperor’s habits spread over his department and<br />
beyond into Internet newsgroups. Two gurus who had heard of the project<br />
manager’s fashion consciousness decided to take advantage of it. They<br />
introduced themselves via e-mail with a scheme in mind.</p>
<p>“We are a pair of very good programmers, and after many<br />
years of research we have invented an extraordinary development process<br />
of such agility that the cost of changing requirements has been reduced<br />
nearly to zero. As a matter of fact, we have flattened out the famous<br />
cost-to-fix- defect exponential curve that Barry Boehm presented in Software<br />
Engineering Economics!” they wrote.</p>
<p>One of Emperor’s programmers heard the gurus’ strange<br />
story and notified Emperor, whose curiosity got the better of him. He<br />
decided to see the two scoundrels.</p>
<p>“Besides reducing the cost of changing requirements,<br />
sir, we’ve eliminated the need for up-front design (this is such a<br />
silly concept with our new method that we call it BDUF, short for ‘Big<br />
Design Up Front’) and, of course, your programmers will never have to<br />
waste any time documenting their work, for all the code is<br />
self-documenting. One important thing, though: You must be aware that<br />
closed-minded people on your staff might tell you that this approach<br />
can’t possibly work. Always remember that this is a sure sign that<br />
these people are afraid, and do not take these fearful opinions<br />
seriously. In fact, you’d be better off getting rid of these cowards,”<br />
the two gurus informed Emperor.</p>
<p>Emperor gave the two men a contract to build a payroll<br />
system in exchange for their promise to begin working on the project<br />
immediately. “Tell us what you need to get started and we’ll give it to<br />
you. Just remember, the payroll system must be done in 4 years before<br />
our mainframes drop dead,” said Emperor.</p>
<p>The two gurus asked for a big room with lots of<br />
computers running Smalltalk and a large stack of index cards, and then<br />
began working. They also asked for a full-time “customer,” who they<br />
called a “goal donor,” to live in the room with the Smalltalk<br />
programmers. The project manager looked around and, finding all of his<br />
key employees busy, he grabbed the first person he could find hanging<br />
around near the coffee machine and tossed him in the room with the<br />
programmers.</p>
<p>Emperor thought he had spent his money quite well—in addition to getting<br />
a new project completed that he could feel forever free to change the<br />
requirements of at any time, he would discover which of his programmers<br />
could churn out the most code in the shortest time, and which of his<br />
programmers were cowardly dogs, so he could get rid of them. A few days<br />
later, he called the old and wise chief technical officer (CTO), who<br />
was considered by everyone to be a man with common sense. “Go and see<br />
how the work is proceeding,” Emperor told the CTO, “and come back to<br />
let me know.”</p>
<p>The CTO was welcomed by the two gurus. “We’ve built and<br />
tested the system 17 times since Tuesday,” they said. “We’re almost<br />
finished, but we need a few more cases of Pepsi, more computers to run<br />
our regression test suites on, some chocolate-chip cookies (coding is<br />
hungry work, indeed), and special desks with two chairs, for we always<br />
program in pairs to compensate for not doing any up-front design. We’ve<br />
made extra certain to turn a blind eye toward future requirements and<br />
only to build what we need today. Here, Excellency! Admire the test<br />
scores—feel the agility of the process!”</p>
<p>The CTO bent over the stack of index cards and tried to<br />
see the architecture that was not there. He felt cold sweat on his<br />
forehead.</p>
<p>“I can’t see any architecture,” he thought. “If I see<br />
nothing, that means I’m stupid! Or worse, incompetent!” If the CTO<br />
admitted that he didn’t see anything, Emperor might claim he was<br />
incompetent and try to take his job.<br />
“What a marvelous architecture,” he said. “I’ll<br />
certainly tell Mr. Emperor.” The two gurus rubbed their hands<br />
gleefully. They had almost made it. More Pepsi, 18 bags of potato<br />
chips, and a couple of ping-pong tables were requested to finish the<br />
work.</p>
<p>Finally, Emperor received the announcement that the two<br />
gurus had the payroll system up and running. They came to Emperor’s<br />
office to demonstrate it for him.</p>
<p>“Come in,” said Emperor. Even as they bowed, the two<br />
gurus pretended that their system, which had been designed to<br />
DoTheSimplestThingT hatCouldPossibly Work and could thus only pay a small<br />
percentage of the employees, would scale to handle all of the<br />
requirements.</p>
<p>“Here it is, Mr. Emperor, the result of our labor,” the<br />
gurus said. “We have worked night and day (well, actually we knock off<br />
at 5:00 PM every day because we want to stay fresh) but, at last, the<br />
most agile process in the world is ready for you. Smell the code and<br />
experience how fine it is.”</p>
<p>Of course, Emperor did not smell anything except a<br />
faint odor of bubble gum and Scotch tape, and he could not see any<br />
architecture between his fingers. He panicked and felt like fainting.<br />
Luckily, his chair was right behind him, so he sat down. But when he<br />
realized that no one could know that he did not see the architecture,<br />
he felt better. Nobody could find out he was stupid and incompetent.<br />
And Emperor didn’t know that everybody else around him thought and did<br />
the very same thing.</p>
<p>The farce continued as the two gurus had foreseen it.<br />
“Mr. Emperor, you’ll have to give us an open-ended variable-scope<br />
contract in order for us to complete the payroll system,” the two gurus<br />
said. “Our new process doesn’t operate well with fixed schedules or<br />
budgets—fixed schedules give the code a funny smell.” Emperor was<br />
annoyed, as he usually only used fixed-price contracts, but because<br />
none of his bystanders seemed upset, he felt relieved.</p>
<p>“Yes, this is a beautiful process and it feels very<br />
agile to me,” Emperor said, trying to look comfortable. “You’ve done a<br />
fine job.”</p>
<p>The two gurus immediately started approaching publishing companies about<br />
getting book contracts to popularize their new process.</p>
<p>“Mr. Emperor,” they said, “we have a request for you.<br />
The people have found out about this extraordinary process and they are<br />
anxious to learn more about it. Might we have permission to publish a<br />
dozen or so books about our process that reference the work we’ve done<br />
for you?” Emperor was doubtful about showing the details of his project<br />
to the people, but then he abandoned his fears. After all, no one would<br />
know about it except the ignorant and the incompetent.</p>
<p>“All right,” he said. “I will grant the people this<br />
privilege.” Book contracts were signed, magazine articles were written,<br />
and user conferences were scheduled in Italy. The gurus’ process was<br />
given great credibility based on the claims of success on Emperor’s<br />
project. Magazine editors and conference coordinators anxiously<br />
scrutinized the ideas of the programmers across the industry. Everyone<br />
wanted to know how stupid or incompetent his or her neighbor was but,<br />
as the details of Emperor’s project were revealed, a strange murmur<br />
rose from the crowd.</p>
<p>Alas, the goal donor whom Emperor had found by the<br />
coffee machine turned out to be a new hire, right out of school, who<br />
really didn’t understand the requirements of the payroll system and<br />
completely missed the point that the mainframes were going to die in 4<br />
years’ time. Encouraged by the gurus that changing requirements was no<br />
problem due to the variable-scope contract they had received, the<br />
project continued to consume soda, chips, and cookies for several years<br />
while they were refactoring code, without actually progressing toward<br />
completion. The two gurus assured the goal donor that this was no<br />
problem, because SoftwareIsNeverDone . And ultimately Emperor had to<br />
cancel the project, unfinished, which he did as soon as he realized<br />
that his mainframe didn’t die.</p>
<p>Everyone said, loud enough for the others to hear, “Look at Emperor’s<br />
new process. It’s the essence of agility!”</p>
<p>“What marvelous productivity!” “And the architecture!<br />
The architecture that has emerged from the code! I have never seen<br />
anything like it in my life.”</p>
<p>They all tried to conceal their disappointment at not<br />
being able to see the architecture or smell the code, and because none<br />
of them was willing to admit their own stupidity and incompetence, they<br />
all behaved as the two gurus had predicted.</p>
<p>A young Java programmer from London, who was not afraid<br />
and could only see things his eyes showed to him, put up a small Web<br />
site with a contrary opinion. “Emperor’s process of<br />
DesignAfterFirstTes ting is DAFT,” he said.</p>
<p>“ConstantRefactoring AfterProgramming is CRAP. The whole thing is a<br />
bunch of daft crap, actually.”</p>
<p>“Fool!” he was reprimanded on the newsgroups. “You’re<br />
afraid of agility!” But the young programmer’s remarks, which had been<br />
heard by the bystanders, were repeated over and over again until<br />
everyone cried, “This is just a bunch of daft crap!”</p>
<p>The book publishers realized that the people were<br />
right but couldn’t admit to that. They thought it better to continue<br />
the book series under the illusion that anyone who couldn’t smell the<br />
code was either stupid or incompetent. And so books continued to roll<br />
off the printing press.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javatron.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javatron.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javatron.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javatron.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javatron.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javatron.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javatron.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javatron.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javatron.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javatron.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javatron.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javatron.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javatron.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javatron.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=27&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javatron.wordpress.com/2009/08/06/emperor%e2%80%99s-new-code-a-story/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c988293b7635a997e9c42ee035e2f96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">javatron</media:title>
		</media:content>
	</item>
		<item>
		<title>It&#8217;s official, Oracle to buy Sun!</title>
		<link>http://javatron.wordpress.com/2009/04/25/its-official-oracle-to-buy-sun/</link>
		<comments>http://javatron.wordpress.com/2009/04/25/its-official-oracle-to-buy-sun/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 11:16:43 +0000</pubDate>
		<dc:creator>javatron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javatron.wordpress.com/2009/04/25/its-official-oracle-to-buy-sun/</guid>
		<description><![CDATA[What do this mean for the future of Java? http://www.sun.com/aboutsun/media/presskits/2009-0420/index.jsp Sun and Oracle announced a definitive agreement for Oracle to acquire Sun for $9.50 per share in cash. The Sun Board of Directors has unanimously approved the transaction. It is anticipated to close this summer. &#8212;&#8212;&#8212;&#8212;&#8212;- http://finance.yahoo.com/news/Oracle-Buys-prnews-14969049.html REDWOOD SHORES, Calif., April 20 /PRNewswire-FirstCall/ &#8212; Oracle [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=25&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>What do this mean for the future of Java?</p>
<p>http://www.sun.com/aboutsun/media/presskits/2009-0420/index.jsp</p>
<p>Sun and Oracle announced a definitive agreement for Oracle to acquire Sun for $9.50 per share in cash. The Sun Board of Directors has unanimously approved the transaction. It is anticipated to close this summer.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>http://finance.yahoo.com/news/Oracle-Buys-prnews-14969049.html</p>
<p>REDWOOD SHORES, Calif., April 20 /PRNewswire-FirstCall/ &#8212; Oracle Corporation (Nasdaq: <a href="http://finance.yahoo.com/q?s=orcl&amp;d=t">ORCL</a> &#8211; <a href="http://finance.yahoo.com/q/h?s=orcl">News</a>) and Sun Microsystems (Nasdaq: <a href="http://finance.yahoo.com/q?s=java&amp;d=t">JAVA</a> &#8211; <a class="yltasis" href="http://finance.yahoo.com/q/h;_ylt=AkLTBYczDysKQDADwK7d16CuMncA?s=java">News</a>) announced today they have entered into a definitive agreement under which Oracle will acquire Sun common stock for $9.50 per share in cash. The transaction is valued at approximately $7.4 billion, or $5.6 billion net of Sun&#8217;s cash and debt. &#8220;We expect this acquisition to be accretive to Oracle&#8217;s earnings by at least 15 cents on a non-GAAP basis in the first full year after closing. We estimate that the acquired business will contribute over $1.5 billion to Oracle&#8217;s non-GAAP operating profit in the first year, increasing to over $2 billion in the second year. This would make the Sun acquisition more profitable in per share contribution in the first year than we had planned for the acquisitions of BEA, PeopleSoft and Siebel combined,&#8221; said Oracle President Safra Catz.</p>
<p><!--- Insert the sidebar information --></p>
<div id="y-article-related" class="mod-group">
<div id="yfi_market_summary">
<div class="hd">
<h2>Related Quotes</h2>
</div>
<div class="bd">
<table id="yfi_ms_accordion" style="height:182.017px;" border="0">
<thead>
<tr>
<th class="first" scope="col">Symbol</th>
<th scope="col">Price</th>
<th scope="col">Change</th>
</tr>
</thead>
<tbody>
<tr class="selected">
<th class="symbol" scope="row"><a href="http://finance.yahoo.com/q?s=JAVA">JAVA</a></th>
<td><span class="streaming-datum">9.20</span></td>
<td class="down"><span class="streaming-datum"><span class="sq_change_down">-0.01</span></span></td>
</tr>
<tr class="chart">
<td colspan="3">
<div class="selected" style="height:auto;"><a href="http://finance.yahoo.com/q?s=JAVA"><img title="Chart for Sun Microsystems, Inc." src="http://ichart.finance.yahoo.com/instrument/1.0/JAVA/chart;range=1d/image;size=179x98" alt="Chart for Sun Microsystems, Inc." width="179" height="98" /></a></div>
</td>
</tr>
<tr>
<th class="symbol" scope="row"><a href="http://finance.yahoo.com/q?s=ORCL">ORCL</a></th>
<td><span class="streaming-datum">19.79</span></td>
<td class="up"><span class="streaming-datum"><span class="sq_change_up">+0.11</span></span></td>
</tr>
<tr class="chart">
<td colspan="3">
<div><a href="http://finance.yahoo.com/q?s=ORCL"><img title="Chart for Oracle Corporation" src="http://ichart.finance.yahoo.com/instrument/1.0/ORCL/chart;range=1d/image;size=179x98" alt="Chart for Oracle Corporation" width="179" height="98" /></a></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p><span class="yfs_module_params">{&#8220;s&#8221; : &#8220;java,orcl&#8221;,&#8221;k&#8221; : &#8220;c10,l10,p20,t10&#8243;,&#8221;o&#8221; : &#8220;&#8221;,&#8221;j&#8221; : &#8220;&#8221;}</span></div>
<p><!-- Article Related Media -->(Logo: <a class="yltasis" href="http://us.lrd.yahoo.com/_ylt=AtiwMDeI25M44FowzVk0LhauMncA/SIG=11qjtjb51/**http%3A//www.newscom.com/cgi-bin/prnh/20020718/ORCLLOGO">http://www.newscom.com/cgi-bin/prnh/20020718/ORCLLOGO</a>)</p>
<p>&#8220;The acquisition of Sun transforms the IT industry, combining best-in-class enterprise software and mission-critical computing systems,&#8221; said Oracle CEO Larry Ellison. &#8220;Oracle will be the only company that can engineer an integrated system &#8211; applications to disk &#8211; where all the pieces fit and work together so customers do not have to do it themselves. Our customers benefit as their systems integration costs go down while system performance, reliability and security go up.&#8221;</p>
<p>There are substantial long-term strategic customer advantages to Oracle owning two key Sun software assets: Java and Solaris. Java is one of the computer industry&#8217;s best-known brands and most widely deployed technologies, and it is the most important software Oracle has ever acquired. Oracle Fusion Middleware, Oracle&#8217;s fastest growing business, is built on top of Sun&#8217;s Java language and software. Oracle can now ensure continued innovation and investment in Java technology for the benefit of customers and the Java community.</p>
<p>The Sun Solaris operating system is the leading platform for the Oracle database, Oracle&#8217;s largest business, and has been for a long time. With the acquisition of Sun, Oracle can optimize the Oracle database for some of the unique, high-end features of Solaris. Oracle is as committed as ever to Linux and other open platforms and will continue to support and enhance our strong industry partnerships.</p>
<p>&#8220;Oracle and Sun have been industry pioneers and close partners for more than 20 years,&#8221; said Sun Chairman Scott McNealy. &#8220;This combination is a natural evolution of our relationship and will be an industry-defining event.&#8221;</p>
<p>&#8220;This is a fantastic day for Sun&#8217;s customers, developers, partners and employees across the globe, joining forces with the global leader in enterprise software to drive innovation and value across every aspect of the technology marketplace,&#8221; said Jonathan Schwartz, Sun&#8217;s CEO, &#8220;From the Java platform touching nearly every business system on earth, powering billions of consumers on mobile handsets and consumer electronics, to the convergence of storage, networking and computing driven by the Solaris operating system and Sun&#8217;s SPARC and x64 systems. Together with Oracle, we&#8217;ll drive the innovation pipeline to create compelling value to our customer base and the marketplace.&#8221;</p>
<p>&#8220;Sun is a pioneer in enterprise computing, and this combination recognizes the innovation and customer success the company has achieved. Our largest customers have been asking us to step up to a broader role to reduce complexity, risk and cost by delivering a highly optimized stack based on standards,&#8221; said Oracle President Charles Phillips. &#8220;This transaction will preserve and enhance investments made by our customers, while we continue to work with our partners to provide customers with choice.&#8221;</p>
<p>The Board of Directors of Sun Microsystems has unanimously approved the transaction. It is anticipated to close this summer, subject to Sun stockholder approval, certain regulatory approvals and customary closing conditions.</p>
<p>There will be a conference call today to discuss the transaction at 5:30 a.m. Pacific time. Investors can listen to the conference call by dialing (719) 234-7870, passcode 923645. A replay will be available for 24 hours after the call ends at (719) 884-8882, passcode: 923645. A live audio webcast of the call will be made available at <a class="yltasis" href="http://us.lrd.yahoo.com/_ylt=Am5vRn5znL7chjfTVLbyPPmuMncA/SIG=1134an189/**http%3A//www.oracle.com/investor"><span style="text-decoration:underline;">www.oracle.com/investor</span></a> and a replay will be available for seven days after the call ends.</p>
<p><strong>About Oracle</strong></p>
<p>Oracle (NASDAQ: <a href="http://finance.yahoo.com/q?s=orcl&amp;d=t">ORCL</a> &#8211; <a href="http://finance.yahoo.com/q/h?s=orcl">News</a>) is the world&#8217;s largest enterprise software company. For more information about Oracle, please visit our Web site at <a class="yltasis" href="http://us.lrd.yahoo.com/_ylt=AuT7FII.HO77xtrLxGFqRVquMncA/SIG=115sanon0/**http%3A//www.oracle.com/index.html"><span style="text-decoration:underline;">http://www.oracle.com</span></a>.</p>
<p><strong>About</strong><strong> Sun Microsystems</strong></p>
<p>Sun Microsystems, Inc. (NASDAQ: <a href="http://finance.yahoo.com/q?s=java&amp;d=t">JAVA</a> &#8211; <a href="http://finance.yahoo.com/q/h?s=java">News</a>) develops the technologies that power the global marketplace. Guided by a singular vision &#8212; &#8220;The Network is the Computer&#8221; &#8212; Sun drives network participation through shared innovation, community development and open source leadership. Sun can be found in more than 100 countries and on the Web at <a class="yltasis" href="http://us.lrd.yahoo.com/_ylt=ArMeGmf_iX3ykS0UW3pJuAiuMncA/SIG=10odt8vrf/**http%3A//www.sun.com/"><span style="text-decoration:underline;">http://www.sun.com</span></a>.</p>
<p><strong>Trademarks</strong></p>
<p>Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.</p>
<p>Sun, Sun Microsystems, the Sun logo, Java, Solaris and the Network is the Computer are trademarks or registered trademarks of Sun Microsystems, Inc. or its subsidiaries in the United States and other countries.</p>
<p><strong>Cautionary Statement Regarding Forward-Looking Statements</strong></p>
<p>This press release contains certain forward-looking statements about Oracle and Sun, including statements that involve risks and uncertainties concerning Oracle&#8217;s proposed acquisition of Sun, anticipated product information, estimates of future results of operations and general business outlook. When used in this press release, the words &#8220;anticipates&#8221;, &#8220;estimates&#8221;, &#8220;may&#8221;, &#8220;can&#8221;, &#8220;will&#8221;, &#8220;believes&#8221;, &#8220;expects&#8221;, &#8220;projects&#8221;, &#8220;intends&#8221;, &#8220;likely&#8221;, similar expressions and any other statements that are not historical facts are intended to identify those assertions as forward-looking statements. Any such statement may be influenced by a variety of factors, many of which are beyond the control of Oracle or Sun, that could cause actual outcomes and results to be materially different from those projected, described, expressed or implied in this press release due to a number of risks and uncertainties. Potential risks and uncertainties include, among others, the possibility that the transaction will not close or that the closing may be delayed, the anticipated synergies of the combined companies may not be achieved after closing, the combined operations may not be successfully integrated in a timely manner, if at all, general economic conditions in regions in which either company does business, and the possibility that Oracle or Sun may be adversely affected by other economic, business, and/or competitive factors. Accordingly, no assurances can be given that any of the events anticipated by the forward-looking statements will transpire or occur, or if any of them do so, what impact they will have on the results of operations or financial condition of Oracle or Sun.</p>
<p>In addition, please refer to the documents that Oracle and Sun, respectively, file with the Securities and Exchange Commission (the &#8220;SEC&#8221;) on Forms 10-K, 10-Q and 8-K. These filings identify and address other important factors that could cause Oracle&#8217;s and Sun&#8217;s respective financial and operational results to differ materially from those contained in the forward-looking statements set forth in this document. You are cautioned to not place undue reliance on forward-looking statements, which speak only as of the date of this report. Neither Oracle nor Sun is under any duty to update any of the information in this release.</p>
<p><strong>Additional Information about the Merger and Where to Find It</strong></p>
<p>In connection with the proposed merger, Sun will file a proxy statement with the SEC. Additionally, Sun and Oracle will file other relevant materials in connection with the proposed acquisition of Sun by Oracle pursuant to the terms of an Agreement and Plan of Merger by and among Oracle, Soda Acquisition Corporation, a wholly-owned subsidiary of Oracle, and Sun. The materials to be filed by Sun with the SEC may be obtained free of charge at the SEC&#8217;s web site at <a class="yltasis" href="http://us.lrd.yahoo.com/_ylt=AtkrBrHBazlJhr.Zk3wzMcmuMncA/SIG=10o1ro8rc/**http%3A//www.sec.gov/">www.sec.gov</a>. Investors and security holders of Sun are urged to read the proxy statement and the other relevant materials when they become available before making any voting or investment decision with respect to the proposed merger because they will contain important information about the merger and the parties to the merger.</p>
<p>Oracle, Sun and their respective directors, executive officers and other members of its management and employees, under SEC rules, may be deemed to be participants in the solicitation of proxies of Sun stockholders in connection with the proposed merger. Investors and security holders may obtain more detailed information regarding the names, affiliations and interests of certain of Oracle&#8217;s executive officers and directors in the solicitation by reading the proxy statement and other relevant materials filed with the SEC when they become available. Information concerning the interests of Sun&#8217;s participants in the solicitation, which may, in some cases, be different than those of Sun&#8217;s stockholders generally, is set forth in the materials filed with the SEC on Form 10-K and will be set forth in the proxy statement relating to the merger when it becomes available.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javatron.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javatron.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javatron.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javatron.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javatron.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javatron.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javatron.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javatron.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javatron.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javatron.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javatron.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javatron.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javatron.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javatron.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=25&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javatron.wordpress.com/2009/04/25/its-official-oracle-to-buy-sun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c988293b7635a997e9c42ee035e2f96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">javatron</media:title>
		</media:content>

		<media:content url="http://ichart.finance.yahoo.com/instrument/1.0/JAVA/chart;range=1d/image;size=179x98" medium="image">
			<media:title type="html">Chart for Sun Microsystems, Inc.</media:title>
		</media:content>

		<media:content url="http://ichart.finance.yahoo.com/instrument/1.0/ORCL/chart;range=1d/image;size=179x98" medium="image">
			<media:title type="html">Chart for Oracle Corporation</media:title>
		</media:content>
	</item>
		<item>
		<title>Write Dumb Code &#8212; Advice From Four Leading Java Developers</title>
		<link>http://javatron.wordpress.com/2009/04/23/write-dumb-code-advice-from-four-leading-java-developers/</link>
		<comments>http://javatron.wordpress.com/2009/04/23/write-dumb-code-advice-from-four-leading-java-developers/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 15:08:32 +0000</pubDate>
		<dc:creator>javatron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javatron.wordpress.com/2009/04/23/write-dumb-code-advice-from-four-leading-java-developers/</guid>
		<description><![CDATA[http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/ Write Dumb Code &#8212; Advice From Four Leading Java Developers By Janice J. Heiss, April 2009 &#60;!&#8211; E-mail &#160;&#160; &#160; Print-friendly Version &#160;&#160; Download &#8211;&#62; Over the years, developers have talked about their favorite code, funniest code, most beautiful code, how to write code, how not to write code, the obstacles to writing good [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=23&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/</p>
<h1>Write Dumb Code &#8212; Advice From Four Leading Java Developers</h1>
<div class="sharepage">
<div class="sharepagew1 share-mailto">
<table border="0" cellspacing="0" cellpadding="0" summary="layout">
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
<p><!-- END PAGETITLE --> <!-- BEGIN WRAPPER TABLE, 2 COLUMN, MAIN/RIGHT --></p>
<table border="0" cellspacing="0" cellpadding="10" width="100%">
<tbody>
<tr>
<td width="100%" valign="top"><!-- BEGIN CENTRAL COLUMN COMPONENTS --> <!--startindex--> <!-- ============ --> <!-- MAIN CONTENT --> <!-- ============ --> <a name="skip2content"></a> <!--  BEGIN VCD4 PFV  --></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="smaller" valign="top"><em></em></td>
<td width="10"></td>
<td align="right" valign="bottom">
<div class="sitelinks" style="padding:0;">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="right" valign="bottom"></td>
<td class="smaller" valign="bottom"></td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
<p><!--  END VCD4 PFV --></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="smaller" valign="top"><em> By Janice J. Heiss, April 2009 </em></td>
<td width="10"></td>
<td align="right" valign="bottom">
<div class="sitelinks" style="padding:0;">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>&lt;!&#8211;</p>
<td valign="bottom" align="right"><img src="/im/ic_email.gif" width="14" height="12" border="0" hspace="4" vspace="1" alt=" " /></td>
<td valign="bottom" class="smaller" nowrap="nowrap"><a href="#{link placeholder}">E-mail</a></td>
<td>&nbsp;&nbsp;</td>
<td valign="bottom" align="right">&nbsp;</td>
<td valign="bottom" class="smaller" nowrap="nowrap"><a href="/jsp_utils/PrintPage.jsp" target="printFriendlyView"><img src="/im/ic_print.gif" width="14" height="12" alt="Print-friendly Version" border="0" hspace="4" />Print-friendly Version</a></td>
<td>&nbsp;&nbsp;</td>
<td valign="bottom" align="right"><img src="/im/ic_download_thin.gif" width="9" height="14" hspace="4" border="0" alt=" " /></td>
<td valign="bottom" class="smaller" nowrap="nowrap"><a href="#{link placeholder}">Download</a></td>
<p>&#8211;&gt;</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
<div class="contentdivider">
<table class="grey4" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://java.sun.com/im/a.gif" border="0" alt=" " width="1" height="4" /></td>
</tr>
</tbody>
</table>
</div>
<p><!--  END VCD4 BYLINE AND TOOLS  --><em>Over the years, developers have talked about their favorite code, funniest code, most beautiful code, how to write code, how not to write code, the obstacles to writing good code, what they love and hate about writing code, the process of writing code, and so on. In the process, they have provided a lot of insight that is worth preserving.</em></p>
<p><em>In the first of a multipart series, we begin with some general advice: Write dumb code.</em></p>
<p><!-- BEGIN VCD5 ANCHOR LINKS COMPONENT  --></p>
<table class="vatop" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2">
<div><strong>Contents</strong></div>
<p><span class="sp2"> </span></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a class="named" href="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/#1">Brian Goetz: Write Dumb Code</a></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a class="named" href="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/#2">Heinz Kabutz: Classify &#8220;Goodness&#8221; by Using Good Object-Oriented Design Patterns</a></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a class="named" href="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/#3">Cay Horstmann: Patterns Are Not Magic Potions</a></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a class="named" href="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/#4">Kirk Pepperdine: Dumb Code Is More Readable</a></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a class="named" href="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/#5">See Also</a></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a class="named" href="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/#6">Discuss</a></td>
</tr>
</tbody>
</table>
<p><span class="sp20"> </span><br />
<!-- END VCD5 ANCHOR LINKS COMPONENT  --></p>
<div><a name="1"></a><strong>Brian Goetz: Write Dumb Code</strong></div>
<div class="contentdivider">
<table class="grey4" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://java.sun.com/im/a.gif" border="0" alt=" " width="1" height="4" /></td>
</tr>
</tbody>
</table>
</div>
<p><!-- BEGIN IMAGE WITH CAPTION --></p>
<table border="0" cellspacing="0" cellpadding="1" width="98" align="left">
<tbody>
<tr>
<td class="grey3">
<table border="0" cellspacing="0" cellpadding="0" width="98" align="center">
<tbody>
<tr>
<td align="center" bgcolor="#ffffff"><a href="http://java.sun.com/developer/technicalArticles/Interviews/goetz_qa.html"><img src="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/images/brian.jpg" border="0" alt="Photo of Brian Goetz" width="98" height="67" /></a></td>
</tr>
<tr>
<td class="grey3" align="center">
<div class="pad6"><span class="dkcaption1"><em>Brian Goetz</em></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td class="white">
<div class="sp2"></div>
</td>
</tr>
</tbody>
</table>
<p><!-- END IMAGE WITH CAPTION --><em>Sun Microsystems technology evangelist <a href="http://java.sun.com/developer/technicalArticles/Interviews/goetz_qa.html">Brian Goetz</a> has, since 2000, published some 75 articles on best practices, platform internals, and concurrent programming. He is the principal author of the book</em> <a href="http://www.javaconcurrencyinpractice.com/" target="_blank">Java Concurrency in Practice</a><em>, a <a href="http://www.joltawards.com/2006" target="_blank">2006 Jolt Award Finalist</a> and the best-selling book at the 2006 JavaOne conference. Prior to joining Sun in August of 2006, he was a consultant for 15 years for his software firm, Quiotix, where, in addition to writing about Java technology, he spoke frequently at conferences and gave presentations on threading, the Java programming language memory model, garbage collection, Java technology performance myths, and other topics.</em></p>
<p><em>In addition, he has consulted on kernel internals, device drivers, protocol implementations, compilers, server applications, web applications, scientific computing, data visualization, and enterprise infrastructure tools. Goetz has participated in a number of open-source projects, including the Lucene text search and retrieval system, and the FindBugs static analysis toolkit.</em></p>
<p><em>At Sun, he serves as a consultant on a wide range of topics that extend from Java concurrency to the needs of Java developers, and he contributes to the development of the <a href="http://java.sun.com/javase/">Java platform</a>.</em></p>
<p><em>How can developers write Java code that performs well?</em></p>
<p>The answer may seem counterintuitive. Often, the way to write fast code in Java applications is to write dumb code &#8212; code that is straightforward, clean, and follows the most obvious object-oriented principles. This has to do with the nature of dynamic compilers, which are big pattern-matching engines. Because compilers are written by humans who have schedules and time budgets, the compiler developers focus their efforts on the most common code patterns, because that&#8217;s where they get the most leverage. So if you write code using straightforward object-oriented principles, you&#8217;ll get better compiler optimization than if you write gnarly, hacked-up, bit-banging code that looks really clever but that the compiler can&#8217;t optimize effectively.</p>
<p><!-- BEGIN ENHANCED QUOTE COMPONENT--></p>
<table class="grey3" border="0" cellspacing="0" cellpadding="4" width="180" align="right">
<tbody>
<tr>
<td class="white">
<div class="sp2"></div>
</td>
<td width="100%">
<div class="pad8"><span class="big"> &#8220;Often, the way to write fast code in Java applications is to write dumb code &#8212; code that is straightforward, clean, and follows the most obvious object-oriented principles.&#8221; </span><br />
<span class="sp8"> </span></p>
<table class="white" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://java.sun.com/im/a.gif" border="0" alt=" " width="1" height="4" /></td>
</tr>
</tbody>
</table>
<div class="sp8"></div>
<p><span class="smaller"><strong>Brian Goetz</strong><br />
Technology Evangelist<br />
Sun Microsystems</span></div>
</td>
</tr>
</tbody>
</table>
<p><!-- End ENHANCED QUOTE COMPONENT-->So clean, dumb code often runs faster than really clever code, contrary to what developing in C might have taught us. In C, clever source code turns into the expected idiom at the machine-code level, but it doesn&#8217;t work that way in Java applications. I&#8217;m not saying that the Java compiler is too dumb to translate clever code into the appropriate machine code. It actually optimizes Java code more effectively than does C.</p>
<p>My advice is this: Write simple straightforward code and then, if the performance is still not &#8220;good enough,&#8221; optimize. But implicit in the concept of &#8220;good enough&#8221; is that you need to have clear performance metrics. Without them, you&#8217;ll never know when you&#8217;re done optimizing. You&#8217;ll also need a realistic, repeatable testing program in place to determine if you&#8217;re meeting your metrics. Once you can test the performance of your program under actual operating conditions, then it&#8217;s OK to start tweaking, because you&#8217;ll know if your tweaks are helping or not. But assuming, &#8220;Oh, gee, I think if I change this, it will go faster,&#8221; is usually counterproductive in Java programming.</p>
<p>Because Java code is dynamically compiled, realistic testing conditions are crucial. If you take a class out of context, it will be compiled differently than it will in your application, which means performance must be measured under realistic conditions. So performance metrics should be tied to indices that have business value &#8212; transactions per second, mean service time, worst-case latency &#8212; factors that your customers will perceive. Focusing on performance characteristics at the micro level is often misleading and difficult to test, because it&#8217;s hard to make a realistic test case for some small bit of code that you&#8217;ve taken out of context.</p>
<p><em>In 2003, you said, &#8220;Developers love to optimize code and with good reason. It is so satisfying and fun. But knowing when to optimize is far more important. Unfortunately, developers generally have horrible intuition about where the performance problems in an application will actually be.&#8221; Do you still believe this?</em></p>
<p>It&#8217;s truer today than it was four years ago, and more true for Java developers than it was for C. Most performance tuning reminds me of the old joke about the guy who&#8217;s looking for his keys in the kitchen even though he lost them in the street, because the light&#8217;s better in the kitchen. We&#8217;re intimately familiar with the code that we write. The external services that we depend on, whether libraries or external agents, such as databases and web services, are out of sight and out of mind. So when we see a performance problem, we tend to think about places in our code that we can imagine being performance problems. But often, that&#8217;s not the source of the performance problem &#8212; it&#8217;s somewhere else in the application&#8217;s architecture.</p>
<p>Most performance problems these days are consequences of architecture, not coding &#8212; making too many database calls or serializing everything to XML back and forth a million times. These processes are usually going on outside the code you wrote and look at every day, but they are really the source of performance problems. So if you just go by what you&#8217;re familiar with, you&#8217;ll be looking for your keys in the kitchen. This is a mistake that developers have always been subject to, and the more complex the application, the more it depends on code you didn&#8217;t write. Hence, the more likely it is that the problem is outside of your code.</p>
<p>Performance analysis is much harder in the Java programming language than in C where it is more straightforward, because C bears a significant similarity to assembly language. The mapping from C code to machine code is fairly direct. To the extent that it isn&#8217;t, the compiler can show you the machine code.</p>
<p>Java applications don&#8217;t work like C. The runtime constantly modifies the code based on changing conditions and observations. It starts out interpreting the code and then compiles it. It may invalidate the compiled code and recompile it based on information from profiling data or from loading other classes. As a result, the performance characteristics of your code will vary dramatically depending on the environment the code runs in. That makes it harder to say &#8220;This code is faster than that code&#8221; because you have to account for more context to make a reasonable performance analysis. There are also nondeterministic factors such as the timing and nature of compilation, the interaction of the loaded classes, and garbage collection. So it&#8217;s harder to do the kind of microperformance optimization with Java code that one can do in C.</p>
<p>At the same time, the fact that the compilation is done at execution time means that the optimizer has far more information to work with than the C compiler does. It knows what classes are loaded and how the method being compiled has actually been used. As a result, it can make far better optimization decisions than a static compiler could. This is great for performance but means it&#8217;s harder to predict the performance of a given block of code.</p>
<p><em>Read the full interview with <a href="http://java.sun.com/developer/technicalArticles/Interviews/goetz_qa.html">Brian Goetz</a>.</em></p>
<div><a name="2"></a><strong>Heinz Kabutz: Classify &#8220;Goodness&#8221; by Using Good Object-Oriented Design Patterns</strong></div>
<div class="contentdivider">
<table class="grey4" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://java.sun.com/im/a.gif" border="0" alt=" " width="1" height="4" /></td>
</tr>
</tbody>
</table>
</div>
<p><!-- BEGIN IMAGE WITH CAPTION --></p>
<table border="0" cellspacing="0" cellpadding="1" width="98" align="left">
<tbody>
<tr>
<td class="grey3">
<table border="0" cellspacing="0" cellpadding="0" width="98" align="center">
<tbody>
<tr>
<td align="center" bgcolor="#ffffff"><a href="http://java.sun.com/developer/technicalArticles/Interviews/community/kabutz_qa.html"><img src="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/images/heinz_image.jpg" border="0" alt="Photo of Heinz Kabutz" width="98" height="67" /></a></td>
</tr>
<tr>
<td class="grey3" align="center">
<div class="pad6"><span class="dkcaption1"><em>Heinz Kabutz</em></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td class="white">
<div class="sp2"></div>
</td>
</tr>
</tbody>
</table>
<p><!-- END IMAGE WITH CAPTION --><em>Java Champion <a href="http://java.sun.com/developer/technicalArticles/Interviews/community/kabutz_qa.html">Heinz Kabutz</a> was raised in Cape Town, South Africa, where he developed a love of programming in junior high school through his explorations on a ZX Spectrum computer. He received a B.S. from the University of Cape Town, and at 25, a Ph.D., both in computer science. In 1998, he started his own software development company, Java Specialists, where he writes contract software, consults, and offers courses on Java technology and design patterns.</em></p>
<p><em>Kabutz is best known as the creator of the free <a href="http://www.javaspecialists.eu/" target="_blank">Java Specialists&#8217; Newsletter</a>, targeted to expert Java developers.</em></p>
<p><em>I asked Kabutz to respond to Brian Goetz&#8217;s advice to write &#8220;dumb&#8221; code.</em></p>
<p><!-- BEGIN ENHANCED QUOTE COMPONENT--></p>
<table class="grey3" border="0" cellspacing="0" cellpadding="4" width="180" align="right">
<tbody>
<tr>
<td class="white">
<div class="sp2"></div>
</td>
<td width="100%">
<div class="pad8"><span class="big"> &#8220;What is good code? I find it easier to classify &#8216;goodness&#8217; by using good object-oriented design patterns. I usually encourage software development companies to train all of their programmers in design patterns, from the most junior to the wise architect.&#8221; </span><br />
<span class="sp8"> </span></p>
<table class="white" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://java.sun.com/im/a.gif" border="0" alt=" " width="1" height="4" /></td>
</tr>
</tbody>
</table>
<div class="sp8"></div>
<p><span class="smaller"><strong>Heinz Kabutz</strong><br />
Java Champion and Creator of the Java Specialists&#8217; Newsletter </span></div>
</td>
</tr>
</tbody>
</table>
<p><!-- End ENHANCED QUOTE COMPONENT-->In my experience, good object-oriented design tends to produce faster and more maintainable Java code. But what is good code? I find it easier to classify &#8220;goodness&#8221; by using good object-oriented design patterns. I usually encourage software development companies to train all of their programmers in design patterns, from the most junior to the wise architect.</p>
<p>Teams that employ good design patterns find it much easier to tune their code, which will be less brittle and require less copying and pasting. The <code>java.util.Arrays</code> class is a good example of bad code. It contains two <code>mergeSort(Object[])</code> methods, one taking a <code>Comparator</code>, the other using <code>Comparable</code>. The methods are virtually identical and could have been merged into one with the introduction of a <code>DefaultComparator</code> that would use the <code>Comparable</code> method. The strategy pattern would have avoided this design flaw.</p>
<p>Coding by Ctrl-C and Ctrl-V can also hide performance problems. Let&#8217;s assume you have several algorithms, all virtually identical, but in different parts of your system.</p>
<p>If you measure performance, you might find that each of the algorithms takes 5 percent of your CPU, but if you add them up, they amount to 20 percent. Good design allows you to more easily change code and detect bottlenecks. Let me give an example to prove Brian Goetz&#8217;s point.</p>
<p>In the early days of Java programming, I sometimes resorted to &#8220;clever&#8221; coding. For example, when I was optimizing a system written by a company in Germany, I changed the <code>String</code> addition to use <code>StringBuffer</code> after we had optimized the architecture and design of the system and wanted to improve things a bit. Don&#8217;t read too much into microbenchmarks. Performance advantages come from good design and an appropriate architecture.</p>
<p>We start with a basic concatenation based on <code>+=</code>:</p>
<p><!-- BEGIN VCD7 CODE SAMPLE COMPONENT  --></p>
<div style="overflow:auto;width:600px;">
<table class="grey4" border="0" cellspacing="0" cellpadding="10" width="100%">
<tbody>
<tr>
<td>
<pre>  public static String concat1(String s1, String s2, String s3,
                               String s4, String s5, String s6) {
    String result = "";
    result += s1;
    result += s2;
    result += s3;
    result += s4;
    result += s5;
    result += s6;

    return result;
  }</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><span class="sp20"> </span><br />
<!-- END VCD7 CODE SAMPLE COMPONENT  --><code>String</code> is immutable, so the compiled code will create many intermediate <code>String</code> objects, which can strain the garbage collector. A common remedy is to introduce <code>StringBuffer</code>, causing it to look like this:</p>
<p><!-- BEGIN VCD7 CODE SAMPLE COMPONENT  --></p>
<div style="overflow:auto;width:600px;">
<table class="grey4" border="0" cellspacing="0" cellpadding="10" width="100%">
<tbody>
<tr>
<td>
<pre>public static String concat2(String s1, String s2, String s3,
                             String s4, String s5, String s6) {
    StringBuffer result = new StringBuffer();
    result.append(s1);
    result.append(s2);
    result.append(s3);
    result.append(s4);
    result.append(s5);
    result.append(s6);
    return result.toString();
  }</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><span class="sp20"> </span><br />
<!-- END VCD7 CODE SAMPLE COMPONENT  -->But the code is becoming less legible, which is undesirable.</p>
<p>Using JDK 6.0_02 and the server HotSpot compiler, I can execute <code>concat1()</code> a million times in 2013 milliseconds, but <code>concat2()</code> in 734 milliseconds. At this point, I might congratulate myself for making the code three times faster. However, the user won&#8217;t notice it if 0.1 percent of the program becomes three times faster.</p>
<p>Here&#8217;s a third approach that I used to make my code run faster, back in the days of JDK 1.3. Instead of creating an empty <code>StringBuffer</code>, I sized it to the number of required characters, like so:</p>
<p><!-- BEGIN VCD7 CODE SAMPLE COMPONENT  --></p>
<div style="overflow:auto;width:600px;">
<table class="grey4" border="0" cellspacing="0" cellpadding="10" width="100%">
<tbody>
<tr>
<td>
<pre>  public static String concat3(String s1, String s2, String s3,
                               String s4, String s5, String s6) {
    return new StringBuffer(
        s1.length() + s2.length() + s3.length() + s4.length() +
            s5.length() + s6.length()).append(s1).append(s2).
        append(s3).append(s4).append(s5).append(s6).toString();
  }</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><span class="sp20"> </span><br />
<!-- END VCD7 CODE SAMPLE COMPONENT  -->I managed to call that a million times in 604 milliseconds. Even faster than <code>concat2()</code>. But is this the best way to add the strings? And what is the simplest way?</p>
<p>The approach in <code>concat4()</code> illustrates another way:</p>
<p><!-- BEGIN VCD7 CODE SAMPLE COMPONENT  --></p>
<div style="overflow:auto;width:600px;">
<table class="grey4" border="0" cellspacing="0" cellpadding="10" width="100%">
<tbody>
<tr>
<td>
<pre>  public static String concat4(String s1, String s2, String s3,
                               String s4, String s5, String s6) {
    return s1 + s2 + s3 + s4 + s5 + s6;
  }</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><span class="sp20"> </span><br />
<!-- END VCD7 CODE SAMPLE COMPONENT  -->You can hardly make it simpler than that. Interestingly, in Java SE 6, I can call the code a million times in 578 milliseconds, which is even better than the far more complicated <code>concat3()</code>. The method is cleaner, easier to understand, and quicker than our previous best effort.</p>
<p>Sun introduced the <code>StringBuilder</code> class in J2SE 5.0, which is almost the same as <code>StringBuffer</code>, except it&#8217;s not thread-safe. Thread safety is usually not necessary with <code>StringBuffer</code>, since it is seldom shared between threads. When <code>Strings</code> are added using the <code>+</code> operator, the compiler in J2SE 5.0 and Java SE 6 will automatically use <code>StringBuilder</code>. If <code>StringBuffer</code> is hard-coded, this optimization will not occur.</p>
<p>When a time-critical method causes a significant bottleneck in your application, it&#8217;s possible to speed up string concatenation by doing this:</p>
<p><!-- BEGIN VCD7 CODE SAMPLE COMPONENT  --></p>
<div style="overflow:auto;width:600px;">
<table class="grey4" border="0" cellspacing="0" cellpadding="10" width="100%">
<tbody>
<tr>
<td>
<pre>  public static String concat5(String s1, String s2, String s3,
                               String s4, String s5, String s6) {
    return new StringBuilder(
      s1.length() + s2.length() + s3.length() + s4.length() +
          s5.length() + s6.length()).append(s1).append(s2).
        append(s3).append(s4).append(s5).append(s6).toString();
  }</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><span class="sp20"> </span><br />
<!-- END VCD7 CODE SAMPLE COMPONENT  -->However, doing this prevents future versions of the Java platform from automatically speeding up the system, and again, it makes the code more difficult to read.</p>
<p><em>Read the full interview with <a href="http://java.sun.com/developer/technicalArticles/Interviews/community/kabutz_qa.html">Heinz Kabutz</a>.</em></p>
<div><a name="3"></a><strong>Cay Horstmann: Patterns Are Not Magic Potions</strong></div>
<div class="contentdivider">
<table class="grey4" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://java.sun.com/im/a.gif" border="0" alt=" " width="1" height="4" /></td>
</tr>
</tbody>
</table>
</div>
<p><!-- BEGIN IMAGE WITH CAPTION --></p>
<table border="0" cellspacing="0" cellpadding="1" width="98" align="left">
<tbody>
<tr>
<td class="grey3">
<table border="0" cellspacing="0" cellpadding="0" width="98" align="center">
<tbody>
<tr>
<td align="center" bgcolor="#ffffff"><a href="http://java.sun.com/developer/technicalArticles/Interviews/community/horstmann_qa.html"><img src="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/images/cayhorstmann.jpg" border="0" alt="Photo of Cay Horstmann" width="98" height="67" /></a></td>
</tr>
<tr>
<td class="grey3" align="center">
<div class="pad6"><span class="dkcaption1"><em>Cay Horstmann</em></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td class="white">
<div class="sp2"></div>
</td>
</tr>
</tbody>
</table>
<p><!-- END IMAGE WITH CAPTION --> <!-- BEGIN ENHANCED QUOTE COMPONENT--></p>
<table class="grey3" border="0" cellspacing="0" cellpadding="4" width="180" align="right">
<tbody>
<tr>
<td class="white">
<div class="sp2"></div>
</td>
<td width="100%">
<div class="pad8"><span class="big"> &#8220;I&#8217;ve had too many junior programmers sprinkle patterns over their code in the hope of improving it. Patterns are not magic potions, and it takes quite a bit more experience than is commonly acknowledged to use them wisely.&#8221; </span><br />
<span class="sp8"> </span></p>
<table class="white" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://java.sun.com/im/a.gif" border="0" alt=" " width="1" height="4" /></td>
</tr>
</tbody>
</table>
<div class="sp8"></div>
<p><span class="smaller"><strong>Cay Horstmann</strong><br />
Java Champion and Professor of Computer Science at San Jose State University </span></div>
</td>
</tr>
</tbody>
</table>
<p><!-- End ENHANCED QUOTE COMPONENT--><em>Java Champion <a href="http://java.sun.com/developer/technicalArticles/Interviews/community/horstmann_qa.html">Cay Horstmann</a> grew up in northern Germany and attended the Christian-Albrechts-Universität in Kiel, a harbor town by the Baltic Sea. With an M.S. in computer science from Syracuse University and a Ph.D. in mathematics from the University of Michigan, he is now a professor of computer science at San Jose State University in California. He was formerly a VP and CTO of a dot-com startup and, previous to that, owner of a successful company that sold a DOS program for editing scientific documents. In his spare time, Horstmann consults in Internet programming.</em></p>
<p>I agree with Brian Goetz. I learned over the years that it never pays to optimize code until after you profile. We all fret over caching values rather than recomputing them, eliminating layers, and so on. More often than not, it makes little difference in performance but introduces a huge headache in debugging.</p>
<p>I saw that you asked Heinz Kabutz the same question. He says, &#8220;I usually encourage software development companies to train all of their programmers in design patterns, from the most junior to the wise architect.&#8221; I&#8217;m a bit uncomfortable with this. I agree that patterns should be a part of everyone&#8217;s education, but I&#8217;ve had too many junior programmers sprinkle patterns over their code in the hope of improving it. Patterns are not magic potions, and it takes quite a bit more experience than is commonly acknowledged to use them wisely.</p>
<p>Take the Java I/O library, which is imbued with the value of the decorator pattern. For example, <code>BufferedReader</code> is a decorator, and to get buffered reading from a file, you do this:</p>
<p><!-- BEGIN VCD7 CODE SAMPLE COMPONENT  --></p>
<div style="overflow:auto;width:600px;">
<table class="grey4" border="0" cellspacing="0" cellpadding="10" width="100%">
<tbody>
<tr>
<td>
<pre>Reader reader = new BufferedReader(new FileReader("foo.txt"));</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><span class="sp20"> </span><br />
<!-- END VCD7 CODE SAMPLE COMPONENT  -->What if you also want <code>lookahead</code>? Now you need to insert a <code>PushbackReader</code> into the decorator chain.</p>
<p>What a pain! I would have preferred more usability and less pattern dogma. In C++, buffering and <code>lookahead</code> are part of every file stream, which is so much more convenient in practice.</p>
<p><em>Read the full interview with <a href="http://java.sun.com/developer/technicalArticles/Interviews/community/horstmann_qa.html">Cay Horstmann</a>.</em></p>
<div><a name="4"></a><strong>Kirk Pepperdine: Dumb Code Is More Readable</strong></div>
<div class="contentdivider">
<table class="grey4" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://java.sun.com/im/a.gif" border="0" alt=" " width="1" height="4" /></td>
</tr>
</tbody>
</table>
</div>
<p><!-- BEGIN IMAGE WITH CAPTION --></p>
<table border="0" cellspacing="0" cellpadding="1" width="88" align="left">
<tbody>
<tr>
<td class="grey3">
<table border="0" cellspacing="0" cellpadding="0" width="88" align="center">
<tbody>
<tr>
<td align="center" bgcolor="#ffffff"><a href="http://java.sun.com/developer/technicalArticles/Interviews/community/pepperdine_qa.html"><img src="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/images/kirk_pepperdine.jpg" border="0" alt="Photo of Kirk Pepperdine" width="88" height="88" /></a></td>
</tr>
<tr>
<td class="grey3" align="center">
<div class="pad6"><span class="dkcaption1"><em>Kirk Pepperdine</em></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td class="white">
<div class="sp2"></div>
</td>
</tr>
</tbody>
</table>
<p><!-- END IMAGE WITH CAPTION --><em>Java Champion <a href="http://java.sun.com/developer/technicalArticles/Interviews/community/pepperdine_qa.html">Kirk Pepperdine</a> is a primary contributor to javaperformancetuning.com, which is widely regarded as the premier site for Java performance tuning information, and is the coauthor of</em> Ant Developer&#8217;s Handbook<em>. He has been heavily involved in application performance since the beginning of his programming career and has tuned applications in a variety of languages: Cray Assembler, C, Smalltalk, and, since 1996, Java technology. He has also worked on building middleware for distributed applications.</em></p>
<p><em>He has worked with Cray supercomputers at the Canadian Department of Defense, as a consultant at Florida Power &amp; Light, and as a senior consultant with GemStone Systems. He is currently an independent consultant and an editor at TheServerSide.com.</em></p>
<p><em>I asked Pepperdine to respond to Brian Goetz.</em></p>
<p><!-- BEGIN ENHANCED QUOTE COMPONENT--></p>
<table class="grey3" border="0" cellspacing="0" cellpadding="4" width="180" align="right">
<tbody>
<tr>
<td class="white">
<div class="sp2"></div>
</td>
<td width="100%">
<div class="pad8"><span class="big"> &#8220;Because we&#8217;re trained to look at code, when something goes wrong, we look at code. And no matter how good our code is, we can always find something wrong or ugly that&#8217;s begging to be fixed. Finding ugly code will throw even the best developers off track &#8212; because the code is ugly, they will guess that it&#8217;s the source of the problem.&#8221; </span><br />
<span class="sp8"> </span></p>
<table class="white" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://java.sun.com/im/a.gif" border="0" alt=" " width="1" height="4" /></td>
</tr>
</tbody>
</table>
<div class="sp8"></div>
<p><span class="smaller"><strong>Kirk Pepperdine</strong><br />
Java Champion and Independent Consultant </span></div>
</td>
</tr>
</tbody>
</table>
<p><!-- End ENHANCED QUOTE COMPONENT-->There are really two questions here: First, how does writing dumb code help with performance? And second, how does writing well-structured code help with performance? I&#8217;ll answer the &#8220;dumb code&#8221; one first.</p>
<p>While we write code to run on a machine, the primary consumers of code are humans. Dumb code tends to be more readable and hence more understandable. If we can iron out the twists, then we have a better chance of avoiding the dumb mistakes that clever code may hide from us.</p>
<p><a href="http://java.sun.com/javase/technologies/hotspot/">HotSpot</a>, IBM&#8217;s <a href="http://publib.boulder.ibm.com/infocenter/javasdk/v1r4m2/index.jsp?topic=/com.ibm.java.doc.diagnostics.142/html/introducingthemmi.html" target="_blank">MMI</a>, and the <a href="http://java.sun.com/developer/onlineTraining/Programming/JDCBook/perf2.html#jit">JIT</a> are tools that work to optimize our code for us through dynamic profiling. Complex code tends to confuse these tools, so that they provide either suboptimal optimizations or no optimizations at all.</p>
<p>We can see this with a well-written microperformance benchmark. Most of the code in a well-written microbenchmark is there to confuse the JIT so that it doesn&#8217;t translate our code into something that no longer measures the effect we&#8217;re interested in. While a microbenchmark may be a pathological case, the same sorts of things can happen in our real application code.</p>
<p>Another reason to write dumb code is that most of the complexities are due to some optimization that everyone thinks is needed. In many cases, these optimizations are premature. While I&#8217;m all for performance planning, I&#8217;m dead set against premature optimizations. When is a plan a plan, and when is it premature? I guess it&#8217;s a little like the difference between art and porn: You&#8217;ll know it when you see it.</p>
<p>Which brings us to the second question &#8212; how does well-structured code help performance? Most performance problems can only be solved by adding or altering code in the application. I&#8217;ve found that if the code is well structured and loosely coupled, if the classes are cohesive, and the code uses delegation, I can avoid the whack-a-mole problem when I start to change code.</p>
<p>This problem can also be called shotgun refactoring &#8212; if I make a change in one part of the application, other seemingly random parts of the application will break. And as I fix the breakage, I create a whole series of new breaks, and so on.</p>
<p>So how can we avoid this? First, follow the DRY &#8212; Don&#8217;t Repeat Yourself &#8212; principle. Let&#8217;s look at collections as an example. We would traditionally manage a query against a collection in Java by creating an iterator:</p>
<p><!-- BEGIN VCD7 CODE SAMPLE COMPONENT  --></p>
<div style="overflow:auto;width:600px;">
<table class="grey4" border="0" cellspacing="0" cellpadding="10" width="100%">
<tbody>
<tr>
<td>
<pre>....
Iterator iter = customers.iterator();
while (iter.hasNext()) {
    Customer c = (Customer)iter.next();
    doStuff( c);
}
....</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><span class="sp20"> </span><br />
<!-- END VCD7 CODE SAMPLE COMPONENT  -->Here&#8217;s the trap: If another part of our application needs to <code>doStuff()</code>, it&#8217;s likely that the code will get repeated either as a cut and paste or as simply rewritten. Either way, you&#8217;ve just violated DRY, which has numerous consequences. You&#8217;ve also neglected another design principle: Delegate, don&#8217;t assume (responsibility).</p>
<p>By not delegating, you risk violating DRY. You certainly violate the principle of information hiding. Think of it this way: By doing a <code>get</code>, you&#8217;ve not only violated encapsulation but have tightly coupled your class to the callee. When you violate encapsulation by exporting state, you are forced to also export the application logic needed to manage that state and hence violate DRY. So you can see that this is wrong from many different perspectives.</p>
<p>Here&#8217;s the big performance hit: Suppose the data structure that is being used is suboptimal, and suppose you recognize that it needs to be changed. If you&#8217;ve exported state and behavior using iterators or whatever, you&#8217;ve created the whack-a-mole problem. Take a look at what happens when we delegate:</p>
<p><!-- BEGIN VCD7 CODE SAMPLE COMPONENT  --></p>
<div style="overflow:auto;width:600px;">
<table class="grey4" border="0" cellspacing="0" cellpadding="10" width="100%">
<tbody>
<tr>
<td>
<pre>public class Customers {

    Hashmap customers = new Hashmap();

    public void putCustomer( Customer customer) {
        allCustomers.put( customer.getId(), customer);
    }

    public Customer getCustomer( String id) {
        allCustomers.get( id);
   }

   public Customers getCustomers( String pattern) {
        return doSomeStufftoGetACollectionOfCustomer( pattern);

    }</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><span class="sp20"> </span><br />
<!-- END VCD7 CODE SAMPLE COMPONENT  -->Here we have more code. But this is often the case when you demonstrate something in a tiny contrived example. You only see the benefits in large code bases, which, of course, make for horrible examples.</p>
<p>That aside, we have a class that wraps our intended collection. Our new class is semantically in tune with our domain. How many problem domains contain the word <code>Hashmap</code> and how many domains contain <code>Customers</code>? So we&#8217;ve corrected our vocabulary.</p>
<p>Next, we&#8217;ve provided a home for our queries, at least the queries that we&#8217;ve anticipated. If we get other patterns of queries, it may be possible to add in a secondary collection that is keyed differently. Think of it as adding another index on a database table.</p>
<p>The beauty of it is that because I&#8217;ve encapsulated and delegated the calls, I&#8217;m free to make these changes unencumbered by what my clients may or may not know. In other words, no whack-a-mole. Furthermore, every client will realize the performance benefit of the optimization. So this is a win all the way round.</p>
<p>I intentionally didn&#8217;t use generics. Using this development pattern, I don&#8217;t need compile-time type checking on the collection(s) because the class API provides all the safety that&#8217;s needed. I&#8217;ve always contended that it&#8217;s a mistake to expose a raw collection in an API, and because I never feel that the primary use case for generics is justified. But that&#8217;s another discussion.</p>
<p>So what happens if someone needs a query that we haven&#8217;t provided? Closures might seem like a good solution, but they would have to be implemented very carefully or we could &#8220;closure&#8221; ourselves into a whack-a-mole problem.</p>
<p>The closure would have to access only those elements that could be classified as nonprimitive, by which I mean those elements that can function without knowledge of the underlying structure. This is in contrast to a primitive method or a method that needs to understand the underlying data structure of the class. The point is to hide the implementation details to things outside of our domain.</p>
<p>To summarize, performance tuning often requires that I touch code, which is not much different from refactoring. All of the arguments that the Agile crowd put forth &#8212; loose coupling, simple code, following good design patterns, having good unit testing in place, automated builds, and so on &#8212; also apply to performance tuning.</td>
</tr>
</tbody>
</table>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javatron.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javatron.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javatron.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javatron.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javatron.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javatron.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javatron.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javatron.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javatron.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javatron.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javatron.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javatron.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javatron.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javatron.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=23&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javatron.wordpress.com/2009/04/23/write-dumb-code-advice-from-four-leading-java-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c988293b7635a997e9c42ee035e2f96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">javatron</media:title>
		</media:content>

		<media:content url="http://java.sun.com/im/a.gif" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://java.sun.com/im/a.gif" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/images/brian.jpg" medium="image">
			<media:title type="html">Photo of Brian Goetz</media:title>
		</media:content>

		<media:content url="http://java.sun.com/im/a.gif" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://java.sun.com/im/a.gif" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/images/heinz_image.jpg" medium="image">
			<media:title type="html">Photo of Heinz Kabutz</media:title>
		</media:content>

		<media:content url="http://java.sun.com/im/a.gif" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://java.sun.com/im/a.gif" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/images/cayhorstmann.jpg" medium="image">
			<media:title type="html">Photo of Cay Horstmann</media:title>
		</media:content>

		<media:content url="http://java.sun.com/im/a.gif" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://java.sun.com/im/a.gif" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/images/kirk_pepperdine.jpg" medium="image">
			<media:title type="html">Photo of Kirk Pepperdine</media:title>
		</media:content>

		<media:content url="http://java.sun.com/im/a.gif" medium="image">
			<media:title type="html"> </media:title>
		</media:content>
	</item>
		<item>
		<title>A peek into Java 7</title>
		<link>http://javatron.wordpress.com/2009/04/20/a-peek-into-java-7/</link>
		<comments>http://javatron.wordpress.com/2009/04/20/a-peek-into-java-7/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 05:52:36 +0000</pubDate>
		<dc:creator>javatron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javatron.wordpress.com/?p=21</guid>
		<description><![CDATA[A sneek peak on the features of the new release of Java(unofficial).  How about you, what features would you like to be included in the new release? http://www.javabeat.net/articles/120-new-features-in-java-70-part-1-1.htmls Introduction This article discusses the new features that are available in Java 7.0. Java 7.0 comes with bunch of new features – language level changes as well [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=21&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A sneek peak on the features of the new release of Java(unofficial).  How about you, what features would you like to be included in the new release?</p>
<p><a href="http://www.javabeat.net/articles/120-new-features-in-java-70-part-1-1.htmls">http://www.javabeat.net/articles/120-new-features-in-java-70-part-1-1.htmls</a></p>
<h2>Introduction</h2>
<p align="justify"><span><span>This <span class="IL_LINK_STYLE" style="font-weight:400;color:#009900;border-bottom:#009900 1px solid;font-style:normal;font-family:Verdana;text-decoration:underline;">article</span> discusses the </span><span class="IL_LINK_STYLE" style="font-weight:400;color:#009900;border-bottom:#009900 1px solid;font-style:normal;font-family:Verdana;text-decoration:underline;">new features</span> that are available in </span><strong><span><span class="IL_LINK_STYLE" style="font-weight:700;color:#009900;border-bottom:#009900 1px solid;font-style:normal;font-family:Verdana;text-decoration:underline;">Java 7</span>.0</span></strong><span><span>. <span class="IL_SPAN">Java 7</span>.0 comes with bunch of </span><span class="IL_SPAN">new features</span><span> – language level changes as well as API level changes and this <span class="IL_SPAN">article</span> concentrates on the new API features such as </span></span><strong><em>Cache API</em></strong>, <strong><em><span>New <span class="IL_LINK_STYLE" style="font-weight:700;color:#009900;border-bottom:#009900 1px solid;font-style:italic;font-family:Verdana;text-decoration:underline;">Date and Time</span> API</span></em></strong> and <strong><em>New IO 2</em></strong> as well as the language level changes in the form of <strong><em>Super packages</em></strong>. The readers are assumed that they are more familiar with the <em>Java 5.0</em><span><span> language level changes such as Generics and Annotations. This <span class="IL_SPAN">article</span> covers few of the </span><span class="IL_SPAN">new features</span> in </span><strong><span><span class="IL_SPAN">Java 7</span>.0</span></strong><span> and the remaining set of <span class="IL_SPAN">new features</span><span> will be covered in the next <span class="IL_SPAN">article</span>. It is likely that the APIs may undergo changes before the formal release of </span></span><strong><span><span class="IL_SPAN">Java 7</span>.0</span></strong><span> happens. <span class="IL_LINK_STYLE" style="font-weight:400;color:#009900;border-bottom:#009900 1px solid;font-style:normal;font-family:Verdana;text-decoration:underline;">You can read</span> </span><a href="http://www.javabeat.net/articles/java7/1/">Java 7.0 Articles</a>.</p>
<h2>New features in Java 7.0</h2>
<p align="justify"><span>The following <span class="IL_SPAN">new features</span><span> will be discussed in detail in this <span class="IL_SPAN">article</span>. </span></span></p>
<p align="justify"> </p>
<ul>
<li>Cache API</li>
<li><span><span class="IL_SPAN">Date and Time</span> API </span></li>
<li>New IO2</li>
<li>Super Packages</li>
</ul>
<p> </p>
<h2>Cache API</h2>
<p align="justify">The <strong><em>Cache API</em></strong><span> provides the <span class="IL_LINK_STYLE" style="font-weight:400;color:#009900;border-bottom:#009900 1px solid;font-style:normal;font-family:Verdana;text-decoration:underline;">mechanism</span> for storing and retrieving the objects. The API also provides a way to plug-in user defined Cache objects. The Cache API is relatively small and this section discusses the core classes and the interfaces available in the Cache API. </span></p>
<h3>Cache Manager</h3>
<p align="justify">The <strong><em>Cache Manager</em></strong> stands as the entry point for using Cache API. An instance of the <em>CacheManager</em> can be obtained using the following code,</p>
<p> </p>
<pre><code>CacheManager manager = CacheManager.getInstance();</code></pre>
<p> </p>
<p align="justify">This method will return a singleton object of type <em>CacheManager</em>. The cache manager also provides methods for registering and deregistering cache objects. Have a look at the following code,</p>
<p> </p>
<pre><code>Cache permanentCache = .... // an implementation of a permanent cache
manager.registerCache("PERM_CACHE", permanentCache);</code></pre>
<p> </p>
<h3>Cache and CacheFactory</h3>
<p align="justify">The API provides plug-in capabilities of custom implementation through the help of <em>Cache</em> and the <em>CacheFactory</em> interfaces. The <em>Cache</em> interface extends the Map interface so the put, get and iteration methods that are available in the map can be directly used. It is also possible to remove the objects in the cache that are no longer needed through the <em>Cache.evict()</em> method. CacheFactory is a service provider API and it provides a factory method for creating a Cache object from a map of properties.</p>
<p> </p>
<pre><code>CacheManager manager = CacheManager.getInstance();
CacheFactory factory = manager.getCacheFactory();

Map cacheProperties = ....;
Cache cacheObject = factory.createCache(cacheProperties);</code></pre>
<p> </p>
<p align="justify">An object is no longer needed in the cache if the expiration time set for the object expires and that&#8217;s where the <em>CacheEntry</em> object comes in.</p>
<h3>CacheEntry</h3>
<p align="justify">The interface provides certain useful information and operations that are applicable for an object in a cache such as the last access time, last update time, creation time, expiration time etc. Note that this interface directly extends <em>Map.Entry interface</em>. It is possible to obtain an instance of this object from the object&#8217;s key,</p>
<p> </p>
<pre><code>Cache permanentCache = .... // an implementation of a permanent cache
permanentCache.put("MYSTR", someStrObject);

CacheEntry entry = cache.getCacheEntry("MYSTR");</code></pre>
<p> </p>
<h3>Cache Events</h3>
<p align="justify">It is also possible to attach listeners to cache object when objects are stored, removed, loaded and evicted from the cache. An implementation of a cache listener could be,</p>
<p><strong>SimpleCacheListener.java</strong></p>
<pre><code>
class SimpleCacheListener implements CacheListener
{
    void onClear() {}

	void onEvict(Object key) {}

	void onLoad(Object key) {}

	void onPut(Object key) {}

	void onRemove(Object key) {}
}
</code></pre>
<p> </p>
<p align="justify">This cache listener can be added to cache for receiving any events notification through the following code,</p>
<p> </p>
<pre><code>Cache cacheObject = ...;
cacheObject.addListener(new SimpleCacheListener());</code></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javatron.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javatron.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javatron.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javatron.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javatron.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javatron.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javatron.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javatron.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javatron.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javatron.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javatron.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javatron.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javatron.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javatron.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=21&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javatron.wordpress.com/2009/04/20/a-peek-into-java-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c988293b7635a997e9c42ee035e2f96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">javatron</media:title>
		</media:content>
	</item>
		<item>
		<title>Essential Skills for Secure Programmers</title>
		<link>http://javatron.wordpress.com/2009/01/22/essential-skills-for-secure-programmers/</link>
		<comments>http://javatron.wordpress.com/2009/01/22/essential-skills-for-secure-programmers/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 15:21:22 +0000</pubDate>
		<dc:creator>javatron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javatron.wordpress.com/?p=17</guid>
		<description><![CDATA[An interesting article on the essential kills to develop secure applications. Many of these issues are easily overlooked even by a well experienced programmer. It takes a really extra conscious effort and dedication to avoid these pitfalls. http://www.sans. org/gssp/ essential_ skills_java. pdf<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=17&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>An interesting article on the essential kills to develop secure applications. Many of these issues are easily overlooked even by a well experienced programmer. It takes a really extra conscious effort and dedication to avoid these pitfalls.</p>
<p><a rel="nofollow" href="http://www.sans.org/gssp/essential_skills_java.pdf" target="_blank">http://www.sans. org/gssp/ essential_ skills_java. pdf</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javatron.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javatron.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javatron.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javatron.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javatron.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javatron.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javatron.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javatron.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javatron.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javatron.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javatron.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javatron.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javatron.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javatron.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=17&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javatron.wordpress.com/2009/01/22/essential-skills-for-secure-programmers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c988293b7635a997e9c42ee035e2f96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">javatron</media:title>
		</media:content>
	</item>
		<item>
		<title>101 Design Patterns</title>
		<link>http://javatron.wordpress.com/2008/05/13/101-design-patterns/</link>
		<comments>http://javatron.wordpress.com/2008/05/13/101-design-patterns/#comments</comments>
		<pubDate>Tue, 13 May 2008 15:35:07 +0000</pubDate>
		<dc:creator>javatron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javatron.wordpress.com/?p=16</guid>
		<description><![CDATA[With so many Design Patterns coming out, it&#8217;s kinda hard to keep up. See how many do you know&#8230; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- http://sourcemaking.com/design-patterns-and-tips Design Patterns Creational Patterns 1. Abstract Factory The purpose of the Abstract Factory is to provide an interface for creating families of related objects, without specifying concrete classes (more&#8230;) 2. Builder The Builder pattern [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=16&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With so many Design Patterns coming out, it&#8217;s kinda hard to keep up. See how many do you know&#8230;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>http://sourcemaking.com/design-patterns-and-tips</p>
<h2><span style="color:#0000ff;">Design Patterns</span></h2>
<div class="section">
<div class="sectiontitle">
<h2><strong>Creational Patterns</strong></h2>
</div>
<div class="sectionbody">
<div class="numouter">
<div class="numinner">1.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/abstract_factory">Abstract Factory</a><br />
The purpose of the Abstract Factory is to provide an interface for creating families of related objects, without specifying concrete classes (<a class="wz small2" href="http://sourcemaking.com/design_patterns/abstract_factory">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">2.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/builder">Builder</a><br />
The Builder pattern separates the construction of a complex object from its representation so that the same construction process can create different representations (<a class="wz small2" href="http://sourcemaking.com/design_patterns/builder">more&#8230;</a>)</div>
</div>
<div class="divfl"><a href="http://sourcemaking.com/design_patterns/abstract_factory"><img style="border:1px dashed #cccccc;padding:5px;" src="http://sourcemaking.com/files/sm/101-1.jpg" alt="" /></a></div>
<div class="numouter">
<div class="numinner">3.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/factory_method">Factory Method</a><br />
The Factory Method defines an interface for creating objects, but lets subclasses decide which classes to instantiate (<a class="wz small2" href="http://sourcemaking.com/design_patterns/factory_method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">4.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/object_pool">Object Pool</a><br />
Object pools are used to manage the object caching and it can offer a significant performance boost (<a class="wz small2" href="http://sourcemaking.com/design_patterns/object_pool">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">5.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/prototype">Prototype</a><br />
The Prototype pattern specifies the kind of objects to create using a prototypical instance. Prototypes of new products are often built prior to full production, but in this example, the prototype is passive and does not participate in copying itself (<a class="wz small2" href="http://sourcemaking.com/design_patterns/prototype">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">6.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/singleton">Singleton</a><br />
The Singleton pattern ensures that a class has only one instance and provides a global point of access to that instance (<a class="wz small2" href="http://sourcemaking.com/design_patterns/singleton">more&#8230;</a>)</div>
<div class="textinner">
</div>
</div>
</div>
</div>
<div class="section">
<h2>Structural Patterns</h2>
<div class="sectionbody">
<div class="numouter">
<div class="numinner">7.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/adapter">Adapter</a><br />
The Adapter pattern allows otherwise incompatible classes to work together by converting the interface of one class into an interface expected by the clients (<a class="wz small2" href="http://sourcemaking.com/design_patterns/adapter">more&#8230;</a>)</div>
</div>
<div class="divfl"><a href="http://sourcemaking.com/design_patterns/flyweight"><img style="border:1px dashed #cccccc;padding:5px;" src="http://sourcemaking.com/files/sm/101-2.jpg" alt="" /></a></div>
<div class="numouter">
<div class="numinner">8.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/bridge">Bridge</a><br />
The Bridge pattern decouples an abstraction from its implementation, so that the two can vary independently (<a class="wz small2" href="http://sourcemaking.com/design_patterns/bridge">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">9.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/composite">Composite</a><br />
The Composite composes objects into tree structures and lets clients treat individual objects and compositions uniformly (<a class="wz small2" href="http://sourcemaking.com/design_patterns/composite">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">10.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/decorator">Decorator</a><br />
The Decorator attaches additional responsibilities to an object dynamically. Decorator pattern suggests giving the client the ability to specify whatever combination of &#8220;features&#8221; is desired (<a class="wz small2" href="http://sourcemaking.com/design_patterns/decorator">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">11.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/facade">Facade</a><br />
The Facade defines a unified, higher level interface to a subsystem that makes it easier to use (<a class="wz small2" href="http://sourcemaking.com/design_patterns/facade">more&#8230;</a>)</div>
</div>
<div class="divfl"><a href="http://sourcemaking.com/design_patterns/proxy"><img style="border:1px dashed #cccccc;padding:5px;" src="http://sourcemaking.com/files/sm/101-3.jpg" alt="" /></a></div>
<div class="numouter">
<div class="numinner">12.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/flyweight">Flyweight</a><br />
The Flyweight pattern describes how to share objects to allow their use at fine granularities without prohibitive cost (<a class="wz small2" href="http://sourcemaking.com/design_patterns/flyweight">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">13.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/private_class_data">Private Class Data</a><br />
The private class data design pattern seeks to reduce exposure of attributes by limiting their visibility (<a class="wz small2" href="http://sourcemaking.com/design_patterns/private_class_data">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">14.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/proxy">Proxy</a><br />
The Proxy provides a surrogate or place holder to provide access to an object (<a class="wz small2" href="http://sourcemaking.com/design_patterns/proxy">more&#8230;</a>)</div>
<div class="textinner">
</div>
</div>
</div>
</div>
<div class="section">
<h2>Behavioral Patterns</h2>
<div class="sectionbody">
<div class="numouter">
<div class="numinner">15.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/chain_of_responsibility">Chain of Responsibility</a><br />
Chain of Responsibility chains the receiving objects together, and then passes any request messages from object to object until it reaches an object capable of handling the message (<a class="wz small2" href="http://sourcemaking.com/design_patterns/chain_of_responsibility">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">16.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/command">Command</a><br />
The Command pattern allows requests to be encapsulated as objects, thereby allowing clients to be parameterized with different requests (<a class="wz small2" href="http://sourcemaking.com/design_patterns/command">more&#8230;</a>)</div>
</div>
<div class="divfl"><a href="http://sourcemaking.com/design_patterns/interpreter"><img style="border:1px dashed #cccccc;padding:5px;" src="http://sourcemaking.com/files/sm/101-4.jpg" alt="" /></a></div>
<div class="numouter">
<div class="numinner">17.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/interpreter">Interpreter</a><br />
The Intepreter pattern defines a grammatical representation for a language and an interpreter to interpret the grammar (<a class="wz small2" href="http://sourcemaking.com/design_patterns/interpreter">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">18.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/iterator">Iterator</a><br />
The Iterator provides ways to access elements of an aggregate object sequentially without exposing the underlying structure of the object. (<a class="wz small2" href="http://sourcemaking.com/design_patterns/iterator">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">19.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/mediator">Mediator</a><br />
The Mediator defines an object that controls how a set of objects interact. Loose coupling between colleague objects is achieved by having colleagues communicate with the Mediator, rather than with each other (<a class="wz small2" href="http://sourcemaking.com/design_patterns/mediator">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">20.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/memento">Memento</a><br />
The Memento captures and externalizes an object&#8217;s internal state so that the object can later be restored to that state (<a class="wz small2" href="http://sourcemaking.com/design_patterns/memento">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">21.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/null_object">Null Object</a><br />
The Null Object encapsulates the absence of an object by providing a substitutable alternative that offers suitable default &#8220;do nothing&#8221; behavior (<a class="wz small2" href="http://sourcemaking.com/design_patterns/null_object">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">22.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/observer">Observer</a><br />
The Observer defines a one-to-many relationship so that when one object changes state, the others are notified and updated automatically (<a class="wz small2" href="http://sourcemaking.com/design_patterns/observer">more&#8230;</a>)</div>
</div>
<div class="divfl"><a href="http://sourcemaking.com/design_patterns/state"><img style="border:1px dashed #cccccc;padding:5px;" src="http://sourcemaking.com/files/sm/101-8.jpg" alt="" /></a></div>
<div class="numouter">
<div class="numinner">23.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/state">State</a><br />
The State pattern allows an object to change its behavior when its internal state changes (<a class="wz small2" href="http://sourcemaking.com/design_patterns/state">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">24.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/strategy">Strategy</a><br />
The Strategy lets the algorithm vary independently from the clients that use it. It defines a family of algorithms, encapsulates each one, and makes them interchangeable (<a class="wz small2" href="http://sourcemaking.com/design_patterns/strategy">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">25.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/template_method">Template Method</a><br />
The Template Method defines a skeleton of an algorithm in an operation, and defers some steps to subclasses (<a class="wz small2" href="http://sourcemaking.com/design_patterns/template_method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">26.</div>
<div class="textinner"><a href="http://sourcemaking.com/design_patterns/visitor">Visitor</a><br />
The Visitor pattern represents an operation to be performed on the elements of an object structure without changing the classes on which it operates (<a class="wz small2" href="http://sourcemaking.com/design_patterns/visitor">more&#8230;</a>)</div>
</div>
</div>
</div>
<h2>Composing Methods of Refactoring</h2>
<div class="sectionbody">
<div class="numouter">
<div class="numinner">27.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/extract-method">Extract Method</a><br />
If you have a code fragment that can be grouped together, turn the fragment into a method whose name explains the purpose of the method (<a class="wz small2" href="http://sourcemaking.com/refactoring/extract-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">28.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/inline-method">Inline Method</a><br />
If a method&#8217;s body is just as clear as its name, put the method&#8217;s body into the body of its callers and remove the method (<a class="wz small2" href="http://sourcemaking.com/refactoring/inline-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">29.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/inline-temp">Inline Temp</a><br />
If you have a temp that is assigned to once with a simple expression, and the temp is getting in the way of other refactorings, replace all references to that temp with the expression (<a class="wz small2" href="http://sourcemaking.com/refactoring/inline-temp">more&#8230;</a>)</div>
</div>
<div class="divfl"><a href="http://sourcemaking.com/design_patterns/iterator"><img style="border:1px dashed #cccccc;padding:5px;" src="http://sourcemaking.com/files/sm/101-5.jpg" alt="" /></a></div>
<div class="numouter">
<div class="numinner">30.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/introduce-explaining-variable">Introduce Explaining Variable</a><br />
If you have a complicated expression, put the result of the expression, or parts of the expression, in a temporary variable with a name that explains the purpose (<a class="wz small2" href="http://sourcemaking.com/refactoring/introduce-explaining-variable">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">31.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/remove-assignments-to-parameters">Remove Assignments to Parameters</a><br />
If the code assigns to a parameter, use a temporary variable instead (<a class="wz small2" href="http://sourcemaking.com/refactoring/remove-assignments-to-parameters">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">32.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-method-with-method-object">Replace Method with Method Object</a><br />
If uou have a long method that uses local variables in such a way that you cannot apply Extract Method, turn the method into its own object so that all the local variables become fields on that object (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-method-with-method-object">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">33.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-temp-with-query">Replace Temp with Query</a><br />
If you are using a temporary variable to hold the result of an expression, extract the expression into a method. Replace all references to the temp with the expression. The new method can then be used in other methods (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-temp-with-query">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">34.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/substitute-algorithm">Substitute Algorithm</a><br />
If you want to replace an algorithm with one that is clearer, replace the body of the method with the new algorithm (<a class="wz small2" href="http://sourcemaking.com/refactoring/substitute-algorithm">more&#8230;</a>)</div>
</div>
</div>
<div class="sectiontitle">
</div>
<h2>Moving Features Between Objects</h2>
<div class="sectionbody">
<div class="numouter">
<div class="numinner">35.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/extract-class">Extract Class</a><br />
If you have one class doing work that should be done by two, create a new class and move the relevant fields and methods from the old class into the new class (<a class="wz small2" href="http://sourcemaking.com/refactoring/extract-class">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">36.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/hide-delegate">Hide Delegate</a><br />
If a client is calling a delegate class of an object, create methods on the server to hide the delegate (<a class="wz small2" href="http://sourcemaking.com/refactoring/hide-delegate">more&#8230;</a>)</div>
</div>
<div class="divfl"><a href="http://sourcemaking.com/design_patterns/visitor"><img style="border:1px dashed #cccccc;padding:5px;" src="http://sourcemaking.com/files/sm/101-10.jpg" alt="" /></a></div>
<div class="numouter">
<div class="numinner">37.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/inline-class">Inline Class</a><br />
If a class isn&#8217;t doing very much, move all its features into another class and delete it (<a class="wz small2" href="http://sourcemaking.com/refactoring/inline-class">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">38.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/introduce-foreign-method">Introduce Foreign Method</a><br />
If a server class you are using needs an additional method, but you can&#8217;t modify the class, create a method in the client class with an instance of the server class as its first argument (<a class="wz small2" href="http://sourcemaking.com/refactoring/introduce-foreign-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">39.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/introduce-local-extension">Introduce Local Extension</a><br />
If a server class you are using needs several additional methods, but you can&#8217;t modify the class, create a new class that contains these extra methods. Make this extension class a subclass or a wrapper of the original (<a class="wz small2" href="http://sourcemaking.com/refactoring/introduce-local-extension">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">40.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/move-field">Move Field</a><br />
If a field is, or will be, used by another class more than the class on which it is defined, create a new field in the target class, and change all its users (<a class="wz small2" href="http://sourcemaking.com/refactoring/move-field">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">41.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/move-method">Move Method</a><br />
If a method is, or will be, using or used by more features of another class than the class on which it is defined, create a new method with a similar body in the class it uses most. Either turn the old method into a simple delegation, or remove it altogether (<a class="wz small2" href="http://sourcemaking.com/refactoring/move-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">42.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/remove-middle-man">Remove Middle Man</a><br />
If a class is doing too much simple delegation, get the client to call the delegate directly (<a class="wz small2" href="http://sourcemaking.com/refactoring/remove-middle-man">more&#8230;</a>)</div>
</div>
</div>
<div class="sectiontitle">
</div>
<h2>Organizing Data</h2>
<div class="sectionbody">
<div class="numouter">
<div class="numinner">43.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/change-bidirectional-association-to-unidirectional">Change Bidirectional Association to Unidirectional</a><br />
If you have a two-way association but one class no longer needs features from the other, drop the unneeded end of the association (<a class="wz small2" href="http://sourcemaking.com/refactoring/change-bidirectional-association-to-unidirectional">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">44.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/change-reference-to-value">Change Reference to Value</a><br />
If you have a reference object that is small, immutable, and awkward to manage, turn it into a value object (<a class="wz small2" href="http://sourcemaking.com/refactoring/change-reference-to-value">more&#8230;</a>)</div>
</div>
<div class="divfl"><a href="http://sourcemaking.com/design_patterns/memento"><img style="border:1px dashed #cccccc;padding:5px;" src="http://sourcemaking.com/files/sm/101-7.jpg" alt="" /></a></div>
<div class="numouter">
<div class="numinner">45.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/change-unidirectional-association-to-bidirectional">Change Unidirectional Association to Bidirectional</a><br />
If you have two classes that need to use each other&#8217;s features, but there is only a one-way link, add back pointers, and change modifiers to update both sets (<a class="wz small2" href="http://sourcemaking.com/refactoring/change-unidirectional-association-to-bidirectional">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">46.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/change-value-to-reference">Change Value to Reference</a><br />
If you have a class with many equal instances that you want to replace with a single object, turn the object into a reference object (<a class="wz small2" href="http://sourcemaking.com/refactoring/change-value-to-reference">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">47.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/duplicate-observed-data">Duplicate Observed Data</a><br />
If you have domain data available only in a GUI control, and domain methods need access, copy the data to a domain object. Set up an observer to synchronize the two pieces of data (<a class="wz small2" href="http://sourcemaking.com/refactoring/duplicate-observed-data">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">48.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/encapsulate-collection">Encapsulate Collection</a><br />
If a method returns a collection, make it return a read-only view and provide add/remove methods (<a class="wz small2" href="http://sourcemaking.com/refactoring/encapsulate-collection">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">49.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/encapsulate-field">Encapsulate Field</a><br />
If there is a public field, make it private and provide accessors (<a class="wz small2" href="http://sourcemaking.com/refactoring/encapsulate-field">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">50.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-array-with-object">Replace Array with Object</a><br />
If you have an array in which certain elements mean different things, replace the array with an object that has a field for each element (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-array-with-object">more&#8230;</a>)</div>
</div>
<div class="divfl"><a href="http://sourcemaking.com/design_patterns/strategy"><img style="border:1px dashed #cccccc;padding:5px;" src="http://sourcemaking.com/files/sm/101-9.jpg" alt="" /></a></div>
<div class="numouter">
<div class="numinner">51.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-data-value-with-object">Replace Data Value with Object</a><br />
If you have a data item that needs additional data or behavior, turn the data item into an object (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-data-value-with-object">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">52.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-magic-number-with-symbolic-constant">Replace Magic Number with Symbolic Constant</a><br />
If you have a literal number with a particular meaning, create a constant, name it after the meaning, and replace the number with it (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-magic-number-with-symbolic-constant">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">53.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-record-with-data-class">Replace Record with Data Class</a><br />
If you need to interface with a record structure in a traditional programming environment, make a dumb data object for the record (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-record-with-data-class">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">54.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-subclass-with-fields">Replace Subclass with Fields</a><br />
If you have subclasses that vary only in methods that return constant data, change the methods to superclass fields and eliminate the subclasses (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-subclass-with-fields">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">55.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-type-code-with-class">Replace Type Code with Class</a><br />
If a class has a numeric type code that does not affect its behavior, replace the number with a new class (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-type-code-with-class">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">56.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-type-code-with-state-strategy">Replace Type Code with State/Strategy</a><br />
If you have a type code that affects the behavior of a class, but you cannot use subclassing, replace the type code with a state object (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-type-code-with-state-strategy">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">57.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-type-code-with-subclasses">Replace Type Code with Subclasses</a><br />
If you have an immutable type code that affects the behavior of a class, replace the type code with subclasses (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-type-code-with-subclasses">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">58.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/introduce-explaining-variable">Introduce Explaining Variable</a><br />
If you have a complicated expression, put the result of the expression, or parts of the expression, in a temporary variable with a name that explains the purpose (<a class="wz small2" href="http://sourcemaking.com/refactoring/introduce-explaining-variable">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">59.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/remove-assignments-to-parameters">Remove Assignments to Parameters</a><br />
If the code assigns to a parameter, use a temporary variable instead (<a class="wz small2" href="http://sourcemaking.com/refactoring/remove-assignments-to-parameters">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">60.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/self-encapsulate-field">Self Encapsulate Field</a><br />
If you are accessing a field directly, but the coupling to the field is becoming awkward, create getting and setting methods for the field and use only those to access the field (<a class="wz small2" href="http://sourcemaking.com/refactoring/self-encapsulate-field">more&#8230;</a>)</div>
<div class="textinner">
</div>
</div>
</div>
<div class="section">
<h2>Simplifying Conditional Expressions</h2>
<div class="sectionbody">
<div class="numouter">
<div class="numinner">61.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/consolidate-conditional-expression">Consolidate Conditional Expression</a><br />
If you have a sequence of conditional tests with the same result, combine them into a single conditional expression and extract it (<a class="wz small2" href="http://sourcemaking.com/refactoring/consolidate-conditional-expression">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">62.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/consolidate-duplicate-conditional-fragments">Consolidate Duplicate Conditional Fragments</a><br />
If the same fragment of code is in all branches of a conditional expression, move it outside of the expression (<a class="wz small2" href="http://sourcemaking.com/refactoring/consolidate-duplicate-conditional-fragments">more&#8230;</a>)</div>
</div>
<p><img style="border:1px dashed #cccccc;float:right;padding:5px;" src="http://sourcemaking.com/files/sm/101-13.jpg" alt="" /></p>
<div class="numouter">
<div class="numinner">63.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/decompose-conditional">Decompose Conditional</a><br />
If you have a complicated conditional (if-then-else) statement, extract methods from the condition, then part, and else parts (<a class="wz small2" href="http://sourcemaking.com/refactoring/decompose-conditional">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">64.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/introduce-assertion">Introduce Assertion</a><br />
If a section of code assumes something about the state of the program, make the assumption explicit with an assertion (<a class="wz small2" href="http://sourcemaking.com/refactoring/introduce-assertion">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">65.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/introduce-null-object">Introduce Null Object</a><br />
If you have repeated checks for a null value, replace the null value with a null object (<a class="wz small2" href="http://sourcemaking.com/refactoring/introduce-null-object">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">66.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/remove-control-flag">Remove Control Flag</a><br />
If you have a variable that is acting as a control flag for a series of boolean expressions, use a break or return instead (<a class="wz small2" href="http://sourcemaking.com/refactoring/remove-control-flag">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">67.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-conditional-with-polymorphism">Replace Conditional with Polymorphism</a><br />
If you have a conditional that chooses different behavior depending on the type of an object, move each leg of the conditional to an overriding method in a subclass. Make the original method abstract (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-conditional-with-polymorphism">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">68.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-nested-conditional-with-guard-clauses">Replace Nested Conditional with Guard Clauses</a><br />
If a method has conditional behavior that does not make clear the normal path of execution, use guard clauses for all the special cases (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-nested-conditional-with-guard-clauses">more&#8230;</a>)
</div>
</div>
</div>
</div>
<div class="section">
<h2>Making Method Calls Simpler</h2>
<div class="sectionbody">
<div class="numouter">
<div class="numinner">69.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/add-parameter">Add Parameter</a><br />
If a method needs more information from its caller, add a parameter for an object that can pass on this information (<a class="wz small2" href="http://sourcemaking.com/refactoring/add-parameter">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">70.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/encapsulate-downcast">Encapsulate Downcast</a><br />
If a method returns an object that needs to be downcasted by its callers,  move the downcast to within the method (<a class="wz small2" href="http://sourcemaking.com/refactoring/encapsulate-downcast">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">71.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/hide-method">Hide Method</a><br />
If a method is not used by any other class, make the method private (<a class="wz small2" href="http://sourcemaking.com/refactoring/hide-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">72.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/introduce-parameter-object">Introduce Parameter Object</a><br />
If you have a group of parameters that naturally go together, replace them with an object (<a class="wz small2" href="http://sourcemaking.com/refactoring/introduce-parameter-object">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">73.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/hide-delegate">Hide Delegate</a><br />
If a client is calling a delegate class of an object, create methods on the server to hide the delegate (<a class="wz small2" href="http://sourcemaking.com/refactoring/hide-delegate">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">74.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/parameterize-method">Parameterize Method</a><br />
If several methods do similar things but with different values contained in the method body, create one method that uses a parameter for the different values (<a class="wz small2" href="http://sourcemaking.com/refactoring/parameterize-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">75.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/preserve-whole-object">Preserve Whole Object</a><br />
If you are getting several values from an object and passing these values as parameters in a method call, send the whole object instead (<a class="wz small2" href="http://sourcemaking.com/refactoring/preserve-whole-object">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">76.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/remove-parameter">Remove Parameter</a><br />
If a parameter is no longer used by the method body, remove it (<a class="wz small2" href="http://sourcemaking.com/refactoring/remove-parameter">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">77.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/remove-setting-method">Remove Setting Method</a><br />
A field should be set at creation time and never altered. Remove any setting method for that field (<a class="wz small2" href="http://sourcemaking.com/refactoring/remove-setting-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">78.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/rename-method">Rename Method</a><br />
If the name of a method does not reveal its purpose, change the name of the method (<a class="wz small2" href="http://sourcemaking.com/refactoring/rename-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">79.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-constructor-with-factory-method">Replace Constructor with Factory Method</a><br />
If you want to do more than simple construction when you create an object, replace the constructor with a factory method (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-constructor-with-factory-method">more&#8230;</a>)</div>
</div>
<p><img style="border:1px dashed #cccccc;float:right;padding:5px;" src="http://sourcemaking.com/files/sm/101-11.jpg" alt="" /></p>
<div class="numouter">
<div class="numinner">80.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-error-code-with-exception">Replace Error Code with Exception</a><br />
If a method returns a special code to indicate an error, throw an exception instead (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-error-code-with-exception">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">81.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-exception-with-test">Replace Exception with Test</a><br />
If you are throwing a checked exception on a condition the caller could have checked first, change the caller to make the test first (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-exception-with-test">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">82.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-parameter-with-explicit-methods">Replace Parameter with Explicit Methods</a><br />
If you have a method that runs different code depending on the values of an enumerated parameter, create a separate method for each value of the parameter (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-parameter-with-explicit-methods">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">83.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-parameter-with-method">Replace Parameter with Method</a><br />
If an object invokes a method, then passes the result as a parameter for a method. The receiver can also invoke this method, remove the parameter and let the receiver invoke the method (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-parameter-with-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">84.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/separate-query-from-modifier">Separate Query from Modifier</a><br />
If you have a method that returns a value but also changes the state of an object, create two methods, one for the query and one for the modification (<a class="wz small2" href="http://sourcemaking.com/refactoring/separate-query-from-modifier">more&#8230;</a>)</div>
<div class="textinner">
</div>
</div>
</div>
</div>
<div class="section">
<h2>Dealing with Generalization</h2>
<div class="sectionbody">
<div class="numouter">
<div class="numinner">85.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/collapse-hierarchy">Collapse Hierarchy</a><br />
If a superclass and subclass are not very different, merge them together (<a class="wz small2" href="http://sourcemaking.com/refactoring/collapse-hierarchy">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">86.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/extract-interface">Extract Interface</a><br />
If several clients use the same subset of a class&#8217;s interface, or two classes have part of their interfaces in common, extract the subset into an interface (<a class="wz small2" href="http://sourcemaking.com/refactoring/extract-interface">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">87.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/extract-subclass">Extract Subclass</a><br />
If a class has features that are used only in some instances, create a subclass for that subset of features (<a class="wz small2" href="http://sourcemaking.com/refactoring/extract-subclass">more&#8230;</a>)</div>
</div>
<p><img style="border:1px dashed #cccccc;float:right;padding:5px;" src="http://sourcemaking.com/files/sm/101-12.jpg" alt="" /></p>
<div class="numouter">
<div class="numinner">88.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-array-with-object">Replace Array with Object</a><br />
If you have an array in which certain elements mean different things, replace the array with an object that has a field for each element (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-array-with-object">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">89.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-data-value-with-object">Replace Data Value with Object</a><br />
If you have a data item that needs additional data or behavior, turn the data item into an object (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-data-value-with-object">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">90.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/extract-superclass">Extract Superclass</a><br />
If you have two classes with similar features, create a superclass and move the common features to the superclass (<a class="wz small2" href="http://sourcemaking.com/refactoring/extract-superclass">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">91.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/form-template-method">Form Template Method</a><br />
If you have two methods in subclasses that perform similar steps in the same order, yet the steps are different, get the steps into methods with the same signature, so that the original methods become the same. Then you can pull them up (<a class="wz small2" href="http://sourcemaking.com/refactoring/form-template-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">92.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/pull-up-constructor-body">Pull Up Constructor Body</a><br />
If you have constructors on subclasses with mostly identical bodies, create a superclass constructor; call this from the subclass methods (<a class="wz small2" href="http://sourcemaking.com/refactoring/pull-up-constructor-body">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">93.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/pull-up-field">Pull Up Field</a><br />
If two subclasses have the same field, move the field to the superclass (<a class="wz small2" href="http://sourcemaking.com/refactoring/pull-up-field">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">94.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/pull-up-method">Pull Up Method</a><br />
If you have methods with identical results on subclasses, move them to the superclass (<a class="wz small2" href="http://sourcemaking.com/refactoring/pull-up-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">95.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/push-down-field">Push Down Field</a><br />
If a field is used only by some subclasses, move the field to those subclasses (<a class="wz small2" href="http://sourcemaking.com/refactoring/push-down-field">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">96.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/push-down-method">Push Down Method</a><br />
If behavior on a superclass is relevant only for some of its subclasses, move it to those subclasses (<a class="wz small2" href="http://sourcemaking.com/refactoring/push-down-method">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">97.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-delegation-with-inheritance">Replace Delegation with Inheritance</a><br />
If you&#8217;re using delegation and are often writing many simple delegations for the entire interface, make the delegating class a subclass of the delegate (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-delegation-with-inheritance">more&#8230;</a>)</div>
</div>
<p><img style="border:1px dashed #cccccc;float:right;padding:5px;" src="http://sourcemaking.com/files/sm/101-14.jpg" alt="" /></p>
<div class="numouter">
<div class="numinner">98.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/replace-inheritance-with-delegation">Replace Inheritance with Delegation</a><br />
If a subclass uses only part of a superclasses interface or does not want to inherit data, create a field for the superclass, adjust methods to delegate to the superclass, and remove the subclassing (<a class="wz small2" href="http://sourcemaking.com/refactoring/replace-inheritance-with-delegation">more&#8230;</a>)</div>
<div class="textinner">
</div>
</div>
</div>
</div>
<h2>Big Refactorings</h2>
<div class="numouter">
<div class="numinner">99.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/convert-procedural-design-to-objects">Convert Procedural Design to Objects</a><br />
If you have code written in a procedural style, turn the data records into objects, break up the behavior, and move the behavior to the objects (<a class="wz small2" href="http://sourcemaking.com/refactoring/refactoring/convert-procedural-design-to-objects">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">100.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/extract-hierarchy">Extract Hierarchy</a><br />
If you have a class that is doing too much work, at least in part through many conditional statements, create a hierarchy of classes in which each subclass represents a special case (<a class="wz small2" href="http://sourcemaking.com/refactoring/extract-hierarchy">more&#8230;</a>)</div>
</div>
<div class="numouter">
<div class="numinner">101.</div>
<div class="textinner"><a href="http://sourcemaking.com/refactoring/tease-apart-inheritance">Tease Apart Inheritance</a><br />
If you have an inheritance hierarchy that is doing two jobs at once, create two hierarchies and use delegation to invoke one from the other (<a class="wz small2" href="http://sourcemaking.com/refactoring/tease-apart-inheritance">more&#8230;</a>)</div>
<div class="textinner">
</div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/javatron.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/javatron.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javatron.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javatron.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javatron.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javatron.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javatron.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javatron.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javatron.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javatron.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javatron.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javatron.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javatron.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javatron.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javatron.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javatron.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=16&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javatron.wordpress.com/2008/05/13/101-design-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c988293b7635a997e9c42ee035e2f96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">javatron</media:title>
		</media:content>

		<media:content url="http://sourcemaking.com/files/sm/101-1.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-2.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-3.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-4.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-8.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-5.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-10.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-7.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-9.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-13.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-11.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-12.jpg" medium="image" />

		<media:content url="http://sourcemaking.com/files/sm/101-14.jpg" medium="image" />
	</item>
		<item>
		<title>The Top 10 Problems with IT Certification in 2008</title>
		<link>http://javatron.wordpress.com/2008/04/07/the-top-10-problems-with-it-certification-in-2008/</link>
		<comments>http://javatron.wordpress.com/2008/04/07/the-top-10-problems-with-it-certification-in-2008/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 15:37:10 +0000</pubDate>
		<dc:creator>javatron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javatron.wordpress.com/?p=15</guid>
		<description><![CDATA[http://www.informit.com/articles/article.aspx?p=1180991 The Top 10 Problems with IT Certification in 2008 Less than 10 years ago, certification was a surefire way to enter the growing IT sector. But certification no longer guarantees that you will be able to find a high quality job in IT. It still has its place, but the IT certification industry has [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=15&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>http://www.informit.com/articles/article.aspx?p=1180991</p>
<h1>The Top 10 Problems with IT Certification in 2008</h1>
<div id="articleLongDescription">Less than 10 years ago, certification was a surefire way to enter the growing IT sector. But certification no longer guarantees that you will be able to find a high quality job in IT. It still has its place, but the IT certification industry has faced some systemic problems that no one has addressed since its emergence. Warren Wyrostek calls on personal and real-world experience to share the top 10 problems with IT certification in 2007/2008.</div>
<p>Since the early part of this decade, when I wrote several certification articles for InformIT, IT certifications have changed a great deal, and the industry’s perception of certifications has waned. IT certifications have fallen out of favor in the eyes of many.</p>
<p>Less than 10 years ago, I had no reservation about recommending a certification to a person interested in entering the IT sector. Certification and the training needed to &#8220;earn&#8221; an IT certification was a great way for a career changer, a displaced worker, or someone simply looking for a career to get a foot in the door on a growing field and land a good job with a lot of growth potential.</p>
<p>Certification no longer guarantees that you will be able to find that kind of job in IT. It still has its place, but the IT certification industry has faced some systemic problems that no one has addressed since its emergence.</p>
<p>Having jumped hook, line, and sinker into the certification world in 1995, I have a bit of historical perspective about where we have been and where we are and what the problems are.</p>
<p>The following are the topics I want to cover during the course of three articles:</p>
<ul>
<li>In this first article, I’ll examine the top 10 problems with IT certification in 2007–2008.</li>
<li>Next, I’ll re-examine the first steps you should consider if you want to enter IT using the current certification paths.</li>
<li>In the third article, I’ll present to InformIT readers an integrated networking program as a possible solution to the current problems with IT certification.</li>
</ul>
<p>But before we can fix the problems, we have to define those problems. On to the problems.</p>
<h2>1. Certifications are Vendor-centric</h2>
<p>IT certifications, as they are currently marketed, are vendor-centric. Their purpose is to quantify a person’s understanding of some of the functionality of a vendor’s product.</p>
<p>A vendor’s certification helps a potential client feel a sense of ownership when it comes to a product. Those who support a vendor’s IT products are encouraged to certify in the product(s) to validate their skill levels.</p>
<p>The problem is that every vendor has its own set of certification criteria; none of them match, and there is no uniformity. Whatever Vendor A says you should know is what you need to know in order to achieve validation.</p>
<p>If you have ever taken a Novell exam, a Microsoft exam, a Cisco exam, and/or a CompTIA exam, you probably have been told to answer the questions on the exam the way the given vendor wants you to answer the questions.</p>
<p>Don’t worry if the answer is ridiculous; if you want to get certified, give the Novell answer, or the Microsoft answer, or the Cisco answer, or the CompTIA answer. For the same question, each vendor could potentially have different correct responses. This is maddening at best.</p>
<h2>2. Certification’s Life Cycle Is Short!</h2>
<p>Because IT certifications are vendor-centric, a vendor can revise, revamp, or completely redo a certification as often as it wants. Much is based on the life cycle of a given product, such as an operating system. If you want to feel like you are simply chasing your tail, keep up your certifications based on a vendor’s whim and whimsy for how long they feel a product’s life cycle is.</p>
<p>Here’s a good example from my experience. In 1995–1996, I earned the Microsoft MCSE for NT 3.51 through a lot of hard work. Not six months later, however, Microsoft changed the MCSE requirements for the MCSE in NT 4.0. The seven exams I took for 3.51 no longer had legs. I had to take six or seven more. So I did.</p>
<p>Well, guess what happened in 1999–2000? Windows 2000 came out, along with a whole new series of exams—which almost killed me. Now in less than 4 years I had taken close to 21 exams to earn 3 Microsoft certifications that I needed to teach the most up-to-date Microsoft classes. Several years later, Windows 2003 came out with two more upgrade exams, which so far I have not taken/passed because of disgust with the process. I will probably have to take them before long because the Longhorn roadmap &#8220;encourages&#8221; MCSEs to be at least 2003 to avoid taking <em>all</em> exams again.</p>
<p>Now a sane person would say that I did not have to be MCSE-2003 if I did not have to teach those classes. I have supported Windows Server 2003 since it was in beta without a MCSE-2003 and never had a problem.</p>
<p>I would agree until recently, when I was talking to an HR recruiter who told me that a company that was interested in me would not consider any of my experience unless I had the latest-and-greatest MCSE. Three earlier MCSEs and 15 years of field experience made no difference. If I did not have the MCSE 2003 they would look elsewhere.</p>
<p>Guess what? They looked elsewhere.</p>
<h2>3. Certifications Are Not Real-World Oriented</h2>
<p>Because certifications are vendor-oriented, they do not prepare you for the real world. Every vendor would have you believe that every enterprise environment is made up of only their platform or application. In today’s market nothing is farther from the truth. Every environment is <em>integrated</em>.</p>
<p>No environment is made up of just Microsoft, or UNIX, or Novell, or Linux. The real-world enterprise is made up of at least two platforms, and tens if not hundreds of applications from a host of vendors. The real world is a fully integrated environment. If you are focused on one vendor’s platform/application, could you in practice manage a real-world enterprise comprised of numerous platforms, or do you have to outsource what you don’t know—thereby giving up ownership to someone else?</p>
<p>If you earn the MCSE from Microsoft, are you qualified to administer a Lotus Notes environment or a Cisco environment? If you are a certified Linux admin, are you qualified to manage a Windows 2003 environment running SQL 2005?</p>
<h2>4. Certifications Have Been Devalued</h2>
<p>This next problem is no secret. IT certifications have been devalued since their heyday in the mid- to late 1990s. The reasons for the devaluation could be the basis for a book. Some of the major reasons why many in the industry do not respect IT certs are the following:</p>
<ul>
<li>Brain dumps let you get all the questions on a live exam. You can then pass the exam without knowing the technology.</li>
<li>Paper certs: those who have used brain dumps or so-called study guides that many sites sell to prep a person for the live test questions. People earn the certification without training and without experience, and advertise themselves as experts. This makes everyone look bad and devalues the certification process.</li>
<li>Testing issues are legendary. There are some vendors, such as Microsoft and Cisco, which are trying to improve the value of the testing experience by incorporating simulations. But in my opinion it is a band-aid. Knowledge-based cognitive exams are awful. Many are poorly written, poorly edited, not real-world oriented, and not in tune with the needs of the industry.</li>
<li>It is difficult to truly accept whether candidates know their stuff based on these exams. If you pay enough, a trained chimp could pass many of these exams.</li>
<li>Practicums, which in my opinion are the best testing methodology currently available, are not widely used. When a practicum is done right, knowledge and experience are absolutely needed. Brain dumps are useless. What matters is skill.</li>
<li>In short, testing has been inconsistent and all over the map devaluing certification.</li>
</ul>
<h2>5. No Oversight Body</h2>
<p>Because certifications are vendor-centric, no one is overseeing the whole process.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/javatron.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/javatron.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javatron.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javatron.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javatron.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javatron.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javatron.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javatron.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javatron.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javatron.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javatron.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javatron.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javatron.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javatron.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javatron.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javatron.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=15&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javatron.wordpress.com/2008/04/07/the-top-10-problems-with-it-certification-in-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c988293b7635a997e9c42ee035e2f96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">javatron</media:title>
		</media:content>
	</item>
		<item>
		<title>Can we please stop fighting FUD with FUD?</title>
		<link>http://javatron.wordpress.com/2008/02/24/can-we-please-stop-fighting-fud-with-fud/</link>
		<comments>http://javatron.wordpress.com/2008/02/24/can-we-please-stop-fighting-fud-with-fud/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 14:15:25 +0000</pubDate>
		<dc:creator>javatron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javatron.wordpress.com/?p=14</guid>
		<description><![CDATA[http://www.freesoftwaremagazine.com/columns/can_we_please_stop_fighting_fud_fud Can we please stop fighting FUD with FUD? By Ryan Cartwright Online on: 2008-02-12 It has long been the case that proprietary software companies regularly engage in FUD (fear, uncertainty and doubt) tactics against their opponents. This particularly seems to apply to Microsoft&#8217;s statements about free software in general and GNU/Linux in particular. Recently [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=14&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>http://www.freesoftwaremagazine.com/columns/can_we_please_stop_fighting_fud_fud</p>
<p>Can we please stop fighting FUD with FUD?</p>
<p>By Ryan Cartwright</p>
<p>Online on: 2008-02-12</p>
<p>It has long been the case that proprietary software companies<br />
regularly engage in FUD (fear, uncertainty and doubt) tactics against<br />
their opponents. This particularly seems to apply to Microsoft&#8217;s<br />
statements about free software in general and GNU/Linux in particular.<br />
Recently I&#8217;ve noticed a surge in the amount of FUD going the other<br />
wayâ€”from the FOSS community towards Microsoft and other proprietary<br />
software companies. Why do we feel it is necessary to fight FUD with<br />
FUD<br />
The genesis of FUD</p>
<p>According to Wikipedia FUD has been used in various contexts since the<br />
1920s but became more used as a terminology in the 1980s and 1990s. It<br />
is most frequently associated with Microsoft. Of course, they are not<br />
the only proponents of FUD but they do seem to employ it a fair bit.</p>
<p>I am not a fan of Microsoft or their monopolistic marketing tactics</p>
<p>FUD from the FOSS community is, again, not new but in recent years it<br />
has become a more widespread tacticâ€”particularly where Microsoft is<br />
the target. Just so I don&#8217;t give the wrong idea: I am not a fan of<br />
Microsoft or their monopolistic marketing tactics. I just don&#8217;t think<br />
the FOSS community should be so ready to use those same tactics as a<br />
defence. So what are the examples of FOSS FUD then? I don&#8217;t want to<br />
make this into a rant against any individual so I won&#8217;t give explicit<br />
examples but below are the kinds of arguments you might find in FOSS<br />
FUD.<br />
FOSS FUD</p>
<p>* &#8220;Using FOSS will save you thousands!&#8221;<br />
* &#8220;Microsoft&#8217;s products suck&#8221;<br />
* &#8220;If you are not using 100% free softwareâ€”don&#8217;t bother&#8221;</p>
<p>That list in not exhaustive but why would I consider this FUD? To be<br />
honestâ€”it&#8217;s not the statements themselves as the way they are<br />
presented. What bothers me is when the &#8220;facts&#8221; are twisted or poorly<br />
researched. All it does is make us look at best foolish and at worst<br />
dishonest. When you compare the retail cost of the most expensive<br />
proprietary product ranges it is a comparison most people won&#8217;t<br />
recognise. In the proprietary world bulk-discounts, student editions,<br />
special offers abound. Rarely do people pay the full retail price. In<br />
any case I&#8217;ve said before that cost is not the best argument to<br />
useâ€”particularly as others have mentioned you may not always be the<br />
cheapest. Using cost may get people&#8217;s attention but it won&#8217;t last if<br />
your &#8216;facts&#8217; are biasedâ€”even with the best of intentions.</p>
<p>If you&#8217;re to going run down Microsoft products then you need to be<br />
specific. What products suck, why and how do they suck? I see a lot of<br />
this type of thing that simply shows the proponent has rarely used the<br />
product in question. Aside from that, is this really a good argument<br />
to make? Are we really going to be so arrogant as to imply that free<br />
software doesn&#8217;t suck at all? By running down the opposition aren&#8217;t we<br />
implying there are no issues with &#8220;our&#8221; software? Arguing your case by<br />
running down the opposition is the stuff of politicians and is pure<br />
FUD. Argue your case on the merits of free software not the faults of<br />
the proprietary alternatives. There are situations when it is useful<br />
to highlight the differences there&#8217;s a very real danger of it sounding<br />
bitter and jealous.</p>
<p>With regards the purist argument: I agree that the world would be<br />
better if everyone used entirely free softwareâ€”something I try to do<br />
myself. That said, if you come in too quick and aggressive with this<br />
point you can drive people away just as they are starting to take an<br />
interest. We need to encourage people to take small steps into our<br />
brave new world. Let&#8217;s allow people to open their eyes at their own<br />
pace.<br />
Swapping shoes</p>
<p>Before we make any plug for free software, we would do well to put<br />
ourselves in the other person&#8217;s shoes. What may sound obvious to us<br />
could sound bitter, pedantic or jealous to them. It&#8217;s difficult to do<br />
this though and we&#8217;ll always come to that point where mis-information<br />
needs correcting. This is when we need to consider how they may<br />
interpret what we say or write.</p>
<p>If we want to promote free softwareâ€”and it&#8217;s associated idealsâ€”to<br />
new<br />
users then we should promote it on its merits, without twisting facts<br />
and by giving them a chance to get it wrong occasionally. Most Windows<br />
users I know moan about it. They tell me it&#8217;s &#8216;bad&#8217; without me having<br />
to tell them. My job therefore becomes simpler: to tell them how they<br />
will benefit from free software.<br />
FUD is FUD is FUD</p>
<p>Fighting FUD with FUD will nearly always leave the listener/reader<br />
confused and less enthusiastic about your side. Iâ€”for oneâ€”would<br />
like<br />
to see more blogs and comments on why free software is good rather<br />
than why Microsoft is bad. So let&#8217;s start here. Your task is complete  the sentence &#8220;Free software is good becauseâ€¦&#8221; in less than 50 words.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/javatron.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/javatron.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javatron.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javatron.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javatron.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javatron.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javatron.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javatron.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javatron.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javatron.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javatron.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javatron.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javatron.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javatron.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javatron.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javatron.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=14&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javatron.wordpress.com/2008/02/24/can-we-please-stop-fighting-fud-with-fud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c988293b7635a997e9c42ee035e2f96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">javatron</media:title>
		</media:content>
	</item>
		<item>
		<title>Coplien and Martin Debate TDD, CDD and Professionalism</title>
		<link>http://javatron.wordpress.com/2008/02/24/coplien-and-martin-debate-tdd-cdd-and-professionalism/</link>
		<comments>http://javatron.wordpress.com/2008/02/24/coplien-and-martin-debate-tdd-cdd-and-professionalism/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 14:12:48 +0000</pubDate>
		<dc:creator>javatron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javatron.wordpress.com/2008/02/24/coplien-and-martin-debate-tdd-cdd-and-professionalism/</guid>
		<description><![CDATA[http://www.infoq. com/interviews/ coplien-martin- tdd Summary Debate sprang up at JAOO &#8217;07 around Bob Martin&#8217;s assertion that &#8220;nowadays it is irresponsible for a developer to ship a line of code he has not executed in a unit test.&#8221; In this InfoQ video, he debated with Jim Coplien on this and other topics, including Design by Contract [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=13&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.infoq.com/interviews/coplien-martin-tdd" rel="nofollow" target="_blank">http://www.infoq. com/interviews/ coplien-martin- tdd</a></p>
<p>Summary<br />
Debate sprang up at JAOO &#8217;07 around Bob Martin&#8217;s assertion that<br />
&#8220;nowadays it is irresponsible for a developer to ship a line of code<br />
he has not executed in a unit test.&#8221; In this InfoQ video, he debated<br />
with Jim Coplien on this and other topics, including Design by<br />
Contract vs. TDD and how much up-front architecture is needed to keep<br />
a system consistent with the business domain model.</p>
<p>Bio<br />
Bob Martin is an Agile Manifesto author, and author of books on Agile<br />
Programming, XP, UML, O-O Programming, and C++. He is CEO and<br />
president of Object Mentor www.objectmentor. com/ Jim Coplien is a<br />
software pioneer in o-o programming and C++ and multi-paradigm design.<br />
He appreciates the human side of design, and has written critically<br />
acclaimed books on design and development.</p>
<p>Excerpts:</p>
<p>B: So I have 3 laws of test driven development. The first one is: a<br />
test driven developer does not write a line of production code until<br />
he has written a failing unit test, and no production code can be<br />
written until there is a failing unit test&#8230;</p>
<p>J: Per se, the main concerns I have about TDD are not problematic with<br />
respect to what you&#8217;ve just said in isolation, so if it&#8217;s no more and<br />
no less than that we may not have a big disagreement. What my concern<br />
is, then, comes out of doing broad work with a lot of clients and a<br />
little bit of interactions with other consultants and other scrum<br />
masters who have seen these things happening in their project. And<br />
we&#8217;ve seen 2 major problems: one is that use of TDD without some kind<br />
of architecture or framework into which you&#8217;re working &#8211; which was<br />
very strongly Kent&#8217;s original position: you use TDD to drive your<br />
architecture &#8211; leads to a procedural bottom-up architecture because<br />
the things you are testing are units.</p>
<p>We just had a discussion upstairs about &#8220;is TDD the same as unit<br />
testing?&#8221; Well, no, it&#8217;s a little more, but unit testing was a great<br />
idea in Fortran, when you could build these layers of APIs and the<br />
units of organization of the software were the same as the units of<br />
testing, but today the units of organization of the software are<br />
objects and we&#8217;re testing procedures and there is a little bit of a<br />
mismatch. Now, if you are using the procedures to drive your<br />
architecture, I think you are trying to build a 3 dimensional<br />
structure from 2 dimensional data, and you end up going awry. And one<br />
of the things we see a lot, in a lot of projects, is that projects go<br />
south on about their 3rd sprint and they crash and burn because they<br />
cannot go any further, because they have cornered themselves<br />
architecturally. And you can&#8217;t refactor your way out of this because<br />
the refactoring has to be across class categories, across class<br />
hierarchies, and you no longer can have any assurances about having<br />
the same functionality.</p>
<p>The other problem we&#8217;ve seen is that this destroys the GUI and this is<br />
what Trygve [Reenskaug] and I talk a lot about, because you have this<br />
procedural architecture kind-of in a JAVA class wrapper; you no longer<br />
are driving the structure according to domain knowledge and things<br />
that are in the user&#8217;s conceptual model of the world, which is where<br />
object orientation came from. I mean even Kent, as he&#8217;s very often<br />
said: &#8220;you can&#8217;t hide a bad architecture with a good GUI.&#8221; The<br />
architecture will always shine through to the interface, and I<br />
strongly believe that, and that is why I believe we need something in<br />
the infrastructure that gives you a picture of what the domain model<br />
is out at the interface. Then, if I want to apply Uncle Bob&#8217;s 3 rules<br />
I probably don&#8217;t have a problem with that, but I want a starting place<br />
that captures this other dimension, which is the structural dimension.</p>
<p>B: Alright. But you do not accept the thesis that the practice of test<br />
driven development is a pure requisite to professional behavior in<br />
2007.</p>
<p>J: I absolutely do not accept that.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/javatron.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/javatron.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javatron.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javatron.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javatron.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javatron.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javatron.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javatron.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javatron.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javatron.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javatron.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javatron.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javatron.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javatron.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javatron.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javatron.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=13&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javatron.wordpress.com/2008/02/24/coplien-and-martin-debate-tdd-cdd-and-professionalism/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c988293b7635a997e9c42ee035e2f96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">javatron</media:title>
		</media:content>
	</item>
		<item>
		<title>Top-10 Application-Design Mistakes</title>
		<link>http://javatron.wordpress.com/2008/02/20/top-10-application-design-mistakes/</link>
		<comments>http://javatron.wordpress.com/2008/02/20/top-10-application-design-mistakes/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 14:32:09 +0000</pubDate>
		<dc:creator>javatron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javatron.wordpress.com/?p=12</guid>
		<description><![CDATA[Very interesting observations. I myself is is guilty of some of these mistakes&#8230;Hehe. Well, it&#8217;s never too late to correct them. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- http://www.useit.com/alertbox/application-mistakes.html Jakob Nielsen&#8216;s Alertbox, February 19, 2008: Top-10 Application-Design Mistakes Summary: Application usability is enhanced when users know how to operate the UI and it guides them through the workflow. Violating common guidelines [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=12&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Very interesting observations. I myself is is guilty of some of these mistakes&#8230;Hehe. Well, it&#8217;s never too late to correct them.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>http://www.useit.com/alertbox/application-mistakes.html</p>
<p class="overline"> <b><a href="http://www.useit.com/jakob/" title="Author biography">Jakob Nielsen</a>&#8216;s Alertbox, February 19, 2008:</b></p>
<h1>Top-10 Application-Design Mistakes</h1>
<blockquote><p> <b>Summary:</b><br />
Application usability is enhanced when users know how to operate the UI and it guides them through the workflow. Violating common guidelines prevents both.</p></blockquote>
<p>It&#8217;s hard to write a general article about application design mistakes because the very <b>worst mistakes are domain-specific</b> and idiosyncratic. Usually, applications fail because they (a) solve the <b>wrong problem</b>, (b) have the <b>wrong features</b> for the right problem, or (c) make the right features too <b>complicated</b> for users to understand.</p>
<p>Any of these three mistakes will doom your app, and yet I still can&#8217;t tell you what to do. What&#8217;s the right problem? What are the right features? What complicating curlicues can safely be cut from those features? For each domain and user category, these questions have specific and very different answers.</p>
<p>The only generalizable advice is this: rather than <a href="http://www.useit.com/alertbox/genius-designers.html" title="The Myth of the Genius Designer" class="old">rely on your own best guesses</a>, <b>base your decisions on user research</b>:</p>
<ul>
<li>Conduct field studies and task analysis before deciding what your app should do.</li>
<li><a href="http://www.nngroup.com/reports/prototyping/" title="32-minute training video on Paper Prototyping " class="new">Paper prototype</a> your initial ideas before doing any detailed design — and definitely before wasting resources implementing something you&#8217;d have to change as soon as you get user feedback.</li>
<li><a href="http://www.useit.com/papers/iterative_design/" title="4 case studies of iterative design" class="old">Design iteratively</a>, conducting many rounds of <a href="http://www.useit.com/alertbox/20000319.html" title="Why You Only Need to Test With 5 Users" class="old">quick user testing</a> as you refine your features.</li>
</ul>
<p>Of course, people don&#8217;t want to hear me say that they need to <i>test</i> their UI. And they definitely don&#8217;t want to hear that they have to actually move their precious butts to a customer location to watch real people do the work the application is supposed to support.The general idea seems to be that real programmers can&#8217;t be let out of their cages. My view is just the opposite: no one should be allowed to work on an application unless they&#8217;ve spent a day observing a few end users.</p>
<p>(Whatever you do, at least promise me this: Don&#8217;t just implement feature requests from &#8220;user representatives&#8221; or &#8220;business analysts.&#8221; The most common way to get usability wrong is to <a href="http://www.useit.com/alertbox/20010805.html" title="First Rule of Usability? Don't Listen to Users " class="old">listen to what users <i>say</i></a> rather than actually watching what they <i>do</i>. <b>Requirement specifications are always wrong</b>. You must prototype the requirements quickly and show users something concrete to find out what they really need.)</p>
<p>All that said, there are still plenty of general guidelines for application UIs — so many, in fact, that we have a hard time cramming the most important into our <a href="http://www.nngroup.com/services/workshops/application-design.html" title="Application Usability" class="new">two-day course</a>. Here&#8217;s my list of 10 usability violations that are both particularly egregious and often seen in a wide variety of applications.</p>
<h2>1. Non-Standard GUI Controls</h2>
<p>Basic GUI widgets — <a href="http://www.useit.com/alertbox/command-links.html" title="Command Links" class="old">command links</a> and buttons, <a href="http://www.useit.com/alertbox/20040927.html" title="Checkboxes vs. Radio Buttons" class="old">radio buttons and checkboxes</a>, scrollbars, close boxes, and so on — are the lexical units that form <b>dialog design&#8217;s vocabulary</b>. If you change the appearance or behavior of these units, it&#8217;s like suddenly injecting foreign words into a natural-language communication. Det vil gøre læserne forvirrede (or, to revert to English: <i>Doing so will confuse readers</i>). For some reason, homemade design&#8217;s most common victims are <a href="http://www.useit.com/alertbox/20050711.html" title="Scrolling and Scrollbars" class="old">scrollbars</a>. For years, we&#8217;ve encountered non-standard scrollbars in our studies, and they almost always cause users to <b>overlook some of their options</b>. We&#8217;re <a href="http://www.useit.com/alertbox/user-skills.html" title="User Skills Improving, But Only Slightly" class="old">seeing this again this year</a>, in the studies we&#8217;re conducting to update our course on <a href="http://www.nngroup.com/events/tutorials/usability.html" title="outline of full-day training course" class="new">Fundamental Guidelines for Web Usability</a>. (The linked article includes screenshots of offending scroll controls.)</p>
<p>Some of the world&#8217;s best interaction designers have refined the standard look-and-feel of GUI controls over 30 years, supported by thousands of user-testing hours. It&#8217;s unlikely that you&#8217;ll invent a better button over the weekend.</p>
<p>But even if your homemade design, seen in isolation, were hypothetically better than the standard, it&#8217;s <b>never seen in isolation</b> in the real world. Your dialog controls will be used by people with years of experience operating standard GUIs.</p>
<p>If <b>Jakob&#8217;s Law</b> is &#8220;users spend most of their time on <i>other</i> websites,&#8221; then <b>Jakob&#8217;s Second Law</b> is even more critical: &#8220;Users have several thousand times more experience with standard GUI controls than with any individual new design.&#8221;</p>
<p>Users will most likely fail if you deviate from expectations on something as basic as the controls to operate a UI. And, even if they don&#8217;t fail, they&#8217;ll expend substantial brainpower trying to operate something that shouldn&#8217;t require a second thought. Users&#8217; cognitive resources are better spent understanding how your application&#8217;s features can help them achieve their goals.</p>
<h3>1.a. Looking Like a GUI Control Without Being One</h3>
<p>The opposite problem — having something that looks like a GUI control when it isn&#8217;t one — can reduce usability even more. We often see text and headlines that look like links (by being <span style="color:blue;">colored</span> or <span style="text-decoration:underline;">underlined</span>, for example) but aren&#8217;t clickable. When users click these look-alikes and nothing happens, they think the site is broken. (So please comply with guidelines for <a href="http://www.useit.com/alertbox/20040510.html" title="Guidelines for Visualizing Links" class="old">visualizing links</a>.) A similar problem occurs when something <b>looks like a button but doesn&#8217;t initiate an action</b>, or looks like a radio button but isn&#8217;t a choice. We found an example of this in our current round of studies.</p>
<p>To design a custom-tailored shirt on Liste Rouge Paris, you must provide your measurements. As the following screenshot shows, there are two different paths through the application here, depending on whether your measurements are already on file with the tailor.</p>
<p style="text-align:center;"> <img src="http://www.useit.com/alertbox/listerouge-buttons-as-headings.gif" alt="Partial screenshot of ordering process for custom-tailored shirts at www.listerouge-paris.com" height="521" width="529" /></p>
<p> Our test user clicked incessantly on the <i>New Customer</i> button to indicate that he was indeed a new customer. Unfortunately, this screen element was not a button at all, but rather a non-clickable heading.</p>
<p>He was the only user to test this site because he encountered it during a task in which users could choose a site to visit (usually from a search listing). In this case, the user eventually overcame the confusion and proceeded to enter his measurements. If we had tested more users, a small percentage would have likely failed at this point. Each small error in dialog design reduces usage only by a small amount, but most UIs contain <b>bundles of errors</b>, and the <b>number of lost customers adds up</b>.</p>
<p>As an aside, this screen also uses radio buttons incorrectly. In theory, all five choices are mutually exclusive, which does call for radio buttons. But in the user&#8217;s mental model of the workflow, there are actually <i>two issues</i> here: (a) new vs. old customers, and (b) how to provide the measurements for your situation. You should use a single set of radio buttons only when users will choose between options for a single issue.</p>
<p>So, in the case above, a better design would first ask users to decide the new/existing customer question, and then reveal the relevant radio buttons for the option they choose.</p>
<h2>2. Inconsistency</h2>
<p>Non-standard GUI controls are a special case of the general problem of inconsistent design.Confusion results when applications use different words or commands for the same thing, or when they use the same word for multiple concepts in different parts of the application. Similarly, users are confused when things move around, violating <b>display inertia</b>.</p>
<p>Using the <b>same name for the same thing in the same place</b> makes things easy.</p>
<p>Remember the double-D rule: <b>differences are difficult</b>.</p>
<p>Another example from our current study: Expedia pops up a two-month calendar view when users specify the departure or return date for a trip. The composite screenshot below was taken in February and shows what happens when you want to book a trip that starts on March 10 and ends on March 15.</p>
<p style="text-align:center;"> <img src="http://www.useit.com/alertbox/expedia-inconsistent-calendar.gif" alt="Two screenshots of date-selection widget (calendar) at Expedia.com" height="219" width="798" /></p>
<p>In the second pop-up, the month of March has moved to the left, leaving room for April to appear on the right. This may seem like a convenient shortcut, since there&#8217;s no way the user would want a February return date when traveling out in March.</p>
<p>In reality, however, the user is looking for March 15 in the same spot where it appeared in the first pop-up calendar: in the right-most column.</p>
<p>In our testing, the inconsistent placement of the months in the second pop-up caused confusion and delays, but users ultimately figured it out. We tested only a few users with this site, but if you observe this kind of <b>almost-miss error</b> in user testing, it&#8217;s usually a sign that a few users will make the mistake for real during actual use.</p>
<p>Booking the wrong return date can have disastrous consequences — customers could arrive at the airport without a ticket for their expected flight. If a site has <a href="http://www.useit.com/alertbox/20031208.html" title="Confirmation Email, Automated Customer Service Email, and Transactional Messages" class="old">good confirmation emails</a>, users might discover the problem before departure, but even that will cause aggravation and expensive customer support calls to resolve the situation.</p>
<p>Even if people eventually use the calendar correctly, it <b>takes more time to ponder the inconsistent design</b> than the time users save by not having to click the next-month button for April departures.</p>
<p>The shortcut that moves the months around saves time only for very frequent users who learn how to efficiently operate this part of the UI. So, an application for professional travel agents should probably use Expedia&#8217;s calendar design. A site targeting average consumers should not.</p>
<h2>3. No Perceived Affordance</h2>
<p>&#8220;Affordance&#8221; means what you can do to an object. For example, a checkbox affords turning on and off, and a slider affords moving up or down. &#8220;<i>Perceived</i> affordances&#8221; are actions you understand just by <i>looking</i> at the object, before you start using it (or feeling it, if it&#8217;s a physical device rather than an on-screen UI element). All of this is discussed in Don Norman&#8217;s book <a href="http://www.amazon.com/dp/0465067107?tag=useitcomusablein" title="Amazon.com: info about this book" class="old"><cite>The Design of Everyday Things</cite></a>. Perceived affordances are especially important in UI design, because all screen pixels afford clicking — even though nothing usually happens if you click. There are so many visible things on a computer screen that users don&#8217;t have time for a <b>mine sweeping</b> game, clicking around hoping to find something actionable. (Exception: <a href="http://www.useit.com/alertbox/children.html" title="Kids' Corner - Website Usability for Children" class="old">small children</a> sometimes like to explore screens by clicking around.)</p>
<p><b>Drag-and-drop</b> designs are often the worst offenders when it&#8217;s not apparent that something can be dragged or where something can be dropped. (Or what will happen if you do drag or drop.) In contrast, simple checkboxes and command buttons usually make it painfully obvious what you can click.</p>
<p>Common <b>symptoms</b> of the lack of perceived affordances are:</p>
<ul>
<li>Users say, &#8220;What do I do here?&#8221;</li>
<li>Users don&#8217;t go near a feature that would help them.</li>
<li>A profusion of screen text tries to overcome these two problems. (Even worse are verbose, multi-stage instructions that disappear after you perform the first of several actions.)</li>
</ul>
<p>When I tested some of the first Macintosh applications in the mid-1980s, users were often stumped by the empty screen that appeared when they launched, say, MacWrite. <i>What do I do here</i>, indeed. The first step was supposed to be to create a new document, but that command was not shown anywhere in the otherwise highly visible Macintosh UI unless you happened to pull down the <i>File</i> menu. Later application releases opened up with a blank document on the screen, complete with an inviting, blinking insertion point that provided the perceived affordance for &#8220;start typing.&#8221;</p>
<h3>3.a. Tiny Click Targets</h3>
<p>An associated problem here is click targets that are so small that users miss and click outside the active area. Even if they originally perceived the associated affordance correctly, users often change their mind and start believing that something isn&#8217;t actionable because they think they clicked it and nothing happened. (Small click zones are a particular problem for <a href="http://www.useit.com/alertbox/seniors.html" title="Usability for Senior Citizens" class="old">old users</a> and users with motor skill <a href="http://www.useit.com/alertbox/20011111.html" title="Beyond Accessibility - Treating Users with Disabilities as People" class="old">disabilities</a>.)</p>
<h2>4. No Feedback</h2>
<p>One of the most basic guidelines for improving a dialog&#8217;s usability is to provide feedback:</p>
<ul>
<li>Show users the system&#8217;s current state.</li>
<li>Tell users how their commands have been interpreted.</li>
<li>Tell users what&#8217;s happening.</li>
</ul>
<p>Sites that keep quiet leave users guessing. Often, they guess wrong. (For an example of the problems with poor feedback, see the screenshot of VW&#8217;s car configurator toward the bottom of my recent <a href="http://www.useit.com/alertbox/user-skills.html" title="User Skills Improving, But Only Slightly" class="old">article reporting on our current round of testing</a>: Because users couldn&#8217;t tell which tire was selected, they had trouble designing their preferred car.)</p>
<h3>4.a. Out to Lunch Without a Progress Indicator</h3>
<p>A variant on lack of feedback is when a system fails to notify users that it&#8217;s taking a long time to complete an action. Users often think that the application is broken, or they start clicking on new actions. If you can&#8217;t meet the recommended <a href="http://www.useit.com/papers/responsetime.html" title="Response Times - The Three Important Limits" class="old">response time limits</a>, say so, and keep users informed about what&#8217;s going on:</p>
<ul>
<li>If a command takes more than <b>1 second</b>, show the <b>&#8220;busy&#8221; cursor</b>. This tells users to hold their horses and not click on anything else until the normal cursor returns.</li>
<li>If a command takes more than <b>10 seconds</b>, put up an explicit <b>progress ba</b>r, preferably as a percent-done indicator (unless you truly can&#8217;t predict how much work is left until the operation is done).</li>
</ul>
<h2>5. Bad Error Messages</h2>
<p>Error messages are a special form of feedback: they tell users that something has gone wrong. We&#8217;ve known the <a href="http://www.useit.com/alertbox/20010624.html" title="Error Message Guidelines" class="old">guidelines for error messages</a> for almost 30 years, and yet many applications still violate them. The most common guideline violation is when an error message simply says something is wrong, without <b>explaining why and how</b> the user can fix the problem. Such messages leave users stranded.</p>
<p>Informative error messages not only help users fix their current problems, they can also serve as a <b>teachable moment</b>. Typically, users won&#8217;t invest time in reading and learning about features, but they will spend the time to understand an error situation if you explain it clearly, because they want to overcome the error.</p>
<p>On the Web, there&#8217;s a second common problem with error messages: people overlook them on most Web pages because they&#8217;re buried in masses of junk. Obviously, having simpler pages is one way to alleviate this problem, but it&#8217;s also necessary to <b>make error messages more prominent</b> in Web-based UIs.</p>
<h2>6. Asking for the Same Info Twice</h2>
<p>Users shouldn&#8217;t have to enter the same information more than once. After all, computers are pretty good at remembering data. The only reason users have to repeat themselves is because programmers get lazy and don&#8217;t transfer the answers from one part of the app to another.</p>
<h2>7. No Default Values</h2>
<p>Defaults help users in many ways. Most importantly, defaults can:</p>
<ul>
<li><b>speed up</b> the interaction by freeing users from having to specify a value if the default is acceptable;</li>
<li><b>teach, by example</b>, the type of answer that is appropriate for the question; and</li>
<li><b>direct novice users</b> toward a safe or common outcome, by letting them accept the default if they don&#8217;t know what else to do.</li>
</ul>
<p>Because I used Liste Rouge Paris as a bad example under Mistake #1a, I thought I&#8217;d play nice and use them as a good example here. The tailor offers 15 different collar styles (among many other options) for people ordering custom-designed shirts. Luckily, they also provide good defaults for each of the many choices. In testing, this proved helpful to our first-time user, because the defaults steered him toward the most common or appropriate options when he didn&#8217;t have a particular preference.</p>
<p style="text-align:center;"> <img src="http://www.useit.com/alertbox/listerouge-default-collar.jpg" alt="Partial screenshot of customization screen in the shirt design application on www.listerouge-paris.com" height="158" width="434" /><br />
<i>Dialog to specify your shirt&#8217;s collar on www.listerouge-paris.com (3 of 15 styles shown).</i></p>
<h2>8. Dumping Users into the App</h2>
<p>Most Web-based applications are <a href="http://www.useit.com/alertbox/20021125.html" title="Ephemeral Web-Based Applications" class="old">ephemeral applications</a> that users encounter as a by-product of their surfing. Even if users deliberately seek out a new app, they often approach it without a <b>conceptual model</b> of how it works. People don&#8217;t know the workflow or the steps, they don&#8217;t know the expected outcome, and they don&#8217;t know the basic concepts that they&#8217;ll be manipulating.For traditional applications, this is less of a problem. Even if someone has never used PowerPoint, they&#8217;ve probably seen a slide presentation. Thus, a new PowerPoint user will typically have at least a bare-bones understanding of the application before double-clicking the icon for the first time.</p>
<p>For mission-critical applications, you can often assume that most users have tried the app many times before. You can also often assume that new users will get some training before seeing the UI on their own. At the minimum, they&#8217;ll usually have nearby colleagues who can give them a few pointers on the basics. And a good boss will give new hires some background info as to <i>why</i> they&#8217;re being asked to use the application and <i>what</i> they&#8217;re supposed to accomplish with it.</p>
<p>Sadly, none of these aides to understanding apply for most Web-based applications. They don&#8217;t even apply for many ephemeral <a href="http://www.nngroup.com/reports/intranet/guidelines/applications.html" title="Intranet Usability Guidelines, vol. 10 - Killer Apps" class="new">intranet applications</a>.</p>
<p>Usability suffers when users are dumped directly into an application&#8217;s guts without any set-up to give them an idea of what&#8217;s going to happen. Unfortunately, most <a href="http://www.useit.com/alertbox/9710a.html" title="How Users Read on the Web" class="old">users won&#8217;t read</a> a lot of upfront instructions, so you might have to offer them in a short bulleted list or through a single image that lets them grok the application&#8217;s main point in one view.</p>
<p>As an example, our test user who was trying to order a custom-tailored shirt was highly confused when the first screen in Hamilton Shirts&#8217; &#8220;Create Your Shirt&#8221; process displayed a fully designed shirt with an &#8220;Add to Bag&#8221; button. This screen mixed two metaphors: a configurator and an e-commerce product screen.</p>
<p style="text-align:center;"> <img src="http://www.useit.com/alertbox/hamilton-create-your-shirt-step1.jpg" alt="Screenshot of the upper part of the screen for the first step of Hamilton's shirt-design application" height="382" width="500" /></p>
<p>This is a case where a default value isn&#8217;t helpful: people who want to design their own shirt are unlikely to want to buy a pre-designed shirt on the first screen.</p>
<p>(This screen also suffers from Mistake #1: non-standard GUI controls. In addition to its non-standard drop-down selection menus in a tabbed dialog that doesn&#8217;t <a href="http://www.useit.com/alertbox/tabs.html" title="Tabs, Used Right" class="old">look enough like tabs</a>, the screen has a non-standard way of paging through additional fabric swatches. Users are less likely to understand how to select fabrics when the controls are presented in this manner.)</p>
<p>Our test user never understood the process of designing his own shirt on this site and ultimately took his business elsewhere.</p>
<h2>9. Not Indicating How Info Will Be Used</h2>
<p>The worst instance of forcing users through a workflow without making the outcome clear is worth singling out as a separate mistake: Asking users to enter information without telling them what you&#8217;ll use it for.A classic example is the &#8220;nickname&#8221; field in the registration process for a bulletin board application. Many users don&#8217;t realize the nickname will be used to identify them in their postings for the rest of eternity — so they often enter something inappropriate.</p>
<p>As another example, we once tested an e-commerce site that smacked users with a demand for their ZIP code before they could view product pages. This was a big turn-off and many users left the site due to privacy concerns. People hate snoopy sites. An alternative design worked much better: It explained that the site needed to know the user&#8217;s location so it could state shipping charges for the very heavy products in question.</p>
<h2>10. System-Centric Features</h2>
<p>Too many applications expose their dirty laundry, offering features that reflect the system&#8217;s internal view of the data rather than users&#8217; understanding of the problem space.In our current study, one user wanted to reallocate her retirement savings among various investments offered by her company&#8217;s plan (for example, to invest more in bonds and less in stocks). She thought she did this correctly, but in fact she had changed only the allocation of <i>future additions</i> to her retirement account. Her existing investments remained unchanged.</p>
<p>As far as the mutual funds company is concerned, new investments and current investments are treated differently. Reallocating future additions means changing the funds they&#8217;ll buy when the employer transfers money into the account. Reallocating current investments means selling some of the holdings in existing mutual funds and using the proceeds to buy into other funds.</p>
<p>The key insights here?</p>
<ul>
<li>Our test user didn&#8217;t have this distinction between new and old money; she simply wanted her retirement savings allocated according to her revised investment strategy.</li>
<li>Even users who understand the distinction between new and old money might prefer to treat their retirement savings as a single unit rather than make separate decisions (and issue separate commands) for the new and old money.</li>
</ul>
<p>It would probably be better to offer a prominent feature for changing the entire account&#8217;s allocation, and use <a href="http://www.useit.com/alertbox/progressive-disclosure.html" title="Progressive Disclosure" class="old">progressive disclosure</a> to reveal expert settings for users who want to make the more detailed distinction between the two classes of money.</p>
<h2>Bonus Mistake: <i>Reset</i> Button on Web Forms</h2>
<p>This mistake relates to Web forms, but because so many applications are rich in forms, I&#8217;ll mention it here: It&#8217;s almost always <a href="http://www.useit.com/alertbox/20000416.html" title="Reset and Cancel Buttons" class="old">wrong to have a <i>Reset</i> button on a Web form</a>.The reset button clears the user&#8217;s entire input and returns the form to its pristine state. Users would want that only if they&#8217;re repeatedly completing the same form with completely different data, which almost never happens on websites. (Call center operators are a different matter.)</p>
<p>Making it easy for users to <b>destroy their work in a single click</b> violates one of the most basic usability principles, which is to respect and protect the user&#8217;s work at almost any cost. (That&#8217;s why you need <b>confirmation dialogs</b> for the most destructive actions.)</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/javatron.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/javatron.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javatron.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javatron.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javatron.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javatron.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javatron.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javatron.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javatron.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javatron.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javatron.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javatron.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javatron.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javatron.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javatron.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javatron.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javatron.wordpress.com&amp;blog=2296491&amp;post=12&amp;subd=javatron&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javatron.wordpress.com/2008/02/20/top-10-application-design-mistakes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9c988293b7635a997e9c42ee035e2f96?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">javatron</media:title>
		</media:content>

		<media:content url="http://www.useit.com/alertbox/listerouge-buttons-as-headings.gif" medium="image">
			<media:title type="html">Partial screenshot of ordering process for custom-tailored shirts at www.listerouge-paris.com</media:title>
		</media:content>

		<media:content url="http://www.useit.com/alertbox/expedia-inconsistent-calendar.gif" medium="image">
			<media:title type="html">Two screenshots of date-selection widget (calendar) at Expedia.com</media:title>
		</media:content>

		<media:content url="http://www.useit.com/alertbox/listerouge-default-collar.jpg" medium="image">
			<media:title type="html">Partial screenshot of customization screen in the shirt design application on www.listerouge-paris.com</media:title>
		</media:content>

		<media:content url="http://www.useit.com/alertbox/hamilton-create-your-shirt-step1.jpg" medium="image">
			<media:title type="html">Screenshot of the upper part of the screen for the first step of Hamilton&#039;s shirt-design application</media:title>
		</media:content>
	</item>
	</channel>
</rss>
