<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Leonard Axelsson</title>
 <link href="http://xlson.com/atom.xml" rel="self"/>
 <link href="http://xlson.com/"/>
 <updated>2018-01-09T15:45:41+00:00</updated>
 <id>http://xlson.com/</id>
 <author>
   <name>Leonard Axelsson</name>
   <email>leo@xlson.com</email>
 </author>

 
 <entry>
   <title>GroovyCSV updated to 1.1</title>
   <link href="http://xlson.com/2015/11/09/groovycsv-updated-to-1.1.html"/>
   <updated>2015-11-09T00:00:00+00:00</updated>
   <id>http://xlson.com/2015/11/09/groovycsv-updated-to-1.1</id>
   <content type="html">&lt;h1 id=&quot;groovycsv-updated-to-11&quot;&gt;GroovyCSV updated to 1.1&lt;/h1&gt;

&lt;p&gt;It’s been a couple of years and it’s time for a small update to
GroovyCSV. There’s a been a bug fix or two but the main news is the
option to get a map representation of your csv’s line-data. A feature contributed by
&lt;a href=&quot;https://github.com/xlson/groovycsv/commits/master?author=gmazelier&quot;&gt;gmazelier&lt;/a&gt;. Thank you!&lt;/p&gt;

&lt;h2 id=&quot;example-getting-a-map-representation-of-a-line&quot;&gt;Example: Getting a map representation of a line&lt;/h2&gt;

&lt;p&gt;It’s now possible to get a map representation of your line data using &lt;code class=&quot;highlighter-rouge&quot;&gt;line.toMap()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@Grab('com.xlson.groovycsv:groovycsv:1.1')
import static com.xlson.groovycsv.CsvParser.parseCsv

def csv = '''ProjectName,Version,Year
GroovyCSV,1.1,2015'''

