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

<channel>
	<title>Artful Code &#187; java</title>
	<atom:link href="http://www.artfulcode.net/tags/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.artfulcode.net</link>
	<description>Resources and tips for dynamic, interactive languages.</description>
	<lastBuildDate>Fri, 09 Sep 2011 02:15:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Python in NetBeans</title>
		<link>http://www.artfulcode.net/articles/python-in-netbeans/</link>
		<comments>http://www.artfulcode.net/articles/python-in-netbeans/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 00:28:53 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.artfulcode.net/?p=377</guid>
		<description><![CDATA[For the past few weeks I've been using the NetBeans (with the new Python module) as my primary IDE.  I generally use TextMate, which is more than an editor and less than the kitchen sink, lying somewhere between BBEdit and Emacs.  TextMate is fast and a pleasure to use, but lately I have found myself in need of something a little more robust.]]></description>
			<content:encoded><![CDATA[<p>For the past few weeks I&#8217;ve been using the NetBeans (<a title="Python for NetBeans" href="http://wiki.netbeans.org/Python">with the new Python module</a>) as my primary IDE.  I generally use <a href="http://macromates.com">TextMate</a>, which is more than an editor and less than the kitchen sink, lying somewhere between BBEdit and Emacs.  TextMate is fast and a pleasure to use, but lately I have found myself in need of something a little more robust.<span id="more-377"></span></p>
<p>Back in October of 2007, I wrote an article on <a title="Article: Java from a functional perspective" href="http://www.artfulcode.net/articles/java-functional-perspective/">Java</a>.  I used NetBeans exclusively during the project about which the article is written and found it to be a solid, well-thought out application.  It is reasonably fast and &#8220;feels good&#8221; to use, which is something I feel most Java applications lack.  It has its problems; in particular, it is not nearly so easy to add language support to NetBeans as it is to TextMate or JEdit.  However, it is beginning to build a decent set of language support plugins and supports most of the languages I use in development: Python, PHP, and Javascript.  It even has support for several of the more popular JS frameworks, including Prototype/Scriptaculous and JQuery (both of which I regularly use).</p>
<p>My first impression is good.  The Python support is very nice.  It has a few problems guessing at types, which is annoying if you leave auto-hinting enabled, and it does not know about the with_statement (which it believes to be an unused import).  Aside from that, it does a good job with hinting, although that is not a feature I particularly need or want, and it manages imports well, removing unused ones and reordering them.</p>
<p>The versioning system integration is good, too, and sheds a few clicks from my life.  It <em>is</em> annoying to need a wizard to create a blank file, though.  I do get a lot of use out of NetBeans&#8217; code checking.  In a mature product, it is easy to end up with a lot of unused variables as code gets added and removed.  The refactoring features are simply a blessing, as anyone who has had to go through several dozen files to make a critical API update can tell you.</p>
<p>One other nice feature that is not immediately apparent is intelligent undo.  I know it&#8217;s not a big deal, but it&#8217;s the little things that give a product its luster.</p>
<p>Most of these features are, in fact, available in a nice little editor written in Python named <a title="Editra editor" href="http://editra.org/">Editra</a>.  But Editra&#8217;s graphics (using wxwidgets) are slow and I don&#8217;t have the patience for an editor that does visibly jerks while updating the screen.  I think that I will use NetBeans for now.</p>
<p><strong>Update:</strong> Shannon -jj Behrens wrote another <a href="http://jjinux.blogspot.com/2009/01/ide-netbeans.html">good review of Python in Netbeans on his blog</a> (<a href="http://jjinux.blogspot.com">jjinux.blogspot.com</a>).</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Submit article</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fpython-in-netbeans%2F&amp;title=Python+in+NetBeans" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fpython-in-netbeans%2F&amp;title=Python+in+NetBeans" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Python+in+NetBeans&amp;url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fpython-in-netbeans%2F&amp;title=Python+in+NetBeans" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fpython-in-netbeans%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fpython-in-netbeans%2F&amp;title=Python+in+NetBeans" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fpython-in-netbeans%2F&amp;title=Python+in+NetBeans" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fpython-in-netbeans%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Python+in+NetBeans+@+http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fpython-in-netbeans%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.artfulcode.net/articles/python-in-netbeans/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Java from a functional perspective</title>
		<link>http://www.artfulcode.net/articles/java-functional-perspective/</link>
		<comments>http://www.artfulcode.net/articles/java-functional-perspective/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 16:11:00 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Soap box]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://www.artfulcode.net/articles/java-functional-perspective/</guid>
		<description><![CDATA[Not long ago a project required me to learn a little Java. As a long-time elitist functional programmer, I was not extremely excited. Due to the low quality of Java software I have used, I assumed, like many, that Java produced slow, bloated, and buggy software. Some languages just feel clunky. My previous experience with [...]]]></description>
			<content:encoded><![CDATA[<p>Not long ago a project required me to learn a little Java.  As a long-time elitist functional programmer, I was not extremely excited.  Due to the low quality of Java software I have used, I assumed, like many, that Java produced slow, bloated, and buggy software.  Some languages just feel clunky.<span id="more-45"></span></p>
<p>My previous experience with Java was as a less experienced programmer and I had some difficulty with the type system.  I learned on dynamically typed languages.  My first experience with static typing was in modern functional languages, where type was inferred automatically by the compiler.  Explicit type declarations felt archaic and overly wordy.</p>
<p>My experience this time around, however, was more positive.  This is primarily due to three factors.</p>
<h4>NetBeans</h4>
<p>NetBeans is Sun&#8217;s Java IDE.  Because it is mostly limited to Java, its syntax formating is excellent.  It takes a lot of code to abstract the ability of an IDE to format multiple languages (in particular, the ability to format both C-style languages and Lisp-style languages using the same application primitives presents difficulty).  NetBeans has the Apple advantage in this; one language to support means that it can have excellent support for that language.  Of course, this means that projects that use multiple languages are more difficult to develop using NetBeans, so perhaps this tradeoff is not worth it.</p>
<p>Java&#8217;s self-documentation is very nice, too.  NetBean&#8217;s code-hinting is superior to most, although it can get in the way.</p>
<p>The GUI builder is also extremely nice.  Swig and AWT can be a real trial in a language as wordy as Java (although I think Sun prefers us to call it &#8220;explicit.&#8221;)</p>
<h4>Classes</h4>
<p>I initially had some difficulty writing entire programs in objects.  Most languages I use that are object oriented are multi-paradigm.  Classes are available, but then utilized within functional or procedural code.  Because of this, I tend to regard classes as a sort of extra-powerful type struct, only to be used when a type becomes complex enough that the extra work of encapsulated it within a class becomes advantageous.</p>
<p>It&#8217;s (unfortunately) common to see new Lisp programmers try to simulate OO in Lisp using closures and hashes (especially if they&#8217;ve read a few Paul Graham essays).  I don&#8217;t particularly see that OO improves Lisp; closures and templates provide roughly the same functionality.  Exactly replicating closures in OOP or objects in functional programming would be moot.  They are different styles; Java-style programming is as uncomfortable in Lisp as Lisp-style programming is in Java.</p>
<p>While writing my initial applications, though, I realized something: classes are a formalized closure syntax.  They are a function that builds functions and closes over their variables.</p>
<p>This freed me to use a style of abstraction in Java that felt much more comfortable to me without the drawback of attempting to use the wrong paradigm for the language.  I could now program using classes and objects in a manner consistent with how I mentally model my applications.</p>
<p>Something I missed quite a bit was pattern matching.  It is very helpful to declare local variables based on the pattern of the argument(s) passed to a function, but that would not be useful in Java, since the primary type mechanism in Java is the class rather than the list.  Method overloading provides much of the same functionality, but idiomatic of Java.</p>
<h4>Write once, run everywhere</h4>
<p>Lisp pioneered the virtual machine.  Lisp is compiled into code that is run within the Lisp interpreter.  But Lisp is not commonly installed on computers, so distribution of Lisp software becomes a real challenge.  One of the advantages of having a huge amount of money behind a language is that Java is installed on virtually every computer a program may end up on.</p>
<p>It&#8217;s common in Lisp to have to code various parts of the program differently depending on the operating system and Lisp distribution.  For example, very few Lisps support multi-threading on OSX.  It makes it agonizing to write threaded software for a multi-platform application.</p>
<p>Java does not have this problem.  A feature is available on all platforms or none at all.  While this means that the language sometimes suffers from the lack of a particular feature, it also means that there is a guarantee against discovering too late that a feature used in the core of your program will not limit its utility on other operating systems.</p>
<h4>Conclusion</h4>
<p>Java is better than I had given it credit for.  With NetBeans taking care of checking your work for you, I am beginning to suspect that the many buggy Java programs are due to poor programming rather than a problem inherent in Java itself.</p>
<p>I still have some doubts as to how useful it would be for a very large project; my experience has been that object orientation and inheritance results in unnecessary complexity.</p>
<p>For small projects and GUI applications, though, Java seems to be a fair choice.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Submit article</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fjava-functional-perspective%2F&amp;title=Java+from+a+functional+perspective" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fjava-functional-perspective%2F&amp;title=Java+from+a+functional+perspective" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Java+from+a+functional+perspective&amp;url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fjava-functional-perspective%2F&amp;title=Java+from+a+functional+perspective" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fjava-functional-perspective%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fjava-functional-perspective%2F&amp;title=Java+from+a+functional+perspective" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fjava-functional-perspective%2F&amp;title=Java+from+a+functional+perspective" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fjava-functional-perspective%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Java+from+a+functional+perspective+@+http%3A%2F%2Fwww.artfulcode.net%2Farticles%2Fjava-functional-perspective%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.artfulcode.net/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.artfulcode.net/articles/java-functional-perspective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

