<?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>logic involved &#187; coding</title> <atom:link href="http://www.coliena.com/blog/tag/coding/feed/" rel="self" type="application/rss+xml" /><link>http://www.coliena.com/blog</link> <description>... more often than not ...</description> <lastBuildDate>Sat, 21 Jan 2012 18:09:36 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Comparison of Java Serialisers</title><link>http://www.coliena.com/blog/2011/10/comparison-of-java-serializers/</link> <comments>http://www.coliena.com/blog/2011/10/comparison-of-java-serializers/#comments</comments> <pubDate>Mon, 24 Oct 2011 18:12:30 +0000</pubDate> <dc:creator>niels</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[android]]></category> <category><![CDATA[coding]]></category> <category><![CDATA[java]]></category><guid
isPermaLink="false">http://www.coliena.com/blog/?p=541</guid> <description><![CDATA[The JVM Serialisers project provides a very extensive comparison of dozens of different JVM serializers out there. Tested tools include several JSON libs, different XML related libs, Scala, protobuf, protostuf, msgpack and many more. I didn&#8217;t know protostuff before &#8211; it seems to be really amazing! (via tutego)]]></description> <content:encoded><![CDATA[<p>The <a
href="https://github.com/eishay/jvm-serializers/wiki" target="_blank">JVM Serialisers</a> project provides a very extensive comparison of dozens of different JVM serializers out there. Tested tools include several JSON libs, different XML related libs, Scala, protobuf, protostuf, msgpack and many more.<br
/> I didn&#8217;t know <a
href="http://code.google.com/p/protostuff/" target="_blank">protostuff</a> before &#8211; it seems to be really amazing!</p><p>(via <a
href="http://www.tutego.de/blog/javainsel/2011/10/schner-vergleich-von-java-serialisierern/" target="_blank">tutego</a>)</p> ]]></content:encoded> <wfw:commentRss>http://www.coliena.com/blog/2011/10/comparison-of-java-serializers/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Displaying the latest global Subversion revision ID in an application</title><link>http://www.coliena.com/blog/2010/06/displaying-the-latest-subversion-revision-id-in-an-application/</link> <comments>http://www.coliena.com/blog/2010/06/displaying-the-latest-subversion-revision-id-in-an-application/#comments</comments> <pubDate>Mon, 21 Jun 2010 19:40:12 +0000</pubDate> <dc:creator>niels</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[coding]]></category> <category><![CDATA[subversion]]></category><guid
isPermaLink="false">http://coliena.com/blog/?p=338</guid> <description><![CDATA[When you have to display the latest global svn revision number in your application you face different options. Using Subversion keywords, like $Revision$ or $Id$, sounds like the most natural approach. Unfortunately the keywords are updated only when you change and commit the corresponding file. In short: if you intend to grab the revision ID [...]]]></description> <content:encoded><![CDATA[<p>When you have to display the latest global svn revision number in your application you face different options.<br
/> Using Subversion keywords, like $Revision$ or $Id$, sounds like the most natural approach. Unfortunately the keywords are updated only when you change and commit the corresponding file. In short: if you intend to grab the revision ID from a central header file, like version.h, this file has to be edited and committed whenever a svn commit on any file in your project takes place. So either you do that manually (<em>&#8220;erm, no?&#8221;</em> &#8211; right!), or you create a commit hook and bloat your repository.<br
/> Another approach is to fetch the latest number of the latest revision and update your version.h as part of your build. In short: whenever you trigger a build by calling <em>make</em>, <em>ant</em> or build your project in your IDE, you invoke a script that generates your header file (or .java, .cs, .rb &#8230; you name it). On Linux and Unix, you might use a script just like this:<br
/> <span
id="more-338"></span></p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/csh</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">SVNREV</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">svnversion</span> -n<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">FILENAME</span>=<span style="color: #007800;">$my</span><span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>version.h
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'/*******************************************************************'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$FILENAME</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'* '</span><span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$FILENAME</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'* This include file is automatically generated. All manual '</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$FILENAME</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'* changes will be lost.'</span>  <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$FILENAME</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'* '</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$FILENAME</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'*******************************************************************/'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$FILENAME</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">''</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$FILENAME</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'/* latest Subversion revision */'</span>  <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$FILENAME</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'#define SVNREV '</span> <span style="color: #007800;">$SVNREV</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$FILENAME</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">''</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$FILENAME</span></pre></div></div><p>If you develop on Windows, you might adopt this script:</p><div
class="wp_syntax"><div
class="code"><pre class="bat" style="font-family:monospace;">@echo off
&nbsp;
REM store latest revision number as SVNREV
for /f &quot;delims=:&quot; %%a in ('svnversion') do @set SVNREV=%%a
&nbsp;
set FILENAME=%my%\path\to\include\version.h
echo /*******************************************************************  &gt; %FILENAME%
echo * &gt;&gt; %FILENAME%
echo * This include file is automatically generated. All manual  &gt;&gt; %FILENAME%
echo * changes will be lost.  &gt;&gt; %FILENAME%
echo * &gt;&gt; %FILENAME%
echo *******************************************************************/  &gt;&gt; %FILENAME%
echo.  &gt;&gt; %FILENAME%
echo /* latest Subversion revision */  &gt;&gt; %FILENAME%
echo #define SVNREV  %SVNREV$ &gt;&gt; %FILENAME%
echo.  &gt;&gt; %FILENAME%</pre></div></div><p>Make sure that you add version.h to svn:ignore.</p> ]]></content:encoded> <wfw:commentRss>http://www.coliena.com/blog/2010/06/displaying-the-latest-subversion-revision-id-in-an-application/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: www.coliena.com @ 2012-02-06 01:05:18 by W3 Total Cache -->