def data = parseCsv(csv)
for(line in data) {
    println line.toMap()
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Output:&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[ProjectName:GroovyCSV, Version:1.1, Year:2015]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;getting-groovycsv&quot;&gt;Getting GroovyCSV&lt;/h2&gt;

&lt;p&gt;GroovyCSV is available from Maven Central:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Group: com.xlson.groovycsv
Artifact: groovycsv
Version: 1.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or you can download it from Github:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/xlson/groovycsv/releases/download/releases%2F1.1/groovycsv-1.1.jar&quot;&gt;groovycsv-1.1.jar&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/xlson/groovycsv/releases/download/releases%2F1.1/groovycsv-1.1-javadoc.jar&quot;&gt;groovycsv-1.1-javadoc.jar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;more-information&quot;&gt;More information&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://github.com/xlson/groovycsv&quot;&gt;Source &amp;amp; Readme&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://xlson.github.com/groovycsv/docs/1.1/javadoc&quot;&gt;Javadoc&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://github.com/xlson/groovycsv/issues&quot;&gt;Issue tracker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Deploying Minecraft.net in 14 minutes, no way</title>
   <link href="http://xlson.com/2012/04/25/deploying-minecraftnet-in-14-minutes.html"/>
   <updated>2012-04-25T00:00:00+00:00</updated>
   <id>http://xlson.com/2012/04/25/deploying-minecraftnet-in-14-minutes</id>
   <content type="html">&lt;h1 id=&quot;deploying-minecraftnet-in-14-minutes-no-way&quot;&gt;Deploying Minecraft.net in 14 minutes, no way&lt;/h1&gt;

&lt;p&gt;Every time we deployed Minecraft.net it would take ~ 14
minutes, that’s a lot of time. During that time I would either do
nothing or get started on something else, losing focus and probably
missing any potential problems with the deploy.&lt;/p&gt;

&lt;p&gt;That could not stand, especially considering the biggest reasons for
the deployment times was easy to remove from the equation.&lt;/p&gt;

&lt;h2 id=&quot;reasons-for-our-slow-deploy&quot;&gt;Reasons for our slow deploy&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Uploading files from the Mojang office in Sweden to Amazon EC2 in America&lt;/li&gt;
  &lt;li&gt;Each server downloads its own dependencies&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;1-location&quot;&gt;1. Location&lt;/h2&gt;

&lt;p&gt;Our build and deploy server was located in the office and was the culprit
responsible for the first problem. Setting up a fresh &lt;a href=&quot;http://jenkins-ci.org/&quot;&gt;Jenkins&lt;/a&gt; &amp;amp;
&lt;a href=&quot;http://rundeck.org/&quot;&gt;Rundeck&lt;/a&gt; in the cloud was easy enough and fixed the problem for
us, bringing down the deployment times to more sensible levels just by
putting the servers closer to eachother. I’d say this probably took
down the deployment times to 3 minutes or so, which is almost 5 times
better than before.&lt;/p&gt;

&lt;h2 id=&quot;2-packaging&quot;&gt;2. Packaging&lt;/h2&gt;

&lt;p&gt;It’s not that I wasn’t happy with our new deployment times, but the second problem was in a
sense more important. Each server was running the dependencies task of
play (Play Framework) at application startup, fetching its dependencies
and relinkling modules to where they were located on disk. This meant
startup took a bit longer than strictly necessary, which in turn
affected deployment times. More importantly, it meant that there was a
risk that the libraries we used would change between application restarts.&lt;/p&gt;

&lt;p&gt;A deploy should send out a self contained distribution to the server
in question, anything else opens up the risk for unexplained problems
during runtime. Now, there’s almost always some kind of moving parts
like this, but they should be kept to a minimum. Dependencies should
rarely be one of them.&lt;/p&gt;

&lt;p&gt;It turns out Play 1 haven’t got a solution for packaging a
self-contained distribution. Running &lt;code class=&quot;highlighter-rouge&quot;&gt;play dependencies --sync --forProd&lt;/code&gt; 
will download all the needed libraries to the lib folder and
remove some of the cruft that isn’t needed in production. It handles
everything except modules, which for some reasons aren’t packaged with
the application. Running the dependencies command actually links the
modules with the location on disk where play itself is located,
something that might differ from server to server.&lt;/p&gt;

&lt;p&gt;I fixed this by packaging the modules with the distribution  and adding a
few extra lines to the start-script that would relink the module
reference files to the once packaged with the distribution on
application startup. This removed the ~20 seconds per server it took to run
the dependencies command and pushed the deployment time down to ~1 minute.&lt;/p&gt;

&lt;h2 id=&quot;benefits-and-cost&quot;&gt;Benefits and cost&lt;/h2&gt;

&lt;p&gt;It took me 2 days to do this, which is ~960 minutes (8 * 2 * 60). We do roughly 5 deploys each
week, perhaps even more now that they are quicker. This means we’ll
save roughly 65 minutes ((14-1) * 5) each week, or 292.5 minutes
(65 * 4.5) in a month. Given this we can see that the time spent on
making the deploys faster will be recuperated in ~3 months.&lt;/p&gt;

&lt;p&gt;More importantly, I can now do deploys more lightheartedly as I know
it will only take a short period of my my time. Deploying even the
smallest of change becomes a no-brainer and features should no longer
pile up into a big and scary deploy at the end of the sprint. Making deploys go faster might change the way I work
and that’s the real advantage here.&lt;/p&gt;

&lt;p&gt;Thanks goes out to my former collegaue Daniel Brolund who talked to me
about &lt;a href=&quot;http://danielbrolund.wordpress.com/2007/08/12/how-much-is-a-team-minute/&quot;&gt;team
minutes&lt;/a&gt;
and the way making something faster might affect more than the time
spent on doing the task itself.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Releasing GroovyCSV 1.0</title>
   <link href="http://xlson.com/2012/02/22/releasing-groovycsv-1.0.html"/>
   <updated>2012-02-22T00:00:00+00:00</updated>
   <id>http://xlson.com/2012/02/22/releasing-groovycsv-1.0</id>
   <content type="html">&lt;h1 id=&quot;releasing-groovycsv-10&quot;&gt;Releasing GroovyCSV 1.0&lt;/h1&gt;

&lt;p&gt;When GroovyCSV 0.2 was released back in &lt;a href=&quot;http://xlson.com/2010/11/08/groovycsv-0.2-released.html&quot;&gt;November of
2010&lt;/a&gt; I
thought it might actually be the final release, at the time I couldn’t think
of anything else to add. Still, calling a first release 1.0 is the
same as asking for trouble.&lt;/p&gt;

&lt;p&gt;Now, 1 year and 3 months later, with no mayor issues and only few bits
of new code I’m confident enough to call the next
release 1.0.&lt;/p&gt;

&lt;h2 id=&quot;additions-since-02&quot;&gt;Additions since 0.2&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Support for guessing separator and/or quote character&lt;/li&gt;
  &lt;li&gt;Support for reading csv without headers&lt;/li&gt;
  &lt;li&gt;Support access of values by index instead of column names&lt;/li&gt;
  &lt;li&gt;Support for setting custom column names&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A special thanks goes out to &lt;a href=&quot;https://github.com/antoineroux&quot;&gt;Antoine
Roux&lt;/a&gt; for writing the autodetection feature!&lt;/p&gt;

&lt;h2 id=&quot;examples-of-the-new-features&quot;&gt;Examples of the new features&lt;/h2&gt;

&lt;h4 id=&quot;autodetection-of-separator&quot;&gt;Autodetection of separator&lt;/h4&gt;

&lt;p&gt;One of the new features in this release is the possibility to
autodetect what separator and quote characters are used.&lt;/p&gt;

&lt;p&gt;These chars are used for autodetection:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Separators = ,;:|
Quotes = &quot;'%
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@Grab('com.xlson.groovycsv:groovycsv:1.0')
import static com.xlson.groovycsv.CsvParser.parseCsv

def csv = '''Name:Lastname
Mark:Andersson
Pete:Hansen'''

def data = parseCsv(csv, autoDetect:true)
for(line in data) {
    println &quot;$line.Name $line.Lastname&quot;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Output:&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Mark Andersson
Pete Hansen
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;parsing-a-headerless-file&quot;&gt;Parsing a headerless file&lt;/h4&gt;

&lt;p&gt;Another feature in this release is better tooling to handle csv data
without column names at the top, or with bad names. For example, if
there’s no header line, you will probably wanna read the first line,
do it by setting
&lt;code class=&quot;highlighter-rouge&quot;&gt;readFirstLine:true&lt;/code&gt;. After that you can either access the values
using their index or by setting custom column names, both is
demonstrated below.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@Grab('com.xlson.groovycsv:groovycsv:1.0')
import static com.xlson.groovycsv.CsvParser.parseCsv
def csv = '''Apple,2
Pear,5'''
 
def data = parseCsv(csv, readFirstLine:true,
                    columnNames:['fruit', 'qty'])
for(line in data) {
    println &quot;$line.fruit ${line[1]}&quot;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Output:&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Apple 2
Pear 5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;getting-groovycsv&quot;&gt;Getting GroovyCSV&lt;/h2&gt;

&lt;p&gt;GroovyCSV is available from Maven Central with the following information:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Group: com.xlson.groovycsv
Artifact: groovycsv
Version: 1.0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or you can download it from Github:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/downloads/xlson/groovycsv/groovycsv-1.0.jar&quot;&gt;groovycsv-1.0.jar&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/downloads/xlson/groovycsv/groovycsv-1.0-javadoc.jar&quot;&gt;groovycsv-1.0-javadoc.jar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;more-information&quot;&gt;More information&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://github.com/xlson/groovycsv&quot;&gt;Source &amp;amp; Readme&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://xlson.github.com/groovycsv/docs/1.0/javadoc&quot;&gt;Javadoc&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://github.com/xlson/groovycsv/issues&quot;&gt;Issue tracker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;one-last-thing&quot;&gt;One last thing&lt;/h2&gt;

&lt;p&gt;I’d love to hear from you if you’re using GroovyCSV, especially
suggestions on improvements and bug reports. Keep the feedback coming! :)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Rescuing my Macbook Pro's battery from Google Chrome</title>
   <link href="http://xlson.com/2011/06/16/rescuing-my-mb-battery-from-google-chrome.html"/>
   <updated>2011-06-16T00:00:00+00:00</updated>
   <id>http://xlson.com/2011/06/16/rescuing-my-mb-battery-from-google-chrome</id>
   <content type="html">&lt;h1 id=&quot;rescuing-my-macbook-pros-battery-from-google-chrome&quot;&gt;Rescuing my Macbook Pro’s battery from Google Chrome&lt;/h1&gt;

&lt;h2 id=&quot;the-story&quot;&gt;The story&lt;/h2&gt;

&lt;p&gt;I’ve been a Google Chrome user for a long time and even ran with Chromium for a while before Google Chrome was released on the Mac. There’s been problems with it now and then, but I’ve been a happy customer most of the time. That was until it started eating at the battery of my new Macbook Pro. But, I’m getting ahead of myself, let’s take it from the start…&lt;/p&gt;

&lt;p&gt;This february I started working with a couple of great guys at the small Stockholm-based consultancy &lt;a href=&quot;http://agical.se/&quot;&gt;Agical&lt;/a&gt;. A couple of days into the gig my spanking new Macbook Pro arrived; I was giddy as a school-girl. The next monday I started working at a customer and haven’t really used the mac much since then; such is the life of the consultant. After a while I noticed that my mac always seemed to be out of power, even when it had been full when I last closed the lid. That was something I had never experienced with my old macbook, even when I had left it lying around for a week or so.&lt;/p&gt;

&lt;p&gt;I was heading off to Gr8Conf in Denmark a couple of weeks ago and thought to myself: “it’s really time I figure out what’s wrong with the battery”. After some googling it turned out to be, not my battery, but instead Google Chrome. You see, Google Chrome uses a feature in OS X that turns on the more expensive Nvidia card, even if it really isn’t doing anything special. This in turn not only eat a lot of power, but also make it harder for the Macbook Pro to get some much needed sleep, hence the constant power-shortage.&lt;/p&gt;

&lt;h2 id=&quot;the-solution&quot;&gt;The solution&lt;/h2&gt;

&lt;p&gt;There’s a free tool called &lt;a href=&quot;http://codykrieger.com/gfxCardStatus&quot;&gt;gfxCardStatus&lt;/a&gt; which helped me figure my issue. Once installed I could see rightaway that the more expensive card was put into action as soon as Google Chrome was started. It also allowed me to setup so that the Nvidia card was never used while the computer was running on battery power. I guess it’s really more of a workaround than a solution, but it works and it’s now easy to know which card is used. It’s still a myster why the macbook had a hard time going into sleep mode but it seems to have been solved by not using the expensive card while on battery.&lt;/p&gt;

&lt;p&gt;Problem solved, I’m back to using Google Chrome again, without any
issues. Big thanks to Cody Krieger for the excellent gfxCardStatus app.&lt;/p&gt;

&lt;p&gt;If you’re interested in gfxCardStatus you can find it &lt;a href=&quot;http://codykrieger.com/gfxCardStatus&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;update&quot;&gt;Update&lt;/h3&gt;

&lt;p&gt;There’s actually an &lt;a href=&quot;http://code.google.com/p/chromium/issues/detail?id=43138&quot;&gt;issue&lt;/a&gt; about this on the Chromium issue tracker, it’s marked as “Won’t fix”. I can only summize that the Chromium guys doen’t care about their users. At the same time, neither Safari or Firefox has this issue so they can’t claim it to be unfixable.&lt;/p&gt;

&lt;p&gt;I’m really dissapointed about how this has been handled and I really hope they come to change their minds.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Groovy/Grails developer wanted</title>
   <link href="http://xlson.com/2011/04/26/groovy-grails-developer-wanted.html"/>
   <updated>2011-04-26T00:00:00+00:00</updated>
   <id>http://xlson.com/2011/04/26/groovy-grails-developer-wanted</id>
   <content type="html">&lt;h1 id=&quot;groovygrails-developer-wanted&quot;&gt;Groovy/Grails developer wanted&lt;/h1&gt;

&lt;p&gt;&lt;img src=&quot;/images/grails-wanted.png&quot; alt=&quot;Grails Wanted in Sweden (on Twitter)&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you don’t live in Sweden and aren’t using &lt;a href=&quot;http://groovy.codehaus.org/&quot;&gt;Groovy&lt;/a&gt; the pic above won’t mean much to
you. To me it means Groovy devs are wanted in Sweden. The message
translates to:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href=&quot;http://grails.org/&quot;&gt;Grails&lt;/a&gt; developers wanted, urgently.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When I started &lt;a href=&quot;http://bit.ly/SweGUG&quot;&gt;SweGUG&lt;/a&gt; two years ago together with &lt;a href=&quot;http://twitter.com/AndreasArledal&quot;&gt;Andreas&lt;/a&gt; I was
hoping to see messages like this all the time. That hasn’t
really been the case and this is the first time I can recall
seeing someone ask for a swedish Groovy developer on
Twitter. This of course calls for a minor celebratory blogpost :)&lt;/p&gt;

&lt;p&gt;Hopefully we’ll see more requests like this in the years to come when
developers everywhere realise there’s more to the JVM than pure
Java.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://twitter.com/#!/nikkelin/status/62840460082806784&quot;&gt;The tweet&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://bit.ly/SweGUG&quot;&gt;SweGUG&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://groovy.codehaus.org/&quot;&gt;Groovy&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://grails.org/&quot;&gt;Grails&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Out of Delicious and into your Couch</title>
   <link href="http://xlson.com/2011/01/13/out-off-delicious-and-into-your-couch.html"/>
   <updated>2011-01-13T00:00:00+00:00</updated>
   <id>http://xlson.com/2011/01/13/out-off-delicious-and-into-your-couch</id>
   <content type="html">&lt;h1 id=&quot;out-of-delicious-and-into-your-couch&quot;&gt;Out of Delicious and into your Couch&lt;/h1&gt;

&lt;p&gt;During december of 2010 it seemed Yahoo was going to pull the plug on
my favorite bookmarking service Delicious. It was later
revealed that they are going to sell it instead. But, before that was
known the web went into an uproar with blogs about how to salvage your
bookmarks and move inte another service. Not only that, A LOT of
developers have stepped up trying to fill the gap with new services
such as &lt;a href=&quot;http://www.liink.it/&quot;&gt;liink.it&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Personally I’ve been wanting to try out &lt;a href=&quot;http://couchdb.apache.org/&quot;&gt;CouchDB&lt;/a&gt; as a bookmark handler
for some time. Couch with it’s ability to bundle a webapp with the
database and simple replication (backup!?) seems like a potentially
great fit for bookmarks in the cloud. Said and done, when it seemed like
Delicious was going away I took the step out into the wild with
Jan-Piet Mens CouchApp
&lt;a href=&quot;http://blog.fupps.com/2010/05/25/truly-scrumptious-bookmarks-in-couchdb/&quot;&gt;Scrumptious&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As the icing on the cake it’s possible to get the bookmarks back into
the cloud using Scrumptious with a free hosted database from
CouchOne. Read on to learn how.&lt;/p&gt;

&lt;h2 id=&quot;scrumptious&quot;&gt;Scrumptious&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/images/scrumptious.png&quot; alt=&quot;Scrumptious UI on CouchOne&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As it happens, I’m not the first person that thought CouchDB would be
a good place to put bookmarks. &lt;a href=&quot;http://twitter.com/jpmens&quot;&gt;Jan-Piet Mens&lt;/a&gt; has
already created a &lt;a href=&quot;http://couchapp.org/page/index&quot;&gt;CouchApp&lt;/a&gt; called Scrumptious. Scrumptious is a
web-application that lives inside CouchDB.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scrumptious features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Bookmarklet for saving bookmarks&lt;/li&gt;
  &lt;li&gt;Listing bookmarks by date or tag&lt;/li&gt;
  &lt;li&gt;Export as bookmarks html for import into the browser of your choice&lt;/li&gt;
  &lt;li&gt;Inline-editing of bookmarks&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;a-word-of-warning&quot;&gt;A word of warning&lt;/h3&gt;

&lt;p&gt;Scrumptious is a cool app but it’s in no way ready for non-techies (as
you will probably figure out during the install, if not earlier). The
bookmarklet doesn’t work in Firefox 3.x currently and the
search-functionality isn’t finished. Scrumptious also lacks all of the
social functionality of Delicious. If this puts you off maybe you’d be
better off looking at something like &lt;a href=&quot;http://pinboard.in/&quot;&gt;Pinboard&lt;/a&gt; or &lt;a href=&quot;http://tagli.us/&quot;&gt;Tagli.us&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;getting-started-with-scrumptious-in-the-cloud&quot;&gt;Getting started with Scrumptious in the cloud&lt;/h2&gt;

&lt;p&gt;You could go to Github and get the code for Scrumptious and install it
into the CouchDB of your choice using couchapp, all of this is
documented in Jan-Piet’s &lt;a href=&quot;http://blog.fupps.com/2010/05/25/truly-scrumptious-bookmarks-in-couchdb/&quot;&gt;post about the tool&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But, there is an easier way. To get you started quickly, I’ve put up a
clean Scrumptious app on CouchOne. The only thing you need to do is
create your own database and replicate my clean install of
Scrumptious. I’ve done one minor change in my version of Scrumptious
to secure the bookmarks and that is to require that the user posting
and updating bookmarks is logged into the CouchDB administration
ui. This is just to add a little security so someone else cant come in
and remove all your bookmarks.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Create an account on CouchOne’s &lt;a href=&quot;http://www.couchone.com/get&quot;&gt;free (and beta)
hosting&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Setup an admin-account for your CouchDB instance using the
admin ui
&lt;code class=&quot;highlighter-rouge&quot;&gt;https://[chosen-subdomain].couchone.com/_utils]&lt;/code&gt; (important as your
database will be completely open otherwise)&lt;/li&gt;
  &lt;li&gt;Create a database using the admin interface&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Replicate my empty scrumptious database into your newly created database using
