<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-5427069094580312550</id><updated>2009-11-28T11:57:48.217-08:00</updated><title type='text'>Code To Joy</title><subtitle type='html'>&lt;i&gt;Code To Joy&lt;/i&gt;: putting the thrill back in blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default?start-index=26&amp;max-results=25'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>251</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-6163624620494292542</id><published>2009-11-08T18:52:00.000-08:00</published><updated>2009-11-08T19:53:29.437-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='free advice'/><title type='text'>Career Cultivation and Creativity</title><content type='html'>Dean Wampler wrote &lt;a href="http://blog.polyglotprogramming.com/2009/11/6/cultivateyourcareertoday"&gt;an excellent article&lt;/a&gt; about the importance of cultivating your career, and provides some ways to do so. A thoughtful piece with some great ideas.&lt;br /&gt;&lt;br /&gt;In classic piggyback style, I thought I might add some suggestions. I'll keep this brief, as I fear an audience mismatch: those who might benefit most from these kinds of blog posts are the people &lt;span style="font-style: italic;"&gt;who don't read blogs&lt;/span&gt;. This means, sadly, we may well be yammering to ourselves in a cyber echo chamber.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Developing Experience&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Dean suggests trying new technologies at work (testing is a great opportunity), or an open-source project.&lt;br /&gt;&lt;br /&gt;One other option is a public repository such as &lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt;. In my experience, posting a project on a public server really forces you to dot the i's: you want a good build process, unit tests, clean/idiomatic code and so on. The public nature of the effort removes the laziness that can happen on homegrown "Sunday night" projects.&lt;br /&gt;&lt;br /&gt;Another option is to build a website. If you want to learn Rails, then &lt;span style="font-style: italic;"&gt;really use it&lt;/span&gt;. Hosting is cheap, as a career investment.&lt;br /&gt;&lt;br /&gt;You might protest&lt;span style="font-style: italic;"&gt;: What would I build? All the great ideas are taken! &lt;/span&gt;Well, first remember that you aren't trying to get rich, you're trying to get experience. That said, it will take some &lt;span&gt;creativity&lt;/span&gt;. All too often we concentrate on creative &lt;span style="font-style: italic;"&gt;technical&lt;/span&gt; solutions, but do not apply it to our &lt;span style="font-style: italic;"&gt;careers&lt;/span&gt;. In this instance, there are lots of ideas: consider a &lt;a href="http://kottke.org/08/02/single-serving-sites"&gt;single service site&lt;/a&gt;, help a &lt;a href="http://github.com/NathanNeff/enrollio/"&gt;volunteer organization&lt;/a&gt;, etc.&lt;br /&gt;&lt;br /&gt;If you play it right, you might learn something and make a name for yourself in the process. A friend of mine wrote &lt;a href="http://www.onlinetasklist.com/"&gt;Online Task List&lt;/a&gt;: he learned a ton about web development and now has hundreds of real-life users (including me).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Use Technology&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Everyone talks about social media, but there are many other technologies such as screencasting and the mighty YouTube.&lt;br /&gt;&lt;br /&gt;As an aside, I am stunned that it is 2009 and I see 6-page résumés: each job has the same lengthy details, no matter if it is a senior position in 2008 or an intern level gig in 1999. There is a painful list of technologies that includes things like log4j. I realize résumés are tuned for search engines, but &lt;span style="font-style: italic;"&gt;no one cares &lt;/span&gt;that you know log4j!&lt;br /&gt;&lt;br /&gt;What I'd like to see is someone on YouTube standing at a white-board, taking 5-10 minutes to explain the &lt;code&gt;inverse=true&lt;/code&gt; concept in Hibernate. Or your definition of unit tests versus integration tests. What is your favourite data structure? &lt;span style="font-style: italic;"&gt;Anything! &lt;/span&gt;If you're good, you will shine through.&lt;br /&gt;&lt;br /&gt;If I were to receive a minimalist résumé with contact info and a URL to your YouTube vid, I guarantee you'll have my attention. (Here, I'm assuming a thoughtful, tailored cover letter as part of the offering.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Upshot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In both solving problems and cultivating careers, don't discount creativity.&lt;br /&gt;&lt;br /&gt;We are only bounded by our imaginations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-6163624620494292542?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/6163624620494292542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=6163624620494292542' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/6163624620494292542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/6163624620494292542'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/11/career-cultivation-and-creativity.html' title='Career Cultivation and Creativity'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-2797401048559454608</id><published>2009-10-27T18:27:00.000-07:00</published><updated>2009-10-27T20:01:44.100-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='strange loop'/><title type='text'>A Random Walk On A Strange Loop: Day 2</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Full Discloseth:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;All of this may or may not matter to you: "A Longer Post" is an anagram of "Strange Loop". I live in St Louis, MO. &lt;/span&gt;&lt;span style="font-style: italic;"&gt;Some speakers and the organizer are friends of mine.&lt;/span&gt;&lt;span style="font-style: italic;"&gt; I work for &lt;a href="http://img21.yfrog.com/i/y61u.jpg/"&gt;a sponsor&lt;/a&gt; of the recent &lt;a href="http://thestrangeloop.com/"&gt;Strange Loop conference&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a continuation of some thoughts on the conference.  See many &lt;a href="http://thestrangeloop.tumblr.com/"&gt;more resources here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hamlet D'Arcy: Groovy Compiler Metaprogramming...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(&lt;a href="http://thestrangeloop.com/sessions/slides"&gt;slides here&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Hamlet gave a splendid talk on the power of manipulating Groovy's AST. As a warm-up to Groovy, he showed a &lt;a href="http://en.wikipedia.org/wiki/Quine_%28computing%29"&gt;quine&lt;/a&gt;: absolutely &lt;span style="font-style: italic;"&gt;perfect&lt;/span&gt; for this conference. Looking back, I'm surprised they weren't all over the place.&lt;br /&gt;&lt;br /&gt;Hamlet's main example was to introduce code into the AST during one of Groovy's compilation stages. I was reminded of a comment on Java Posse where someone said that AOP had to be invented in Java to solve a particular problem, and that the problem simply didn't exist in dynamic languages. This talk exemplified this in spades.&lt;br /&gt;&lt;br /&gt;As an aside, Hamlet was a real trooper with the microphone. It was an awkward set-up, but he handled it gracefully. (I tend to get rattled under such conditions, so big props...).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Matt Taylor: jQuery, the Javascript Library of the Future&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(&lt;a href="http://thestrangeloop.com/sessions/slides"&gt;slides here&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;This talk wins the prize for making me want to a buy a book on the subject. If you haven't seen Javascript for awhile, good news: the libraries are fantastic, with jQuery arguably leading the way.&lt;br /&gt;&lt;br /&gt;Matt's presentation and slides (featuring a hall-of-fame &lt;a href="http://twittch.com/"&gt;Twittch&lt;/a&gt; comic) were right on target, but the money maker is &lt;a href="http://storage.dangertree.net/jQuery/sample.html"&gt;the demo&lt;/a&gt;. Seriously: check it out now.&lt;br /&gt;&lt;br /&gt;It may be simple jQuery in a browser, but it is really a clever layout and a testament to jQuery. Matt showed some snazzy selectors and hinted that you can do more if you know CSS. I maintain that if &lt;span style="font-style: italic; font-weight: bold;"&gt;you don't know&lt;/span&gt; CSS, you could use something like this to explore and learn more about it. The demo is a bit like an IDE for the browser. Also, if you are using a giant template system (ahem), then jQuery might be useful to introspect pieces of the HTML fractal with which you must deal.&lt;br /&gt;&lt;br /&gt;I'm sold. I hate CSS and a lot of web design but this library looks great.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Michael Galpin: Mobile Development 101...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(&lt;a href="http://thestrangeloop.com/sessions/slides"&gt;slides here&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Michael gave a classic, spot-on talk on 2 major platforms: iPhone and Android. I say 'classic' in the sense that the trade-offs were presented in a balanced and honest manner. This is one talk where I wish there was more time for questions. There were many.&lt;br /&gt;&lt;br /&gt;After all, there is a big fork in the road for mobile development, and you can't take &lt;span style="font-style: italic;"&gt;both&lt;/span&gt; paths. Choosing one is a big decision. I'd especially liked to have heard more about development as a potential side-venture, rather than within an enterprise, and the necessary resources (e.g. accountant, attorney, trademark, etc). Not very techie, but mobile is the new gold-rush.&lt;br /&gt;&lt;br /&gt;I respected that Michael didn't proselytize which path to choose: he just laid out the options. I have the high respect for people who can present both sides of a topic without tipping their hand (even if they are passionate in one direction).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Alex Payne: Keynote on 'Minimalism in Software'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've been somewhat scooped by &lt;a href="http://fupeg.blogspot.com/2009/10/minimalism-programming-huh.html"&gt;Michael Galpin&lt;/a&gt; (above) on this one: I also give Alex high marks and found his keynote to be really thought-provoking, even if it was disagreement. I may write a critique in later a post. However, unlike Michael G, I &lt;span style="font-style: italic;"&gt;do &lt;/span&gt;like&lt;span style="font-style: italic;"&gt; &lt;/span&gt;artistic/&lt;a href="http://codetojoy.blogspot.com/2007/01/tale-of-two-themes.html"&gt;musical analogies&lt;/a&gt;. If anything, I wonder if Alex went &lt;span style="font-style: italic;"&gt;far enough&lt;/span&gt; with his analogy.&lt;br /&gt;&lt;br /&gt;More later, after the web has a chance to see Alex's talk. The nano-gist: after an introduction to Minimalism (versus &lt;span style="font-style: italic;"&gt;minimalism&lt;/span&gt;), Alex listed some methods to achieve it in technology (see the slides or &lt;a href="http://www.weiqigao.com/blog/2009/10/24/day_two_of_strange_loop_2009.html"&gt;this recap by Weiqi Gao&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Regrets and 2nd Chances&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I saw some other talks but want to focus on regrets -- actually, second chances -- as the content will be online. I'm looking forward to the Strange Passion sessions, talks by the &lt;a href="http://en.wikipedia.org/wiki/Sensei"&gt;&lt;span style="font-style: italic;"&gt;sensei&lt;/span&gt;s&lt;/a&gt; Jeff Brown and Ken Sipe, and definitely James Williams' talk on Griffon.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Upshot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes, yes, Alex Miller likes nachos. But I once read that he also likes building things, including events, and bringing people together. Strange Loop really was a dandy, and we are all better for it. Congrats! And thanks...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Full Discloseth:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;I work for &lt;a href="http://img21.yfrog.com/i/y61u.jpg/"&gt;a sponsor&lt;/a&gt; of the recent &lt;a href="http://thestrangeloop.com/"&gt;Strange Loop conference&lt;/a&gt;. &lt;/span&gt;&lt;span style="font-style: italic;"&gt;Some speakers and the organizer are friends of mine.&lt;/span&gt; &lt;span style="font-style: italic;"&gt;I live in St Louis, MO. &lt;/span&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;span style="font-style: italic;"&gt;"Lagoon Strep" is an anagram of "Strange Loop". &lt;/span&gt;&lt;span style="font-style: italic;"&gt;All of this may or may not matter to you. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;a href="http://codetojoy.blogspot.com/2009/10/random-walk-on-strange-loop-day-1.html"&gt;Go Steal Porn&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-2797401048559454608?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/2797401048559454608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=2797401048559454608' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/2797401048559454608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/2797401048559454608'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/10/random-walk-on-strange-loop-day-2.html' title='A Random Walk On A Strange Loop: Day 2'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-2124264778929383786</id><published>2009-10-26T18:27:00.000-07:00</published><updated>2009-10-27T20:04:23.718-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='strange loop'/><title type='text'>A Random Walk On A Strange Loop: Day 1</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Full Discloseth:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;I work for &lt;a href="http://img21.yfrog.com/i/y61u.jpg/"&gt;a sponsor&lt;/a&gt; of the recent &lt;a href="http://thestrangeloop.com/"&gt;Strange Loop conference&lt;/a&gt;. Some speakers and the organizer are friends of mine. I live in St Louis, MO. Finally, I've run "strange loop" through an anagram generator and laughed for hours at the various and sundry output. All of this may or may not matter to you.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;As always, all opinions are solely mine, and genuine.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A Random Walk&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I'm not a journalist and won't try to report on the conference. Chances are, it would be a futile endeavour. I use the "random walk" title as signal that this post is an &lt;a href="http://en.wikipedia.org/wiki/Impressionism"&gt;Impressionist&lt;/a&gt;, personal experience.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Vibe&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I &lt;span style="font-style: italic;"&gt;do&lt;/span&gt; want to set the scene: the event was held at &lt;a href="http://www.landmarktheatres.com/Market/St.Louis/TivoliTheatre.htm"&gt;the Tivoli&lt;/a&gt; in University City. "The Tiv" is a 1920s era movie theater with lots of unabashedly glitzy character. It was a marvelous choice and worked out really well. About 300 people attended, cramming the lobby and the facilities: the geek vibe was strong. (There was much more room in the theatres; i.e. during the talks.)&lt;br /&gt;&lt;br /&gt;There were also cameras! The talks will be on video, thanks to DZone. I'll post them here along with any links to slides.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Mario Aquino: Zen Mind/Warrior Spirit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(&lt;a href="http://thestrangeloop.com/sessions/slides"&gt;slides are here&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;One measure of a good movie is how long it stays with you afterwards. Mario's talk passes that same test. In a lyrical style with captivating slides, he combined ideas from Zen philosophy and a 'warrior code' to forge parallels to agile teams in software development.&lt;br /&gt;&lt;br /&gt;Among my revelations:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The struggle of meditation is to quiet the inner voice. Pure TDD is similar, as the inner voice always wants to write 'the real code' first. Testing first &lt;span style="font-style: italic; font-weight: bold;"&gt;is&lt;/span&gt; meditation. Perhaps that's why it takes focus.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Team culture is more than the sum of its parts. Like a warrior clan, there is a sense of something larger. Good teams have a sense of the 'common good' (aka convention) and the discipline to stay with it.&lt;/li&gt;&lt;li&gt;I once read about an Allied WW2 bombing squadron that suffered terrible losses over Europe. Despite being decimated, the remaining planes returned to Britain &lt;span style="font-style: italic;"&gt;in formation&lt;/span&gt;. I think of this often when I work, alone, in a team war room on a weekend. &lt;/li&gt;&lt;li&gt;Mario mentioned &lt;a href="http://twitter.com/coreyhaines"&gt;Corey Haines&lt;/a&gt;, who lives a nomadic existence as a programmer. This reminded several of us about &lt;a href="http://en.wikipedia.org/wiki/Paul_Erd%C5%91s"&gt;Paul Erdős&lt;/a&gt;, a rockstar mathematician who lived the same lifestyle.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Mark Volkmann: Tackling Concurrency with STM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(&lt;a href="http://thestrangeloop.com/sessions/slides"&gt;slides are here&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Mark gave an excellent overview: the pros and cons of lock-based concurrency versus using Software Transactional Memory (STM). I especially liked the open question of whether its time has come: after all, garbage collection took many years to become mainstream. The unvarnished truth is that we don't know, but things certainly seem to be brewing.&lt;br /&gt;&lt;br /&gt;Mark examined the details of STM in Clojure, using diagrams to give a sense of the internal representation. It is hard to recreate here, but I left with a better sense of Rich Hickey's position that the time dimension is vital to concurrency (see Hickey's &lt;a href="http://jaoo.dk/aarhus-2009/file?path=/jaoo-aarhus-2009/slides/RichHickey_TheClojureConcurrencyStory.pdf"&gt;slides here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Charles Nutter: Ruby Mutants&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(&lt;a href="http://thestrangeloop.com/sessions/slides"&gt;slides are here&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;I don't know Ruby, but I couldn't pass up a chance to see Charles. He's a class act in the Ruby community and obviously a major force. Not knowing Ruby, I was definitely a stranger in a strange land -- in fact some goons at the door frisked me, finding a Grails book and some Python code in an inside pocket. &lt;span style="font-style: italic;"&gt;Not necessary, gang!&lt;/span&gt; (&lt;span style=";font-family:times new roman;font-size:85%;"  &gt;also: not true&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;Charles mentioned "Java Next" and his criteria for choosing a Java successor. I loved that some popular JVM languages -- claimed by others as Java Next -- did not meet his criteria. He respected said languages but stated, matter-of-fact, that they didn't meet his aesthetic. This is a clear sign that the JVM community is healthy.&lt;br /&gt;&lt;br /&gt;He went on to examine two Ruby mutants: Duby and Surinx. There are some compelling slides that compare and contrast these two 'unfortunately named' mutants to Ruby itself. I'm struggling here to capture the essence of this talk, but do check it out: I thought it was fantastic stuff and an object lesson as a presentation, in terms of pace, tone, and code samples.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bob Lee: Keynote on Future of Java&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(&lt;a href="http://thestrangeloop.com/sessions/slides"&gt;slides are here&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;There is one aspect of Bob's keynote that I found especially noteworthy, and I'm dedicating this section to it. It was an excellent talk, with lots of interesting material, but this really resonated.&lt;br /&gt;&lt;br /&gt;A friend of mine once kept a log, for years, about bugs that he found. Over time, he compiled &lt;span style="font-style: italic;"&gt;evidence&lt;/span&gt; about software development in a given language. Based on this record, he developed a philosophy towards his coding conventions. (More to come in a subsequent post about evidence-based software practices: it ain't gonna be easy.)&lt;br /&gt;&lt;br /&gt;I was impressed at the time, and impressed again by Bob, when he argued for ARM blocks. He began with some Java puzzlers, to show the difficulty of correctly using IO and try-catch-finally blocks. All well and good. But then he reported examinations of large codebases, including &lt;span style="font-style: italic; font-weight: bold;"&gt;the JDK itself&lt;/span&gt;: there are &lt;span style="font-weight: bold;"&gt;plenty&lt;/span&gt; of instances where the code does not behave in a strictly-correct manner.&lt;br /&gt;&lt;br /&gt;More than Java 7 features, this is the big take-away: when presenting a case to an audience (be it a keynote, or your team), do the research and present evidence. Compelling.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Strange Passions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sadly, I didn't make it to the &lt;a href="http://thestrangeloop.com/passions"&gt;Strange Passions&lt;/a&gt; track, or the party at Blueberry Hill. However, there was a lot of buzz about the track idea (which is fantastic) and the individual talks. Sounds like it was a huge hit. I hope the passion talks are on video.&lt;br /&gt;&lt;br /&gt;More to come, re: Day #2.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Full Discloseth:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;All of this may or may not matter to you: "go steal porn" is an anagram of "strange loop". I live in St Louis, MO. &lt;/span&gt;&lt;span style="font-style: italic;"&gt;Some speakers and the organizer are friends of mine.&lt;/span&gt;&lt;span style="font-style: italic;"&gt; I work for &lt;a href="http://img21.yfrog.com/i/y61u.jpg/"&gt;a sponsor&lt;/a&gt; of the recent &lt;a href="http://thestrangeloop.com/"&gt;Strange Loop conference&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://codetojoy.blogspot.com/2009/10/random-walk-on-strange-loop-day-2.html"&gt;A Longer Post&lt;/a&gt;.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-2124264778929383786?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/2124264778929383786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=2124264778929383786' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/2124264778929383786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/2124264778929383786'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/10/random-walk-on-strange-loop-day-1.html' title='A Random Walk On A Strange Loop: Day 1'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-8076760756406594416</id><published>2009-10-12T18:44:00.000-07:00</published><updated>2009-10-12T19:08:45.143-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the best of the best'/><title type='text'>Ignorance is Bliss</title><content type='html'>Like many, I have loved &lt;a href="http://en.wikipedia.org/wiki/Calvin_and_Hobbes"&gt;Calvin and Hobbes &lt;/a&gt;for a long time. Not that this blog compares, but the spoofs on here are influenced by Calvin's weird, wonderful world where we only bounded by our imaginations.&lt;br /&gt;&lt;br /&gt;I recently &lt;a href="http://chutzpah.typepad.com/slow_movement/2008/07/calvin-hobbes-2.html"&gt;found a post&lt;/a&gt; that contains, my all-time favourite C&amp;amp;H. I probably shouldn't encourage a likely violation of copyright, but I'm weak. I've tried, in vain, to describe this one to people dozens of times. I laugh out loud (especially the visual of frame 5, "&lt;span style="font-style: italic;"&gt;I don't want to know about it"&lt;/span&gt;) every time since I first saw it in the early 1990s.&lt;br /&gt;&lt;br /&gt;This comic is such biting satire toward software development that I no longer hang it up at work gigs, lest it is interpreted as some kind of protest.&lt;br /&gt;&lt;br /&gt;The genius is that it has &lt;span style="font-weight: bold;"&gt;no&lt;/span&gt; ties to IT: a friend once commented that her mother, &lt;span style="font-style: italic;"&gt;a judge&lt;/span&gt;, had it laminated and placed prominently on her refrigerator. Truly philosophical, it is timeless and universal.&lt;br /&gt;&lt;br /&gt;I love Dilbert too, but if I had to choose: you can keep it. Give me Calvin and Hobbes, please. I only wish that &lt;a href="http://en.wikipedia.org/wiki/Bill_Watterson"&gt;Watterson&lt;/a&gt; would come out of retirement and do a few more, whenever his muse strikes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-8076760756406594416?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/8076760756406594416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=8076760756406594416' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/8076760756406594416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/8076760756406594416'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/10/ignorance-is-bliss.html' title='Ignorance is Bliss'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-3103639290993574337</id><published>2009-09-29T04:31:00.000-07:00</published><updated>2009-09-29T06:17:27.002-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='duct tape'/><title type='text'>The Emperor's New Prose: Duct Tape Blogging</title><content type='html'>I've been a fan of Joel Spolsky's for a long time. He has written some excellent, influential stuff. Unfortunately, his latest blog entry, &lt;a href="http://www.joelonsoftware.com/items/2009/09/23.html"&gt;The Duct Tape Programmer&lt;/a&gt;, falls short of the mark, and has sparked &lt;a href="http://blog.objectmentor.com/articles/2009/09/24/the-duct-tape-programmer"&gt;some&lt;/a&gt; &lt;a href="http://www.tbray.org/ongoing/When/200x/2009/09/25/On-Duct-Tape"&gt;debate&lt;/a&gt; throughout the web.&lt;br /&gt;&lt;br /&gt;I wasn't going to respond until I saw supportive tweets such as 'thoughtful, provoking essay'. (Damn you, Twitter, now you've drawn me into this.)&lt;br /&gt;&lt;br /&gt;Joel's piece isn't a thoughtful, provoking essay. &lt;a href="http://www.joelonsoftware.com/articles/fog0000000043.html"&gt;This one is&lt;/a&gt;, but Duct Tape Programmer is just a quick rant. Like I said, I'm a fan of Joel, but let's not be sycophants here!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Gist&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I freely admit that I haven't read the book, Coders At Work, but here is &lt;a href="http://www.joelonsoftware.com/items/2009/09/23.html"&gt;Joel's article&lt;/a&gt;. Here's my summary of his points:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Keep things as simple as possible, but no simpler.&lt;/li&gt;&lt;li&gt;'Simple as possible' is context dependent.&lt;/li&gt;&lt;li&gt;It's the features, stupid.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The first item is a favourite quote of mine, often attributed to Einstein (though I have not verified that). An example in software: your webapp may not need GWT on a full blown J2EE stack, but you'll probably need a database. The first case is not simple as possible; yet without a DB, it is &lt;span style="font-style: italic;"&gt;too&lt;/span&gt; simple.&lt;br /&gt;&lt;br /&gt;His other point is that the definition of 'simple as possible' depends on circumstances: the context of a start-up company is much different than a mature app at a large enterprise. Naturally, the start-up will have a much more stringent definition of 'simple as possible'.&lt;br /&gt;&lt;br /&gt;Finally, Joel admires those that concentrate on features, and who ship code.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Surprise&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I agree with Joel. His thesis isn't particularly original, but as I see it, it is virtually indisputable.&lt;br /&gt;&lt;br /&gt;However, I take issue with some of the details. My point is that this just isn't a thoughtful post.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;At Issue: What is Duct Tape?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Joel gives lots of examples of complex technologies: multi-threading, COM, and CORBA. Hard stuff, no doubt. He goes on to write:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-family:verdana;" &gt;... any kind of coding technique that’s even &lt;/span&gt;&lt;em style="color: rgb(51, 51, 255); font-family: verdana;"&gt;slightly&lt;/em&gt;&lt;span style="color: rgb(51, 51, 255);font-family:verdana;" &gt; complicated is going to doom your project.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;However, against the backdrop of extremely complicated technologies, he doesn't define 'slightly complicated'. There's not even an example! From what I can tell there isn't even an example of duct tape!&lt;br /&gt;&lt;br /&gt;Is OO slightly complicated? AOP? Functional programming? Transactions? Languages without garbage collection? &lt;span style="font-style: italic;"&gt;with&lt;/span&gt; garbage collection? The notion of 'simple' is much more nuanced than Joel implies.&lt;br /&gt;&lt;br /&gt;This rhetoric reminds me of the &lt;a href="http://en.wikipedia.org/wiki/Straw_man"&gt;straw-man argument&lt;/a&gt; and definitely is the logical fallacy of &lt;a href="http://en.wikipedia.org/wiki/False_alternative"&gt;false alternative&lt;/a&gt;. Joel assured me on Twitter that the COM example is real, and not a straw-man. I'm sure it is true (I didn't think Joel was being deceitful), but berating the most extreme case with no comment on the middle-ground does not make a thoughtful article.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;At Issue: Design Patterns&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Quick -- what is the most commonly used design pattern, using the vocabulary of the seminal work, &lt;a href="http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612"&gt;Design Patterns&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;I don't know, but I'd wager that it is the &lt;a href="http://en.wikipedia.org/wiki/Iterator_pattern"&gt;Iterator&lt;/a&gt;. In fact, if you work with Java, it is so common that it may not 'count' in your mind. And yet, there it is: a freaking &lt;span style="font-style: italic;"&gt;commodity&lt;/span&gt;, no less.&lt;br /&gt;&lt;br /&gt;Joel takes a shot at a 'Design Patterns meet-up'. It's true that people can go crazy with esoterica, but again, nuances are lost with broad strokes. It is easy to deride the architecture astronauts!&lt;br /&gt;&lt;br /&gt;There may well be times when a design pattern is the right fit, and it is &lt;span style="font-weight: bold;"&gt;our job as professionals to be prepared&lt;/span&gt;. True -- we have to be intellectually honest and disciplined -- but that doesn't mean we shouldn't be informed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;At Issue: Unit Tests&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hoo-boy, Joel fired a shot across the bow of the agile ship. A brave man.&lt;br /&gt;&lt;br /&gt;I'm a big fan of unit testing and am convinced that they helps us make better software. However, &lt;span style="font-style: italic; font-weight: bold;"&gt;if&lt;/span&gt; the context is a start-up in an ultra-competitive space, and we are racing for the '50% good' mark, then I &lt;span style="font-style: italic;"&gt;agree&lt;/span&gt; that unit tests would slow things down. If I were in that environment, I would shower every 2 hours just to get the smell off me.&lt;br /&gt;&lt;br /&gt;The issue here is that most of us are &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; in that context, and the post implies that unit tests are used for 'endless polishing' to get to the '99% sparkling' mark. That's just bogus.&lt;br /&gt;&lt;br /&gt;Unit tests are the first client of any software. They find bugs. They highlight problems in an API. They serve as executable documentation. They get us to the X% mark faster, where X is way higher than 50 and not as obsessive as 99. &lt;span style="font-style: italic;"&gt;Most projects are shooting for X.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Upshot&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;We all agree that simplicity and features are of paramount importance. We all agree that we shouldn't listen to architecture astronauts with high-falutin', ego-driven schemes that are not appropriate for the situation. As usual, the devil is in the definitions (what is&lt;span style="font-style: italic;"&gt; appropriate&lt;/span&gt;?).&lt;br /&gt;&lt;br /&gt;But to the Twitterverse: just because an excellent writer wrote a piece, it doesn't make it excellent. Call them out, when &lt;a href="http://en.wikipedia.org/wiki/The_Emperor%27s_New_Clothes"&gt;they have no prose&lt;/a&gt;, and write your own 'duct tape post' instead of broad, incendiary brush strokes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-3103639290993574337?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/3103639290993574337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=3103639290993574337' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/3103639290993574337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/3103639290993574337'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/09/emperors-new-prose-duct-tape-blogging.html' title='The Emperor&apos;s New Prose: Duct Tape Blogging'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-5206706407105594271</id><published>2009-09-14T18:45:00.000-07:00</published><updated>2009-09-15T18:00:13.323-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming on ACID'/><title type='text'>STM and Clojure: An Article Recommendation</title><content type='html'>Your friend and mine, &lt;a href="http://java.ociweb.com/mark/"&gt;Mark Volkmann&lt;/a&gt;, has written an &lt;a href="http://ociweb.com/mark/stm/article.html"&gt;excellent, thorough article&lt;/a&gt; over at the &lt;a href="http://ociweb.com/jnb"&gt;OCI Java News Brief&lt;/a&gt; (I work for an affiliate of OCI).&lt;br /&gt;&lt;br /&gt;The article first places Software Transactional Memory (STM) within the milieu of other concurrency techniques. I especially like the emphasis on &lt;span style="font-style: italic;"&gt;transactional&lt;/span&gt;, as I found that as a stumbling block in the past. (It does not necessarily mean a database!)&lt;br /&gt;&lt;br /&gt;The article goes on to work though some serious study of STM in Clojure. Great stuff....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-5206706407105594271?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/5206706407105594271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=5206706407105594271' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/5206706407105594271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/5206706407105594271'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/09/stm-and-clojure-article-recommendation.html' title='STM and Clojure: An Article Recommendation'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-795022751414864488</id><published>2009-09-14T18:30:00.000-07:00</published><updated>2009-09-14T18:36:33.392-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fair warning'/><title type='text'>PostgreSQL and Unicode</title><content type='html'>I ran into this recently and thought I would post it, just in case in helps someone.&lt;br /&gt;&lt;br /&gt;In PostgreSQL 8.3, the &lt;code&gt;chr()&lt;/code&gt; function accepts &lt;a href="http://www.postgresql.org/docs/8.3/static/functions-string.html"&gt;a Unicode codepoint&lt;/a&gt;. This is useful to insert (or in our case, correct) Unicode strings.&lt;br /&gt;&lt;br /&gt;You might think that this feature has been around since... version 6, or 7, or surely 8.2 ?&lt;br /&gt;&lt;br /&gt;No. Be careful: the documentation for 8.2 &lt;a href="http://www.postgresql.org/docs/8.2/static/functions-string.html"&gt;mentions only ASCII&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-795022751414864488?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/795022751414864488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=795022751414864488' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/795022751414864488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/795022751414864488'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/09/postgresql-and-unicode.html' title='PostgreSQL and Unicode'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-7978025315737344639</id><published>2009-09-13T17:16:00.000-07:00</published><updated>2009-09-13T20:09:07.278-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='internal DSL'/><title type='text'>Vending Machine: A DSL in Groovy</title><content type='html'>In a previous post, I explained a modest example of the &lt;a href="http://codetojoy.blogspot.com/2009/08/vending-machine-modest-groovy-example.html"&gt;Vending Machine in Groovy&lt;/a&gt;. I've since taken the code and tried my hand at writing an &lt;a href="http://www.martinfowler.com/bliki/DomainSpecificLanguage.html"&gt;internal DSL&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'm a relative newbie to internal DSLs, but I've pushed my example up to GitHub (&lt;a href="http://github.com/codetojoy/vending_machine_groovy_dsl_internal/"&gt;here&lt;/a&gt;). (This post is light on explaining the details, since the code is available.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Observation #1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The best discovery is the magic of disappearing code. In this example, the main program simply evaporates and becomes this:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;// load the DSL engine/rules&lt;br /&gt;def dslEngine = new File("${args[0]}").text&lt;br /&gt;&lt;br /&gt;// load the command input&lt;br /&gt;def input = new File("${args[1]}").text.toLowerCase()&lt;br /&gt;&lt;br /&gt;// dslEngine creates 'machine', which accepts the input:&lt;br /&gt;def dslScript = " $dslEngine ; machine.accept { $input } "&lt;br /&gt;&lt;br /&gt;// let Groovy do the rest!&lt;br /&gt;new GroovyShell().evaluate(dslScript)&lt;br /&gt;&lt;/pre&gt;Amazing! There are 2 input arguments to the program. One is the DSL "engine" or context. It looks something like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;class Machine {&lt;br /&gt;   def machineState = new MachineState()&lt;br /&gt;&lt;br /&gt;   def service(def coinList, def inventoryMap) {&lt;br /&gt;      machineState.availableChange = new MoneyState(coinList)&lt;br /&gt;      machineState.inventoryState = new InventoryState(inventoryMap)&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   def getN() { machineState.addInsertedMoney(MoneyState.NICKEL) }&lt;br /&gt;   def getD() { machineState.addInsertedMoney(MoneyState.DIME) }&lt;br /&gt;   def getQ() { machineState.addInsertedMoney(MoneyState.QUARTER) }&lt;br /&gt;&lt;br /&gt;   def getCoin_return() { machineState.insertedMoney = MoneyState.ZERO }&lt;br /&gt;&lt;br /&gt;   // snip&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The other argument is the set of commands. For example:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;SERVICE ([50, 50, 50, 50], [ [N:'A', P:'65', C:'10'] ])&lt;br /&gt;&lt;br /&gt;VERIFY "[50, 50, 50, 50] [0, 0, 0, 0] [ [N:'A', P:'65', C:'10'] ]"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Note that the SERVICE command looks like a method call, with parentheses and a comma. That's because it &lt;span style="font-style: italic; font-weight: bold;"&gt;is&lt;/span&gt; a method call. Similarly, VERIFY is as well, though no parentheses are necessary for the single string argument.&lt;br /&gt;&lt;br /&gt;The other commands are simpler:&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;N ; D ; Q ; a$ ; COIN_RETURN&lt;br /&gt;&lt;/pre&gt;These are direct method/property calls as well (e.g. &lt;code&gt;machine.getN()&lt;/code&gt;).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;Observation #2&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Articles on internal DSLs often talk about the contortions that one must go through to simplify the syntax for the end-user. Often, one uses techniques that would otherwise be considered poor style. (&lt;a href="http://www.amazon.com/Programming-Groovy-Productivity-Developer-Programmers/dp/1934356093"&gt;Venkat Subramaniam&lt;/a&gt; jokes that "designing the DSL" is "finding the right tricks").&lt;br /&gt;&lt;br /&gt;I discovered that as well. In Groovy, it is relatively easy to have a decent DSL, but there is a never-ending desire to improve upon it. In the current version, I ran into a wall for using the dollar-sign as a token (see the compromise above: quoting that character in this post is giving Blogspot fits). Along with the parentheses on SERVICE, this pains me. I literally think about it while running on a treadmill.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Observation #3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the first example, I adopted a file based approach for the input, over an interactive command-line. This has paid off in spades, because my suite of input files act as acceptance tests. Morphing the Java-esque example into a DSL was considerably easier with the existence of those files.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The upshot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With the right support and on the right scale, internal DSLs are terrific. For example, parts of (or, &lt;span style="font-style: italic;"&gt;all&lt;/span&gt; of?) Grails and Gant are internal DSLs and I love it.&lt;br /&gt;&lt;br /&gt;On a smaller scale, I'm not so sure. I'm still disturbed about the issue of &lt;a href="http://codetojoy.blogspot.com/2008/06/domain-specific-error-messages.html"&gt;Domain Specific Error messages&lt;/a&gt;. That is: can a domain expert (without development skills) really handle the power of an internal DSL (including the errors)?&lt;br /&gt;&lt;br /&gt;Either way, internal DSLs are undeniably a fun exercise and a great way to learn more about a language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-7978025315737344639?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/7978025315737344639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=7978025315737344639' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/7978025315737344639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/7978025315737344639'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/09/vending-machine-dsl-in-groovy.html' title='Vending Machine: A DSL in Groovy'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-6267348420286883368</id><published>2009-08-30T18:38:00.000-07:00</published><updated>2009-08-30T19:04:29.414-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='get your groovy online'/><title type='text'>Groovy Console App and WIDE</title><content type='html'>In April 2008, I blogged about &lt;a href="http://codetojoy.blogspot.com/2008/04/wide-web-enabled-ide.html"&gt;the WIDE: web-enabled IDE&lt;/a&gt;. I wondered if web tools might augment some of the standard stuff available in the IDEs.&lt;br /&gt;&lt;br /&gt;(I realize many have 'scratchpads' but I wanted something more. Also, by environment, I don't mean a single app).&lt;br /&gt;&lt;br /&gt;In particular, I've thought about a website dedicated to string and regex utilities. Whenever I find myself writing a little script to parse a data string, or to toy with a regex, I always think "there must be a better way".&lt;br /&gt;&lt;br /&gt;Well, we're one huge step closer: check out the &lt;a href="http://groovyconsole.appspot.com/"&gt;Groovy Web Console&lt;/a&gt;, by Guillaume Laforge.&lt;br /&gt;&lt;br /&gt;It laughs at basic string utilities:&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;def s = "does this string fit into a 32-char column?"&lt;br /&gt;println s.size()&lt;br /&gt;&lt;/pre&gt;And provides a test-bed for regular expressions:&lt;br /&gt;&lt;br /&gt;(Note, this is a Java-Groovy hybrid. It's only somewhat 'Groovy'. Making it Groovier is left to the reader)&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;import java.util.regex.Pattern&lt;br /&gt;&lt;br /&gt;def s = "1 - 314-867- 5309"&lt;br /&gt;def p = Pattern.compile(/.*1.*(\d\d\d).*(\d\d\d).*(\d\d\d\d).*/)&lt;br /&gt;def m = p.matcher(s)&lt;br /&gt;if (m.matches()) {&lt;br /&gt;  println "area code = ${m[0][1]}"&lt;br /&gt;  println "exchange = ${m[0][2]}"&lt;br /&gt;  println "digits = ${m[0][3]}"&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Count me in... I'm definitely going to have this site at hand in my environment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-6267348420286883368?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/6267348420286883368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=6267348420286883368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/6267348420286883368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/6267348420286883368'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/08/groovy-console-app-and-wide.html' title='Groovy Console App and WIDE'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-853644678971638854</id><published>2009-08-30T17:23:00.000-07:00</published><updated>2009-08-30T18:15:08.676-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='this is your brain on code'/><title type='text'>The IDE is a Browser: Neuroscience and Language Design</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Lizard Brain Web Design&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Last winter, I saw a great talk by Scott Davis called &lt;a href="http://www.therichwebexperience.com/conference/orlando/2009/12/session?id=15940"&gt;"Lizard Brain Web Design"&lt;/a&gt;. The theme was to apply psychology and neuro sci ideas to web sites, and to explain why simplicity and good design can really work. For example, we want the site to stay "out of the way" so that the users stay in a primal, "lizard" mode of consciousness with respect to the site. In this way, they can concentrate on what matters.&lt;br /&gt;&lt;br /&gt;During the talk, I remember thinking that all of the principles discussed apply to more than surfing content on the web. They also apply to surfing &lt;span style="font-style: italic;"&gt;code in an IDE&lt;/span&gt;. That is, topics such as:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Whitespace is a critical aspect of design&lt;/li&gt;&lt;li&gt;Group related items (locality of reference)&lt;/li&gt;&lt;li&gt;Our minds can only stack N items (N = 7 ?)&lt;/li&gt;&lt;li&gt;Principle of least surprise&lt;/li&gt;&lt;/ul&gt;apply just as well to our APIs, our code organization, and coding conventions.&lt;br /&gt;&lt;br /&gt;For months now, I've wondered if there were studies that applied neuro sci to developers.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Subitizing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's play a game: as you add a parameter to a method, how many parameters triggers your sense of "this is too many -- I need to refactor this".&lt;br /&gt;&lt;br /&gt;Seriously, go ahead, think of a number, N, for your threshold.&lt;br /&gt;&lt;br /&gt;You probably said N = 3 or 4. True, that's what everyone says, but here is one reason why. The delightful book &lt;a href="http://www.amazon.com/Mind-Hacks-Tricks-Using-Brain/dp/0596007795"&gt;Mind Hacks&lt;/a&gt; discusses &lt;span style="font-style: italic;"&gt;subitizing&lt;/span&gt; (item #35): given a set of N objects, where N is 4 or less, we process counting in a &lt;span style="font-style: italic;"&gt;much&lt;/span&gt; faster way. The book claims 250 ms for the first 4 items and a full second (!) for every 4 items after that.&lt;br /&gt;&lt;br /&gt;There is debate as to how this works (see Mind Hacks for academic references), but one conjecture is that when N &lt;= 4, the "counting" is a side effect of visual processing: i.e. it is done by the lizard, reptilian level of the brain. When N goes past 4, we have to do some work. &lt;br /&gt;&lt;br /&gt;Now, let's be clear: the book talks about counting shapes. Stars, circles, beads on an abacus. I have no idea if this applies to Java or C# parameters. &lt;br /&gt;&lt;br /&gt;But I'm willing to bet money that it does.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Eye-Tracking and Variable Names&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.scala-lang.org/node/3069"&gt;This article&lt;/a&gt; came across the transom recently, and dovetailed with the above ideas. The gist is that the researchers used scientific techniques (e.g. eye-tracking) to evaluate productivity of programming styles.&lt;br /&gt;&lt;br /&gt;The claim in the paper is that the Scala style of using comprehensions is more productive than Java's iterative loops. Also, for small code blocks, well-named intermediate variables may not matter.&lt;br /&gt;&lt;br /&gt;I didn't read the paper, and I have no idea of the validity of the science. However, I find the approach to be very fascinating. I'm sure scientific methods have been used for a long time with respect to lines of code, and productivity, but I wonder if neuroscience will have a future impact on language &lt;span style="font-style: italic;"&gt;design&lt;/span&gt;?&lt;br /&gt;&lt;br /&gt;It would be fascinating to see if researchers start hooking up developers to &lt;a href="http://en.wikipedia.org/wiki/Functional_magnetic_resonance_imaging"&gt;functional MRI&lt;/a&gt; machines, to see how the brain works while coding. (I know that my &lt;a href="http://en.wikipedia.org/wiki/Amygdala"&gt;amygdala&lt;/a&gt; lights up when I see a 80-line method!)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Upshot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Imagine a geek conference where a new language is unveiled: instead of its design being driven by a sense of tradition or aesthetic, what if its design was modeled on hard evidence from a neuro lab?&lt;br /&gt;&lt;br /&gt;Neat stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-853644678971638854?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/853644678971638854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=853644678971638854' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/853644678971638854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/853644678971638854'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/08/ide-as-browser-neuroscience-and.html' title='The IDE is a Browser: Neuroscience and Language Design'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-4679683257887164733</id><published>2009-08-25T10:09:00.000-07:00</published><updated>2009-08-25T10:46:24.028-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='count me in'/><title type='text'>An Understated Feature in Groovy</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Background&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have worked with Groovy for awhile, but have been averse to one feature: the implicit return of the last expression evaluated. For example:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;def getFoo() {&lt;br /&gt;    def foo = null&lt;br /&gt;&lt;br /&gt;    if (something) {&lt;br /&gt;        foo = new Foo()&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    foo // no 'return' necessary&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the above code, I would use &lt;code&gt;return&lt;/code&gt; because it felt safer to me. I tended to agree &lt;a href="http://stuffthathappens.com/blog/2007/09/25/paying-my-taxes/"&gt;with Eric's post&lt;/a&gt; (with respect to explicit returns).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Revelation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I &lt;span style="font-style: italic;"&gt;get it&lt;/span&gt; now, and it's all thanks to the &lt;a href="http://groovy.codehaus.org/Collections"&gt;enhanced collection methods&lt;/a&gt; in Groovy.&lt;br /&gt;&lt;br /&gt;Consider the &lt;code&gt;collect&lt;/code&gt; method. It transforms a list by applying a function. In pseudocode:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;[ a, b, c, d] =&gt; [ f(a), f(b), f(c), f(d) ]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;With that in mind, here's another example:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;class Composer {&lt;br /&gt;    def name&lt;br /&gt;    // def era, etc&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;def list = [ 'Bach', 'Beethoven', 'Brahms' ]&lt;br /&gt;&lt;br /&gt;// the closure returns the new Composer object, as it is the last&lt;br /&gt;// expression evaluated.&lt;br /&gt;&lt;br /&gt;def composers = list.collect { item -&gt; new Composer(name : item) }&lt;br /&gt;&lt;br /&gt;assert 'Bach' == composers[0].name&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The idea is simply to build a list of &lt;code&gt;Composer&lt;/code&gt; objects from a list of strings. As noted in the comment, the closure passed to &lt;code&gt;collect&lt;/code&gt; uses the implicit return to great effect. At one time, I would have taken 3-4 lines to express that idea.&lt;br /&gt;&lt;br /&gt;But now, this code is not merely concise: it is truly &lt;span style="font-style: italic;"&gt;elegant&lt;/span&gt;. Very reminiscent of other languages such as Python.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Take-Home Message&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are many lists of &lt;a href="http://joe.kueser.com/2007/10/06/what-makes-groovy-sogroovy/"&gt;excellent Groovy features&lt;/a&gt;. However we rarely see 'implicit return' listed. I'm a fan: it greases the wheels for other features.&lt;br /&gt;&lt;br /&gt;I realize it is available in many languages: I just haven't used it in Groovy. I suspect in a few weeks I won't be able to live without it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-4679683257887164733?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/4679683257887164733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=4679683257887164733' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/4679683257887164733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/4679683257887164733'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/08/understated-feature-in-groovy.html' title='An Understated Feature in Groovy'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-3624872683744709979</id><published>2009-08-17T17:54:00.000-07:00</published><updated>2009-08-17T18:07:44.447-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='guest post'/><title type='text'>The Case for Grails</title><content type='html'>&lt;a href="http://www.blogger.com/profile/14700866414917837527"&gt;David Jacobs&lt;/a&gt;, a friend and colleague, posted a comment in response to other comments on a &lt;a href="http://codetojoy.blogspot.com/2009/06/case-for-groovy.html"&gt;previous post&lt;/a&gt;. The comments focused on scaffolding in Grails.&lt;br /&gt;&lt;br /&gt;I thought it was worthy of a full-blown post, and he has kindly granted me permission. David's thesis is that there is much more to Grails than just scaffolding and quick demos.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;By David Jacobs:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've now been using Grails on my primary project for about 16 months (not just toying with it--this is at my "real job" on a large project for one of the 50 largest companies in America). My appreciation of it has continued to grow, and I have complete confidence in it as an appropriate choice for 95%+ of business applications.&lt;br /&gt;&lt;br /&gt;Scaffolding is NOT a primary benefit of Grails. It enables cool 5 minute demos, but the real world benefits of Grails are much deeper. There are simplified (auto-wired) conventions, built in tools, or plugins for nearly every aspect of web development. This enables a massive increase in productivity by enabling and encouraging clean solutions that don't re-invent the wheel. Perhaps even more importantly, this keeps the code lean, which is very important for long-term maintenance, refactoring, and preventing "sleeper defects" that tend to hide in bloated code.&lt;br /&gt;&lt;br /&gt;I needed to add caching for some web service calls to improve performance: 11 lines of code (entirely declarative).&lt;br /&gt;&lt;br /&gt;To meet a versioning requirement (lock, copy as new revision), I needed to implement deep cloning of a persistent domain tree with child associations (mostly collections) five levels deep, with multiple branches, touching about 30 persistent objects. Some needed to be copied by reference (for example, a createdByUser association), and some cloned as new (recursively deep cloned). My implementation is completely generic and won't require changes if the domain model is changed. Pass the method a domain object instance, it hands you back a copy with all of the children copied and properly attached to their new parents. Then you call .save(), and all of the new ids are generated and your database has been updated. This one is a testament to the power of Grails metaprogramming with GORM and Groovy: 22 lines of code.&lt;br /&gt;&lt;br /&gt;I needed to create a utility application for mocking a third-party SSO module to enable logins on staging/demo servers. It validates user inputs, makes an AJAX request to the target app with modified request headers to initiate a browser session, and launches it with the intended user now logged in. It uses a proper MVC architecture, the layout is configured with SiteMesh, it has configuration/build management and versioning, URL mapping/redirection to keep it friendly, and log4j integrated and configured. From creating the project to building the WAR file, it took 4 hours.&lt;br /&gt;&lt;br /&gt;Point proven?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-3624872683744709979?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/3624872683744709979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=3624872683744709979' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/3624872683744709979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/3624872683744709979'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/08/case-for-grails.html' title='The Case for Grails'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-6734543901500816465</id><published>2009-08-16T19:14:00.000-07:00</published><updated>2009-08-16T19:54:00.219-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vending machine'/><title type='text'>Vending Machine: A Modest Groovy Example</title><content type='html'>I wasn't ready for the &lt;a href="http://lambdalounge.org/meeting-archive/"&gt;Language Shootout at the Lambda Lounge&lt;/a&gt;, but I've completed an example of the vending machine, and &lt;a href="http://github.com/codetojoy/vending_machine_groovy_javaesque/tree/master"&gt;placed it up at GitHub&lt;/a&gt;. (The Language Shootout used a small specification to illustrate languages ranging from Haskell to Fan, and everything in between.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Highlights&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As Lambda Loungers know, these examples are not intended to be submissions for &lt;a href="http://en.wikipedia.org/wiki/Turing_Award"&gt;the Turing Award&lt;/a&gt;. My example is a modest program, but offers this to Groovy newbies:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The project uses &lt;a href="http://gant.codehaus.org/"&gt;Gant&lt;/a&gt;, has test cases, and is fairly complete.&lt;/li&gt;&lt;li&gt;The program accepts an input file, and supports a VERIFY action to "assert" the expected state of the machine. In some ways, the file could be an acceptance test (reminiscent of &lt;a href="http://en.wikipedia.org/wiki/Framework_for_Integrated_Test"&gt;FIT&lt;/a&gt;).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;One interesting idea (IMHO) is the execution of data as code. More below.&lt;/li&gt;&lt;li&gt;The example has some internal uses of &lt;code&gt;Expando&lt;/code&gt;, and many uses of the elegant closure-based iterations.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Evaluating Data&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Consider a command like so:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;// N = Name, P = Price, C = Count&lt;br /&gt;SERVICE [5,5,5,5] [[N:'A', P:'65', C:'10'],[N:'B', P:'100', C:'10']]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The pattern here is: &lt;code&gt;Action Coins Inventory&lt;/code&gt;. In this example, &lt;code&gt;Coins&lt;/code&gt; is evaluated as a Groovy &lt;code&gt;list&lt;/code&gt;; &lt;code&gt;Inventory&lt;/code&gt; is a Groovy &lt;code&gt;map&lt;/code&gt;. This not only simplifies parsing, but affects the architecture of the example. This is hardly new (&lt;span style="font-style: italic;"&gt;hello, Lisp&lt;/span&gt;!), but a powerful tool.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Java-esque&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As with many languages, Groovy supports a wide-range of styles. I've dubbed this example as "Java-esque". Here's why:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Actions (like SERVICE) are objects. This is a nod to Java's style.&lt;/li&gt;&lt;li&gt;It does not use the MOP (see &lt;a href="http://github.com/rhyolight/groovy-vending/tree/master"&gt;Matt Taylor's example&lt;/a&gt;), and is not really a DSL.&lt;/li&gt;&lt;li&gt;It eschews some common Groovyisms (e.g. using an expression as the return value, without specifying the &lt;code&gt;return&lt;/code&gt; keyword).&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Known Issues&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There is no REPL-loop or interaction with the user: only file input. Also, it emits no output per se, and does not acknowledge corner-cases, such as requiring exact change. It simply allows verification of expected state.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Lessons Learned&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I love evaluation of data as code. I always have.&lt;/li&gt;&lt;li&gt;Tests are essential with Groovy, &lt;span style="font-weight: bold;"&gt;and&lt;/span&gt; they become inextricably tied to your experience as a developer. This is hard to explain, but because of the dynamic types, the tests cement themselves into your dev cycle in a way that is much stronger than Java. If you cheat with a large method that does not have a test, you'll probably pay for it.&lt;/li&gt;&lt;li&gt;It is important to read the output when a test fails. Often, I just scan it and blithely assume I know where the problem is. This usually leads to frustration, until I realize that the test was &lt;span style="font-weight: bold;"&gt;trying&lt;/span&gt; to help me &lt;span style="font-style: italic;"&gt;all along&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;As an aside, this is my first project in Git. It is excellent and definitely worth studying.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;The Gist&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I hope this example helps someone. I hope to write some others, including a full-on Groovy MOP version.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-6734543901500816465?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/6734543901500816465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=6734543901500816465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/6734543901500816465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/6734543901500816465'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/08/vending-machine-modest-groovy-example.html' title='Vending Machine: A Modest Groovy Example'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-1770962262759595357</id><published>2009-07-29T05:43:00.000-07:00</published><updated>2009-07-29T10:35:30.285-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code reviews'/><title type='text'>More On Code Reviews</title><content type='html'>Your friend and mine, &lt;a href="http://marioaquino.blogspot.com/"&gt;Mario Aquino&lt;/a&gt;, has an &lt;a href="http://marioaquino.blogspot.com/2009/07/my-code-review-criteria_26.html"&gt;excellent post&lt;/a&gt; on material for code reviews. In classic blogger tradition, why leave a comment when I can write a post?&lt;br /&gt;&lt;br /&gt;I agree with his points, and will add my own below. Don't leave a comment saying 'what about unit tests?'. Mario has already covered a lot, so consider his post.&lt;br /&gt;&lt;br /&gt;I once wrote about the &lt;a href="http://codetojoy.blogspot.com/2007/02/universal-issues.html"&gt;Universal Issues&lt;/a&gt; that affect a software project. They influence this list.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Architectural Harmony&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Mario writes about harmony within a source-file. One can expand that to the level of architecture: is this code in the proper place, with respect to the architecture? Is it in the right package/module?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Client-Side Specifics&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Does the code follow known conventions for a GUI? e.g. In a Swing app, does it use the event-dispatch thread appropriately? What about i18n?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Server-Side Boundaries&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Similar to the architectural harmony above, is the code correct with respect to transactions? concurrency? In a framework situation, these are often handled at an outer scope, but it is important to place ourselves in the appropriate context.&lt;br /&gt;&lt;br /&gt;Concurrency is a fun topic because developers have an involuntary reflex: we look upwards to the ceiling whenever asked about multi-threading. Try it, and see for yourself.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Data Is Immortal&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As I've said before, versioning is the toughest problem in software engineering, especially given that data lives forever. I've been on projects where data must persist across versions, and in this case, it is vital to give consideration to this aspect during a code review. The gotchas are downright ghostly and ghastly: i.e. hard to see, and expensive.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A Thought On Delivery&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is dangerous to riff through such a list in &lt;span style="font-style: italic;"&gt;every&lt;/span&gt; code review.  It will frustrate the developer and eventually turn people off from asking for code reviews. Though always wise to keep these things in mind, it is important to know &lt;span style="font-style: italic;"&gt;when&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;ask out loud&lt;/span&gt;. That is a true art, and can only be gained by experience and a sensitivity to the working conditions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-1770962262759595357?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/1770962262759595357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=1770962262759595357' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/1770962262759595357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/1770962262759595357'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/07/more-on-code-reviews.html' title='More On Code Reviews'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-5451377969899560685</id><published>2009-07-28T19:49:00.000-07:00</published><updated>2009-07-28T20:04:57.964-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cool conferences'/><title type='text'>The Strange Loop (Why You Need To Be In St Louis, Oct 09)</title><content type='html'>Alex Miller is organizing a terrific conference in St Louis (October 2009). Check out all the details &lt;a href="http://thestrangeloop.com/"&gt;over at the website&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you are in the midwest USA, you won't find a better value. Hell, if you are &lt;span style="font-style: italic;"&gt;on another continent&lt;/span&gt;, you won't find a better value. Come on over.&lt;br /&gt;&lt;br /&gt;You may think I'm biased, but check out &lt;a href="http://thestrangeloop.com/sessions"&gt;the session list&lt;/a&gt;, and see for yourself. Lots of interesting, off-the-beaten-path stuff by first class speakers, with even more to be announced: I believe the 'Strange Passions' track is still open.&lt;br /&gt;&lt;br /&gt;Alex envisioned an esoteric conference that he would like to attend -- and the dream is forming right before our eyes. Check it out!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-5451377969899560685?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/5451377969899560685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=5451377969899560685' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/5451377969899560685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/5451377969899560685'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/07/strange-loop-why-you-need-to-be-in-st.html' title='The Strange Loop (Why You Need To Be In St Louis, Oct 09)'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-7714623620562170567</id><published>2009-06-11T10:24:00.000-07:00</published><updated>2009-06-11T11:10:42.433-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='brought to you by the letter G'/><title type='text'>The Case for Groovy</title><content type='html'>This month's &lt;a href="http://java.ociweb.com/javasig/"&gt;StL JUG&lt;/a&gt; features &lt;a href="http://weblog.dangertree.net/"&gt;Matt Taylor&lt;/a&gt; speaking on TDD with Groovy (tonight!).&lt;br /&gt;&lt;br /&gt;Like last month's &lt;a href="http://codetojoy.blogspot.com/2009/05/case-for-clojure.html"&gt;post on Clojure&lt;/a&gt;, I'll play law professor, and try my hand at making some arguments that Groovy is the JVM-based language you should learn (if you can only pick one). Like last time, I'm treating this as an exercise, though this is easy, as I am a Groovy fan.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Grails&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Long ago, I would say that the first reason for Groovy was its learning curve. That is still important (see below), but my new first reason is: &lt;a href="http://www.grails.org/"&gt;Grails&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I imagine most readers are familiar with Grails: a Rails-influenced web framework that stands on the shoulders of giants -- namely, Hibernate and Spring. The reason I put this item up front and center is that you &lt;span style="font-weight: bold;"&gt;can make money&lt;/span&gt; with it. There are real jobs to be had here, folks. This is a powerful framework with plenty of momentum.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Griffon, GORM, Gradle, Gant, ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In addition to Grails, there are several other projects that are intimately related to the Java platform. e.g. &lt;a href="http://groovy.codehaus.org/Griffon"&gt;Griffon&lt;/a&gt; brings Grails-like conventions to Swing apps. Straight from Grails, &lt;a href="http://grails.org/GORM"&gt;GORM&lt;/a&gt; is a DSL for Hibernate mappings. &lt;a href="http://www.gradle.org/"&gt;Gradle&lt;/a&gt; is a next-gen build system that stands on top of Ant and Maven, without all that nasty XML. &lt;a href="http://groovy.codehaus.org/Gant"&gt;Gant&lt;/a&gt; is somewhat similar, used by Grails.&lt;br /&gt;&lt;br /&gt;The upshot is that the Groovy community is vibrant and doing many different things: surely something &lt;span style="font-weight: bold;"&gt;will be useful &lt;/span&gt;to your project.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Language&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Up to this point, I haven't written about the language itself. IMO, Groovy seems familiar to Java, but with all of the ceremony stripped away.  Tremendous amounts of boilerplate are removed: getters/setters are gone; access modifiers have reasonable defaults; regular expressions are trivially easy; and so on.&lt;br /&gt;&lt;br /&gt;But there's more: dynamic typing, closures, the Meta-Object Protocol, and other features provide a rich feature-set that is quite different from a merely trimmed Java.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tools and Testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Groovy-Recipes-Greasing-Pragmatic-Programmers/dp/0978739299"&gt;Scott Davis has written an excellent book&lt;/a&gt; with the subtitle "&lt;span style="font-style: italic;"&gt;Greasing &lt;/span&gt;the Wheels of Java". That is spot-on. For XML, web services, scripting Java libraries, etc, Groovy is amazingly useful and effective.&lt;br /&gt;&lt;br /&gt;One of these aspects is testing (this is where Matt's talk applies). Groovy has tremendous support for unit-tests, including mocks and stubs. The dynamic nature of the language offers a lot of options.  Come on out to the talk to see more on this item.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A Gentle Learning Curve, With Growth&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you know Java, Groovy is extremely easy to learn: in fact, almost all Java will run &lt;span style="font-style: italic;"&gt;as&lt;/span&gt; Groovy. The curve actually goes &lt;span style="font-style: italic;"&gt;downhill&lt;/span&gt; (in a good, effortless way).&lt;br /&gt;&lt;br /&gt;Now, you may dismiss this. As a reader of this and other fine blogs, you may be confident that you can learn &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; language, thanks. I'm sure you can. The usefulness of the learning curve is that your work (e.g. a utility) is far more likely to be used by other &lt;span style="font-weight: bold;"&gt;Java&lt;/span&gt; developers. In a team environment, that's important. Groovy is unmatched in this regard: it promotes social computing.&lt;br /&gt;&lt;br /&gt;That is, if you want it to do so. If you want to do something wild, Groovy allows you to grow into that as well. In this spirit, it is reminiscent of Python: the curve is always reasonable but seems to climb forever. As mentioned, the dynamic nature of the language will definitely, quickly, take you to places that you haven't been using only Java.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Upshot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I realize there are no code samples in this post. I apologize. Again, this is a quick list of 'arguments' for learning Groovy as your next language on the JVM. There is a ton of material out there, both in free documentation and in books.&lt;br /&gt;&lt;br /&gt;(Full disclosure, some of the following authors are friends.)&lt;br /&gt;&lt;br /&gt;For Groovy books, start with either &lt;a href="http://www.amazon.com/Programming-Groovy-Productivity-Developer-Programmers/dp/1934356093/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1244743040&amp;amp;sr=1-1"&gt;Programming Groovy&lt;/a&gt; or &lt;a href="http://www.amazon.com/Groovy-Recipes-Greasing-Pragmatic-Programmers/dp/0978739299"&gt;Groovy Recipes&lt;/a&gt;.  For Grails books, pick up either &lt;a href="http://pragprog.com/titles/dkgrails/grails"&gt;Grails: A Quick-Start Guide&lt;/a&gt; or the ultimate reference, &lt;a href="http://apress.com/book/view/1590599950"&gt;The Definitive Guide to Grails&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Either way, give Groovy a shot, or come on out to the &lt;a href="http://ociweb.com/javasig"&gt;StL JUG&lt;/a&gt;. It is time well-spent.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-7714623620562170567?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/7714623620562170567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=7714623620562170567' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/7714623620562170567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/7714623620562170567'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/06/case-for-groovy.html' title='The Case for Groovy'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-2853783700714080223</id><published>2009-06-04T06:17:00.000-07:00</published><updated>2009-06-04T10:44:57.191-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tonight&apos;s entertainment'/><title type='text'>Haskell and MacRuby at Lambda Lounge</title><content type='html'>A quick reminder that tonight's Lambda Lounge features talks on Haskell and MacRuby. Both speakers are friends: they really know their stuff, so it should be a fantastic evening.&lt;br /&gt;&lt;br /&gt;For more details, check out &lt;a href="http://lambdalounge.org/2009/06/01/june-meeting-haskell-and-macruby/"&gt;this post&lt;/a&gt; over on the LL site.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-2853783700714080223?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/2853783700714080223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=2853783700714080223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/2853783700714080223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/2853783700714080223'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/06/haskell-and-macruby-at-lamba-lounge.html' title='Haskell and MacRuby at Lambda Lounge'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-8896026464865644436</id><published>2009-05-28T19:44:00.000-07:00</published><updated>2009-05-28T20:03:13.994-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pop psych'/><title type='text'>Beware Of Mumpsimus</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;In first year of university, I took a class that used the wonderful book &lt;a href="http://college.cengage.com/collegesurvival/ellis/master_student/10e/students/"&gt;Becoming A Master Student&lt;/a&gt;. The book had many stories that have stayed with me over the years.&lt;br /&gt;&lt;br /&gt;One is the &lt;a href="http://www.worldwidewords.org/qa/qa-mum1.htm"&gt;story of mumpsimus&lt;/a&gt;. You can read more at the link, but the gist is that a monk used a Latin word, &lt;span style="font-style: italic;"&gt;mumpsimus&lt;/span&gt;, for decades before discovering it was bogus. Upon the revelation, the monk replied that he didn't care: he had been using it for 40 years and so it would it remain.&lt;br /&gt;&lt;br /&gt;In my freshman year, I was an uncomfortable chemistry major. Little did I know that I would be writing about that story many years, later vis-a-vis computer science. (The story itself may go back centuries!)&lt;br /&gt;&lt;br /&gt;I mentioned mumpsimus in the comments of the last post. I had speculated on using &lt;code&gt;protected&lt;/code&gt; methods over &lt;code&gt;private&lt;/code&gt; methods. The feedback was unified in its rejection of the idea, yet I mused that I would probably continue my style. Ouch. That is mumpsimus indeed: after seeking opinions, I launched a heroic denial of the responses and continued on my merry way. Nice.&lt;br /&gt;&lt;br /&gt;Another example is the defeat of mumpsimus. Years ago, in C++, I would define class members like so:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: rgb(196, 225, 255);"&gt;&lt;br /&gt;class Person {&lt;br /&gt;  int m_id;&lt;br /&gt;  string m_name;&lt;br /&gt;  int m_age;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;When I turned to Java, I held on to that style -- for about 1 day. When I saw what IDEs could do for automatically generating getters and setters, it became obvious that the prefix had to go. Thankfully, logic carried the day over mumpsimus.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Upshot&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The point here is that we have a name for a particular mindset, and a reminder that it is important to re-evaluate ideas with an honest understanding of our biases.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-8896026464865644436?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/8896026464865644436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=8896026464865644436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/8896026464865644436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/8896026464865644436'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/05/beware-of-mumpsimus.html' title='Beware Of Mumpsimus'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-7230127592397223205</id><published>2009-05-27T04:32:00.000-07:00</published><updated>2009-05-27T05:00:08.214-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='to be served and protected'/><title type='text'>Java Methods: protected is the new private?</title><content type='html'>In code reviews (including my code), when I see a Java method marked as &lt;code&gt;private&lt;/code&gt;, I ask if there are any unit tests for it.&lt;br /&gt;&lt;br /&gt;Since tests are written in other files in parallel packages, the answer, of course, is no.&lt;br /&gt;&lt;br /&gt;I've recently realized that I've obtained the following habit: my methods are either &lt;code&gt;public&lt;/code&gt; or &lt;code&gt;protected&lt;/code&gt;. I have no use for &lt;a href="http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html"&gt;&lt;code&gt;default&lt;/code&gt;&lt;/a&gt; or &lt;a href="http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html"&gt;&lt;code&gt;private&lt;/code&gt;&lt;/a&gt;. I don't like &lt;code&gt;default&lt;/code&gt; because I feel compelled to write a comment saying that it is package-level access; I don't like &lt;code&gt;private&lt;/code&gt; because of the lack of testing options.&lt;br /&gt;&lt;br /&gt;Before you start hammering in comments, here are some thoughts:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;This is not for a formal API to another team or other 3rd party. In that case, I would be more careful and rigid. You may argue there is no distinction, in which case: commence hammering.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I realize that &lt;code&gt;protected&lt;/code&gt; is not &lt;code&gt;default&lt;/code&gt; and that it is leaking encapsulation somewhat. I can cheerily say that I don't care. I like scanning a file and seeing either &lt;code&gt;public&lt;/code&gt; or &lt;code&gt;protected&lt;/code&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I'm not trumpeting that I write more unit-tests than others on my team. Just because a method is &lt;code&gt;protected&lt;/code&gt; doesn't mean that I've written the tests!&lt;/li&gt;&lt;/ul&gt;What do you think? Has your style changed over the years, with respect to access modifiers on methods?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-7230127592397223205?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/7230127592397223205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=7230127592397223205' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/7230127592397223205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/7230127592397223205'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/05/java-methods-protected-is-new-private.html' title='Java Methods: protected is the new private?'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-881068979985146427</id><published>2009-05-13T19:16:00.000-07:00</published><updated>2009-05-13T20:16:07.598-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lisp'/><category scheme='http://www.blogger.com/atom/ns#' term='fp'/><category scheme='http://www.blogger.com/atom/ns#' term='clojure'/><title type='text'>The Case for Clojure</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Background&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At NFJS shows, a common question is "I only have time to learn one new language on the JVM: which should I pick?".&lt;br /&gt;&lt;br /&gt;The easy answer is true: it doesn't matter. Just pick one already!&lt;br /&gt;&lt;br /&gt;However, I think people can reasonably ask for more information.&lt;br /&gt;&lt;br /&gt;Even though my personal favourite is Groovy, I fancy that, like a good law professor, I could argue a decent case for any of them.&lt;br /&gt;&lt;br /&gt;In this post, I'll write a bit on Clojure. To be honest, the title is deceiving: I don't know Clojure, and this isn't a full-blown legal case. I'm really inviting you to some resources (see below).&lt;br /&gt;&lt;br /&gt;However, I know enough to see the benefit. This is an earnest post.&lt;br /&gt;&lt;br /&gt;Mark Volkmann is giving &lt;a href="http://java.ociweb.com/javasig/"&gt;a Clojure talk&lt;/a&gt; on Thursday at the St Louis JUG. Quoting from his intro, Clojure is a dynamically-typed, functional programming language that runs on the JVM.&lt;br /&gt;&lt;br /&gt;From past talks, and from Mark's intro, here are some reasons I think Clojure is worthy of your consideration:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Let's Lisp Again, &lt;a href="http://www.youtube.com/watch?v=5krtVb9zZFI"&gt;Like We Did Last Semester&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you liked Lisp back in university, welcome back: Clojure has a Lisp-like syntax and style. Both the syntax and functional programming seems new again, in part thanks to &lt;a href="http://www.pragprog.com/titles/shcloj/programming-clojure"&gt;Stuart Halloway's book&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here, 'new' means a shot-in-the-arm to the FP community and a welcoming online scene. Let's face it: it can be &lt;span style="font-style: italic;"&gt;lonely&lt;/span&gt; when studying older languages.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Got Lisp?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you don't know Lisp or functional programming, adding Clojure to your repetoire is almost like right-brain thinking. It is profoundly different from Java, C#, and other imperative languages.  This is important in order to truly grow. To borrow from natural languages: it's cool if you know French and Spanish, but it's &lt;span style="font-style: italic;"&gt;cooler&lt;/span&gt; if you know French and Chinese (or Spanish and Chinese).&lt;br /&gt;&lt;br /&gt;Bonus: though not unique to FP, Clojure can execute data &lt;span style="font-style: italic;"&gt;as code&lt;/span&gt;. This is powerful, and quite underrated, IMHO. This goes all the way back to grand-daddy Lisp, so you'll be learning from one of &lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fitknowledgeexchange.techtarget.com%2Fwhatis%2Fcode-to-joys-7-wonders-of-programming-languages%2F&amp;amp;ei=togLSsXmOYq7mQem66maCA&amp;amp;usg=AFQjCNHszwYHNZ1Adskr59Tkd1_H-EmuXw"&gt;the undisputed giants&lt;/a&gt;. What's more both Lisp and Clojure have a minimal, consistent syntax. Though it is, er, mind-expanding at first, many people become true fans of the philosophy.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Software Transactional Memory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Concurrency is the new memory management. Memory management was a beast until garbage collection evolved, over decades, to be a shining sword.&lt;br /&gt;&lt;br /&gt;Now, on the JVM, we've tamed the memory beast and wrestle with concurrency. Consider &lt;a href="http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601"&gt;books like this&lt;/a&gt;: JCiP is an outstanding book, but it is a tough go, in part because the developer must coordinate lock-level tools. Or, worse, a &lt;span style="font-style: italic;"&gt;team &lt;/span&gt;of people must coordinate lock-level tools.&lt;br /&gt;&lt;br /&gt;What if we had something really different -- a pseudo-intelligent agent &lt;span style="font-style: italic;"&gt;like&lt;/span&gt; a garbage collector, except &lt;span style="font-style: italic;"&gt;aimed at concurrency&lt;/span&gt;? That's what Clojure offers: a unique alternative that might (and that's all we can say: &lt;span style="font-style: italic; font-weight: bold;"&gt;might&lt;/span&gt;) slay the beast of our time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Upshot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Come on out to &lt;a href="http://java.ociweb.com/javasig/"&gt;the JUG&lt;/a&gt; on Thursday, or if you aren't in St Louis, check out Mark's &lt;a href="http://jnb.ociweb.com/jnb/jnbMar2009.html"&gt;excellent article on Clojure&lt;/a&gt;. It is quite thorough, and has received kudos from the Clojure community.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-881068979985146427?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/881068979985146427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=881068979985146427' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/881068979985146427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/881068979985146427'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/05/case-for-clojure.html' title='The Case for Clojure'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-3148733583390148159</id><published>2009-05-13T10:17:00.000-07:00</published><updated>2009-05-13T10:27:12.389-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='no excuses'/><title type='text'>Mandatory Listening: Michael Nygard on SE-Radio</title><content type='html'>Ted Neward &lt;a href="http://blogs.tedneward.com/2007/10/08/A+Book+Every+Developer+Must+Read.aspx"&gt;has told us&lt;/a&gt; to buy Michael Nygard's &lt;a href="http://www.pragprog.com/titles/mnee/release-it"&gt;Release It&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;I&lt;/span&gt; &lt;a href="http://codetojoy.blogspot.com/2008/11/car-pooling-with-ebay-erlang-and.html"&gt;have told you&lt;/a&gt; to listen to Software Engineering Radio.&lt;br /&gt;&lt;br /&gt;Perhaps you haven't listened. Perhaps you've been busy, or perhaps you reject advice from respected IT leaders (and me) on principle.&lt;br /&gt;&lt;br /&gt;Well, now there are &lt;span style="font-style: italic;"&gt;no&lt;/span&gt; excuses: check out &lt;a href="http://www.se-radio.net/podcast/2009-05/episode-134-release-it-michael-nygard"&gt;SE-Radio episode 134 with Michael Nygard&lt;/a&gt;. You may &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; refute an implicit &lt;span style="font-style: italic;"&gt;double&lt;/span&gt; recommendation!&lt;br /&gt;&lt;br /&gt;Believe me, you won't regret it. Then read the book and check out his talks on the NFJS tour.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-3148733583390148159?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/3148733583390148159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=3148733583390148159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/3148733583390148159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/3148733583390148159'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/05/mandatory-listening-michael-nygard-on.html' title='Mandatory Listening: Michael Nygard on SE-Radio'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-8723114591006180648</id><published>2009-05-05T20:36:00.000-07:00</published><updated>2009-05-05T20:51:25.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='a different kind of project coin'/><title type='text'>Language Shootout At Lambda Lounge</title><content type='html'>Gmail has been recommending "vending machines" ads to me for some weeks now.&lt;br /&gt;&lt;br /&gt;Here's why: &lt;a href="http://lambdalounge.org"&gt;the Lambda Lounge&lt;/a&gt; has issued the &lt;a href="http://stllambdalounge.files.wordpress.com/2009/03/vendingmachinespecification.pdf"&gt;Vending Machine&lt;/a&gt; exercise as a way to showcase the idioms of different languages (and there has been good discussions on the mailing list, hence the Google ads).&lt;br /&gt;&lt;br /&gt;If you are in St Louis, drop by on Thursday night (&lt;a href="http://lambdalounge.org/2009/05/05/may-meeting/"&gt;details here&lt;/a&gt;), to see some live demos! There are a &lt;span style="font-style: italic;"&gt;wide&lt;/span&gt; variety of languages on display.&lt;br /&gt;&lt;br /&gt;For best results, take a shot with a language of your choice. Though somewhat behind, I've been working on a Groovy version.&lt;br /&gt;&lt;br /&gt;Stay tuned to the website (or &lt;a href="http://lambdalounge.org/mailing-list/"&gt;the mailing list&lt;/a&gt;) to find resources to examples.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-8723114591006180648?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/8723114591006180648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=8723114591006180648' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/8723114591006180648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/8723114591006180648'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/05/language-shootout-at-lambda-lounge.html' title='Language Shootout At Lambda Lounge'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-185646078734001590</id><published>2009-04-24T05:19:00.000-07:00</published><updated>2009-04-24T05:50:26.703-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patently false'/><category scheme='http://www.blogger.com/atom/ns#' term='satire'/><title type='text'>What is this, the developer's version of The Onion?</title><content type='html'>I've started a new venture: &lt;a href="http://twitter.com/statuses/user_timeline/33727328.rss"&gt;Patently False&lt;/a&gt;. Tech headlines and gossip from the cutting edge of satire.&lt;br /&gt;&lt;br /&gt;Here &lt;a href="http://twitter.com/statuses/user_timeline/33727328.rss"&gt;is an RSS feed&lt;/a&gt; and &lt;a href="http://twitter.com/patentlyfalse"&gt;here is a Twitter feed&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Story&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CodeToJoy's model has been, vaguely, &lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=2&amp;amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCalvin_and_Hobbes&amp;amp;ei=ILHxSaGeKcOe-AbBy42hDw&amp;amp;usg=AFQjCNFNzwBNQNIJ4aX42lzxQ-pfRanhWQ"&gt;Calvin and Hobbes&lt;/a&gt;, with posts that range from &lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fitknowledgeexchange.techtarget.com%2Fwhatis%2Fcode-to-joys-7-wonders-of-programming-languages%2F&amp;amp;ei=M7HxScDRNcfN-Qap_JGmDw&amp;amp;usg=AFQjCNHszwYHNZ1Adskr59Tkd1_H-EmuXw"&gt;the earnest&lt;/a&gt; to &lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fcodetojoy.blogspot.com%2F2007%2F11%2Flas-vegas-lobbies-for-java-6-on-leopard.html&amp;amp;ei=RLHxScWpB5av-AaR642_Dw&amp;amp;usg=AFQjCNEBmqSvfL1vt5PUhWjVNqQYM2eT4w"&gt;the absurd&lt;/a&gt;. Long-time readers can stay with me, and adjust easily as the sincerity scale changes.&lt;br /&gt;&lt;br /&gt;However, I realize that it's difficult for newbies to pin down the vibe. The title of this post is a comment that was left on Reddit or DZone, months ago. For CodeToJoy, the answer is "it depends on the post".&lt;br /&gt;&lt;br /&gt;Though my writing certainly doesn't compare to genius of C&amp;amp;H or The Onion, I've decided to branch out. &lt;a href="http://twitter.com/patentlyfalse"&gt;Patently False&lt;/a&gt; will be all absurdity, all the time -- a &lt;span style="font-weight: bold;"&gt;resounding yes&lt;/span&gt; to this post's title. To combat ambiguity, I put a disclaimer right in the title.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Organization&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Also, I've decided to go ultra-lightweight: headlines only, on Twitter. On Google Reader, I've noticed that &lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fwww.theonion.com%2F&amp;amp;ei=hrPxSe7oIoSV-gaRhbyvDw&amp;amp;usg=AFQjCNEpHfwDik4DUv9pVS4vWrzk-a_aXQ"&gt;The Onion&lt;/a&gt; can make me laugh with a good headline.  Sometimes, the stories seem like a forced, obligatory exercise.&lt;br /&gt;&lt;br /&gt;There is a &lt;a href="http://patentlyfalse.blogspot.com/"&gt;blog site&lt;/a&gt;, with an official introduction and explanation of the &lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FInterrobang&amp;amp;ei=-bTxScP7OdnG-QaNo83ADw&amp;amp;usg=AFQjCNGoJEMwfEpDJE9z7pjfe1SurjNU3w"&gt;interrobang&lt;/a&gt;, but for now that is mostly a holding area.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Upshot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Subscribe today....  I reserve the right to do longer, full spoof pieces on CodeToJoy: this blog won't change. After all, the nation of The Joyous must be served!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-185646078734001590?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/185646078734001590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=185646078734001590' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/185646078734001590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/185646078734001590'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/04/what-is-this-developers-version-of.html' title='What is this, the developer&apos;s version of The Onion?'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-8107168575804785233</id><published>2009-04-20T17:25:00.000-07:00</published><updated>2009-04-21T06:12:30.871-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='sun'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Top Ten Reasons Java Developers Fear The Oracle Buyout</title><content type='html'>It is huge news indeed, and so without further ado, here are the Top Ten Reasons why Java developers fear the Oracle buyout:&lt;br /&gt;&lt;br /&gt;#10 Any Java class with the name &lt;code&gt;Table&lt;/code&gt; in it will have a 30 character limit&lt;br /&gt;&lt;br /&gt;#9 Your favorite open-source IDE will become a Toad plugin&lt;br /&gt;&lt;br /&gt;#8 Applications will become known as &lt;span style="font-style: italic;"&gt;Enterprise Stored Procedures&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#7 Ignoring silly hexadecimal, the CEO will insist the venerable &lt;code&gt;CAFEBABE&lt;/code&gt; header be changed to &lt;code&gt;IAMLARRY&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;#6 Prospective JavaOne speakers will need to win a yacht race as part of the acceptance process. JavaOne itself will be held on a desert island.&lt;br /&gt;&lt;br /&gt;#5 The beloved Java Posse will suddenly resurface as the &lt;span style="font-style: italic;"&gt;PL/SQL Posse&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#4 The classloader will become a fork of MySQL and require a series of certification tests before modification&lt;br /&gt;&lt;br /&gt;#3 The next version of Java will be known as JDK 7g&lt;br /&gt;&lt;br /&gt;#2 A new Swing API will replace EventListener with TNSListener, requiring annoying server configuration.&lt;br /&gt;&lt;br /&gt;and the top reason Java developers fear the Oracle buyout:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;#1 DBAs will park in reserved slots, acquire window offices, and gleefully demand that &lt;span style="font-weight: bold;"&gt;everything&lt;/span&gt; goes into Fourth Normal Form.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you like this kind of humor, come on over to a brand-new Twitter feed...&lt;br /&gt;&lt;br /&gt;Introducing &lt;a href="http://twitter.com/patentlyfalse"&gt;@patentlyfalse&lt;/a&gt; (read &lt;a href="http://patentlyfalse.blogspot.com/"&gt;more here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Even if you aren't on Twitter, &lt;a href="http://twitter.com/statuses/user_timeline/33727328.rss"&gt;here is an RSS feed&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-8107168575804785233?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/8107168575804785233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=8107168575804785233' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/8107168575804785233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/8107168575804785233'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/04/top-ten-reasons-java-developers-fear.html' title='Top Ten Reasons Java Developers Fear The Oracle Buyout'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5427069094580312550.post-827669543520602052</id><published>2009-04-19T13:26:00.000-07:00</published><updated>2009-04-19T14:01:40.214-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thanks Ed'/><title type='text'>Historical Footnote on Design Patterns</title><content type='html'>When it rains, it pours. I recently attended an excellent talk on "&lt;a href="http://tech.puredanger.com/presentations/design-patterns-reconsidered"&gt;Design Patterns Reconsidered&lt;/a&gt;" by &lt;a href="http://tech.puredanger.com"&gt;Alex Miller&lt;/a&gt;.  Around the same time, I was listening to a &lt;a href="http://se-radio.net/"&gt;Software Engineering radio&lt;/a&gt; podcast (on &lt;a href="http://www.amazon.com/Adrenaline-Junkies-Template-Zombies-Understanding/dp/0932633676"&gt;Adrenalin Junkies&lt;/a&gt;) and heard a comment that merits amplification.&lt;br /&gt;&lt;br /&gt;Many people know (or would know, if they attended Alex's talk) that the seminal book, &lt;a href="http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612"&gt;Design Patterns&lt;/a&gt;, was heavily influenced by books on architecture by &lt;a href="http://en.wikipedia.org/wiki/Christopher_Alexander"&gt;Christopher Alexander&lt;/a&gt;. In Design Patterns, the now-famous Gang of Four certainly discuss Alexander, and list patterns-based literature of the era, vis-a-vis software architecture -- but there isn't much on the semantic gap between architecture and computer science. How did we discover Alexander in the&lt;span style="font-style: italic;"&gt; first place&lt;/span&gt;?&lt;br /&gt;&lt;br /&gt;On the podcast, a woman points out that &lt;a href="http://www.amazon.com/Peopleware-Productive-Projects-Teams-Second/dp/0932633439"&gt;Peopleware&lt;/a&gt; is one of the first known books on software to reference Alexander's works (though note that the context is organizing office space).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Tom_DeMarco"&gt;Tom deMarco&lt;/a&gt; acknowledges the comment, but states that &lt;a href="http://en.wikipedia.org/wiki/Edward_Yourdon"&gt;Edward Yourdon&lt;/a&gt; was a major factor in bringing the book into consciousness of IT (in the early 1970s). Though he can only comment for himself (and not the Gang of Four), deMarco goes on to say that he owes "a personal debt" to Yourdon.&lt;br /&gt;&lt;br /&gt;Perhaps, we all owe thanks?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5427069094580312550-827669543520602052?l=codetojoy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codetojoy.blogspot.com/feeds/827669543520602052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5427069094580312550&amp;postID=827669543520602052' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/827669543520602052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5427069094580312550/posts/default/827669543520602052'/><link rel='alternate' type='text/html' href='http://codetojoy.blogspot.com/2009/04/historical-footnote-on-design-patterns.html' title='Historical Footnote on Design Patterns'/><author><name>Michael Easter</name><uri>http://www.blogger.com/profile/14799771593145201161</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00410961247553263513'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry></feed>