<?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>Nick Zalabak - techwhizbang &#187; clojure</title>
	<atom:link href="http://techwhizbang.com/tag/clojure/feed/" rel="self" type="application/rss+xml" />
	<link>http://techwhizbang.com</link>
	<description>my work, life, and ideas</description>
	<lastBuildDate>Wed, 25 Jan 2012 05:47:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Short and Sweet Disclojure</title>
		<link>http://techwhizbang.com/2012/01/short-and-sweet-disclojure/</link>
		<comments>http://techwhizbang.com/2012/01/short-and-sweet-disclojure/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 06:32:53 +0000</pubDate>
		<dc:creator>techwhizbang</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://techwhizbang.com/?p=516</guid>
		<description><![CDATA[After experimenting and bouncing back and forth on several relatively new languages, I was undecided on what new language I wanted to commit myself to. It wasn&#8217;t until I began reading Clojure in Action that I really started to grok and see through its otherwise intimidating syntax. Admittedly, Clojure just looked and sounded too exotic [...]]]></description>
			<content:encoded><![CDATA[<p>After experimenting and bouncing back and forth on several relatively new languages, I was undecided on what new language I wanted to commit myself to. It wasn&#8217;t until I began reading <em><a href="http://amzn.com/1935182595" title="Clojure in Action" target="_blank">Clojure in Action</a></em> that I really started to grok and see through its otherwise intimidating syntax. Admittedly, Clojure just looked and sounded too exotic at first glance. Do I really want to learn Lisp? Aren&#8217;t those parentheses crazy? Shouldn&#8217;t I be programming the next million dollar idea for the iPhone? </p>
<p>It turns out that the answers to those questions are: Yes. No. What money? </p>
<p>I wanted a challenge. I wanted something that would transcend the way I&#8217;ve been thinking about programming. I wanted something that I knew would make me a better software engineer. I wanted something more expressive and powerful. </p>
<p>Luckily, the past two weeks I&#8217;ve had an excellent opportunity at work to apply and push my learnings of Clojure further. I thought it would be an opportune time to share the good, the bad, and whatever else in between. A reflective and honest &#8220;disclojure&#8221;. </p>
<p>It seems that the best way to learn a new language is finding well documented source code and blogs from likeminded people. Clojure is a &#8220;newer&#8221; burgeoning language so it goes without saying that there are far fewer comprehensive online resources to tap into. The blogosphere is actually a bit sparse on Clojure. I&#8217;d strongly recommend having a couple Clojure e-books at your fingertips for reference. Speaking of books, don&#8217;t expect to learn Clojure by reading a stack of books for 5 months and think that it will magically flow from your digits. It&#8217;ll never ever happen. The best recipe for me has been a 1:1 ratio of time spent reading and coding. If you&#8217;re in pursuit of books that might help you on your quest to learning Clojure, remember Clojure is a Lisp. <em><a href="http://amzn.com/0262560992" title="The Little Schemer" target="_blank">The Little Schemer</a></em> and <em><a href="http://amzn.com/026256100X" title="The Seasoned Schemer" target="_blank">The Seasoned Schemer</a></em> have been priming Lisp programmers for decades. If anything reading these two books will make you hungrier for more, wink wink nudge nudge.</p>
<p>Github has been an invaluable asset when looking for good source code examples. One of the questions I continue to ask myself while coding, &#8220;Is the code I&#8217;m writing idiomatic?&#8221; That is important to me because one of my main objectives is to transcend my thinking and programming style. So before you add that dependency to your <a href="https://github.com/technomancy/leiningen" title="Leiningen" target="_blank">Leiningen</a> project.clj have a peek at the author&#8217;s source. In reality, you might often find yourself sifting through source because of the lack of documentation or examples. Actually I read other developers source code daily for this very reason. So let me re-phrase that, while you&#8217;re trying to figure out how the heck some library or &#8220;clojar&#8221; works, be mindful of the coding style. Undoubtedly you will pick up something useful.</p>
<p>I had a perplexing problem the other day and for the life of me I couldn&#8217;t figure it out. I simply lacked the context necessary that other more advanced Clojure developers have. I found my answer after posting my question on the <a href="http://groups.google.com/group/clojure" title="Clojure Google Groups" target="_blank">Clojure forum</a> hosted on Google Groups. More specifically, I was using lein run to execute a simple database preparation task, but the process was hanging on well after it completed. It wasn&#8217;t until someone informed me that I should use (shutdown-agents) after the task I was running finished because of the way the agent thread pool delays shut down. See my gist <a href="https://gist.github.com/1635837">here</a>. The turn around time on the Clojure forum varies. I think it took 2 or 3 days before my post was moderated and then received a response. Most if not all of the Clojure core developers answer questions in this forum so the responses are of high quality and are super helpful.</p>
<p>Sometimes you&#8217;re totally stuck. Even after using your e-book as a reference and reading the source code it just doesn&#8217;t make sense. Enter <a href="irc://irc.freenode.net/#clojure" title="Clojure IRC" target="_blank">Clojure IRC</a>! During the daytime it is bustling with chatter. Lots of the folks who answer questions on the Clojure forum hang out here too. In my experiences, the community that gathers here is friendly and willing to help. </p>
<p>Clojure is as expressive, powerful, and succinct as advertised. The Java interop with Clojure is about the simplest and cleanest I&#8217;ve seen thus far and that includes JRuby and Scala. I&#8217;m impressed with the clean HTTP API Ring has to offer and using the Clojure JDBC API is really nice. If only JDBC were that easy in Java there would be no need for heavyweight clunky ORMs. In terms of testing, speclj is a pretty awesome testing framework that mirrors Ruby&#8217;s RSpec API. I also have enjoyed rolling my own solutions for things that aren&#8217;t available yet. And one of the most important parts&#8230;it is fast and performs very well under load. I don&#8217;t make these claims falsely either, we ran a load test today at work and we were absolutely thrilled with the response times and throughput. I look forward to posting more about Clojure in the coming weeks. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://techwhizbang.com/2012/01/short-and-sweet-disclojure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bright Future for Dynamic Languages</title>
		<link>http://techwhizbang.com/2010/04/bright-future-for-dynamic-languages/</link>
		<comments>http://techwhizbang.com/2010/04/bright-future-for-dynamic-languages/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 20:35:26 +0000</pubDate>
		<dc:creator>techwhizbang</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[dynamic languages]]></category>
		<category><![CDATA[functional programming]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[jvm]]></category>

		<guid isPermaLink="false">http://techwhizbang.com/?p=130</guid>
		<description><![CDATA[I find myself infinitely fascinated by the increasing number of dynamic languages. For many of us dynamic language introduction came by way of Ruby, Python, and/or Javascript. While my fascination with these languages hasn’t ended,  I am more enthralled with dynamic languages whose strength is concurrency and multi-threading. Indeed, these are exciting times and there is a shift happening in the software community. Honestly, who hasn’t bragged on Twitter that they just finished reading the latest book on Clojure, or Erlang? Clearly there is momentum and change in the air. The future of software and computing in the next 10 or 15 years is being shaped and molded with the underlying fundamentals and principles of these languages.]]></description>
			<content:encoded><![CDATA[<p>I find myself fascinated by the increasing popularity of dynamic languages. For many of us dynamic language introduction came by way of Ruby, Python, and/or Javascript. While my fascination with these languages hasn&#8217;t ended, I am more enthralled with dynamic languages whose strength is concurrency. Indeed, these are exciting times and there is a shift happening in the software community. Honestly, who hasn&#8217;t bragged on Twitter that they just finished reading the latest book on Clojure or Erlang? Clearly there is momentum and change in the air. The future of software and computing in the next 10 or 15 years is being shaped and molded with the underlying fundamentals and principles of these languages.</p>
<p>I&#8217;m excited about the evolution happening. There is a higher degree of maturity, professionalism, and most importantly scientific and mathematical infused creativity. We&#8217;ve all heard the anecdotal comparison of a craft like architecture versus software. Yes software as a craft is merely a fetus when compared to architecture. For centuries architecture has used equal parts science and artistry to build some of the most breathtaking sites in the world. I believe the software community has really begun using more scientific and mathematical backed <em>artsy creativity.</em> We must flex both sides of our brains to imagine the crazy, the impossible, and make it reality. I digress&#8230;back to the languages.</p>
<p>Why am I so fascinated? The bottom line is we are evolving and learning.</p>
<ul>
<li>Language composition and leverage</li>
<li>Developer productivity</li>
<li>Functional programming and concurrency</li>
</ul>
<p>Clojure and JRuby both run on the JVM. Undoubtedly there are statistics somewhere showing that Java is one of the most popular languages of our time and it is probably running in your software shop in some capacity. As a result the barrier to entry for integrating and using these new languages has been lowered. It is comparatively easier than the transition when Java gained <em><em>über</em></em> popularity in the 90&#8242;s. However, this isn&#8217;t as important and _fascinating_ as how these languages integrate directly with the Java language. The number of possibilities for composing and leveraging preexisting Java libraries with these languages seems endless. This eliminates many reasons to reinvent a library or API. When you wish you could use some Java component, framework, or API, you can &#8211; easily! I&#8217;ve used this fact to my advantage using JRuby numerous times. The other really neat possibility that I haven&#8217;t messed around with yet is using Clojure in JRuby.</p>
<p>The next reason for my interest is directly related to why Ruby is hot and will remain so for a long time. On a side note, I feel the need to disclose that I am not a Ruby &#8220;fan boy&#8221;, I&#8217;ve spent my time in the ranks wrestling with C and Java and still have an fond appreciation for both. Back to what is important, developer productivity. Here are some of the things these dynamic languages really excel in, while keeping in mind that correlation doesn&#8217;t imply causation:</p>
<ul>
<li>It will make your developers happy to write less elaborate wordy boilerplate code</li>
<li>Writing less boilerplate code usually results in writing more human readable and elegant code (it has been said before that code should be human readable first and just coincidentally interpreted by a machine)</li>
<li>More human readable code can improve maintainability, health, and longevity of the code base</li>
<li>Maintainability can result in greater agility to output more business value</li>
</ul>
<p>Mathematicians have been joking that they&#8217;ve known that functional programming rocks for a pretty long time now. How could they not? Functions are the premise of their craft. It is true they&#8217;ve been using Lisp, Sage, and Python for years. I remember my MCS professors telling us in the late 90&#8242;s and early 2000&#8242;s that we better learn why these languages are kick ass (all the while they were teaching us the principles of OOP with this new language called Java). In fact, I noticed the other day that the new course outlines for MCS students at UIC have plenty of functional programming aspects using Python and Lisp. Sure Python isn&#8217;t a purist&#8217;s functional language, but anything with support for closures will do. Joining the bandwagon, I am trying to get good with Clojure at the moment with the trusty Pragmatic Programming Clojure book at my side. I am not going to lie, it has been tough to wrap my head around this concept (but doesn&#8217;t that generally happen with anything outside your comfort zone?). I would be remiss if I didn&#8217;t mention Erlang or Haskell in the context of popular functional languages. I suppose I could of chosen either one of those. I felt like Clojure was a better fit for me since it runs on the JVM, it&#8217;s dynamic, and the application of my learnings would be easier to integrate at work. So I have written fewer lines of code and as a result things are just concise. I am not sitting there worrying about immutability and concurrency they are just the fruits of my labor. I hope to extract some of the cool ideas out of the O&#8217;Reilly Collective Intelligence book and write them in Clojure.</p>
<p>I&#8217;m definitely stoked about the future with these languages. There is certainly so many possibilities and cool things to come. So the question is what will you be doing with these languages?</p>
]]></content:encoded>
			<wfw:commentRss>http://techwhizbang.com/2010/04/bright-future-for-dynamic-languages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.396 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-06 15:28:36 -->