the Replicator part of the admin ui&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;On the left side you need to put the url to my clean install of Scrumptious: &lt;code class=&quot;highlighter-rouge&quot;&gt;http://xlson.couchone.com/scrumptious-fresh&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;On the right side you should choose your newly created database.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;At this point you’re done and ready to head over to &lt;code class=&quot;highlighter-rouge&quot;&gt;https://[chosen-subdomain].couchone.com/[newly-created-database]/_design/app/index.html&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Take some time to play around with the ui, add the Bookmarklet to your
bookmarks bar and try it out. One thing you should know about CouchOne
hosting is that I don’t know much about it and what it will cost in
the long run. At this point its free and completely without
guarantees so I’d really suggest you install CouchDB locally to take
backups of your database from time to time (once again using the
replication feature).&lt;/p&gt;

&lt;h2 id=&quot;but-wheres-my-delicious-bookmarks&quot;&gt;But where’s my Delicious bookmarks?&lt;/h2&gt;

&lt;p&gt;Well, we still have one thing to do, and that’s to export our
bookmarks from Delicous and move them into our cloud. We’re gonna use
curl to get all your bookmarks, so open up your terminal and enter the
following (replace username with your delicious account). curl should
already be available if you run Mac OS X or a linux-flavor. If you’re
stuck with Windows &lt;a href=&quot;http://www.cygwin.com/&quot;&gt;cygwin&lt;/a&gt; is problably your best option to get hold of
curl.&lt;/p&gt;

