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

<channel>
	<title>Shizzle</title>
	<atom:link href="http://lenni.info/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://lenni.info/blog</link>
	<description>My little notebook</description>
	<lastBuildDate>Sun, 25 Jul 2010 22:39:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Thoughts about Rails from a Django guy</title>
		<link>http://lenni.info/blog/2010/07/thoughts-about-rails-from-a-django-guy/</link>
		<comments>http://lenni.info/blog/2010/07/thoughts-about-rails-from-a-django-guy/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 13:39:41 +0000</pubDate>
		<dc:creator>Lenni</dc:creator>
				<category><![CDATA[Mixed]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=310</guid>
		<description><![CDATA[My first and still my favourite programming language is Python and Django has so far been my framework of choice for my personal projects. Nevertheless, when a good friend of mine scrounged a free website off me a little while ago, I didn’t do what I normally do when friends ask for freebies: setting up [...]]]></description>
			<content:encoded><![CDATA[<p>My first and still my favourite programming language is Python and Django has so far been my framework of choice for my personal projects. Nevertheless, when a good friend of mine scrounged a free website off me a little while ago, I didn’t do what I normally do when friends ask for freebies: setting up another instance of WordPress on my server and let them choose a free template. Instead I decided to write my own CMS for his website using Rails.</p>
<p>I had read and heard lots of praise about Rails and was planning to add another skill to my list. I thought to myself that if I’m doing him a favour he can put with the slow speed of a developer  learning a new language and framework.</p>
<p>Whilst working through the documentation and tutorials I couldn’t help comparing Rails to Django, since it is the framework I’m most comfortable with and it takes a little time to unwire your assumptions and expectations of how a web framework ought to work. So, basically this is a one-sided mini-review of Rails.</p>
<h3>The Ruby language</h3>
<div>
<p>I didn&#8217;t know any Ruby before this project but everybody knows these days, that the blogging engine is the new &#8216;Hello World&#8217;. Ruby and Python are more alike than they’re different. Both are interpreted, use duck typing and both impose little structure on the source files. Ruby is slightly less readable to me due to the following things</p>
<ul>
<li>too many <a href="http://en.wikipedia.org/wiki/Sigil_(computer_programming)">sigils</a></li>
<li>multiple possible function/method calling syntaxes</li>
<li>the block syntax &#8211; it took me a little while to get used to but I&#8217;ve grown rather fond of it</li>
</ul>
</div>
<p>I&#8217;ve read that Ruby lacks the amount of non-web libraries that Python has. But that doesn&#8217;t bother me since I almost exclusively do web stuff. I&#8217;m simply not clever enough to have a use for for SciPy and NumPy.</p>
<h3>What I don&#8217;t like about Rails</h3>
<h4>ActiveRecord</h4>
<p>The abovementioned project obviously didn&#8217;t need a really complicated data model: a handful of entities with some simple many-to-ones. Particularly because ActiveRecored markets itself as a simpler solution to heavyweight enterprise ORMs like Hibernate, I found setting up this schema surprisingly difficult. Compared to Django, Rails introduces a few new concepts, which took me little bit to get my head around it.</p>
<ul>
<li><strong>separation of schema and model:</strong> in Django the model <em>is</em> the schema and I couldn&#8217;t really understand why those two things should be separate</li>
<li><strong>migrations:</strong> I can see how this could come in handy but in my case this was yet another extra thing I had to keep tabs of</li>
<li>if you have a <strong>many-to-many relationship</strong> you will have to define a join table yourself; in my view this is exactly the type of thing that an ORM at the abstraction level of ActiveRecord should take care of</li>
</ul>
<p>Particularly due to that last point I kept thinking that ActiveRecord is just SQL rewritten in Ruby.</p>
<h4>Templating</h4>
<p>Using pure Ruby in .erb templates surely is powerful but to me smells of Java Scriptlet, doesn&#8217;t it? I subscribe to the view that the template language is for designers and should only allow safe constructs. Not really a biggie, but rather a little quirk.</p>
<h4>No built-in admin</h4>
<p>This is something I love about Django and find kind of a deal-breaker with Rails. Django gives you great looking admin interfaces for editing your data out of the box. It takes you 95% of where you want your admin area to be and I myself never had the need to customize the template. I hear that with the introduction of the newforms library it is now not so hard anymore to write your own admin views. All in all, I&#8217;m pretty surprised that Rails hasn&#8217;t event got anything remotely similar. (Maybe I have given up looking too soon? Let me know in the comments.)</p>
<h3>What I like about Rails</h3>
<h4>Directory structure</h4>
<p>Rails is pretty good at giving you a feeling of where your files ought to be in the directory structure, by neatly giving you a controller per model. Also, I quite like the distinction between the top level folders <code>config</code>, <code>app</code>, <code>db</code>, <code>test</code> etc. This is, in my opinion, something of a weak point in Django, where I never quite understood where stuff is supposed to live. Yes, you say that you should be separating your code into individual Django apps but I think that is the wrong abstraction level and like the concepts of plugins somehow better. That might be the Java developer in me speaking &#8211; a gem is much more like a JAR.</p>
<h4>Dependency management</h4>
<p>It&#8217;s great that you can specify the needed gems for your application and even tell the runtime that you need a specific version of Rails. I haven&#8217;t tried it but it seems that the needed gems are automatically installed if they aren&#8217;t already. Managing your dependencies is kinda non-existent in Django.</p>
<h3>Grass isn&#8217;t always greener</h3>
<p>Well, I don&#8217;t really know what I expected but Rails does not magically solve all problems and does not trivialise web development. On the other hand I wasn&#8217;t unhappy with Django &#8211; I just wanted to expand my horizon.</p>
<p>Rails certainly boosts your productivity but I found a few things, mostly around ActiveRecord, a bit strange and counterintuitive. I can&#8217;t say that I have fallen in love with Rails but it is a solid framework worth its popularity. Bear in mind that this is me speaking after using Rails for about 2 weeks &#8211; I&#8217;m sure I have only scratched the surface of the things that Rails can do for me; I hear that the testing and deployment tools are fantastic. Maybe I&#8217;ll do a follow up post on how my view changed after I used them.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2010/07/thoughts-about-rails-from-a-django-guy/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>taglibdoc-ng &#8211; JavaDoc for JSP tag libraries</title>
		<link>http://lenni.info/blog/2010/04/taglibdoc-ng-javadoc-for-jsp-tag-libraries/</link>
		<comments>http://lenni.info/blog/2010/04/taglibdoc-ng-javadoc-for-jsp-tag-libraries/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 08:01:36 +0000</pubDate>
		<dc:creator>Lenni</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[javadoc]]></category>
		<category><![CDATA[jsp]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=293</guid>
		<description><![CDATA[Recently at work I had to write a set of JSP tag files (as in .tag files, not Java classes) for our designers to use. Naturally, when you write software for someone else to work with you need good documentation. At first I used Sun&#8217;s tool for generating the JavaDoc for those tag files. Soon, [...]]]></description>
			<content:encoded><![CDATA[<p>Recently at work I had to write a set of JSP tag files (as in .tag files, not Java classes) for our designers to use. Naturally, when you write software for someone else to work with you need good documentation. At first I used <a title="TaglibraryDoc Generator" href="https://taglibrarydoc.dev.java.net/">Sun&#8217;s tool</a> for generating the JavaDoc for those tag files.</p>
<p>Soon, however, I discovered that it had a few bugs: It was borking non-ASCII characters. And there didn&#8217;t seem to be a way to exclude certain folders so it was often listing tags twice in the resulting documentation. Another gripe I had (which is also the case with the regular JavaDoc tool) was the extremely <a title="Ugly JavaDoc" href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">ugly</a> mid-90s default stylesheet. The tool seemed to have been abandoned (last change in 2005), but I managed to checkout a working copy from their CVS. Stupidly, dev.java.net requires an account to simply checkout code, but luckily I found <a title="dev.java.net on bugmenot" href="http://www.bugmenot.com/view/dev.java.net">account details</a> on bugmenot.</p>
<h3>The tool</h3>
<p>Weirdly the code didn&#8217;t compile straight away as two classes were missing, but I just rewrote them. I also added a nicer stylesheet, which I pinched from JBoss.</p>
<p><a href="http://www.flickr.com/photos/24003367@N00/4445500928/"><img class="aligncenter" title="Screenshot of taglibdoc-ng" src="http://farm3.static.flickr.com/2704/4445500928_28bb98d502.jpg" alt="Screenshot of taglibdoc-ng" width="500" height="415" /></a></p>
<p>The character encoding issues simply went away by recompiling the project with Java 1.5 compatibility settings. I also put the code under Mercurial version control (screw CVS) and uploaded it to my bitbucket.</p>
<h3>Getting it</h3>
<p>Just go to <a href="http://bitbucket.org/lenniboy/taglibdoc-ng/wiki/Home">taglibdoc-ng&#8217;s page on bitbucket</a> and read the technical details. Or you simply head over to the <a title="Downloads" href="http://bitbucket.org/lenniboy/taglibdoc-ng/downloads/">downloads page</a> and grab the latest JAR. I have plans to put it up on Maven Central, but to be honest have never done that so will have to find out how easy that is.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2010/04/taglibdoc-ng-javadoc-for-jsp-tag-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buzz &#8211; Google&#8217;s backdoor into Facebook?</title>
		<link>http://lenni.info/blog/2010/02/buzz-googles-backdoor-into-facebook/</link>
		<comments>http://lenni.info/blog/2010/02/buzz-googles-backdoor-into-facebook/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 13:25:46 +0000</pubDate>
		<dc:creator>Lenni</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[google buzz]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=274</guid>
		<description><![CDATA[Having activated and quickly turned off again GMail&#8217;s new feature I was left wondering why a great email reader was being polluted by some shitty Twitter crap. I like my communication formal and simply don&#8217;t have the need to tell the world in a scattergun approach what I am currently doing. Buzz in itself is [...]]]></description>
			<content:encoded><![CDATA[<p>Having activated and quickly turned off again GMail&#8217;s new feature I was left wondering why a great email reader was being polluted by some shitty Twitter crap. I like my communication formal and simply don&#8217;t have the need to tell the world in a scattergun approach what I am currently doing.</p>
<p>Buzz in itself is also not very Googley so I was scratching my head what it was all about. Then I read <a href="http://www.nytimes.com/external/readwriteweb/2010/02/09/09readwriteweb-how-google-buzz-is-disruptive-open-data-sta-81676.html">column in the New York Times</a>:</p>
<blockquote><p>Facebook and Twitter will face renewed pressure to publish and consume  standardized data feeds as well now.  If Buzz is big enough, it could  break the dam holding back a flood of standardized data.  Where there is  standized (sic) data, there is scalable network effects, consumer choice,  competition and thus innovation.</p></blockquote>
<p>Maybe Google isn&#8217;t really interested in providing another me-too product. Maybe they want to pry open Facebook and their social data feeds so they can organise and rank them, making them useful for their users. Think of a Google Reader for Twitter/Facebook/Friendfeed. Then do what Google does best and slap a few ads in it and bingo! As always Google isn&#8217;t really a content provider but rather a way to channel all the available content out there and make it into a neat, bite-size parcel. That&#8217;s what made them what they are today.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2010/02/buzz-googles-backdoor-into-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dependency injection for beginners</title>
		<link>http://lenni.info/blog/2010/02/dependency-injection-for-beginners/</link>
		<comments>http://lenni.info/blog/2010/02/dependency-injection-for-beginners/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 22:46:57 +0000</pubDate>
		<dc:creator>Lenni</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[modularisation]]></category>
		<category><![CDATA[software design]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=230</guid>
		<description><![CDATA[Pro-forma preamble When I started learning how dependency injection works it was extremely hard for me to understand. Once I got what it does I still didn&#8217;t quite get what the benefits of this technique were. I just thought it was some overly complex design pattern that is just making life difficult for the sake [...]]]></description>
			<content:encoded><![CDATA[<h3>Pro-forma preamble</h3>
<p>When I started learning how dependency injection works it was extremely hard for me to understand. Once I got what it does I still didn&#8217;t quite get what the benefits of this technique were. I just thought it was some overly complex design pattern that is just making life difficult for the sake of it. After all, what is so bad about using <code>new</code> anyway?</p>
<p>Well, in this blog post I want to share what I have learned about dependency injection since leaving university and a becoming full-time programmer last September. I hope I can help a newbie to understand a little more about this design approach. Don&#8217;t be frustrated, however, if you don&#8217;t get it straight away: It took me the best part of my first month to really dive into dependency injection even though I had read lots of articles and blog posts about the topic.</p>
<h3>Dependency injection vs. Inversion of control</h3>
<p>Some authors strangely claim that DI is the same thing as IoC. I however think that DI is a type of IoC, namely to tell the to be injected object what its dependencies are. Inversion of control, to me, means something more general: That there is a predefined workflow (the control part) that the developer hooks her own components into. This principle applies to virtually all libraries and frameworks. For example, your favourite web development framework allows you to write a request handler for a URL, but most likely you can&#8217;t change the nature of the request itself. You will always receive a <code>HttpRequest</code> as the input of your request handling code. Dependency injection however is a specialisation of this principle.</p>
<h3>Modules and dependencies</h3>
<p>When you start to build big systems you naturally tend to modularise. Lets take online shopping as an example. You have one module of your code handling the user input for an order and validating form fields; lets call this module the <code>OrderHandler</code>. Then you have another module, which opens a connection to your payment provider and checks that the credit card data the user just gave are actually kosher and the payment can go ahead. We call this module the <code>CreditCardPaymentService</code>.</p>
<p>So, when the OrderHandler has validated all the form fields it passes the data over to the <code>CreditCardPaymentService</code>. But before it can do that it needs to have or create an instance of the <code>CreditCardPaymentService</code>. In (pseudo-) code this would probably look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> OrderHandler:
   this.<span style="color: black;">payment_service</span> = <span style="color: #dc143c;">new</span> CreditCardPaymentService<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
   handle_request<span style="color: black;">&#40;</span>request<span style="color: black;">&#41;</span>:
     <span style="color: #808080; font-style: italic;"># do something to validate the user input...</span>
     payment_data = request.<span style="color: black;">get_parameters</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
     response = this.<span style="color: black;">payment_service</span>.<span style="color: black;">handle_payment</span><span style="color: black;">&#40;</span>payment_data<span style="color: black;">&#41;</span>
     <span style="color: #ff7700;font-weight:bold;">if</span> response.<span style="color: black;">successful</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
         <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">new</span> HttpResponse<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Payment accepted&quot;</span><span style="color: black;">&#41;</span>
     <span style="color: #ff7700;font-weight:bold;">else</span>:
         <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">new</span> HttpResponse<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Payment declined&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>So far, so good. But what happens when you have quite a few parts of your code taking orders and querying the PaymentService? They all call <code>new CreditCardPaymentService</code>.<br />
Now, your boss has decided your going to switch from your old credit card provider to Paypal. You write a new PaymentProvider that sends a request to their server and authorises the payment. When you actually want to switch over, you will have to replace all instances of <code>CreditCardPaymentProvider</code> with <code>PaypalPaymentProvider</code>. Once you do these kinds of thing a lot, you&#8217;ll end up thinking that there&#8217;s got to be a better way to do this.</p>
<h3>DI to the rescue</h3>
<p>What if all the different modules of your shopping website, instead of creating new instances of <code>PaymentProviders,</code> would instead be given (or <em>injected</em>) those modules?</p>
<p>Maybe we could rewrite the above code like this:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> OrderHandler:
&nbsp;
 this.<span style="color: black;">payment_service</span>=<span style="color: #008000;">None</span>
&nbsp;
 set_payment_service<span style="color: black;">&#40;</span>payment_service<span style="color: black;">&#41;</span>:
    this.<span style="color: black;">payment_service</span>=payment_service
&nbsp;
 handle_request<span style="color: black;">&#40;</span>request<span style="color: black;">&#41;</span>:
    <span style="color: #808080; font-style: italic;"># do something to validate the user input...</span>
    payment_data = request.<span style="color: black;">get_parameters</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    response = this.<span style="color: black;">payment_service</span>.<span style="color: black;">handle_payment</span><span style="color: black;">&#40;</span>payment_data<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> response.<span style="color: black;">successful</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">new</span> HttpResponse<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Payment accepted&quot;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">new</span> HttpResponse<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Payment declined&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Obviously now it is easy to exchange on payment provider with another one. The downside of this that you have to pre-configure the <code>OrderHandler</code> with some type of <code>PaymentProvider</code>. Most DI frameworks do this using Factories and assign each configured, ready-to-use object a string. A factory is supplied with some configuration file that defines those objects and their dependencies.<br />
Those config files could look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* objects.conf */</span>
<span style="color: #cc00cc;">#cc_order_handler</span><span style="color: #00AA00;">&#123;</span>
  class<span style="color: #00AA00;">:</span> OrderHandler
  payment_service<span style="color: #00AA00;">:</span> CreditCardPaymentService
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#paypal_order_handler</span><span style="color: #00AA00;">&#123;</span>
  class<span style="color: #00AA00;">:</span> OrderHandler
  payment_service<span style="color: #00AA00;">:</span> PaypalPaymentService
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>We now have a central piece of code that handles each module&#8217;s dependencies. It basically instantiates the OrderHandler, sets the right payment service and then gives this object to whoever wants to use it. If we wanted to fetch on of the order handlers we would do it like this.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">factory = <span style="color: #dc143c;">new</span> ObjectFactory<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;objects.conf&quot;</span><span style="color: black;">&#41;</span>
paypal_payment_handler = factory.<span style="color: black;">getObject</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;paypal_order_handler&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>What you have done now is to externalise the configuration process of  the <code>Handler</code> from inside it to the factory with calls the set_payment_provider method before it returns it to whoever is requesting the object.</p>
<p>As an added benefit we can now easily unit-test the <code>OrderHandler</code> by creating and injecting a fake PaymentService that always returns a positive response.</p>
<h3>Implementations</h3>
<p>This principle is currently used in a lot of enterprise Java applications. The most popular   framework that uses this pattern is <a href="http://www.springsource.org/">Spring</a>. Spring uses XML files for configuration and much of what I described above stems directly from Spring, which actually many more things and DI is just one, albeit central, aspect of the framework.</p>
<p>Another piece of code I also want to have a look at is Google&#8217;s <a href="http://code.google.com/p/google-guice/">Guice</a> which superficially looks less all-singing, all-dancing, but still very interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2010/02/dependency-injection-for-beginners/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What&#8217;s my Google OpenID URL?</title>
		<link>http://lenni.info/blog/2009/12/whats-my-google-openid-url/</link>
		<comments>http://lenni.info/blog/2009/12/whats-my-google-openid-url/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 09:00:39 +0000</pubDate>
		<dc:creator>Lenni</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[openid]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=208</guid>
		<description><![CDATA[Short answer It&#8217;s the same for all Google accounts: https://www.google.com/accounts/o8/id Your username is not part of the OpenID. Long answer Well, it seems little strange that Google, your friendly neighbourhood search giant, is so coy about its OpenID support. I had to search around for quite a while to find my OpenID URL, which is [...]]]></description>
			<content:encoded><![CDATA[<h3>Short answer</h3>
<p>It&#8217;s the same for all Google accounts:</p>
<p><code>https://www.google.com/accounts/o8/id</code></p>
<p>Your username is not part of the OpenID.</p>
<h3>Long answer</h3>
<p>Well, it seems little strange that Google, your friendly neighbourhood search giant, is so coy about its OpenID support. I had to search around for quite a while to find my OpenID URL, which is the thing you paste into the OpenID box at the service you want to sign up to.</p>
<div class="wp-caption aligncenter" style="width: 305px"><a href="http://www.flickr.com/photos/24003367@N00/4183672163/"><img class=" " title="OpenID URL" src="http://farm3.static.flickr.com/2529/4183672163_111674d2de.jpg" alt="Logging in with your OpenID URL" width="295" height="139" /></a><p class="wp-caption-text">Logging in with your OpenID URL</p></div>
<p>Why is Google doing this, you may ask? They are usually very good about these things and usually support an open standard (like they have done with XMPP, which they use for Google Chat.) My suspicion is that they want to plug their own <a title="OAuth Wikipedia page" href="http://en.wikipedia.org/wiki/OAuth">OAuth </a>instead, which is a similar protocol, but they effectively solve <a href="http://softwareas.com/oauth-openid-youre-barking-up-the-wrong-tree-if-you-think-theyre-the-same-thing">different problems</a>.</p>
<p>Anyway, the URL that lets you sign into OpenID enabled services is<br />
<code>https://www.google.com/accounts/o8/id</code><br />
This URL is the same for all Google accounts; it redirects you to Google&#8217;s servers for you to confirm the logging in process. That&#8217;s it.</p>
<h3>A good example</h3>
<p>Stackoverflow.com is doing OpenID signing in right. I doesn&#8217;t ask you to fiddle with an OpenID URL but rather gives you nice and easy logos to click on &#8211; it fills in the URL for you. Well done!</p>
<div class="wp-caption aligncenter" style="width: 510px"><a href="http://www.flickr.com/photos/24003367@N00/4183691209/"><img title="Stackoverflow.com login page" src="http://farm3.static.flickr.com/2774/4183691209_ab62a124fc.jpg" alt="Stackoverflow.com login page" width="500" height="289" /></a><p class="wp-caption-text">Stackoverflow.com login page</p></div>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2009/12/whats-my-google-openid-url/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Guten Tag, Edd</title>
		<link>http://lenni.info/blog/2009/11/guten-tag-edd/</link>
		<comments>http://lenni.info/blog/2009/11/guten-tag-edd/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 12:22:33 +0000</pubDate>
		<dc:creator>Lenni</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[edd]]></category>
		<category><![CDATA[i18n]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=201</guid>
		<description><![CDATA[If you are a regular user of the Edd, the spoke length calculator you may have noticed that there is a new little drop-down box at the top right hand corner which lets you select between different languages. That&#8217;s right, Edd is going to be available in multiple languages. At the moment this is limited [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a regular user of the <a href="http://lenni.info/edd">Edd, the spoke length calculator</a> you may have noticed that there is a new little drop-down box at the top right hand corner which lets you select between different languages. That&#8217;s right, Edd is going to be available in multiple languages.</p>
<p>At the moment this is limited to only English and German, but as soon as the last few kinks of theinternationalisation have been ironed out, I will try to add more languages.</p>
<p>In the meanwhile, if you find something that has been translated incorrectly or something that hasn&#8217;t been translated at all, make sure to let me know either in the comments to this post or by writing an email to lenniboy@gmail.com.</p>
<h2>Terve!</h2>
<p>Pekka L has provided a Finnish translation: <a href="http://lenni.info/edd/fi">http://lenni.info/edd/fi</a>.</p>
<p>Thanks Pekka.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2009/11/guten-tag-edd/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Mavens&#8217;s &#8220;The artifact has no valid ranges&#8221;</title>
		<link>http://lenni.info/blog/2009/10/mavenss-the-artifact-has-no-valid-ranges/</link>
		<comments>http://lenni.info/blog/2009/10/mavenss-the-artifact-has-no-valid-ranges/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 07:10:05 +0000</pubDate>
		<dc:creator>Lenni</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=189</guid>
		<description><![CDATA[I have just learned to use the really great Java build and project management tool Maven. It makes managing large projects with dozens of components a lot easier and its build configuration is simpler and less imperative compared to Ant, since it relies a lot on convention over configuration. Basically, Maven knows that pretty much [...]]]></description>
			<content:encoded><![CDATA[<p>I have just learned to use the really great Java build and project management tool <a href="http://maven.apache.org/">Maven</a>. It makes managing large projects with dozens of components a lot easier and its build configuration is simpler and less imperative compared to Ant, since it relies a lot on convention over configuration. Basically, Maven knows that pretty much every project needs to be</p>
<ul>
<li>compiled</li>
<li>JavaDoc&#8217;d</li>
<li>unit tested</li>
</ul>
<p>These things don&#8217;t need to be declared and are automatically done by Maven. Maven&#8217;s great advantage over Ant is it&#8217;s ability to handle the dependencies of your project, ie. the old &#8220;Hunt the JAR&#8221; game is a thing of the past as Maven will simply download whatever libraries or frameworks you will need. Most of the time your build will run smoothly and Maven will spit out a nice JAR or WAR without problems.</p>
<h3>The curious error message</h3>
<p>However, if there are build errors they tend to be on the cryptic side. &#8220;The artifact has no valid ranges&#8221; is one of those. Basically it means that you <em>do have</em> a valid range, however you have defined two (or more) <em>different version ranges of an artifact</em> in a fixed way. Most likely you haven&#8217;t defined those dependencies in the same project but through a transitive dependency.</p>
<p>Let&#8217;s have an example. Your project <em>my-app</em>, depends on an artifact <em>super-framework</em> at version 1.0, and only 1.0, nothing else. <em>my-app</em> also depends on another of your apps called<em> my-app2</em>. <em>my-app2</em> has a dependency on <em>super-framework</em> but only for versions 0.5 to 0.9. This means that you have incompatible version ranges and you need to resolve this. You will have to edit <em>my-app</em> or <em>my-app2</em> and change their version ranges for <em>super-framework</em>.</p>
<p>This took me a little while to figure out myself since the error kinda suggests to look in the wrong place. The range is perfectly valid, it&#8217;s just that there is too many of them.</p>
<h3>Debugging this message</h3>
<p>That is a little tricky. You can try running Maven with the -X flag, which will show a running log of how the version is chosen. Also, sometimes the Maven plugin for Eclipse can give you some clues, but sometimes it is way off.</p>
<p>One word of advice though, it seems to matter in which order you include your dependencies in the the POM file. So, if you include a dependency on</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">super-framework [0.5,1.5)</pre></div></div>

<p>it will fetch the latest available version, say 1.1.</p>
<p>If you then have a transitive dependency further down that includes</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">super-framework [0.5, 1.0)</pre></div></div>

<p>Maven will generate this misleading error, since it will not select anything other than the 1.1 it already has, even though it could just select 0.9 without producing a version conflict. If you swap the order, weirdly, it works.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2009/10/mavenss-the-artifact-has-no-valid-ranges/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First impressions of OS X 10.6 Snow Leopard</title>
		<link>http://lenni.info/blog/2009/09/first-impressions-of-os-x-10-6-snow-leopard/</link>
		<comments>http://lenni.info/blog/2009/09/first-impressions-of-os-x-10-6-snow-leopard/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 12:35:10 +0000</pubDate>
		<dc:creator>Lenni</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=171</guid>
		<description><![CDATA[I couldn&#8217;t wait to finally get my hands on a copy of the latest iteration of Apple&#8217;s OS and the postal strike here in the UK made matters worse. Last Saturday the disc finally arrived! It didn&#8217;t take long to upgrade the system from Leopard and the process was smooth and polished &#8211; almost zero [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t wait to finally get my hands on a copy of the latest iteration of Apple&#8217;s OS and the postal strike here in the UK made matters worse.</p>
<p>Last Saturday the disc finally arrived! It didn&#8217;t take long to upgrade the system from Leopard and the process was smooth and polished &#8211; almost zero user input required as we are used form Apple.</p>
<p>Now to the actual OS: Well, startup and shutdown is noticeably faster but to be honest I couldn&#8217;t see a massive speed up in the main system. To be fair, it was pretty speedy on Leopard already and I never had the feeling that it was sluggish; therefore it probably went  from <em>pretty fast</em> to <em>very fast</em> and maybe that difference isn&#8217;t so big.</p>
<p>Lets get to the improvements. These aren&#8217;t earth-shaking but many of them fall under the category &#8220;Oh, that&#8217;s nice&#8221;.</p>
<p><strong> </strong></p>
<ul>
<li><span style="font-weight: normal; "><strong>Working CD/DVD burning support</strong>: This was a major gripe of mine on Leopard. Disc writing would often fail and Disk Utility was awful for burning &#8211; Leopard&#8217;s &#8220;burn folders&#8221; never worked either. If that wasn&#8217;t such a basic thing I would say &#8220;Well Done&#8221; to Apple but this should have been way better a long time ago.</span></li>
</ul>
<div class="wp-caption aligncenter" style="width: 393px"><a href="http://www.flickr.com/photos/24003367@N00/3900097564/"><img title="Disc burning in action" src="http://farm3.static.flickr.com/2659/3900097564_0641666d05_o.png" alt="Snow Leopard disc burning" width="383" height="146" /></a><p class="wp-caption-text">Snow Leopard disc burning</p></div>
<ul>
<li><strong>Expose is more useful. </strong>Instead of the old seemingly random positioning of the windows they now arrange themselves on a grid and the dock and the menu bar turn black which I like better. Also, if you click on an active dock icon and then hold you can see all the windows that the program has open at this point in time.</li>
<li><strong>Dock stacks are scrollable.</strong> Again this really isn&#8217;t a killer feature.</li>
<li><strong>Address Book can sync with GMail.</strong> I&#8217;m liking that.</li>
<li><strong>Quick Time looks nicer. </strong>I&#8217;m not quite sure what has happened under the hood there but I like the new interface. Just get yourself <a href="http://perian.org/">Perian</a> and it is almost as good as <a href="http://www.videolan.org/vlc/download-macosx.html">VLC</a>.</li>
<li><strong>Mail supports Exchange server.</strong> Even though I didn&#8217;t test this, as I use neither, this could come in handy. It also means that Exchange server is better supported out-of-the box on OS X than on Windows &#8211; go figure.</li>
</ul>
<p>Apparently, there is all sorts of stuff happening with Grand Central and OpenCL but I rarely have an application that is heavy on either CPU or GPU so this doesn&#8217;t really matter to me but is nice to know. Almost all of my programs still worked fine under Snow Leopard; the only one where I had to use a beta version is <a title="Cyberduck" href="http://cyberduck.ch/">Cyberduck</a>.</p>
<p>There is one little gripe: I used to have a developer preview version of Safari 4 which allowed websites to be saved as a web application which then had it own dock icon (and presumably its own process). I assumed this feature was held back until Snow Leopard came out but I can&#8217;t seem to find it. Hmm.</p>
<h3>Baseline</h3>
<p>I like it particularly for the fact that it isn&#8217;t jam-packed with features that no-one needs but is a good solid exercise in improving the core of the system. I got this update for £10 and I think even £30 would be no-brainer for all Leopard users. I don&#8217;t think I would pay the full retail price (£129.00 for the box set with iLife) for it though.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2009/09/first-impressions-of-os-x-10-6-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting transparent PNGs for use with LaTeX</title>
		<link>http://lenni.info/blog/2009/08/converting-transparent-pngs-for-use-with-latex/</link>
		<comments>http://lenni.info/blog/2009/08/converting-transparent-pngs-for-use-with-latex/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 09:09:25 +0000</pubDate>
		<dc:creator>Lenni</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[transparency]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=160</guid>
		<description><![CDATA[I have recently discovered the power and ease of use of LaTeX and in my last report in included quite a few screenshots of the application I was writing. However OS X&#8217;s screenshot tool also saves the nice drop shadow that the UI produces around it&#8217;s windows. LaTeX on the other hand, doesn&#8217;t seem to [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently discovered the power and ease of use of LaTeX and in my last report in included quite a few screenshots of the application I was writing. However OS X&#8217;s screenshot tool also saves the nice drop shadow that the UI produces around it&#8217;s windows.</p>
<p>LaTeX on the other hand, doesn&#8217;t seem to like those drop shadows as they contain transparency (also know as alpha channel) which after the conversion to PDF appears as ugly black borders. Fortunately there is an easy fix for this problem, which I found in a <a title="[unix-dev] mailing list message" href="https://mail.cs.drexel.edu/pipermail/unix-dev/2008-April/001322.html">mailing list message</a>.</p>
<p>You will need to have <a href="http://www.imagemagick.org/">ImageMagick</a> installed for this to work. ImageMagick&#8217;s convert command line tool allows you to convert the transparent part into proper colours rather than a grey layer with added transparency information (which is what throws the tex-to- PDF converter). Before you add those images to the tex file, convert them like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">convert -background white -layers merge input.png output.png</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2009/08/converting-transparent-pngs-for-use-with-latex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changes to submitting measurements to Edd</title>
		<link>http://lenni.info/blog/2009/08/changes-to-submitting-measurements-to-edd/</link>
		<comments>http://lenni.info/blog/2009/08/changes-to-submitting-measurements-to-edd/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 13:52:23 +0000</pubDate>
		<dc:creator>Lenni</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[edd]]></category>
		<category><![CDATA[measurements]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=153</guid>
		<description><![CDATA[I have made some changes to how submitting measurements works in my spoke length calculator, Edd. Up until now submission was anonymous, which had the obvious drawbacks of verification and me being unable to ask for clarification if a submission was unclear. From now on you will have to supply an email address if you [...]]]></description>
			<content:encoded><![CDATA[<p>I have made some changes to how submitting measurements works in my <a title="Edd, an easy to use spoke length calculator" href="http://lenni.info/edd">spoke length calculator</a>, Edd. Up until now submission was anonymous, which had the obvious drawbacks of verification and me being unable to ask for clarification if a submission was unclear.</p>
<p>From now on you will have to supply an email address if you want to submit measurements for a hub or rim, but please be assured that this data will be for my eyes only. I won&#8217;t spam you or won&#8217;t give your email address to <em>anyone</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2009/08/changes-to-submitting-measurements-to-edd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
