<?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>41 technologies &#187; Java</title>
	<atom:link href="http://techblog.41concepts.com/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://techblog.41concepts.com</link>
	<description>A software development blog from 41concepts</description>
	<lastBuildDate>Fri, 25 Nov 2011 14:44:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='techblog.41concepts.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>41 technologies &#187; Java</title>
		<link>http://techblog.41concepts.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://techblog.41concepts.com/osd.xml" title="41 technologies" />
	<atom:link rel='hub' href='http://techblog.41concepts.com/?pushpress=hub'/>
		<item>
		<title>Howto: Java 7(ea) &amp; Eclipse 3.7.1 on Mac OS X</title>
		<link>http://techblog.41concepts.com/2011/10/05/howto-java-7ea-eclipse-3-7-1-on-mac-os-x/</link>
		<comments>http://techblog.41concepts.com/2011/10/05/howto-java-7ea-eclipse-3-7-1-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 19:51:54 +0000</pubDate>
		<dc:creator>mmc</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://techblog.41concepts.com/?p=110</guid>
		<description><![CDATA[I recall that when Java 6 first came out, Mac OS X did not support it at first and it was only when Java 6 got full support by Apple that I decided to switch to a Mac. Now, years later Java 7 is out on Windows/Linux/etc and I have been feeling a bit cheated by [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techblog.41concepts.com&amp;blog=1325376&amp;post=110&amp;subd=41tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recall that when Java 6 first came out, Mac OS X did not support it at first and it was only when Java 6 got full support by Apple that I decided to switch to a Mac. Now, years later <strong>Java 7</strong> is out on Windows/Linux/etc and I have been feeling a bit cheated by Apple since they won&#8217;t provide Java 7 and have in fact decided to drop Java support in OS X in the future.</p>
<p>Happily, the <a title="OpenJDK project - Mac" href="http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port">OpenJdk</a> project does have Java 7 for Mac OSX under development with an official build from Oracle available <a title="Oracle jdk7 ea" href="http://jdk7.java.net/macportpreview/">here</a>.</p>
<p>In related news, <a href="http://www.eclipse.org/">Eclipse</a> Indigo SR1 (v3.7.1) has just been released with full JDK1.7 support for Mac OS X. It is available <a title="Eclipse download" href="http://www.eclipse.org/downloads/">here</a>.</p>
<p>To get Eclipse 3.7.1 to work with Java 1.7 (EA) on Mac OS X do the following.</p>
<p>1) Install Java 7 but leave the more complete+stable Java 6 as the default Java on Mac OS X.</p>
<p>2) Install Eclipse and let it run under Java 6.</p>
<p>3) Start Eclipse, select Preferences,  Installed JREs, Execution Environments and click on &#8220;add&#8221;.</p>
<p>4) Select standard VM.</p>
<p>5) In the field JRE home, do <strong>not</strong> attempt to browse for the Java 7 directory as this will not work. Instead just paste the installation dir of the installed Java 7 package +/Content/Home (fx. &#8220;/Library/Java/JavaVirtualMachines/JDK 1.7.0 Developer Preview.jdk/Contents/Home&#8221;) into the JRE home text field and press return.</p>
<p>6) Fix the JRE name in the field below to something suitable like &#8220;JDK1.7&#8243; and click finish.</p>
<p>Now you should be able to create your Java 7 project in eclipse on your Mac OS X and you should be able to run/debug without problems&#8230;. Yes!</p>
<br />Filed under: <a href='http://techblog.41concepts.com/category/eclipse/'>Eclipse</a>, <a href='http://techblog.41concepts.com/category/java/'>Java</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/41tech.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/41tech.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/41tech.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/41tech.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/41tech.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/41tech.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/41tech.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/41tech.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/41tech.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/41tech.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/41tech.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/41tech.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/41tech.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/41tech.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techblog.41concepts.com&amp;blog=1325376&amp;post=110&amp;subd=41tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techblog.41concepts.com/2011/10/05/howto-java-7ea-eclipse-3-7-1-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5bb3e48385cef486d4d915f9713e49b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mmc</media:title>
		</media:content>
	</item>
		<item>
		<title>3 small steps for non-OSGI developers that want to stay OSGi compatible</title>
		<link>http://techblog.41concepts.com/2010/05/21/3-small-steps-for-non-osgi-developers-that-want-to-stay-osgi-compatible/</link>
		<comments>http://techblog.41concepts.com/2010/05/21/3-small-steps-for-non-osgi-developers-that-want-to-stay-osgi-compatible/#comments</comments>
		<pubDate>Fri, 21 May 2010 19:08:44 +0000</pubDate>
		<dc:creator>mmc</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[OSGI]]></category>

		<guid isPermaLink="false">http://techblog.41concepts.com/?p=101</guid>
		<description><![CDATA[Here is some advice if you do not know OSGI, but you would like your Java code to at least not be hostile towards OSGI environments (so that other OSGI developers can use your code and you might easier &#8220;upgrade&#8221; your code to OSGI later): 1) Do not use (or set/unset/inspect) the context class loader [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techblog.41concepts.com&amp;blog=1325376&amp;post=101&amp;subd=41tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is some advice if you do not know <a title="OSGI" href="http://en.wikipedia.org/wiki/OSGi">OSGI</a>, but you would like your Java code to at least not be hostile towards OSGI environments (so that other OSGI developers can use your code and you might easier &#8220;upgrade&#8221; your code to OSGI later):</p>
<p>1) Do <strong>not</strong> use (or set/unset/inspect) the context class loader returned by Thread.<a href="http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#getContextClassLoader%28%29">getContextClassLoader</a>(). The context class loader is only applicable to JEE applications. For OSGI in particular, any code that relies to the context class loader will generally fail (or more correctly might by accident work in a few OSGI implementation but will fail in most cases)&#8230;. Even if the context loader is non-null do not try to use the context class loader to load any classes as this might interferer with how OSGI resolves classes/versions. To put bluntly, the context class loader should be completely ignored for anything but JEE-only applications, where the context class loader is well defined.</p>
<p>2) Do <strong>not</strong> use <a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html#forName%28java.lang.String%29">Class.forname</a>(&#8220;name&#8221;) which will not use the class loader setup by OSGI and cause of kinds of failures incl. ClassNotFound exceptions. You can use the classloader returned by any of the existing classes of your module to dynamically load your classes. F.x. you may use Myclass.<a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getClassLoader%28%29">class.getClassLoader</a>().loadClass(&#8220;name&#8221;) instead.</p>
<p>3) Do <strong>not</strong> split your packages across multiple jars (i.e. where multiple jars have the same exact package and java has to combine the files from each jar to get the whole package content). While it works in OSGI, it is complicated and highly undesired.</p>
<p>P.S. Also, do not use the default package (no package) for your code as this will break OSGI. But seriously, who would do that anyway ?</p>
<p>That&#8217;s it, while your code might still not be full OSGI&#8217;fied it will at least be OSGI friendly.</p>
<br />Filed under: <a href='http://techblog.41concepts.com/category/java/'>Java</a>, <a href='http://techblog.41concepts.com/category/java/osgi/'>OSGI</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/41tech.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/41tech.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/41tech.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/41tech.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/41tech.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/41tech.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/41tech.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/41tech.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/41tech.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/41tech.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/41tech.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/41tech.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/41tech.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/41tech.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techblog.41concepts.com&amp;blog=1325376&amp;post=101&amp;subd=41tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techblog.41concepts.com/2010/05/21/3-small-steps-for-non-osgi-developers-that-want-to-stay-osgi-compatible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5bb3e48385cef486d4d915f9713e49b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mmc</media:title>
		</media:content>
	</item>
		<item>
		<title>Portable Eclipse projects &amp; goodbye to unbound classpath container (JRE) errors</title>
		<link>http://techblog.41concepts.com/2010/04/25/portable-eclipse-projects-goodbye-to-unbound-classpath-container-jre-errors/</link>
		<comments>http://techblog.41concepts.com/2010/04/25/portable-eclipse-projects-goodbye-to-unbound-classpath-container-jre-errors/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 09:44:30 +0000</pubDate>
		<dc:creator>mmc</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://techblog.41concepts.com/?p=95</guid>
		<description><![CDATA[It is nice to have Eclipse projects under source control but unless you setup your project correctly you will have a high risk of getting JRE errors like &#8220;unbound classpath container&#8221; when you share your project with other developers. For new projects make sure to select &#8220;Execution Environment JRE&#8221; when you create your projects &#8211; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techblog.41concepts.com&amp;blog=1325376&amp;post=95&amp;subd=41tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is nice to have <a href="http://www.eclipse.org/">Eclipse</a> projects under source control but unless you setup your project correctly you will have a high risk of getting JRE errors like &#8220;unbound classpath container&#8221; when you share your project with other developers.</p>
<ul>
<li>For new projects make sure to select &#8220;<a href="http://wiki.eclipse.org/index.php/Execution_Environments">Execution Environment JRE</a>&#8221; when you create your projects &#8211; do <strong>not</strong> select project specific JRE or default JRE!</li>
<li> For existing projects select package view, right click on JRE system library, select &#8220;<a href="http://wiki.eclipse.org/index.php/Execution_Environments">Execution Environment</a>&#8221; and the appropriate environment.  F.x. JavaSE-1.6</li>
</ul>
<br />Filed under: <a href='http://techblog.41concepts.com/category/eclipse/'>Eclipse</a>, <a href='http://techblog.41concepts.com/category/java/'>Java</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/41tech.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/41tech.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/41tech.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/41tech.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/41tech.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/41tech.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/41tech.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/41tech.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/41tech.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/41tech.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/41tech.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/41tech.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/41tech.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/41tech.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techblog.41concepts.com&amp;blog=1325376&amp;post=95&amp;subd=41tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techblog.41concepts.com/2010/04/25/portable-eclipse-projects-goodbye-to-unbound-classpath-container-jre-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5bb3e48385cef486d4d915f9713e49b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mmc</media:title>
		</media:content>
	</item>
		<item>
		<title>Generating ANT build numbers using subversion</title>
		<link>http://techblog.41concepts.com/2009/05/08/generating-ant-build-numbers-using-subversion/</link>
		<comments>http://techblog.41concepts.com/2009/05/08/generating-ant-build-numbers-using-subversion/#comments</comments>
		<pubDate>Thu, 07 May 2009 23:31:18 +0000</pubDate>
		<dc:creator>mmc</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://techblog.41concepts.com/?p=38</guid>
		<description><![CDATA[I have been working on a Java project recently where we are using ANT as a build tool and Subversion for version control. Managing software build-versions manually is bothersome and the ANT&#8217;s build-in buildnumber task has many problems/pitfalls. Using subversion and it&#8217;s reversion history is really the way to go for easily generating consistent, ’build’ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techblog.41concepts.com&amp;blog=1325376&amp;post=38&amp;subd=41tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been working on a Java project recently where we are using <a href="http://ant.apache.org/">ANT</a> as a build tool and <a href="http://subversion.tigris.org/">Subversion</a> for version control. Managing software build-versions manually is bothersome and the ANT&#8217;s build-in<a href="http://ant.apache.org/manual/CoreTasks/buildnumber.html"> buildnumber</a> task has many problems/pitfalls.</p>
<p>Using subversion and it&#8217;s reversion history  is really the way to go for easily generating consistent, ’build’ numbers across team member machines. Furthermore, if your application has multiple modules (in multiple directories) subversion can easily provide individual version numbers for each module.</p>
<p>Unfortunately, subversion is poorly supported by ANT. There are many optional add-on tasks that can be downloaded, but all the ones that I looked at either did not work, was not portable or the license was unacceptable.</p>
<p>The best solution I could find was to invoke the subversion command line command &#8220;svnversion&#8221; directly from ANT and with a little help from <a href="http://ant.apache.org/manual/CoreTasks/macrodef.html">here</a> and <a href="http://www.innovationontherun.com/creating-a-build-number-with-ant-and-subversion/">here</a>, I wrote a nice little macro that can be used from ANT 1.6+.</p>
<pre>&lt;macrodef name="svnversion" description="Get last subversion commit version."&gt;
 &lt;attribute name="dir"/&gt;
 &lt;attribute name="outputproperty"/&gt;
 &lt;attribute name="unversionedDefault"/&gt;
 &lt;sequential&gt;
  &lt;echo message="svnversion -n -c '@{dir}' =&gt; '@{outputproperty}'"/&gt;
  &lt;exec outputproperty="@{outputproperty}" executable="svnversion" failonerror="true"&gt;
  &lt;arg line="-n -c @{dir}" /&gt;
  &lt;redirector&gt;
   &lt;outputfilterchain&gt;
   &lt;tokenfilter&gt;
    &lt;replaceregex pattern="^[0-9]*:" replace="" flags="g"/&gt;
    &lt;replaceregex pattern="exported" replace="@{unversionedDefault}" flags="g"/&gt;
   &lt;/tokenfilter&gt;
   &lt;/outputfilterchain&gt;
  &lt;/redirector&gt;
  &lt;/exec&gt;
  &lt;echo message="svnversion returned '${@{outputproperty}}'"/&gt;
 &lt;/sequential&gt;
&lt;/macrodef&gt;</pre>
<p>Usage example</p>
<pre>&lt;!--
Sets the ant propery 'src_revision' the the subversion revision of the 'src' directory.
--&gt;
&lt;svnversion unversionedDefault="" dir="src" outputproperty="src_revision"/&gt;</pre>
<p>P.S. The last echo statement in the ANT macro also demonstrates a useful ANT trick: How to get the indirect value of a property using another property&#8217;s value as the name of the property that we are retriving the value from? This is something that is only possible in ANT 1.6 using macros.</p>
<br />Posted in Java  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/41tech.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/41tech.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/41tech.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/41tech.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/41tech.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/41tech.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/41tech.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/41tech.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/41tech.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/41tech.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/41tech.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/41tech.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/41tech.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/41tech.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techblog.41concepts.com&amp;blog=1325376&amp;post=38&amp;subd=41tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techblog.41concepts.com/2009/05/08/generating-ant-build-numbers-using-subversion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5bb3e48385cef486d4d915f9713e49b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mmc</media:title>
		</media:content>
	</item>
		<item>
		<title>Shooting yourself in the leg with a bazooka</title>
		<link>http://techblog.41concepts.com/2007/07/13/shooting-yourself-in-the-leg-with-a-bazooka/</link>
		<comments>http://techblog.41concepts.com/2007/07/13/shooting-yourself-in-the-leg-with-a-bazooka/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 21:11:13 +0000</pubDate>
		<dc:creator>mmc</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Design & Architecture]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://techblog.41concepts.com/2007/07/13/shooting-yourself-in-the-leg-with-a-bazooka/</guid>
		<description><![CDATA[The colorful title reflects that this posting is about common mistakes done by good but relatively inexperienced software developers. Big mistakes that a developer actually need quite some skills to make. Mistakes that we unfortunately see all too often and we would rather not see much of again (hopefully this blog entry can aid a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techblog.41concepts.com&amp;blog=1325376&amp;post=4&amp;subd=41tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <font color="#ff0000">colorful </font>title reflects that this posting is about common <strong>mistakes done by good </strong>but relatively<strong> </strong>inexperienced <strong>software developers</strong>. Big mistakes that a developer actually need quite some skills to make. Mistakes that we unfortunately see all too often and we would rather not see much of again (hopefully this blog entry can aid a bit towards that goal):</p>
<ol>
<li><strong>Overly complicated design</strong> – Instead of a simple design for a simple project some developers insist on using a impracticable mix of all the newest, fanciest abstractions, <a href="http://en.wikipedia.org/wiki/Design_pattern_(computer_science)" title="Wiki article">design patterns</a>, techniques and advanced language constructs that can possibly be combined in one software solution. All design elements have benefits and drawbacks. Great (experienced) developers know when a particular benefit of an abstraction, pattern, technique or feature outweighs the drawbacks. There is <a href="http://en.wikipedia.org/wiki/No_Silver_Bullet" title="Wiki article">no silver bullet</a>. No design element works well in all situations (just as no rules that you learned in “programming school” are in fact absolute). Developers that get way too eager ends up with one big unmaintainable design mess with the combined drawbacks of all decisions but few if any real benefits remaining…. Remember, a simple design is a beautiful design!</li>
<li><strong>Writing too much code</strong> – Writing lengthily code with a high maintenance cost by hand when writing such code can be avoided. Much code can be avoided by choosing a more suitable design/architecture, using standard framework/library features (xml serialization is a common example), using techniques such as dynamic <a href="http://en.wikipedia.org/wiki/Reflection_%28computer_science%29" title="Wiki article">reflection</a> or specialized <a href="http://www.codegeneration.net/" title="Code generation site">code generation</a> and <a href="http://aosd.net/wiki/index.php?title=Tools_for_Developers" title="Wiki article">aspect oriented tools</a> (be careful though).</li>
<li><strong>Reinventing the wheel</strong>  &#8211; Some developers think they can write their own code much faster than learning to understand the underlying framework and available libraries. This might in some cases even be true, but when considering overall quality and maintainability (which developers seldom do) <a href="http://en.wikipedia.org/wiki/Reinventing_the_wheel" title="Wiki article">reinventing the wheel</a> is almost always a bad idea.</li>
<li><strong>Incorrect use of advanced concepts such as multithreading</strong> – Some developers use <a href="http://en.wikipedia.org/wiki/Multithreading" title="Wiki article">multithreading </a>without the discipline and deep understanding that writing correct, <a href="http://en.wikipedia.org/wiki/Thread-safety" title="Wiki article">safe</a> multi-threaded code requires. Multithreading can<a href="http://www.manning.com/dennis/" title="Book"> improve the user experience</a> immensely. It is also the <a href="http://www.gotw.ca/publications/concurrency-ddj.htm">answer to scalability</a> nowadays. However, before even considering to use multithreading in your design, make sure to know the theory and features in your environment well. A vague recollection of <a href="http://en.wikipedia.org/wiki/Mutual_exclusion" title="Wiki article">mutexes </a>and <a href="http://http://en.wikipedia.org/wiki/Semaphore_(programming)">semaphores </a>from school is not good enough. You should also realize that by deciding to use multithreading, you generally need to upgrade on testing, documentation, reviews and quality insurance.</li>
</ol>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/41tech.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/41tech.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/41tech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/41tech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/41tech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/41tech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/41tech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/41tech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/41tech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/41tech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/41tech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/41tech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/41tech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/41tech.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/41tech.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/41tech.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techblog.41concepts.com&amp;blog=1325376&amp;post=4&amp;subd=41tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techblog.41concepts.com/2007/07/13/shooting-yourself-in-the-leg-with-a-bazooka/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5bb3e48385cef486d4d915f9713e49b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mmc</media:title>
		</media:content>
	</item>
	</channel>
</rss>