&lt;p&gt;Download bookmarks using curl:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;curl -sf -u username -o mine.xml
https://api.del.icio.us/v1/posts/all&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After you’ve got your bookmarks you can either use Jan-Piet’s
perl-script mentioned in &lt;a href=&quot;http://blog.fupps.com/2010/05/25/truly-scrumptious-bookmarks-in-couchdb/&quot;&gt;his
post&lt;/a&gt;
or my groovy alternative available
&lt;a href=&quot;https://gist.github.com/756095&quot;&gt;here&lt;/a&gt; (whatever floats your boat :)&lt;/p&gt;

&lt;p&gt;To use my script you need groovy installed, available from
&lt;a href=&quot;http://groovy.codehaus.org/&quot;&gt;Codehaus&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;groovy del2scrumptious.groovy -in mine.xml -out mine.json&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;At this point we only need to push the bookmarks up to your couch in
the cloud, once again using curl.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl -u admin  -H &quot;Content-Type: application/json&quot; -X POST \ 
http://[chosen subdomain].couchone.com/[newly_created_database]/_bulk_docs -d @mine.json
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Head back to the web application; you bookmarked it in the last step
right? All your bookmarks should be available now. A word of warning
though, it might take a little while for the page to load the first
time you request it after uploading your bookmarks as that’s when
CouchDB internally builds its view of the bookmarks that will be used
to list them.&lt;/p&gt;

