tag:blogger.com,1999:blog-84252654345153535602024-03-13T12:27:16.829-04:00The Software Grovethoughts of a software consultantMatt Passellhttp://www.blogger.com/profile/08333337257678227054noreply@blogger.comBlogger62125tag:blogger.com,1999:blog-8425265434515353560.post-66696632454203563582013-03-14T22:17:00.001-04:002013-03-14T22:17:07.953-04:00Goodbye Google ReaderYesterday, I was browsing my feeds in Google Reader and came upon an article relaying the news that <a href="http://googlesystem.blogspot.com/2013/03/no-more-google-reader.html">Google Reader will be retired on July 1st</a>. According to the <a href="http://googleblog.blogspot.com/2013/03/a-second-spring-of-cleaning.html">post on Google's official blog</a>, the service was launched in 2005. I started using it shortly after launch and have visited the site most days since, so I was pretty disappointed to hear the news. I knew it was a bad sign when the Reader link disappeared from the prominent section of the Google app bar and moved more than half way down the "More" menu, but I hoped that Google would at least keep it alive as long as it made them more money than it cost to operate. Perhaps that's no longer true, but I have my doubts. After a certain point, the service ceased to receive much in the way of UI or feature updates and it's hard to believe it's been a resource hog (the same can't be said of Google Wave). Although I doubt it will make a difference, I signed a <a href="http://www.change.org/petitions/google-keep-google-reader-running">petition on change.org</a>, asking that the service be kept alive.<br />
<br />
Rather than waiting around and hoping for its revival, I thought it would be worth exploring alternatives to Reader. A quick Google search led me to a <a href="http://reviews.cnet.com/8301-19512_7-57574201-233/google-reader-is-dying-but-we-have-five-worthy-alternatives/">CNET article</a> discussing five other options and <a href="http://blog.digg.com/post/45355701332/were-building-a-reader">Digg announced</a> today that they'll be building one as well. My plan is to try out <a href="http://www.feedly.com/">Feedly</a> in Chrome and on my phone and see what I think. So far, so good, but I'll let you know if my opinion changes.Matt Passellhttp://www.blogger.com/profile/08333337257678227054noreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-39881751251474716462011-05-25T16:49:00.002-04:002011-06-04T21:33:16.127-04:00GPars For Beginners PresentationI'll be giving a presentation titled <a href="http://www.meetup.com/Grails-Boston/events/16276921/">GPars For Beginners</a> to the <a href="http://www.meetup.com/Grails-Boston/">Boston Grails Users' Group</a> on Wednesday, May 25 at 7 P.M.  Here's my description of the talk: <br /> <blockquote>The <a href="http://gpars.codehaus.org/">GPars</a> (Groovy Parallel Systems) project provides multiple abstractions for concurrent, parallel programming in Groovy and Java. Rather than dealing directly with threads, synchronization, and locks, or even the java.util.concurrent classes added in Java 5, the project allows you to think in terms of actors, data flows, or composable asynchronous functions (to name a few). <br />In this talk, I'm planning to cover the basics of GPars, including what it's like to learn to use it. Although I've done a fair amount of concurrent programming, I've just started using GPars. As such, this talk should be suitable for Groovy beginners.</blockquote> If you're a fan of Groovy and will be in the Boston-area, I hope you'll attend.  If you can't, I'll be posting a link to the slides here when they're ready. <br /> <br />In the presentation, I'll be referring to several resources I found helpful.  Here are links to each of them: <br /> <ul> <li>Groovy in Action 2nd Edition (aka ReGinA) Chapter 17 - <a href="http://manning.com/koenig2/">http://manning.com/koenig2/</a> </li> <li>GPars User Guide - <a href="http://gpars.org/guide/">http://gpars.org/guide/</a> </li> <li>GPars User Mailing List - <a href="http://xircles.codehaus.org/lists/user@gpars.codehaus.org">http://xircles.codehaus.org/lists/user@gpars.codehaus.org</a> </li> <li>Dierk König's presentation (Concurrent programming for you and me) - <a href="http://skillsmatter.com/podcast/groovy-grails/concurrent-programming-for-you-and-me">http://skillsmatter.com/podcast/groovy-grails/concurrent-programming-for-you-and-me</a> </li> <li>Alex Miller's DevWorks article - <a href="http://www.ibm.com/developerworks/java/library/j-gpars/index.html">http://www.ibm.com/developerworks/java/library/j-gpars/index.html</a> </li> <li>Václav Pech's blog - <a href="http://www.jroller.com/vaclav/">http://www.jroller.com/vaclav/</a> </li> </ul> (Sorry if this shows up as an entirely new post.  Blogger seems once again to be acting funky.) <p><strong>Update:</strong> Here are <a href="http://www.slideshare.net/mpassell/gpars-for-beginners">the slides</a> from my talk.  Sadly, I forgot to record the audio to go along with it. <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-sadsmile" alt="Sad smile" src="http://lh6.ggpht.com/-IP6Sps94F8E/Td3Crf17zCI/AAAAAAAAABk/MKYydb1LYmM/wlEmoticon-sadsmile%25255B2%25255D.png?imgmax=800" /></p> <div style="width:425px" id="__ss_8146056"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/mpassell/gpars-for-beginners" title="GPars For Beginners">GPars For Beginners</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/8146056" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> <div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/mpassell">Matt Passell</a> </div> </div><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2011/05/gpars-for-beginners-presentation.html';</script><script type="text/javascript">var dzone_title = 'GPars For Beginners Presentation';</script><script type="text/javascript">var dzone_blurb = 'GPars For Beginners Presentation';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Matt Passellhttp://www.blogger.com/profile/08333337257678227054noreply@blogger.com2tag:blogger.com,1999:blog-8425265434515353560.post-39080772575144334942010-10-04T14:17:00.003-04:002010-12-10T21:44:26.614-05:00Is Xmarks Dying or Not?<p>Early this year, I made the switch from <a href="http://www.google.com/bookmarks/">Google Bookmarks</a> to <a href="http://www.xmarks.com/">Xmarks</a>. I've been really happy with Xmarks and have used it to sync the bookmarks and open tabs in <a href="http://www.getfirefox.net/">Firefox</a>, <a href="http://www.google.com/chrome">Chrome</a>, and IE on Windows and Firefox, Chrome, and Safari on Mac OS. They had plans for an Android client which I would have installed the moment it was released. Unfortunately, the company announced on September 27th that they'd be <a href="http://blog.xmarks.com/?p=1886">discontinuing the service</a> around the end of this year. You should have seen how much the news deflated me. I'd finally found a way to keep all of my browsers in sync and now the service would be going away! Well, I found out some promising news today. The outpouring of support and the number of disappointed users expressing their willingness to pay for the service <a href="http://blog.xmarks.com/?p=1945">has made the company reconsider</a>. If you're an existing customer or even someone who just found out about the service and would be willing to pay at least $10 per year for it, please go and sign the <a href="http://www.pledgebank.com/XmarksPremium">pledge at PledgeBank</a>! I really hope it reaches their 100,000 signature threshold.</p> <p><b>Update:</b> <a href="http://blog.lastpass.com/2010/12/lastpass-acquires-xmarks.html">Xmarks was acquired</a> by <a href="http://lastpass.com/">LastPass</a>, a company that provides a password management service. You can continue to use each service for free, pay $12/year for each of the premium services separately, or do what I did and sign up for the combination for $20/year.  What a nice outcome! :)</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2010/10/is-xmarks-dying-or-not.html';</script><script type="text/javascript">var dzone_title = 'Is Xmarks Dying or Not?';</script><script type="text/javascript">var dzone_blurb = 'Is Xmarks Dying or Not?';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Matt Passellhttp://www.blogger.com/profile/08333337257678227054noreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-6183909791245027782010-04-25T20:04:00.001-04:002010-12-10T21:48:25.352-05:00Technical Research Topics<p>As you can probably guess from reading this blog, I'm the sort of person that's constantly researching new technologies, often to the point where I move on from a given topic before I've given it the time and attention it deserves.  The point of this post is to both mention what I'm doing to make my attention less transient and to discuss some of the technologies I've decided to focus on.</p> <p>How am I trying to keep my research interests under control?  Composing a list.  I created a Google spreadsheet and started entering my professional interests.  That probably sounds rather unexciting, but for the first time in a while, I had a concrete list I could look over and evaluate.  The first thing I noticed was that it was long, far too long.  There was no practical way to work on all of the items in the short term.  The natural next step was to sort the list into a rough priority order.  It was hard to push items down ("Ooh, I bet that would be fun!"), but there are only so many things a person can do.</p> <p>Here's a subset of the list, not necessarily in priority order (I'm still trying to figure out how much I care about the technologies being relevant to my day-to-day work):</p> <ul> <li><a href="http://git-scm.com/">Git</a> is the distributed/decentralized source control system that Linus Torvalds put together in 2005 to manage the source for the Linux kernel.  It took me a while to <a href="http://en.wikipedia.org/wiki/Grok">grok</a> the notion of distributed source control (<a href="http://www.joelonsoftware.com/items/2010/03/17.html">I'm not alone</a>), but once I did, I became convinced that it could lead to great productivity gains.  Rather than trying to convince you of this directly, I refer you to the site <a href="http://whygitisbetterthanx.com/">Why Git is Better Than X</a>, the <a href="http://refcardz.dzone.com/refcardz/getting-started-git">Getting Started with Git</a> DZone RefCard and <a href="http://www.nofluffjuststuff.com/training/video/git_101">Git 101 screencast</a> by Matthew McCullough (registration required), and <a href="https://github.com/">GitHub</a>.  If you need any extra encouragement, you should know that Git is being used by <a href="http://www.grails.org/blog/graemerocher/Grails+moves+to+Git">Grails</a> (and <a href="http://blog.springsource.com/2009/07/15/git-migration/">SpringSource</a> <a href="http://twitter.com/cdupuis/statuses/12716339209">generally</a>), <a href="http://git.eclipse.org/c/">Eclipse</a>, and many others that I'm forgetting at the moment.  Learning Git is definitely my top research priority. </li> <li><a href="http://code.google.com/p/groovypptest/"><strike>Static Groovy</strike></a><strike> (most call it Groovy++, but I can't stand that name!) is a project based on the not-yet-released 1.8 version of </strike><a href="http://groovy.codehaus.org/"><strike>Groovy</strike></a><strike> that provides annotations allowing developers to designate sections of code (methods or classes) as statically typed.  This brings large performance improvements for many operations, allows some errors to be caught at compile-time rather than run-time, and allows type inferencing similar to what's done in Scala.</strike>  I dug into this a bit and ended up changing my mind.  Along with making Groovy run faster, it makes significant semantic changes.  It's not just an addition to the language, it's a whole separate dialect.</li> <li><a href="http://gpars.codehaus.org/">GPars</a> (formerly GParallelizer) is a project that aims to make it easier to write parallel programs in Groovy.  I originally learned about its smooth support for <a href="http://gpars.codehaus.org/ForkJoin">Fork/Join</a>, but it also enables several other concurrent programming models such as <a href="http://gpars.codehaus.org/Actor">actors</a>, <a href="http://gpars.codehaus.org/Safe">agents</a>, and <a href="http://gpars.codehaus.org/Dataflow">dataflow concurrency</a>. </li> <li><a href="http://gradle.org/">Gradle</a> is a new build system/language written in Groovy that learns from and improves upon <a href="http://maven.apache.org/">Maven</a>.  Like Maven and <a href="http://grails.org/">Grails</a>, it emphasizes convention over configuration, but unlike Maven, it doesn't become painfully awkward to deal with when you diverge from its conventions.  It uses Apache Ivy to implement its dependency management features.  Speaking of which… </li> <li><a href="http://ant.apache.org/ivy/">Ivy</a> is a sub-project of the long-lived <a href="http://ant.apache.org/">Ant</a> build system and separates management of dependencies from the rest of the build process.  It can be used with Ant or other build systems (see previous). </li> <li><a href="http://couchdb.apache.org/">CouchDB</a> is a relatively mature open source document-oriented database that is frequently grouped with other "<a href="http://en.wikipedia.org/wiki/NoSQL">NoSQL</a>" databases.  It's written in <a href="http://www.erlang.org/">Erlang</a> and stores <a href="http://www.json.org/">JSON</a> documents.  It allows you to build views based on <a href="http://en.wikipedia.org/wiki/MapReduce">Map-Reduce</a> functions written in JavaScript.  I recently signed up for a beta account with <a href="https://cloudant.com/">Cloudant</a>, a company that provides a hosted version of CouchDB.  As a related alternative, <a href="http://riak.basho.com/">Riak</a> is also definitely worth considering. </li> </ul><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2010/04/technical-research-topics.html';</script><script type="text/javascript">var dzone_title = 'Technical Research Topics';</script><script type="text/javascript">var dzone_blurb = 'Technical Research Topics';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-13761552861112530792010-03-10T20:12:00.001-05:002010-03-10T20:12:39.385-05:00Finally Bit the Bullet – I'm on Twitter<p>So, after saying a while ago that <a href="http://blog.grovehillsoftware.com/2009/03/why-twitter.html">I didn't understand Twitter</a>, I've now signed up for an account (<a href="http://twitter.com/softwaregrove">softwaregrove</a>).  Why the change of heart?  I thought I'd give it a try to see if it helped me understand the phenomenon.  Truthfully, the thing that finally convinced me is a bit embarrassing – the lure of free (<a href="http://en.wikipedia.org/wiki/Gratis">as in beer</a>) software.  See my tweets (I can't believe I just typed that!) to learn more.</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2010/03/finally-bit-bullet-i-on-twitter.html';</script><script type="text/javascript">var dzone_title = 'Finally Bit the Bullet – I'm on Twitter';</script><script type="text/javascript">var dzone_blurb = 'Finally Bit the Bullet – I'm on Twitter';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-76780830997468702522010-01-24T16:19:00.001-05:002015-09-01T11:41:33.831-04:00Looking For Part-Time Groovy/Grails WorkAs you can see from <a href="http://www.linkedin.com/in/mattpassell">my LinkedIn profile</a>, I'm an experienced <a href="http://java.sun.com/">Java</a> developer (starting with <a href="http://www.java.com/en/javahistory/timeline.jsp">1.0 and 1.1 in the Fall of 1997</a>), who's done some work with <a href="http://groovy.codehaus.org/">Groovy</a> and <a href="http://grails.org/">Grails</a>. Although I love Java the Platform, I've decided (like many others I know) to gradually shift my emphasis away from Java the Language. I've decided to focus on Groovy for now, but I can easily imagine adding <a href="http://www.scala-lang.org/">Scala</a> to my portfolio as well.<br />
So, here's my challenge: I have the good fortune to have long-term Java work for a client that takes up most, but not all of my time. That means that if I were to take on new Grails (or straight Groovy) work, it would have to be part-time. That really limits my options. If I can't find paid part-time work, I'll probably try to contribute to an existing <a href="http://grails.org/plugin/home">Grails plug-in</a>. I already author an <a href="http://code.google.com/p/fogbugzreporter/">open source Groovy project</a>, but it's so small that it doesn't really push me to improve my skills.<br />
Any other suggestions?<br><br />
<p><strong>Update:</strong> I found just what I was looking for with <a href="http://www.wingu.com/">Wingu</a>, a startup in stealth mode creating next generation science applications on the web. Last week, I started working for them a day a week. I'm looking forward to some Groovy/Grails/<a href="http://gradle.org/">Gradle</a> goodness. :) (reference to <a href="http://mrhaki.blogspot.com/">mrhaki</a> only slightly intentional)<br />
By the way, if you're looking for something similar and you live in the L.A. area, I just saw <a href="http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&discussionID=14002773&gid=39757&trk=EML_anet_qa_ttle-cDhOon0JumNFomgJt7dBpSBA">a post show up on LinkedIn</a>. If you're not a member of LinkedIn, here are <a href="http://xheavy.com/jobs/exhi-developer.pdf">the details (PDF)</a> on the Extremely Heavy Industries website. I'm not familiar at all with the company, so make sure to perform your standard due diligence.</p><p><strong>Update (Mar. 2, 2010):</strong> Things with Wingu didn't work out. :( I'm back to looking. This time around I'll try to do a better job of figuring out whether I can perform useful work for the client with the limited number of hours I have available.</p><p><strong>Update (Sept. 1, 2015):</strong> I took a full-time job with <a href="http://www.cargurus.com/Cars/jobs.html">CarGurus.com</a> back in June of 2013 and I've been very happy here. If you're in the Boston area, I <i>highly</i> recommend it as a place to work.</p>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-8425265434515353560.post-73742328889366385022010-01-14T23:14:00.001-05:002010-05-26T12:34:47.402-04:00Prediction for 2010: VMware acquires Terracotta<p>While at <a href="http://www.springone2gx.com/conference/new_orleans/2009/10/home">SpringOne2GX</a> back in October, the thought occurred to me that <a href="http://www.terracotta.org/">Terracotta</a> would make a really interesting acquisition target for <a href="http://www.vmware.com/">VMware</a>.  VMware has had some pretty amazing virtualization technology for a while, including the ability to migrate live virtual machines between physical boxes, but it has (as far as I know) all been focused on low-level infrastructural magic.  That changed with their acquisition of <a href="http://www.springsource.com/">SpringSource</a> last year, which followed shortly after SpringSource's acquisition of <a href="http://www.springsource.com/products/cloudfoundry">Cloud Foundry</a>.  Now, if you just add Terracotta to the mix, you could make it possible to easily deploy an auto-scaling clustered app to the cloud.  Doesn't that sound interesting?  Add to that the fact that Terracotta has been a sponsor for at least the last two SpringOne conferences in the U.S., SpringSource and Terracotta have already <a href="http://reference.terracotta.org/examinator/">collaborated to build a sample app</a>, and Terracotta brings <a href="http://www.terracotta.org/ehcache/distributed-cache/">Ehcache</a> (easy clustered caching) to the table.  Seems like a potent combination to me.</p> <p>I have no concrete grounds for this prediction beyond the points above, but I wanted to get the idea out there now just in case it actually happens. ;)</p> <p><strong>Update (May 26, 2010):</strong> Unfortunately, with the announcement of <a href="http://www.springsource.com/newsevents/springsource-acquires-gemstone-systems">SpringSource/VMware's acquisition of Gemstone</a>, my prediction is now unlikely to occur.  Oh, well.  Plenty of others before me have been wrong. ;)</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2010/01/prediction-for-2010-vmware-acquires.html';</script><script type="text/javascript">var dzone_title = 'Prediction for 2010: VMware acquires Terracotta';</script><script type="text/javascript">var dzone_blurb = 'Prediction for 2010: VMware acquires Terracotta';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-10053444506782039412010-01-02T22:26:00.001-05:002010-12-10T21:59:54.789-05:00Problems with NVIDIA GT220 and Windows 7 64-bit<p>Sorry about the extremely narrow focus of this post, but I wanted to make sure that anyone out there suffering from the same problems as mine knows that they're not alone.</p> <p>I recently built a computer from parts (more on that another time – I'm not sure how many people would be interested in the details) to use as my primary development machine.  The last time I built a machine was in 1999 or 2000.  A lot has changed in the past ten years.  Fortunately, the assembly/setup process went relatively smoothly, except for problems with one part.  I bought the ASUS-branded version of the NVIDIA GT220 (ENGT220) graphics card from NewEgg.  I'd happily link to their product listing, but that would be rather silly, given that I can't currently recommend it as a purchase.  The card slid nicely into the PCI Express 2.0 x16 slot and my DVI cable attached happily to the appropriate port (this version of the card comes with D-SUB/VGA, DVI, and HDMI ports).  However, when it came time to install Windows 7 64-bit, the problems began.</p> <p>At first, it was recognized as merely a generic video card – no big surprise, still a bit of a disappointment for a mainstream card that is by no means on the bleeding edge.  My next idea was to download drivers from ASUS's website.  I installed the newest version and rebooted.  Up came the the login screen at full resolution and I thought I was done.  Unfortunately, after I logged in, my screen went totally blank/black.  After much experimenting and many installs/uninstalls, I managed to get the card to work with a slightly older version of the drivers provided by ASUS.  The story would end there, but sadly the problem returned shortly after.  This time, I first did a search on Google for <a href="http://www.google.com/search?q=gt220+screen+blank">gt220 screen blank</a>, which revealed that others were having similar problems, and not just with the ASUS version.  After reading <a href="http://sholden.typepad.com/weblog/2009/10/windows-7-tip-nvidia-gt-220-driver.html">a blog post</a> and some forum questions and trying several other driver versions, I finally found something promising.  A user on the NVIDIA forums <a href="http://forums.nvidia.com/index.php?showtopic=151966">complained that his DVI port had stopped working</a>.  Inspired by that, I tried connecting my monitor via the D-SUB/VGA port instead of DVI.  That worked!  Since then, I've been running for two weeks without a problem.  I can't say I find the solution very satisfying, but at least it worked.</p> <ul> <li>Steve Holden's <a href="http://sholden.typepad.com/weblog/2009/10/windows-7-tip-nvidia-gt-220-driver.html">Windows 7 Tip - NVIDIA GT 220 driver</a> </li> <li>HP Forums: <a href="http://h30434.www3.hp.com/t5/Monitors-and-video/e9280t-w-GT-220-v-c-monitor-goes-blank-with-kernel-driver-error/m-p/161635">e9280t w/ GT 220 v.c. monitor goes blank with kernel driver error</a> </li> <li>SevenForums: <a href="http://www.sevenforums.com/graphic-cards/40625-geforce-gt-220-a.html">Geforce GT 220</a> question </li> <li>NVIDIA Forums: <a href="http://forums.nvidia.com/index.php?showtopic=151966">GT220 - No Signal on DVI after reboot</a> </li> <li>EVGA Forums: <a href="https://www.evga.com/forums/tm.aspx?high=&m=63030&mpage=1">Computer won't restart after installing GeoForce GT 220</a> </li> <li>SevenForums: <a href="http://www.sevenforums.com/hardware-devices/50560-gt220-w7-driver-problem.html">GT220 and W7 driver problem</a> </li> </ul> <p>By the way, I'd love to get feedback from other GT220 owners as to whether the solution I described (or something different) works for you.  Please let me know in the comments.</p> <p><strong>Update (Dec. 10, 2010):</strong> I'm a bit embarrassed to admit that I finally gave up and bought a new graphics card with an <a href="http://www.amd.com/us/products/desktop/graphics/ati-radeon-hd-5000/hd-5570/Pages/hd-5570-overview.aspx">ATI Radeon HD 5570</a>.  I'd link to the actual card, but I got a great deal on it because it was just about to be discontinued.  So far, it's been great.  It's slightly faster than my GT220 card, consumes less power, has a quieter fan, and (best of all) works on both the D-SUB and DVI ports.  Good luck to everyone who sticks with their GT220!</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2010/01/problems-with-nvidia-gt220-and-windows.html';</script><script type="text/javascript">var dzone_title = 'Problems with NVIDIA GT220 and Windows 7 64-bit';</script><script type="text/javascript">var dzone_blurb = 'Problems with NVIDIA GT220 and Windows 7 64-bit';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com58tag:blogger.com,1999:blog-8425265434515353560.post-11766943012010064742009-12-28T23:16:00.001-05:002011-07-12T00:30:09.712-04:00Handy But Hidden: Collections.newSetFromMap()<p>I was reminded again today of how much the core Java libraries have grown over the years.  It can be really hard to keep track of all the nice little features that get added in each release.  Today, I was wishing that there was a ConcurrentHashSet class or some other HashSet-style concurrent collection.  Before implementing something myself, I did some searching on Google and <a href="http://dhruba.name/2009/08/05/concurrent-set-implementations-in-java-6/">found a nice way</a> to solve the problem.  In Java 6 (a.k.a. JDK 1.6), Sun added the utility method <a href="http://java.sun.com/javase/6/docs/api/java/util/Collections.html#newSetFromMap(java.util.Map)">Collections.newSetFromMap()</a>, which allows you to pass in an empty backing Map and get out a Set with behavior based on the underlying Map.  So, here is all I needed to do to build a concurrent HashSet:</p> <pre class="brush: js">Set<Observer> observers = Collections.newSetFromMap(new ConcurrentHashMap<Observer, Boolean>());</pre>
<p>I also <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6327883">found a bug/enhancement request in Sun's bug database</a> suggesting that this feature should be documented in any core Map for which there is no corresponding Set implementation, such as <a href="http://java.sun.com/javase/6/docs/api/java/util/WeakHashMap.html">WeakHashMap</a> and <a href="http://java.sun.com/javase/6/docs/api/java/util/IdentityHashMap.html">IdentityHashMap</a>.  Given how long I went without knowing the method existed, I wish they'd done it.</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/12/handy-but-hidden-collectionsnewsetfromm.html';</script><script type="text/javascript">var dzone_title = 'Handy But Hidden: Collections.newSetFromMap()';</script><script type="text/javascript">var dzone_blurb = 'Handy But Hidden: Collections.newSetFromMap()';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-42582068677979727942009-12-02T13:04:00.001-05:002009-12-02T13:04:22.332-05:00MorphLabs, the Meta-Cloud Vendor?<p>Fascinating!  I just got an email from <a href="http://www.g2ix.com/">G2iX</a>, the parent company of <a href="http://mor.ph/">MorphLabs</a>, inviting me to a <a href="https://www1.gotomeeting.com/register/977087288?lf1=6214735b5658388502d87952">webinar</a> (Wed, Dec. 9, 2009 from 11AM - 12PM PST) in which they plan to demonstrate how to "Morph your Data Center into a Cloud Vendor":</p> <blockquote style="font-size: 80%"> <p>Traditional data center and co-location vendors are under tremendous threat in the face of Amazon EC2 and related Web Services, and those providers who’re unable to adapt to some sort of cloud computing model face extinction as competing Infrastructure as a Service products become even more prevalent. </p> <p>This webinar will demonstrate how the Morph Cloud Computing Platform can help regional data centers transform their business using their existing assets with minimal cost and hardware investments so that they can provide a cutting edge cloud solution to a broader customer base with rates that are more than competitive while still maintaining great profit margin.</p> </blockquote> <p>For those who are unfamiliar with the company, MorphLabs provides a hosting platform that runs on top of <a href="http://aws.amazon.com/ec2/">Amazon's EC2</a> web service.  So, assuming I'm not mistaken, G2iX plans to help data centers other than Amazon's set up the Morph platform to run on their own servers.  My first thought was, "Why would they do that?  Won't this just create competition for MorphLabs?!"  However, once I mulled it over, I realized that if they structure things right, it could be quite beneficial to MorphLabs.  What if these Morph platform deployments simply became new pools of servers to which Morph apps could be deployed?  Viewed that way, it actually sounds quite clever.  I'm almost tempted to attend the webinar, even though it has no direct relevance to me. :)</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/12/morphlabs-meta-cloud-vendor.html';</script><script type="text/javascript">var dzone_title = 'MorphLabs, the Meta-Cloud Vendor?';</script><script type="text/javascript">var dzone_blurb = 'MorphLabs, the Meta-Cloud Vendor?';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-40825641872852760242009-10-01T14:20:00.001-04:002010-01-14T08:34:49.756-05:00Great Star Trek:TOS Quote<p>My wife and I recently started watching <a href="http://www.imdb.com/title/tt0060028/">Star Trek: The Original Series</a> episodes via Netflix's Watch Instantly streaming service (they're also available on <a href="http://www.youtube.com/show?p=Zk2dX5DnW_c&pl=9E8437637BD6D008">YouTube Shows</a>).  Although it's a fun show, I still prefer <a href="http://www.imdb.com/title/tt0092455/">The Next Generation</a> and <a href="http://www.imdb.com/title/tt0106145/">Deep Space Nine</a> series.  I did, however, come upon a line that made me laugh out loud:</p> <blockquote> <p>What makes you think you're a man?  You're an overgrown jackrabbit, an elf with a hyperactive thyroid! <br /><font size="1"><strong>Kirk</strong> intentionally trying to irritate Spock in <a href="http://www.imdb.com/title/tt0708483/">This Side of Paradise</a>, Season 1, Episode 24</font></p> </blockquote><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/10/great-star-trektos-quote.html';</script><script type="text/javascript">var dzone_title = 'Great Star Trek:TOS Quote';</script><script type="text/javascript">var dzone_blurb = 'Great Star Trek:TOS Quote';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-63487641725677105782009-09-19T11:59:00.001-04:002010-05-26T12:28:19.748-04:00JavaScript Date Library Advice?<p>I've been doing some work recently with the <a href="http://code.google.com/apis/maps/">Google Maps API</a>, something I'll try to describe in a future post.  While doing that work, I've realized that I need (or would at least find very handy) a JavaScript library that provides more sophisticated date/time support than the <a href="http://www.javascriptkit.com/jsref/date.shtml">standard JavaScript Date</a>.  Searches have led me to two libraries which look plausible.  <a href="http://code.google.com/p/datejs/">Datejs</a> takes the approach of ornamenting the existing Date class with numerous additional functions.  I really like the coding style <a href="http://www.datejs.com/2007/11/27/getting-started-with-datejs/">demonstrated in their tutorial</a>, which is a point in their favor.  In contrast, <a href="http://js.fleegix.org/">Fleegix</a> provides a <a href="http://js.fleegix.org/plugins/date/date">Date class</a> independent from, but interface-compatible with the standard Date (yay for <a href="http://en.wikipedia.org/wiki/Duck_typing">duck-typing</a>!).  They clearly view timezone support as critical for Dates, which I'm very happy to see, since dealing with them and daylight/standard time can be a real pain.  So, from a functional standpoint, both libraries look pretty strong.  I'm concerned that they're not particularly active, neither having any check-ins in 2009, but perhaps it's because they've been around for a while and work well already.  I can't say I found <a href="http://groups.google.com/group/datejs/browse_thread/thread/12cdf9401f7fb746#">this discussion</a> in the Datejs group very encouraging. :(</p> <p>Any thoughts?  Anyone out there used either of these libraries or another one they'd recommend?</p> <p><strong>Update (May 26 2010):</strong> I just looked again at Fleegix and have some excellent news!  The projects are now <a href="http://github.com/mde">hosted on GitHub</a> and the <a href="http://github.com/mde/timezone-js">timezone-js project</a> has some updates from April of this year.  I'll have to give it a closer look soon.</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/09/javascript-date-library-advice.html';</script><script type="text/javascript">var dzone_title = 'JavaScript Date Library Advice?';</script><script type="text/javascript">var dzone_blurb = 'JavaScript Date Library Advice?';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-7328271314077728692009-09-17T21:41:00.001-04:002009-09-17T21:41:44.968-04:00Subversion – Odd Problems and Funny Solutions<p>I've been using <a href="http://subversion.tigris.org/">Subversion</a> and <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> since 2005.  They're both great technologies and I'm <em>very</em> happy they exist.  However, I think anyone who's been using them for a while has periodically encountered some weird problems and has had to come up with a few strange (and even funny) solutions.  I certainly have.  In this post, I describe one example.</p> <p>Earlier this week, a developer I work with saw the following in a TortoiseSVN window when he ran update on a working copy:</p> <pre>Error: Couldn't do property merge
Error: Unable to make name for 'C:\tempfile'</pre>
<p>Not knowing how to proceed, he asked me for help.  We tried my typical first approach: running cleanup via Tortoise on the working copy.  That didn't fix it, so we ran a "Check for modifications" and discovered that there were a few temp files scattered through the directory tree.  We deleted those and tried again.  Still the same message, so on to Google.  I searched for various permutations of the error messages, but was unable to find anything other than code check-in comments for Subversion itself, which appropriately enough uses a Subversion repository.  For some reason, I wish I remember why, we next tried updating just one child directory within the working copy.  It worked!  We tried updating all the other child directories and those worked as well.  So, that suggested that there was something wrong with the Subversion metadata, but only at the top level.  We went into the .svn directory and started browsing through the files.  When we looked at the entries file, we noticed a few lines starting with "incomplete".  I tried moving the entries file out of the .svn directory to a totally different location in the file system, hoping that when we updated or ran another cleanup, the file would simply be recreated.  Unfortunately, with that file missing, the directory was no longer considered by Subversion to be a working copy.  Disappointed, I moved the entries file back into .svn and started thinking about what to do next.  On a whim, the guy I was helping tried updating again and it worked!  Somehow, changing the directory from a valid working copy to an invalid one and back again was enough to fix everything.  Who knew?!</p>
<p>Have any good Subversion/TortoiseSVN troubleshooting stories or troubleshooting tips of your own?  Please leave them in the comments.</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/09/subversion-odd-problems-and-funny.html';</script><script type="text/javascript">var dzone_title = 'Subversion – Odd Problems and Funny Solutions';</script><script type="text/javascript">var dzone_blurb = 'Subversion – Odd Problems and Funny Solutions';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-8425265434515353560.post-4980090251300361072009-08-25T01:28:00.001-04:002009-09-07T17:21:58.992-04:00Curious Concept's Excellent JSON Pretty Formatter and Validator<p>I just wrote a bit of code using <a href="http://groovy.codehaus.org/HTTP+Builder">Groovy HTTPBuilder</a> to fetch and parse some <a href="http://json.org/">JSON</a> content to help answer <a href="http://stackoverflow.com/questions/1323758/json-in-groovy-grails">someone's question on StackOverflow</a>.  When trying to pull some interesting data out of the JSON to display, I realized that it would be much easier for me to understand the structure of the JSON if it were pretty-printed (or pretty-formatted).  When I googled for "JSON pretty format", I found <a href="http://www.forgeniuses.com/2007/11/14/json-pretty-printer/">a helpful blog entry</a> pointing me to <a href="http://jsonformatter.curiousconcept.com/">Curious Concept's JSON Formatter (& Validator)</a>.  It's a simple online tool that allows you to paste in either a URL pointing to JSON content or the content itself and display it in either compressed or readable form.  It might not have been very hard to code, but it's extremely useful.  Thanks Curious Concept!</p> <p><strong>Update:</strong> I'm trying out the <a href="http://brh.numbera.com/software/jsonview/">JSONView Firefox plug-in</a>.  So far it seems to work pretty well.  Even so, I expect I'll continue to use Curious Concept's tool for a while, since I spend a fair amount of time in Chrome.</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/08/curious-concept-excellent-json-pretty.html';</script><script type="text/javascript">var dzone_title = 'Curious Concept's Excellent JSON Pretty Formatter and Validator';</script><script type="text/javascript">var dzone_blurb = 'Curious Concept's Excellent JSON Pretty Formatter and Validator';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8425265434515353560.post-48391872039755579142009-08-21T14:59:00.001-04:002009-08-21T15:01:09.439-04:00Merger Madness & One Sample App To Rule Them All<table border="0" cellspacing="0" cellpadding="2" width="330"><tbody> <tr> <td valign="middle" rowspan="2" width="85" align="right">VMware ---</td> <td valign="middle" rowspan="2" width="100">SpringSource ---</td> <td valign="top" width="140">/---G2One</td> </tr> <tr> <td valign="top" width="140">\---CloudFoundry</td> </tr> <tr> <td valign="middle" width="85" align="right">Terracotta ---</td> <td valign="middle" colspan="2">Ehcache</td> </tr> <tr> <td valign="middle" width="85" align="right">Oracle ---</td> <td valign="middle" colspan="2">Sun</td> </tr> </tbody></table> <p> <br />With all the mergers and acquisitions happening in the Java world, I thought I'd suggest a sample app someone could build to bring them all together.</p> <p>Here it is: a Grails app using an Oracle DB with distributed caching provided by Terracotta and Ehcache, all running in a VMware cloud, with deployment and management handled by CloudFoundry.  I think that covers all the bases.  I have no idea what it will do yet, but let me know if I've missed anything. :)</p> <p><font size="1">Note: I actually have a lot of respect for all the technologies and people involved, I'm just feeling a bit overwhelmed with all of the recent consolidation!</font></p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/08/merger-madness-one-sample-app-to-rule.html';</script><script type="text/javascript">var dzone_title = 'Merger Madness & One Sample App To Rule Them All';</script><script type="text/javascript">var dzone_blurb = 'Merger Madness & One Sample App To Rule Them All';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-78364784693507448352009-08-19T23:20:00.002-04:002012-10-07T16:25:31.046-04:00Interruptible JDBC StatementsI work for a client on a product that makes direct queries against databases via JDBC. A while ago, I added some code so that a user could stop the execution of a series of queries by clicking on a cancel button. Behind the scenes, it interrupts the thread executing the queries. Since that thread checks whether it's been interrupted by calling <code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#isInterrupted()">Thread.currentThread().isInterrupted()</a></code> before starting to execute each query, no new queries will start once the cancel button was pushed. However, any query that's already started will run to completion before the code discovers that a request to cancel had been made. Recently, my client decided that we should make cancellation more granular and add the ability to stop a query in mid-stream. Looking at the <a href="http://java.sun.com/javase/6/docs/api/java/sql/package-summary.html">JDBC docs</a>, there's nothing to indicate that any of the relevant methods respond to interrupts (none throw <a href="http://java.sun.com/javase/6/docs/api/java/lang/InterruptedException.html">InterruptedException</a>s or claim to wrap them in a <a href="http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html">SQLException</a>), so I had to come up with another way. I settled on an approach where I submit the query as a <a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Callable.html">Callable</a> to an <a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ExecutorService.html">ExecutorService</a> and then block, waiting for the result via <code><a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Future.html#get()">Future.get()</a></code>. If the thread is interrupted while we're waiting, get() throws an InterruptedException, which gives us the chance to call <code><a href="http://java.sun.com/javase/6/docs/api/java/sql/Statement.html#cancel()">Statement.cancel()</a></code>. It's pretty simple and works nicely. :)<br />
Here's the code in a somewhat abridged/condensed form (I create the ExecutorService elsewhere using <code><a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Executors.html">Executors.newCachedThreadPool()</a></code>):<br />
<pre class="brush: java">final String sql = "...<some SQL>...";
final Statement statement = conn.createStatement();
Future<ResultSet> queryFuture =
execService.submit(new Callable<ResultSet>() {
@Override
public ResultSet call() throws Exception {
statement.execute(sql);
return statement.getResultSet();
}
}
);
ResultSet rs;
try {
rs = queryFuture.get();
} catch (InterruptedException e) {
logger.info("Query interrupted - calling Statement.cancel()");
statement.cancel();
throw e;
} catch (ExecutionException e) {
//code to handle or rethrow the exception
}</pre>
By the way, if any of the <code><a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/package-summary.html">java.util.concurrent</a></code> classes above are unfamiliar to you, I <em>highly</em> recommend <a href="http://www.amazon.com/gp/product/0321349601?ie=UTF8&tag=thesofgro-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0321349601">Java Concurrency in Practice</a> by Brian Goetz (et al.). It's an excellent book.<br />
<div class="wlWriterHeaderFooter" style="margin: 0px; padding: 4px 4px 4px 4px; text-align: left;">
<script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/08/interruptible-jdbc-statements.html';</script><script type="text/javascript">var dzone_title = 'Interruptible JDBC Statements';</script><script type="text/javascript">var dzone_blurb = 'Interruptible JDBC Statements';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div>
Unknownnoreply@blogger.com13tag:blogger.com,1999:blog-8425265434515353560.post-22871409030927741522009-08-18T15:52:00.001-04:002009-08-19T19:28:58.923-04:00Terracotta Acquires Ehcache<p>Exciting news!  This morning I <a href="http://sourceforge.net/forum/forum.php?thread_id=3370018&forum_id=322278">received a note</a> from <a href="http://gregluck.com/blog/">Greg Luck</a> via the <a href="http://sourceforge.net/forum/forum.php?forum_id=322278">Ehcache Open Discussion mailing list</a> announcing that the <a href="http://ehcache.sourceforge.net/">Ehcache</a> project was joining forces with <a href="http://www.terracotta.org/">Terracotta</a> and that Greg would be joining the team at Terracotta, Inc.  Since there's been a <a href="http://forge.terracotta.org/releases/projects/tim-ehcache/">Terracotta Integration Module for Ehcache</a> for a while, I don't foresee any instant improvements with regard to integration between the two technologies, but I was quite excited to see the following in <a href="http://gregluck.com/blog/archives/2009/08/ehcache_joins_w.html">Greg's blog post</a> announcing the news:</p> <blockquote> <p>I am full-time on Ehcache. I have not had the time I would have liked to devote to Ehcache (I have been doing a miserly 10-15 hours per week for the past 6 years) but now I do. Look out!</p> </blockquote> <p>Given what he's done so far with limited time, I'm looking forward to seeing what Greg can do when Ehcache becomes his full-time job!</p> <p>For more information, see <a href="http://www.terracotta.org/web/display/orgsite/Terracotta+Acquires+Ehcache">Terracotta's announcement</a>, CTO of Terracotta <a href="http://blog.terracottatech.com/2009/08/terracotta_and_ehcache_a_marri.html">Ari Zilka's blog post</a>, or <a href="http://tech.puredanger.com/2009/08/18/ehcache-terracotta/">Alex Miller's blog post</a>.</p> <p>p.s. I <a href="http://sourceforge.net/tracker/?func=detail&aid=2795695&group_id=93232&atid=603561">submitted a patch</a> that Greg ended up incorporating into Ehcache 1.6, so I feel a tiny bit of ownership toward the project – similar to the way <a href="http://blog.grovehillsoftware.com/2009/03/teeny-tiny-bit-of-fame.html">I feel toward Tomcat</a>.</p> <p><strong>Update:</strong> Terracotta and Ehcache are holding a <a href="https://terracotta.webex.com/terracotta/onstage/g.php?t=a&d=667348301">webcast on August 20th at 4PM ET</a> to further discuss the acquisition.  Also, I just submitted my <a href="https://sourceforge.net/tracker/?func=detail&aid=2840648&group_id=93232&atid=603561">second patch</a> to Ehcache. :)</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/08/terracotta-acquires-ehcache.html';</script><script type="text/javascript">var dzone_title = 'Terracotta Acquires Ehcache';</script><script type="text/javascript">var dzone_blurb = 'Terracotta Acquires Ehcache';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-38711895746637755692009-07-28T13:47:00.001-04:002009-07-28T13:47:40.237-04:00Attending SpringOne 2GX in October!<p>After much thought, I finally decided last night to register for the <a href="http://www.springone2gx.com/conference/new_orleans/2009/10/home">SpringOne 2GX</a> conference running from October 19 through 22 in New Orleans.  The deadline for the <a href="http://www.springone2gx.com/conference/new_orleans/2009/10/register">super-early bird pricing</a> is this Friday (July 31), so I thought I should make my decision.  I've been to talks on <a href="http://groovy.codehaus.org/">Groovy</a> and <a href="http://grails.org/">Grails</a> at <a href="http://www.nofluffjuststuff.com/home/main">NFJS</a> and <a href="http://java.sun.com/javaone/sf/2008/">JavaOne</a>, but I'm really looking forward to an entire conference devoted to those topics.  I hope to see you there!</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/07/attending-springone-2gx-in-october.html';</script><script type="text/javascript">var dzone_title = 'Attending SpringOne 2GX in October!';</script><script type="text/javascript">var dzone_blurb = 'Attending SpringOne 2GX in October!';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-70846295520421461262009-07-02T11:34:00.001-04:002009-07-02T11:46:09.720-04:00FogBugzReporter: NetBeans + Ivy = IvyBeans<p>(This is my second post in a series about <a href="http://code.google.com/p/fogbugzreporter/">FogBugzReporter</a>, a small open source app that I originally wrote in Java and later ported to Groovy.  See the <a href="http://blog.grovehillsoftware.com/2009/05/fogbugzreporter-introduction.html">first post</a> for more information and for links to other posts in the series as I write them.)</p> <p>When I first ported FogBugzReporter to Groovy, I was able to take advantage of a free 1 year license for <a href="http://www.jetbrains.com/idea/index.html">JetBrains IntelliJ IDEA</a> (version 7) and its nice Groovy support.  I had good experiences with it, but when the year ran out, I was both reluctant to pay for a new license and curious to explore the Groovy and Grails support in <a href="http://www.netbeans.org/">NetBeans</a>.  At the same time, I was interested in trying out <a href="http://ant.apache.org/ivy/">Apache Ivy</a> for dependency management.  As it turns out, Laurent Forêt wrote a plug-in for NetBeans called <a href="http://code.google.com/p/ivybeans/">IvyBeans</a> which integrates Ivy with the NetBeans internal build infrastructure.  So, if you reference a library in your ivy.xml, not only is it downloaded into your local repository (located in <font face="Courier New">%USERPROFILE%/.netbeans/<netbeans_version>/modules/ext/cache</font> on Windows) but it's also added as a NetBeans project dependency.  This post describes what it was like to move to NetBeans and start using Ivy.</p> <p>Although I'd previously used NetBeans 6.1 and 6.5 for some small <a href="http://grails.org/">Grails</a> apps, by the time I got around to moving FogBugzReporter into NetBeans, the <a href="http://wiki.netbeans.org/NetBeans67">6.7 release process</a> had already reached Milestone 2 or 3 (it has since been <a href="http://www.netbeans.org/downloads/index.html">released</a>!).  Since the Groovy/Grails plug-in for 6.7 provided better, more up-to-date support, I decided to jump directly to it.  After installing the base version and adding the Groovy/Grails plug-in, I looked over the options for opening the project in NetBeans.  I couldn't see any easy way to either import the project based on the existing IntelliJ files or create a new project pointing to the existing sources (any suggestions?), so I ended up doing something weird along the lines of creating a new project and checking out the files from Subversion on top of it.  I don't remember the exact steps, but even if I did I might not repeat them here, since I'm sure there's a better way to do it.  Once that was done, I was a bit disappointed to discover that I was unable to designate my Groovy script (<a href="http://code.google.com/p/fogbugzreporter/source/browse/trunk/src/com/grovehillsoftware/reportbuilder/MainFrame.groovy">MainFrame.groovy</a>) as the project's main class.  This was even true after I converted the script into a class and gave it a main method.  Fortunately, it's still possible to run the app inside NetBeans by selecting that file and choosing <em>Run File (Shift+F6)</em> from the Run menu.</p> <p>Next, it was time to try out Ivy and IvyBeans.  At the time, there was no up-to-date build available, so I built from HEAD, but at this point you can just download <a href="http://code.google.com/p/ivybeans/downloads/list">1.1 Milestone 3</a>.  Installation is as simple as extracting the zip you just downloaded and then following the <a href="http://wiki.netbeans.org/FaqPluginInstall">basic plug-in install steps</a>.  I searched on <a href="http://mvnrepository.com/">MVNRepository.com</a> to find the appropriate org (a.k.a. group) and name for each of the two libraries my project uses.  I then removed the libraries from the NetBeans project, temporarily making the IDE unhappy.  After I added lines of the following form to ivy.xml and then executed a Clean and Build on the project, Ivy downloaded the libraries, IvyBeans made them available to the project, and the build completed successfully.  Pretty cool!</p> <pre class="brush: xml"><dependency org="com.something" name="library_name" rev="1.2.3" conf="compile->*" /></pre>
<p>My transition to NetBeans isn't totally finished, but it's almost there.  One thing I still need to figure out is what changes are needed to allow me to run an external build using the ant build.xml file generated by NetBeans – I think it involves specifying a few properties that are currently absent when ant is run standalone.</p>
<p>As I've said in most of my posts, please tell if you know of a better way to do any of what I've described above.  I'm definitely not an expert in NetBeans or Ivy.</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/07/fogbugzreporter-netbeans-ivy-ivybeans.html';</script><script type="text/javascript">var dzone_title = 'FogBugzReporter: NetBeans + Ivy = IvyBeans';</script><script type="text/javascript">var dzone_blurb = 'FogBugzReporter: NetBeans + Ivy = IvyBeans';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-8425265434515353560.post-79034327383432663662009-06-27T18:09:00.002-04:002009-06-30T18:40:23.953-04:00Embedded Groovy as an Application Extension Language<p>I recently worked with my client to add an extension mechanism (in this case, a very simple plug-in system) to their intranet Java web application.  It's initially meant for use by professional services staff and possibly other advanced users in the future.  Our first thought was to go with <a href="http://en.wikipedia.org/wiki/JavaScript">JavaScript</a> via the <a href="http://java.sun.com/javase/6/docs/technotes/guides/scripting/programmer_guide/index.html">Java Scripting API</a>, since that pair of technologies was already in use elsewhere in the system for simple filtering expressions (e.g., "value > 10 && value < 100").  I wrote a few examples and discovered that the code quickly became a weird hybrid of Java and JavaScript that was very hard to read. ("Is that a Java String or a JavaScript String?…")  After a brief conversation with my client, we decided to instead go with Groovy for several reasons.  We can keep the code around as Strings for now, but easily compile it to class files later if our needs change.  Groovy's integration with Java is excellent and easy to understand.  If the user knows Java, but isn't comfortable with Groovy's many cool features, he or she can write normal Java (except for inner classes) and have it interpreted/compiled as Groovy.  What follows is a description of how I set it up.  Please let me know what you think of this approach, especially if you can suggest a way to improve it.</p> <p>Each extension is a Groovy class extending a Java abstract adapter class that provides default implementations of all but one of the methods in a Java interface (ScriptingInterface).  The Java code used to load the extension gets a GroovyClassLoader using the following code:</p> <pre class="brush: java">GroovyClassLoader loader = new GroovyClassLoader(getClass().getClassLoader());</pre>
<p>I use the following code to get the relevant class and instantiate it via its no-arg constructor, catching the (entertainingly-named) MultipleCompilationErrorsException along with several other exceptions:</p>
<pre class="brush: java">String code = "<Groovy>";
Class<? extends ScriptingInterface> clazz = loader.parseClass(code);
ScriptingInterface script = clazz.newInstance();</pre>
<p>Does that sound like a reasonable way to do it?  It definitely works, but I'm not sure it's the best way.</p>
<p><strong>Update:</strong> Ack!  For some reason, my Blogger settings changed from "New Posts Have Comments" to "New Posts Do Not Have Comments" through no action of my own!  While I try to figure out how to fix it (now that this post is no longer new), you can add any comments to <a href="http://www.dzone.com/links/embedded_groovy_as_an_application_extension_langu.html">this post's listing on DZone</a>.</p>
<p><strong>Update2:</strong> Problem fixed.  It turned out to be possible to <a href="http://help.blogger.com/bin/answer.py?hl=en&answer=41443">turn on comments for a single post</a> via the Blogger post editor.</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/06/embedded-groovy-as-application.html';</script><script type="text/javascript">var dzone_title = 'Embedded Groovy as an Application Extension Language';</script><script type="text/javascript">var dzone_blurb = 'Embedded Groovy as an Application Extension Language';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-8425265434515353560.post-39401093868153251342009-06-16T11:04:00.002-04:002009-06-29T15:17:45.576-04:00Boston Grails Users' Group!<p>Last night, I watched an <a href="http://thirstyhead.blip.tv/file/2197838/">interview with Dave Klein</a> done by <a href="http://thirstyhead.com/news/show/Interview_with_Dave_Klein">Scott Davis of ThirstyHead</a> at JavaOne 2009, in which they discussed Dave's upcoming book, <em><a href="http://www.pragprog.com/titles/dkgrails/grails">Grails: A Quick-Start Guide</a></em>. At the end of the interview, Dave mentioned that one of his kids had put together a site called <a href="http://g2groups.net/">g2groups.net</a>, which helps people find and start Groovy/Grails user groups. I visited the site and was very excited to see that <a href="http://g2groups.net/g2Group/showProposal/75">Boston has a newly formed group</a> and that their <a href="http://www.meetup.com/Grails-Boston/calendar/10632982/">first meeting is on Thursday</a>! I have a conflict, but this is important enough that I plan to drop my original commitment to attend. See you there!</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/06/boston-grails-users-group.html';</script><script type="text/javascript">var dzone_title = 'Boston Grails Users' Group!';</script><script type="text/javascript">var dzone_blurb = 'Boston Grails Users' Group!';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-46048287382246607582009-05-27T11:00:00.001-04:002009-07-02T11:45:38.051-04:00FogBugzReporter: Introduction<p>This is the first post in what I plan to be a series about a small application named <a href="http://code.google.com/p/fogbugzreporter/">FogBugzReporter</a> that I began writing in October of 2007.  I'd recently started using the <a href="http://www.fogcreek.com/FogBugz/IntrotoOnDemand.html">on demand edition</a> of <a href="http://www.fogcreek.com/FogBugz/">FogBugz</a> from <a href="http://www.fogcreek.com/">Fog Creek Software</a> to track my time spent consulting and was disappointed to discover that it had no direct way for me to generate time reports.  Fortunately, I discovered that along with the web UI, FogBugz also had a <a href="http://www.fogcreek.com/FogBugz/docs/60/topics/advanced/API.html">pseudo-REST API</a> for interacting with the application (I say "pseudo-REST" because almost all operations can be performed with HTTP GETs, including ones that change state on the server).  I read the API docs, quickly wrote a simple Swing application in Java, and <a href="http://support.fogcreek.com/default.asp?fogbugz.4.19024.9#discussTopic19120">made it available to the rest of the FogBugz community</a>.  Soon after, I started experimenting with <a href="http://groovy.codehaus.org/">Groovy</a> and realized that porting the app would be a nice way to get some experience with the language, including <a href="http://groovy.codehaus.org/Swing+Builder">SwingBuilder</a> and the great <a href="http://docs.codehaus.org/display/GROOVY/Processing+XML">APIs for processing XML</a>.  I did that and eventually moved the code from a private <a href="http://subversion.tigris.org/">Subversion</a> repository to one on <a href="http://code.google.com/">Google Code</a> under an <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache license</a>.  Until a few days ago, it sat for the most part unchanged.  In the meantime, my Groovy skills have improved a bit (I'm still no expert), the language has evolved, and the technologies around it have grown.  In this series, I plan to gradually bring the application up-to-date and polish up the code.  I'll update this posting with links to the other posts in the series as I write them.</p> <p>Posts:</p> <ul> <li><a href="http://blog.grovehillsoftware.com/2009/07/fogbugzreporter-netbeans-ivy-ivybeans.html">NetBeans + Ivy = IvyBeans</a></li> </ul> <p>Planned Posts:</p> <ul> <li>FogBugzReporter and Griffon</li> <li>Suggestions?</li> </ul><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/05/fogbugzreporter-introduction.html';</script><script type="text/javascript">var dzone_title = 'FogBugzReporter: Introduction';</script><script type="text/javascript">var dzone_blurb = 'FogBugzReporter: Introduction';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-40030608966382089162009-05-23T00:07:00.002-04:002009-05-27T18:08:15.346-04:00AWS Elastic MapReduce Webinar @Noon ET on May 28<p>Amazon's new <a href="http://aws.amazon.com/elasticmapreduce/">Elastic MapReduce</a> service makes it easier to run Map/Reduce jobs within EC2. If that sounds interesting, you can find out more about it by <a href="https://www2.gotomeeting.com/register/484711666">registering and "attending" the webinar</a> they're holding on Thursday, May 28 at Noon ET. I'll be there, in a virtual sense. :)</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/05/aws-elastic-mapreduce-webinar-noon-et.html';</script><script type="text/javascript">var dzone_title = 'AWS Elastic MapReduce Webinar @Noon ET on May 28';</script><script type="text/javascript">var dzone_blurb = 'AWS Elastic MapReduce Webinar @Noon ET on May 28';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-58121964937570323462009-05-17T14:29:00.001-04:002009-05-17T14:29:52.418-04:00ConcurrentLinkedHashMap and Possible Alternatives<p>I mentioned in an <a href="http://blog.grovehillsoftware.com/2008/10/concurrentlinkedhashmap-as-in-memory.html">earlier post</a> that a project I'm working on needed a thread-safe class with behavior similar to <a href="http://java.sun.com/javase/6/docs/api/java/util/LinkedHashMap.html">LinkedHashMap</a>, which maintains the order of entries while allowing sub-classes to set a (rather primitive) eviction policy.  I came upon and started using Ben Manes's <a href="http://code.google.com/p/concurrentlinkedhashmap/">ConcurrentLinkedHashMap</a>, with only minor modifications to allow for easier sub-classing.  I've been pretty happy with it so far and have been meaning to take a look at recent changes that he and "zellster" have made since I last downloaded the code.</p> <p>The same project is also using <a href="http://ehcache.sourceforge.net/">ehcache</a> for caching.  I was looking forward to the release of version 1.6 and <a href="https://sourceforge.net/forum/forum.php?thread_id=3183351&forum_id=322280">inquired about the expected release date</a> on the <a href="https://sourceforge.net/forum/forum.php?forum_id=322280">developer's forum</a>.  That kicked off an exchange between me and Greg Luck, the lead for ehcache, that eventually led to him mentioning <a href="https://sourceforge.net/forum/message.php?msg_id=7256768">some problems he'd encountered with ConcurrentLinkedHashMap</a>.  I'm going to check in with Ben and let him respond to what Greg said, along with giving him a chance to provide a guess for when his new version of CLHM is likely to be usable.  I also need to look into what Greg was referring to in the changelog for ehcache 1.6 beta5 when he said, "Make MemoryStore eviction policies injectable."  Interesting…</p> <p>Just to confuse matters, I was also recently looking over some materials discussing <a href="http://www.jboss.org/infinispan">Infinispan</a>, which will essentially be the 4.0 release of <a href="http://www.jboss.org/jbosscache/">JBoss Cache</a>, and saw this interesting blog entry on "<a href="http://infinispan.blogspot.com/2009/05/implementing-performant-thread-safe.html">Implementing a performant, thread-safe ordered data container</a>".  In it, Manik Surtani mentions their newly implemented classes <a href="http://docs.jboss.org/infinispan/4.0/apidocs/org/infinispan/container/FIFODataContainer.html">FIFODataContainer</a> and <a href="http://docs.jboss.org/infinispan/4.0/apidocs/org/infinispan/container/LRUDataContainer.html">LRUDataContainer</a>, which sound like another plausible way to approach my problem.  I'll make sure to ask more about them in the comments for that post.</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/05/concurrentlinkedhashmap-and-possible.html';</script><script type="text/javascript">var dzone_title = 'ConcurrentLinkedHashMap and Possible Alternatives';</script><script type="text/javascript">var dzone_blurb = 'ConcurrentLinkedHashMap and Possible Alternatives';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8425265434515353560.post-66379366980941867532009-05-16T22:34:00.001-04:002009-05-18T20:14:30.289-04:00JPC: x86 Emulator in Java<p>Last night, I was reading <a href="http://tech.puredanger.com/2009/05/01/terracotta-cache-map/">Caches and Maps in Terracotta</a> by <a href="http://tech.puredanger.com/">Alex Miller</a> when I came upon his link to the <a href="http://www-jpc.physics.ox.ac.uk.nyud.net/">JPC (a.k.a. JavaPC) Project</a>.  It sounded familiar and I decided to follow the link.  It turns out to be an open source project implementing an impressively functional and performant x86 emulator in Java.  I had fun last night launching an MS-DOS environment within an applet (what a concept!) and playing Donkey Kong for the first time in ages.  According to the site, the emulated layer runs at about 20% of your processor's speed - not bad for a emulator written in pure Java.</p> <p><strong>Note</strong>: After my first visit to the site, it seemed to be having problems.  Just in case it had to do with visitor load, I changed the link above to point to the copy in <a href="http://www.coralcdn.org/">Coral Cache</a>.  The site is now totally back up and behaving normally.  If Coral has any problems or is slow, you can safely go to <a href="http://www-jpc.physics.ox.ac.uk/">the site directly</a>.</p> <p><strong>Update:</strong> I got an email from one of the JPC team members saying that they'll be at JavaOne this year with some new stuff.  I wish I could be there to see it.  I guess I'll have to wait for it to show up on their site.</p><div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"><script type="text/javascript">var dzone_url = 'http://blog.grovehillsoftware.com/2009/05/jpc-x86-emulator-in-java.html';</script><script type="text/javascript">var dzone_title = 'JPC: x86 Emulator in Java';</script><script type="text/javascript">var dzone_blurb = 'JPC: x86 Emulator in Java';</script><script type="text/javascript">var dzone_style = '2';</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> </div> Unknownnoreply@blogger.com0