&lt;p&gt;Good luck with your cloud-hosted bookmarks!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Further reading:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://xlson.couchone.com/scrumptious/_design/app/_list/ls/bydate?limit=20&amp;amp;descending=true&quot;&gt;My bookmarks&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://blog.fupps.com/2010/05/25/truly-scrumptious-bookmarks-in-couchdb/&quot;&gt;Truly scrumptious bookmarks in CouchDB&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://couchapp.org/&quot;&gt;CouchApp&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://couchdb.apache.org/&quot;&gt;CouchDB&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/xlson/scrumptious&quot;&gt;Scrumptious with my modifications&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/jpmens/scrumptious&quot;&gt;Scrumptious official repo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Speeding up your Gradle builds using the Daemon</title>
   <link href="http://xlson.com/2010/11/15/speeding-up-your-gradle-builds.html"/>
   <updated>2010-11-15T00:00:00+00:00</updated>
   <id>http://xlson.com/2010/11/15/speeding-up-your-gradle-builds</id>
   <content type="html">&lt;h1 id=&quot;speeding-up-your-gradle-builds-using-the-daemon&quot;&gt;Speeding up your Gradle builds using the Daemon&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://gradle.org/&quot;&gt;Gradle 0.9 Release Candidate 3&lt;/a&gt; is just out, and with it a bunch of changes. The main feature for this release is the new daemon that will help Gradle speeding up at startup. Also, it’s a step in the direction of a final 0.9 release.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Release notes:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;New features since 0.9-rc-2:&lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;This release includes the experimental build daemon. To use the daemon, add the –daemon option when you run Gradle. The daemon is started automatically.&lt;/li&gt;
  &lt;/ul&gt;

  &lt;p&gt;The new command-line options are documented at: &lt;a href=&quot;http://www.gradle.org/0.9-rc-3/docs/userguide/gradle_command_line.html#N153AB&quot;&gt;http://www.gradle.org/0.9-rc-3/docs/userguide/gradle_command_line.html#N153AB&lt;/a&gt;.&lt;/p&gt;

  &lt;p&gt;Some background information on the daemon is available at: &lt;a href=&quot;http://docs.codehaus.org/display/GRADLE/Gradle+Build+Daemon&quot;&gt;http://docs.codehaus.org/display/GRADLE/Gradle+Build+Daemon&lt;/a&gt;&lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;Upgraded the code-quality plugin to use Checkstyle 5.3 and CodeNarc 0.11.&lt;/li&gt;
  &lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;enter-the-daemon&quot;&gt;Enter the Daemon&lt;/h2&gt;

&lt;p&gt;The daemon is basically a Java application that will run in the background and run your builds, thereby removing the initial cost of starting the JVM and load all the Gradle classes. While using it, my &lt;code class=&quot;highlighter-rouge&quot;&gt;gradle clean&lt;/code&gt; went from 6 to 1 seconds. As you can imagine I will start using it extensively on my local computer, but, I wouldn’t go as far as enable it on our Continous Integration server yet, the feature IS experimental after all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using the daemon:&lt;/strong&gt;
&lt;code class=&quot;highlighter-rouge&quot;&gt;gradle --daemon clean&lt;/code&gt; this will start the daemon in the backgrund if it’s the first time you use the &lt;code class=&quot;highlighter-rouge&quot;&gt;--daemon&lt;/code&gt; flag. It stops automatically after a few hours it hasn’t been used. Unless you enable it globally you will have to add &lt;code class=&quot;highlighter-rouge&quot;&gt;--daemon&lt;/code&gt; to the commandline on every call to use it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stopping the daemon:&lt;/strong&gt;
&lt;code class=&quot;highlighter-rouge&quot;&gt;gradle --stop&lt;/code&gt; this IS an experimental feature and therefor you might have to stop it from time to time&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enabling the daemon for all builds:&lt;/strong&gt;
Add  &lt;code class=&quot;highlighter-rouge&quot;&gt;-Dorg.gradle.daemon=true&lt;/code&gt; to your &lt;code class=&quot;highlighter-rouge&quot;&gt;GRADLE_OPTS&lt;/code&gt;, in my case this meant adding the following to my &lt;code class=&quot;highlighter-rouge&quot;&gt;~/.profile&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# Use Gradle daemon (experimental)
export GRADLE_OPTS=&quot;-Dorg.gradle.daemon=true&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is the same as adding &lt;code class=&quot;highlighter-rouge&quot;&gt;--daemon&lt;/code&gt; every time you run gradle. There is also a &lt;code class=&quot;highlighter-rouge&quot;&gt;--no-daemon&lt;/code&gt; flag that you can use when you’d like to disable it explicitly.&lt;/p&gt;

&lt;h2 id=&quot;potential-issues&quot;&gt;Potential issues&lt;/h2&gt;

&lt;p&gt;I’ve already noticed that I have some builds that don’t use the
&lt;code class=&quot;highlighter-rouge&quot;&gt;projectDir&lt;/code&gt;property that is available in all Gradle builds and
therefor (incorrectly) run tasks in &lt;code class=&quot;highlighter-rouge&quot;&gt;~/.gradle/&lt;/code&gt; instead of the
project directory. This is easily fixed but might be worth checking.&lt;/p&gt;

&lt;p&gt;The latest release (0.9-rc3) is available over at &lt;a href=&quot;http://gradle.org/&quot;&gt;gradle.org&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Getting started with GitHub Pages</title>
   <link href="http://xlson.com/2010/11/09/getting-started-with-github-pages.html"/>
   <updated>2010-11-09T00:00:00+00:00</updated>
   <id>http://xlson.com/2010/11/09/getting-started-with-github-pages</id>
   <content type="html">&lt;h1 id=&quot;getting-started-with-github-pages&quot;&gt;Getting started with GitHub Pages&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://pages.github.com/&quot;&gt;Github Pages&lt;/a&gt; is something as simple as
a GitHub service for serving up static HTML from a GitHub
repository. It’s the perfect place for project documentation, like
&lt;a href=&quot;http://en.wikipedia.org/wiki/Javadoc&quot;&gt;Javadoc&lt;/a&gt;, and that’s what I’ve been using it for. It can also be used for blogging with &lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt; or even a complete site for your project.&lt;/p&gt;

&lt;h2 id=&quot;tell-me-more&quot;&gt;Tell me more!&lt;/h2&gt;

&lt;p&gt;GitHub Pages (hence called Pages) can be tied to a project by creating a special branch called &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt;, or directly to your account by creating a repository called &lt;code class=&quot;highlighter-rouge&quot;&gt;yourname.github.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Also, saying it only feeds static HTML is like telling only part of
the story. Pages can be used together with a couple of different
templating systems (like &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt;) or as I mentioned earlier, the
static blog-generator &lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt;, to easily keep
a web presence for yourself or your project. As every part of a Pages
page is in a GitHub repository it’s really easy to update and work with.&lt;/p&gt;

&lt;h2 id=&quot;getting-started&quot;&gt;Getting started&lt;/h2&gt;

&lt;h3 id=&quot;creating-your-personal-page&quot;&gt;Creating your personal page&lt;/h3&gt;

&lt;p&gt;Pages is really quite easy to use. Wanna create a site for yourself?
Follow this 5 step guide to get started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; there’s currently an issue regarding Pages and pushing
  over http, which means, it just won’t work. So use normal Git over
  SSH instead.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Create a new repo named &lt;code class=&quot;highlighter-rouge&quot;&gt;yournick.github.com&lt;/code&gt; (&lt;code class=&quot;highlighter-rouge&quot;&gt;xlson.github.com&lt;/code&gt; in my case)&lt;/li&gt;
  &lt;li&gt;Create a simple welcome page to verify that it’s working (an
index.html with Hello World is quite enough)&lt;/li&gt;
  &lt;li&gt;Verify that you’ve received a notification from GitHub that they’ve
rebuilt your Page (normally within seconds)&lt;/li&gt;
  &lt;li&gt;Wait for your Page to be created (will take up to 10 minutes the
first time, probably just seconds after that)&lt;/li&gt;
  &lt;li&gt;GitHub page will be available at
http://yournick.github.com/ when it’s ready&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;creating-a-project-page&quot;&gt;Creating a project page&lt;/h3&gt;

&lt;p&gt;Creating the project page is about as easy as creating a personal
page, but a little different. Instead of residing in a new repository
it will live in a special branch (of your project repository) called &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Go into “Admin” mode on your GitHub project&lt;/li&gt;
  &lt;li&gt;Click the GitHub Pages checkbox and then the “Automatic GitHub Page
Generator”&lt;/li&gt;
  &lt;li&gt;Choose the options you’d like and hit the “Create Page” button
after that (it doesn’t matter that much what you choose as you’ll
probably remove the generated page afterwards anyway)&lt;/li&gt;
  &lt;li&gt;Follow steps 3-4 from the previous checklist for “Creating your personal page”&lt;/li&gt;
  &lt;li&gt;GitHub page will be available at
&lt;code class=&quot;highlighter-rouge&quot;&gt;http://yournick.github.com/projectname/&lt;/code&gt; when it’s ready&lt;/li&gt;
  &lt;li&gt;Create a new local clone of your repository (check your GitHub
project for links, in my case:  &lt;code class=&quot;highlighter-rouge&quot;&gt;git clone git@github.com:xlson/groovycsv.git groovycsv-pages&lt;/code&gt;)&lt;/li&gt;
  &lt;li&gt;Go into the new &lt;code class=&quot;highlighter-rouge&quot;&gt;projectname-pages&lt;/code&gt; directory and checkout the
&lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; branch. (&lt;code class=&quot;highlighter-rouge&quot;&gt;git checkout origin/gh-pages -b gh-pages&lt;/code&gt;)&lt;/li&gt;
  &lt;li&gt;Start working on the &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; branch and push to &lt;code class=&quot;highlighter-rouge&quot;&gt;origin gh-pages&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You could work with the &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; branch in your ordinary repository
but I find it’s easier to manage when you have a separate folder for
the page branch.&lt;/p&gt;

&lt;h2 id=&quot;templating-using-markdown&quot;&gt;Templating using Markdown&lt;/h2&gt;

&lt;p&gt;We’re just about finished, but I’m going to cover one more thing,  and
that’s how to use the &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt; templating system.&lt;/p&gt;

&lt;p&gt;Create a file named &lt;code class=&quot;highlighter-rouge&quot;&gt;demo.markdown&lt;/code&gt; in your repo and add the following
content:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;---
title: This will be used as the title-tag of the page head
---

# This is a H1

[the clickable text](http://xlson.com/)

* Bullet lists are also easy to create
* One more
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; the top part containing the &lt;code class=&quot;highlighter-rouge&quot;&gt;---&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;title&lt;/code&gt; segment
  is required and if you skip it, no conversion from Markdown to HTML
  will happen.&lt;/p&gt;

&lt;p&gt;Try pushing the new file to your &lt;code class=&quot;highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; branch, or personal repository. GitHub will turn this template into an ordinary HTML file named
&lt;code class=&quot;highlighter-rouge&quot;&gt;demo.html&lt;/code&gt; using the conversions specified in the sample. Pages
supports a few
other templating engines (like &lt;a href=&quot;http://textile.thresholdstate.com/&quot;&gt;Textile&lt;/a&gt;) but Markdown is the only one I
use.&lt;/p&gt;

&lt;p&gt;There’s also support for the static blog generator Jekyll (which I’ve used to
create &lt;a href=&quot;http://github.com/xlson/xlson.com/&quot;&gt;this&lt;/a&gt; blog). Getting
started with Jekyll is out of the scope of this article, but if you’ve
gotten this far, getting Jekyll running should be no problem. Check
the “Getting Started” instructions over at
&lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyllrb.com&lt;/a&gt; to get started.&lt;/p&gt;

&lt;h2 id=&quot;rounding-it-off&quot;&gt;Rounding it off&lt;/h2&gt;

&lt;p&gt;I’ve had some problems with GitHub Pages and that’s where this guide
comes from. I’m hoping this can help others to not make the same
mistakes I did. But even with those problems I think the features GitHub
provide via GitHub Pages is really great. It’s a simple way to put up
both documentation and a project site, or even a blog without having
to think about hosting at all.&lt;/p&gt;

&lt;p&gt;So, in closing: Big thanks to they guys over at GitHub! :)&lt;/p&gt;

&lt;h2 id=&quot;further-reading&quot;&gt;Further reading&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://pages.github.com/&quot;&gt;GitHub Pages&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/mojombo/mojombo.github.com&quot;&gt;Source for Mojombo’s Blog (The creator of Jekyll)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>GroovyCSV 0.2 Released</title>
   <link href="http://xlson.com/2010/11/08/groovycsv-0.2-released.html"/>
   <updated>2010-11-08T00:00:00+00:00</updated>
   <id>http://xlson.com/2010/11/08/groovycsv-0.2-released</id>
   <content type="html">&lt;h1 id=&quot;groovycsv-02-released&quot;&gt;GroovyCSV 0.2 Released&lt;/h1&gt;

&lt;p&gt;The first final release of Groovys very own CSV parsing library is out. Also, it’s up on Maven Central which should make it a lot easier to get. There have been some minor changes to the API since I posted about csv-parser &lt;a href=&quot;http://xlson.com/2010/08/17/introducing-csv-parser.html&quot;&gt;the first time&lt;/a&gt; but the biggest change is probably the new name and package structure.&lt;/p&gt;

&lt;h2 id=&quot;changes-since-01&quot;&gt;Changes since 0.1&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Project renamed from csv-parser to GroovyCSV (new package-structure &lt;code class=&quot;highlighter-rouge&quot;&gt;com.xlson.groovycsv&lt;/code&gt;)&lt;/li&gt;
  &lt;li&gt;Explicit &lt;code class=&quot;highlighter-rouge&quot;&gt;close()&lt;/code&gt; method has been addsed to &lt;code class=&quot;highlighter-rouge&quot;&gt;com.xlson.groovycsv.CsvIterator&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;example-using-grab-and-custom-separator&quot;&gt;Example using @Grab and custom separator&lt;/h2&gt;

&lt;p&gt;Because GroovyCSV is now up on Maven Central it’s really easy to use in your Groovy scripts. This example shows how you can make GroovyCSV available using &lt;code class=&quot;highlighter-rouge&quot;&gt;@Grab&lt;/code&gt; as well as how you can use custom separators and quote character.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@Grab('com.xlson.groovycsv:groovycsv:0.2')
import com.xlson.groovycsv.CsvParser

def csv = '''Name-Lastname
Mark-'Anderson-Nielsen'
Pete-Hansen'''

def data = new CsvParser().parse(csv, separator: '-', quoteChar: &quot;'&quot;)
for(line in data) {
    println &quot;$line.Name $line.Lastname&quot;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;output&quot;&gt;Output&lt;/h3&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Mark Anderson-Nielsen
Pete Hansen
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;getting-groovycsv&quot;&gt;Getting GroovyCSV&lt;/h2&gt;

&lt;p&gt;GroovyCSV is available from Maven Central with the following information:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Group: com.xlson.groovycsv
Artifact: groovycsv
Version: 0.2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or you can download it from Github:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/downloads/xlson/groovycsv/groovycsv-0.2.jar&quot;&gt;groovycsv-0.2.jar&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/downloads/xlson/groovycsv/groovycsv-0.2-javadoc.jar&quot;&gt;groovycsv-0.2-javadoc.jar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;more-information&quot;&gt;More information&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://github.com/xlson/groovycsv&quot;&gt;Source &amp;amp; Readme&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://xlson.github.com/groovycsv/docs/0.2/javadoc&quot;&gt;Javadoc&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://github.com/xlson/groovycsv/issues&quot;&gt;Issue tracker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;one-last-thing&quot;&gt;One last thing&lt;/h2&gt;

&lt;p&gt;I’d love to hear from you if you’re using GroovyCSV, especially
suggestions on improvements and bug reports. Keep the feedback coming! :)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>SweGUG is back!</title>
   <link href="http://xlson.com/2010/10/03/swegug-is-back.html"/>
   <updated>2010-10-03T00:00:00+00:00</updated>
   <id>http://xlson.com/2010/10/03/swegug-is-back</id>
   <content type="html">&lt;h1 id=&quot;swegug-is-back&quot;&gt;SweGUG is back!&lt;/h1&gt;

&lt;p&gt;Our little &lt;a href=&quot;http://groovy.codehaus.org/&quot;&gt;Groovy&lt;/a&gt; user group is finally back in action after being dormant for almost a year. 8 of us met at the &lt;a href=&quot;http://valtech.se/&quot;&gt;Valtech&lt;/a&gt; offices here in Stockholm this thursday. We had some food, drank some beer and got lots of great discussions out of it.&lt;/p&gt;

&lt;p&gt;I’m thrilled that so many took the time off to come to the meeting even though there was only a weeks advance notice. I’m even happier for the great discussions and talks.&lt;/p&gt;

&lt;p&gt;The whole evening was driven by the attendees through lightning talks and open discussions. &lt;a href=&quot;http://twitter.com/niklasl&quot;&gt;Niklas Lindström&lt;/a&gt; introduced &lt;a href=&quot;http://code.google.com/p/spock/&quot;&gt;Spock&lt;/a&gt; to the crowd and demonstrated how to use this powerful &lt;a href=&quot;http://en.wikipedia.org/wiki/Behavior_Driven_Development&quot;&gt;BDD&lt;/a&gt; tool to great effect. I have to admit that I still don’t know Spock as well as I’d like to and really wanna work with it more myself. Another highlight from the evening was when Eric Johansson talked about how he’s been using Groovy’s meta-programming to make an existing Java-API a lot easier to work with (should get him to blog about that).&lt;/p&gt;

&lt;p&gt;We’re looking at November for our next meeting and will probably organize it the same way again. This means lightning talks and great discussions from the attendees, pretty awesome huh? :)&lt;/p&gt;

&lt;p&gt;Big thanks to Valtech for food and housing but even bigger thanks to Niklas who helped me organize the meeting!&lt;/p&gt;

&lt;p&gt;See you all soon!&lt;/p&gt;

&lt;h3 id=&quot;more-about-the-group&quot;&gt;More about the group:&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://groups.google.com/group/swegug&quot;&gt;SweGUG&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Introducing csv-parser</title>
   <link href="http://xlson.com/2010/08/17/introducing-csv-parser.html"/>
   <updated>2010-08-17T00:00:00+00:00</updated>
   <id>http://xlson.com/2010/08/17/introducing-csv-parser</id>
   <content type="html">&lt;h1 id=&quot;introducing-csv-parser&quot;&gt;Introducing csv-parser&lt;/h1&gt;

&lt;p&gt;Not that long ago I found I had the need to parse some csv data. Well that’s easy - right? Yeah it is, most of the time at least. But what I found while surveying my options was that while it is easy, there really isn’t a Groovy way to do it. So with @&lt;a href=&quot;http://twitter.com/goeh&quot;&gt;goeh’s&lt;/a&gt;
&lt;a href=&quot;http://www.technipelago.se/blog/?p=44&quot;&gt;ExcelBuilder&lt;/a&gt; as inspiration I started hacking away at a new library.&lt;/p&gt;

&lt;p&gt;For me there were 2 goals, first to get access to the csv data using header names and the second to be able to use the Groovy collection processing methods directly on the data to allow for some nifty parsing.&lt;/p&gt;

&lt;p&gt;csv-parser is just that, a library to make csv processing just a little bit Groovier. The library uses &lt;a href=&quot;http://opencsv.sourceforge.net/&quot;&gt;opencsv&lt;/a&gt; behind the scenes and merely tries to add a thin layer of “Groovy-ness” to the mix.&lt;/p&gt;

&lt;p&gt;At the moment there’s no official release but I’ll link a build at the end of this post. If you’re out to get the latest code it’s an easy match to get the &lt;a href=&quot;http://github.com/xlson/csv-parser/&quot;&gt;source&lt;/a&gt; and build it with &lt;a href=&quot;http://www.gradle.org/&quot;&gt;Gradle&lt;/a&gt;. I plan to get a 0.1 version out the door soon and get that up on a maven repo for easy access. csv-parser is pretty much feature-complete, so nothing big should change while moving from SNAPSHOT to the 0.1 release.&lt;/p&gt;

&lt;h2 id=&quot;features&quot;&gt;Features&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Accessing values using header names&lt;/li&gt;
  &lt;li&gt;Iteration using the ordinary collection methods (&lt;code class=&quot;highlighter-rouge&quot;&gt;findAll&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;collect&lt;/code&gt;
and so on)&lt;/li&gt;
  &lt;li&gt;Support for custom separator, quoteChar and escapeChar&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;

&lt;p&gt;The parse method returns an iterator over the rows in the csv. This
means we can use any of the default groovy ways to iterate. Here we’ll see an example of filtering data in the csv using the &lt;code class=&quot;highlighter-rouge&quot;&gt;findAll&lt;/code&gt; method. &lt;code class=&quot;highlighter-rouge&quot;&gt;:&lt;/code&gt; is used as separator to demonstrate how to use a custom &lt;code class=&quot;highlighter-rouge&quot;&gt;separator&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import com.xlson.csvparser.CsvParser

def csv = '''Name:Lastname:YearBorn
Bette:Midler:1945
Roger:Moore:1927
Dan:Aykroyd:1952'''

def actors = new CsvParser().parse(csv, separator: ':')

// List all actors that was born after 1950
actors.findAll { (it.YearBorn as int) &amp;gt; 1950 }.each {
    println &quot;$it.Name $it.Lastname was born in $it.YearBorn&quot;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Dan Aykroyd was born in 1952
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;more-information&quot;&gt;More information&lt;/h2&gt;

&lt;p&gt;For further information about the library I’d suggest you visit the
&lt;a href=&quot;http://xlson.github.com/csv-parser/&quot;&gt;project page&lt;/a&gt; on github. There
you’ll find links to the
&lt;a href=&quot;http://github.com/xlson/csv-parser/&quot;&gt;source&lt;/a&gt;, build instructions and
even &lt;a href=&quot;http://github.com/xlson/csv-parser/issues&quot;&gt;current bugs and
enhancements&lt;/a&gt;. If you’re
interested in csv parsing and would like to delve deeper into the
subject I’d like to recommend The Kaptain’s excellent article &lt;a href=&quot;http://www.kellyrob99.com/blog/2010/07/01/groovy-and-csv-how-to-get-your-data-out/&quot;&gt;Groovy and CSV: How to Get Your Data Out?&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Latest build:&lt;/em&gt; &lt;a href=&quot;/files/csv-parser-0.1-SNAPSHOT.jar&quot;&gt;csv-parser-0.1-SNAPSHOT.jar&lt;/a&gt; (depends on &lt;a href=&quot;http://opencsv.sourceforge.net/&quot;&gt;opencsv 2.0&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Many thanks to Glen Smith and the other’s in the opencsv team for
doing all the heavy lifting.&lt;/p&gt;

&lt;h2 id=&quot;one-more-thing&quot;&gt;One more thing&lt;/h2&gt;

&lt;p&gt;I’m thinking csv-parser is a pretty lousy name that doesn’t stand out
at all. As I haven’t figured out a better name myself I’d love to hear
your suggestions in the comments!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Giving Jekyll a try</title>
   <link href="http://xlson.com/2010/08/10/giving-jekyll-a-try.html"/>
   <updated>2010-08-10T00:00:00+00:00</updated>
   <id>http://xlson.com/2010/08/10/giving-jekyll-a-try</id>
   <content type="html">&lt;h1 id=&quot;giving-jekyll-a-try&quot;&gt;Giving Jekyll a try&lt;/h1&gt;

&lt;p&gt;Today I’ve spent some time fiddling with the static (blog-aware) site generator
&lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt; and this blog is actually created using
it.&lt;/p&gt;

&lt;p&gt;Jekyll is interesting (in my opinion) in that it allows you to blog
using a light weight template engine such as
&lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;markdown&lt;/a&gt; and not much
else. Wordpress is a nice and all but I can’t say I’ve ever had a
really good time while using WYSIWYG on the web and Wordpress is no
exception. Not to mention the complexities of using a big piece of
software for something as simple(?) as a blog. Then we’ve got the
issue of getting code examples into blog posts. There’s lots of
solutions for all these problems out there and probably as many
problems more.&lt;/p&gt;

&lt;p&gt;Jekyll is different than a normal blog engine in that it takes the template files and markdown files and builds it all
into static html complete with rss feed and related posts. That html
is what you upload and show your users on your out-of-the-box web server.  What it
doesn’t do is things like comments, admin gui (duh..). You could go as
far as to say that it’s strength lies in that it really doesn’t do
anything advanced. It’s actually so easy to use that there’s no real
template project to start with when you’re starting up an new
site. Personally I did what many other have done: “stole” the design
of it’s makers &lt;a href=&quot;http://github.com/mojombo/mojombo.github.com&quot;&gt;blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now don’t get me wrong, Jekyll isn’t for everyone and it’s no silver
bullet. But it IS an interesting approach to blogging for us geeks and
I’m going to give it a try for a while.&lt;/p&gt;

&lt;p&gt;Let’s hope this get’s me blogging again. Been way to long since the
last time. My old home was on &lt;a href=&quot;http://code.qbranch.se/&quot;&gt;QBRANCH:CODE&lt;/a&gt;
and I’ll probably keep cross-publishing my stuff over there.&lt;/p&gt;
</content>
 </entry>
 
 
</feed>
