<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>No Relation To...</title>
	
	<link>http://blog.emmanuelbernard.com</link>
	<description />
	<lastBuildDate>Wed, 25 Aug 2010 18:22:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/NoRelationTo" /><feedburner:info uri="norelationto" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>To Tor or à Tort</title>
		<link>http://feedproxy.google.com/~r/NoRelationTo/~3/otyBszV2cgQ/</link>
		<comments>http://blog.emmanuelbernard.com/2010/08/to-tor-or-a-tort/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 18:16:35 +0000</pubDate>
		<dc:creator>emmanuel</dc:creator>
				<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://blog.emmanuelbernard.com/?p=156</guid>
		<description><![CDATA[Last night, I read some articles about Tor. Tor is an a [...]]]></description>
			<content:encoded><![CDATA[<p>Last night, I read some articles about <a href="http://www.torproject.org/">Tor</a>. Tor is an anonymous network that redirects your communications securely and anonymously across the Tor network before entering the public internet. It prevents people from finding who / where you are and from spying on your internet connection. The idea is that the communication between you and say the web site you want to look at is encrypted and passes via a few other machines running the Tor network. It looks like the last person on the Tor network is surfing the web site you are looking at.</p>
<p>Long story short, it&#8217;s a tool emphasizing anonymity and protecting people&#8217;s freedom, privacy and confidentiality (quite useful when you are a dissident in a not so open country).</p>
<p>I did install Tor so that my machine ran as a Tor relay and exit node. A Tor relay relays the data flow from one Tor node to another. An exit node is the bridge between the Tor network and the real internet: in my previous example that&#8217;s the last guy that appears to look at the website you are surfing.</p>
<p><em>Why did I do that?</em><br />
Good question. I was curious first and doing my part to keep the world good is something I try to do from time to time.</p>
<p><em>What happened?</em><br />
That&#8217;s the sad part. I let the node run all night and when I tried to use my connection in the morning I had a couple of bad surprises:</p>
<ul>
<li>Google thought I was a bot trying to run automated queries and abusing the system. Consequently, every search I was doing was guarded by a captcha (annoying).</li>
<li>freenode (IRC) must have thought I was a bad guy cause I could not log onto #hibernate-dev #jboss-dev and co</li>
</ul>
<p>I suspect some people were abusing the system and hid themselves behind Tor and I was their gateway to the internet. That left a bad taste in my mouth, I&#8217;ve disabled my Tor relay.</p>
<p>End of experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.emmanuelbernard.com/2010/08/to-tor-or-a-tort/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://blog.emmanuelbernard.com/2010/08/to-tor-or-a-tort/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=to-tor-or-a-tort</feedburner:origLink></item>
		<item>
		<title>IntelliJ’s Live Template</title>
		<link>http://feedproxy.google.com/~r/NoRelationTo/~3/dCy4FwJeLXk/</link>
		<comments>http://blog.emmanuelbernard.com/2010/08/intellijs-live-template/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 16:10:34 +0000</pubDate>
		<dc:creator>emmanuel</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[ide]]></category>

		<guid isPermaLink="false">http://blog.emmanuelbernard.com/?p=146</guid>
		<description><![CDATA[If you remember, I like to write my getters this way (l [...]]]></description>
			<content:encoded><![CDATA[<p>If you remember, I like to write my getters this way (<a href="http://blog.emmanuelbernard.com/2010/03/getter-setter-generation-in-java/">long story here</a>)</p>
<pre>public String getName() { return this.name; }
public void setName(String name) { this.name = name; }
private String name;</pre>
<p>I have been doing it manually for a while but it turns out IntelliJ has a super nice feature for that: Live Templating which allows you to use parameterized and contextual templates to generate code.</p>
<p>Go to your Settings-&gt;Live Templating and create a new one.</p>
<p>Add this template:</p>
<pre>public $TYPE$ get$UpperName$() { return $lowername$; }
public void set$UpperName$($TYPE$ $lowername$) { this.$lowername$ = $lowername$; }
private $TYPE$ $lowername$;</pre>
<p>Then edit the variables:</p>
<ul>
<li><em>TYPE</em>: the expression should be <em>classNameComplete(</em>) to refer to the class name context</li>
<li><em>lowername</em>: the expression should be <em>decapitalize(UpperName).</em> Also tick <em>skip if defined</em> to not have to validate the computed value (this saves you one key stroke).</li>
</ul>
<p>I&#8217;ve named my Live Template &#8220;get&#8221;. When I type &#8220;get&#8221; and TAB, I am asked to type the property type (which is suggested). The second variable asked is the capitalized property name. Then the Live Template infers the rest (decapitalize my property name to fill up <em>lowername</em>).</p>
<p>Pretty nice feature!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.emmanuelbernard.com/2010/08/intellijs-live-template/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://blog.emmanuelbernard.com/2010/08/intellijs-live-template/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=intellijs-live-template</feedburner:origLink></item>
		<item>
		<title>Retour sur l’Universite du SI 2010: geek et boss une equipe qui gagne</title>
		<link>http://feedproxy.google.com/~r/NoRelationTo/~3/8GtmxQYDOFc/</link>
		<comments>http://blog.emmanuelbernard.com/2010/07/retour-sur-luniversite-du-si-2010-geek-et-boss-une-equipe-qui-gagne/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 17:39:58 +0000</pubDate>
		<dc:creator>emmanuel</dc:creator>
				<category><![CDATA[conference]]></category>
		<category><![CDATA[podcast]]></category>

		<guid isPermaLink="false">http://blog.emmanuelbernard.com/?p=143</guid>
		<description><![CDATA[J'ai eu la chance d'aller à l'université du SI où Gu [...]]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai eu la chance d&#8217;aller à l&#8217;<a href="http://www.universite-du-si.com">université du SI</a> où Guillaume, Vincent et moi avons animé la session live du podcast <a href="http://lescastcodeurs.com">Les Cast Codeurs</a> (ça devrait arriver bientôt dans votre iTunes, j&#8217;attends toujours le fichier son d&#8217;Octo). Qu&#8217;ai-je retenu de l&#8217;USI? Je vais me limiter volontairement aux deux choses qui m&#8217;ont le plus frappé.</p>
<p><b>Geek et boss: pas une frontière, un gouffre&#8230; et pourtant</b></p>
<p>Ce qui ma frappé, c&#8217;est que les geeks et les boss vivent dans des mondes complètements différents, des réalités alternatives presque. C&#8217;était particulièrement visible pendant les sessions questions / réponses des keynotes où le micro passe du développeur Java au DSI Renault. Vous aller me dire, on le sait déjà que les DSI ne comprennent rien à la technique. OK mais il y a plus.</p>
<p>M&#8217;étant (re)pris une claque avec cette (re)révélation, j&#8217;y a réfléchi et j&#8217;ai passé du temps à comparer les points de vue pendant ces deux jours. Bien que vivant dans des mondes parallèles, le geek a besoin du boss et le boss a besoin du geek. Aussi bizarre que cela paraisse, c&#8217;est presque une symbiose. Comme un animal et son parasite qui le protège de je ne sais quelle autre bactérie (je ne dirais pas qui est le parasite de l&#8217;autre). Il y a de l&#8217;espoir cependant: au fur et a mesure de ces deux jours, on a vu décrire des techniques et des points de vues qui essayaient de faire parler/interagir les différents niveaux en proposant un langage et terrain commun, en ajoutant des boucles de retour rapides etc (hiérarchies râteau, méthodes itératives, reconsidération de la responsabilité&#8230;).</p>
<p>Il y a encore beaucoup de choses a inventer, de progrès à faire. C&#8217;est un énorme chantier, particulièrement pour les sociétés françaises. Celles qui prendront le pli gagneront en compétitivité, les autre iront pleurer auprès du gouvernement contre les grands méchants de l&#8217;étranger qui leur volent leur clients.</p>
<p><b>Les keynotes: pour penser plus loin</b></p>
<p>Une bonne keynote doit présenter quelque chose qui va au delà du thème de la conference, qui fait réfléchir, change les perspectives et fait mal à la tête. L&#8217;USI a mis la barre très haut avec 8 keynotes! Toutes n&#8217;étaient pas à mon goût mais 6 sur les 8 étaient du gros calibre, voir du gros gros calibre.</p>
<p>Celle qui m&#8217;a mis le cul par terre c&#8217;est la keynote de <a href="http://en.wikipedia.org/wiki/Juan_Enriquez">Juan Enriquez</a>. Ce monsieur est une pointure en science de la vie et un business man averti. Il a trempé de près ou de loin dans beaucoup des dernières avancées clés en biologie et notamment la récente annonce de la première cellule entièrement synthétique (pour traduire: l&#8217;homme a crée la vie a partir de 0).</p>
<p>Juan nous a donne la vision d&#8217;un monde:</p>
<ul>
<li>où les usines de chimie étaient obsolètes: une vache génétiquement modifiée génère la molécule anti-cancéreuse qui va bien dans son lait en beaucoup moins de place et de pollution</li>
<li>où les matières synthétiques ne sont pas dérivées du pétrole mais générées par des cellules</li>
<li>où les donnees génétiques sont du code, les cellules des microprocesseurs et les généticiens des développeurs: geek power!</li>
</ul>
<p>La vie est la prochaine plate-forme, le vrai post-silicone. Oublier le cloud computing, le cloud computing est l&#8217;étape intermédiaire pour nous apprendre à faire du développement massivement distribué. Là où l&#8217;informatique silicone manipule des 0 et des 1, le bio développeur manipule des A,C,G,T.</p>
<p>Quelques chiffres clés:</p>
<ul>
<li>100,000 milliards de cellules (10^14) dans le corps humain</li>
<li>6 milliards de bits dans le génome humain contenu dans chaque cellule (715 Mo)</li>
<li>donc le corps humain contient 68.187.713.623 To ou 63,5 Zetta octets (pour info au dessus il y a yotta et puis plus rien <img src='http://blog.emmanuelbernard.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</li>
</ul>
<p>Une fois que le &#8220;hardware&#8221; sera peaufiné, il nous suffira d&#8217;écrire l&#8217;assembleur Vie, et la GVM Genetic Virtual Machine. L&#8217;expression code smell prendra tout son sens. Cela ouvre des perspectives totalement bluffantes! Cette perspective et cette vision de Juan Enriquez était tellement soufflante que je me suis dit &#8220;je veux bosser pour lui&#8221;.</p>
<p>Une petite déception d&#8217;ailleurs puisqu&#8217;à part moi, les autres questions dans l&#8217;assemblée étaient négatives ou pessimistes: Quid de l&#8217;utilisation en tant qu&#8217;arme? Quid des risques de ceci et cela? Quid des règlementations à mettre en place? etc. On reconnait bien la mentalité française <img src='http://blog.emmanuelbernard.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>L&#8217;USI est un mini <a href="http://ted.com">TED</a> dédié a l&#8217;IT. Le format geek / boss et les sessions de 20 minutes fonctionnent bien. Un grand merci aux USI boys and girls qui ont tout organisé et avec un peu de chance, à l&#8217;année prochaine <img src='http://blog.emmanuelbernard.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.emmanuelbernard.com/2010/07/retour-sur-luniversite-du-si-2010-geek-et-boss-une-equipe-qui-gagne/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blog.emmanuelbernard.com/2010/07/retour-sur-luniversite-du-si-2010-geek-et-boss-une-equipe-qui-gagne/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=retour-sur-luniversite-du-si-2010-geek-et-boss-une-equipe-qui-gagne</feedburner:origLink></item>
		<item>
		<title>Git: how my life has improved since last month when I used SVN</title>
		<link>http://feedproxy.google.com/~r/NoRelationTo/~3/yHAMuExxQEI/</link>
		<comments>http://blog.emmanuelbernard.com/2010/05/git-how-my-life-has-improved-since-last-month-when-i-used-svn/#comments</comments>
		<pubDate>Mon, 31 May 2010 11:35:03 +0000</pubDate>
		<dc:creator>emmanuel</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://blog.emmanuelbernard.com/?p=128</guid>
		<description><![CDATA[I've switched from SVN to Git (more git-svn actually) c [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve switched from SVN to Git (more git-svn actually) close to a month ago and that had to be a leap of faith. Rationally convincing someone that a DVCS is better is pretty hard because overall the life in SVN land is not that bad or does not appear to be. Note that I am using git-svn so I don&#8217;t benefit from all the power of DVCSes. While nothing replace actually trying it, I thought it was worth the time to explain what I like about this new tool to help people jump too.</p>
<p>This is not a post on why merging is superior in Git compared to SVN (this is something you need to experience), it&#8217;s a post on how Git is making my life easier.</p>
<p>This post is split is a few sections:</p>
<ul>
<li>some intro</li>
<li>how to import a SVN repo into Git (feel free to skip this tutorial of you are interested in what I liked in Git compared to SVN)</li>
<li>use case: multitasking in isolation</li>
<li>use case: backporting bug fixes</li>
<li>use case: writing better commits and commit histories</li>
<li>resources</li>
</ul>
<p><strong>General</strong></p>
<p>If I had to summarize, Git gives me more freedom than SVN. I am not constrained by the tool in any way:</p>
<ul>
<li>it can follow whatever workflow I want</li>
<li>it is fast</li>
<li>as a net result my commits are clearer</li>
</ul>
<p>I&#8217;t hard for me to say that but since the move I do enjoy committing stuffs (I know, that&#8217;s pretty scary).</p>
<p><strong>The bootstrap</strong></p>
<p>Here is a small tutorial section for people willing to import a project from SVN to Git and keep a bridge between the two. Due to a bug in git-svn for https imports, I am using Git 1.6.5.1 and not the 1.7.1 version.</p>
<pre>mkdir project; cd project;
git svn init --trunk=my/svn/repo/project/trunk/ \
             --tags=my/svn/repo/project/tags \
             --branches=my/svn/repo/project/branches \
             my/svn/repo/project</pre>
<p>You can optionally create a file containing a conversion between SVN logins and the committers names and email addresses</p>
<pre>jdoe = John Doe &lt;jdoe@foo.com&gt;
agaulois = Asterix &lt;asterix@gaule.fr&gt;</pre>
<p>In the logs, every time git-svn finds agaulois, it converts it to Asterix &lt;asterix@gaule.fr&gt;. If you want to do that, you need to create this file. Don&#8217;t be afraid to miss a couple of logins, if you do, git-svn will stop and ask you to add it. In your Git repository directory, run</p>
<pre>git config svn.authorsfile ~/dir/myauthors.txt</pre>
<p>The next step is to fetch all the information. This is long, very long. The good news is that you can stop it and restart later.</p>
<pre>git svn fetch</pre>
<p>Once that is done, you are good to go. To update your Git repo with the new commits from SVN do</p>
<pre>git svn rebase</pre>
<p>To commit your set of local commits to SVN, do</p>
<pre>git svn dcommit</pre>
<p>Many people, especially in the open source community, consider DVCS as a bad thing because it encourages committers to keep their work locally and not share with others. In reality, it does not. People who share frequently will continue to do so, people who don&#8217;t still don&#8217;t and should be fired. Same as usual. In practice for me, I dcommit every 4 to 6 hours.</p>
<p>I do recommend to import one SVN project per Git repository. You will typically get several Git repos per SVN repo. The rule is import the biggest unit that you tag / branch in isolation in SVN. For example, for Hibernate, I&#8217;ve several Git repos:</p>
<ul>
<li>Hibernate Core (which contains all the modules)</li>
<li>Hibernate Validator</li>
<li>Hibernate Search</li>
<li>JPA API</li>
<li>Bean Validation API</li>
<li>Bean Validation TCK</li>
</ul>
<p>All of these have generally independent release cycles and version numbers. Apparently it is possible to aggregate Git repositories via the notion of superproject but I have not tried.</p>
<p>One golden rule: you cannot share a Git repository and pull changes back with someone else AND use it to commit in a SVN repository. That will be a mess because git-svn rewrites the commit unique identifiers. Forget sharing repos when you use git-svn unless you are abandoning SVN and are doing a one time import.</p>
<p><strong>Multitasking in Isolation</strong></p>
<p>The absolute coolest feature is the ability to work in total isolation on a given topic for very cheap. I am not necessarily talking about the ability to work offline on an island (though that&#8217;s nice). I am talking about the ability to work on several subjects in parallel without complex settings.</p>
<p>Let&#8217;s take an example. I was working on a new feature for Hibernate Search&#8217;s query DSL. I branched <em>master</em> to <em>dsl</em> and started to work, including committing small chunks of work (more on this later). While working on it, I found a bug in the existing query engine. No problem, I literally stopped working on the new feature, put stuff aside (git stash). created a new branch off <em>master</em> named <em>bug123</em> and fixed the bug. When I was done with the bug fix, I applied it on <em>master</em> and the <em>dsl</em> branch and resumed my work there. There is the workflow:</p>
<pre>git checkout -b dsl #create the dsl branch and move to it
#work work commit work commit work
git stash #put not yet committed stuff aside
git checkout master

git checkout -b bug123 #create bug fix branch
#work work #fix bug 123
git commit
git rebase master #apply commits of master on bug123 (not necessary in this case as I did nothing in master)

git checkout master
git merge bug123 #merge bug123 and master
git branch -d bug123 #delete the useless branch

git checkout dsl
git rebase master # apply commits of bug123
git stash pop #reapply uncommitted changes
#work</pre>
<p>It looks like a lot of operations but, it&#8217;s very fluid and very fast!</p>
<p>What&#8217;s the benefit? I&#8217;ve fixed a bug in isolation of my new feature even if the same files where impacted. I&#8217;ve committed the bug fix isolated: I can easily reapply it to maintenance branches (see below). Had I used SVN, I would have fixed the bug and committed &#8220;new feature + bug fix 123&#8243;. I would not have backported the fix to our maintenance branch nor would have my co-workers because of the complexity to separate the new feature from the bug fix. In Git the process is so smooth that I even use it to bug fix typos in comments in isolation from my main work.</p>
<p>I should point out that switching branch is super fast and done in the same directory. You IDE quickly refreshes and you are ready to work in the same IDE window. For me that&#8217;s a big plus over having to checkout a maintenance branch in a separate directory, set up my IDE and open a second IDE window to work in a different context of the same project: I work on five different projects on average, I can&#8217;t afford a proliferation of IDE windows. With Git, the context switching comes with much less friction and saves me a lot of time.</p>
<p><strong>Backporting bug fixes</strong></p>
<p>In SVN land, to backport a bug, I either:</p>
<ul>
<li>generate the patch off of the SVN commit, and apply it on a checkout of the maintenance branch</li>
<li>manually read the commit diff and select which change I want to apply (generally because somebody has committed the fix alongside a new feature or because it has committed the feature in 7 isolated commits)</li>
</ul>
<p>In the first scenario (the easiest), it involves</p>
<ul>
<li>generating the patch</li>
<li>saving it as a file</li>
<li>optionally checking out the maintenance branch (ie get a coffee)</li>
<li>opening my new IDE window</li>
<li>apply the patch</li>
<li>commit the change with a log message</li>
</ul>
<p>In Git, you:</p>
<ul>
<li>checkout the maintenance branch (2s)</li>
<li>run the cherry-pick command (git cherry-pich sha1) over the commit or commits you want to copy from the main branch (logs are copied automatically though you can change them if needed)</li>
</ul>
<p>So easy you actually do it <img src='http://blog.emmanuelbernard.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Writing better commits and commit histories<br />
</strong></p>
<p>A feature I do like is the ability to uncommit things and rewrite / rearrange them. This is something you only do on the commits you have not yet shared (in my case not yet pushed to SVN). That looks like a stupid and useless feature but it turns out I use it all the time:</p>
<ul>
<li>I can commit an unstable work, explore a couple of approaches and come back if needed</li>
<li>I can fix a typo or bad log message</li>
<li>I can simplify the commit history by merging two or more commits (I typically merge commits I used as unstable checkpoints)</li>
<li>These operations typically require 5 seconds or less</li>
</ul>
<p>The net effect of being able to do that is:</p>
<ul>
<li>I write better log messages</li>
<li>I commit more often / in smaller pieces, making my changes more readable</li>
<li>If the pieces happen to be too small I merge them before synching with SVN</li>
</ul>
<p>You can also do some more micro surgery. If you are changing code and realize that these are really two or three sets of changes and should be committed separately (changes from the the same file potentially). You can literally select which file / which line to commit. The tool GitX let&#8217;s you do that very easily.</p>
<p>Git can do that because it does not track files, it tracks changes. You can stage some changes for commit (two new files and changes in three files), continue working on the same set of files and commit the state as defined when you initially staged it. Your subsequent changes can then be committed later. This is a subtle difference of approach (content management vs file management) but now that I have used it, I like it better. As a consequence, if you change a file, these changes won&#8217;t be committed automatically next time you commit. You need to include them (that&#8217;s what the <em>-a</em> option is for when you run <em>git commit</em>).</p>
<p><strong>Resources</strong></p>
<p>I absolutely recommend you to read Pro Git:</p>
<ul>
<li>that&#8217;s a top quality book</li>
<li>use case oriented</li>
<li>and it&#8217;s also available for free online <a href="http://progit.org">http://progit.org</a> (though go buy it too, it&#8217;s well deserved)</li>
</ul>
<p>Aside from that, I do use</p>
<pre>git help <em>command</em></pre>
<p>very often, their documentation is pretty good. Otherwise, Google is your friend, there are many resources out there.</p>
<p>I don&#8217;t need / miss additional tools to work with Git. The command line is good enough and often less confusing (IntelliJ&#8217;s integration confused me, so I don&#8217;t use it unless I need to compare files). I do like to use <a href="http://gitx.frim.nl/">GitX</a> a graphical tool for two purposes:</p>
<ul>
<li>it displays branches and commits graphically</li>
<li>it lets you easily stage specific lines of a file for later commit (the micro surgery tool)</li>
</ul>
<p>That&#8217;s it folks,</p>
<p>I hope you enjoyed the read and that I&#8217;ve encouraged you to give it a try. git-svn made the try a no brainer really. I&#8217;ve lost probably 16 hours to learn, try and understand Git. I&#8217;m confident I will get them back within the next three to four months (my ROI is covered <img src='http://blog.emmanuelbernard.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). You can also try it on any directory, I am now using Git to keep a revision history of all my presentations. Remember, no need to set up a server or anything complex. Run <em>git init</em> and you are good to go.<br />
Disclaimer: this is not a thorough comparison, just the feedback of a one month old user.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.emmanuelbernard.com/2010/05/git-how-my-life-has-improved-since-last-month-when-i-used-svn/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://blog.emmanuelbernard.com/2010/05/git-how-my-life-has-improved-since-last-month-when-i-used-svn/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=git-how-my-life-has-improved-since-last-month-when-i-used-svn</feedburner:origLink></item>
		<item>
		<title>“No meeting” always beats “Meeting”</title>
		<link>http://feedproxy.google.com/~r/NoRelationTo/~3/BHVIcPa9qCM/</link>
		<comments>http://blog.emmanuelbernard.com/2010/05/no-meeting-always-beats-meeting/#comments</comments>
		<pubDate>Tue, 04 May 2010 12:54:01 +0000</pubDate>
		<dc:creator>emmanuel</dc:creator>
				<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://blog.emmanuelbernard.com/?p=124</guid>
		<description><![CDATA[I was chatting with a colleague on a feature that is lo [...]]]></description>
			<content:encoded><![CDATA[<p>I was chatting with a colleague on a feature that is loooooooong overdue and proposed to kill a meeting and use the time saved to write the damn thing.</p>
<p>He replied to me</p>
<blockquote><p>Believe me, I would like to drop a meeting, not sure which one.</p></blockquote>
<p>To which I replied</p>
<blockquote><p>That&#8217;s easy, anyone of them <img src='http://blog.emmanuelbernard.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></blockquote>
<p>and gave my thoughts on meetings.</p>
<p>If there is a need for bi-weekly meetings to integrate XXX and XXX, we&#8217;ve got a problem that meetings can&#8217;t solve.</p>
<p>I have a radical take on meetings, especially regularly scheduled meetings:</p>
<ul>
<li>assuming n persons in the meeting you waste most of the time n-2 people&#8217;s time (and if n&gt;10, it&#8217;s likely n-1 people&#8217;s time)</li>
<li>people tend to not prepare meetings. They instead think about the issue at stake while in the meeting and thus wasting n-1 people&#8217;s time. Force people to write ideas in a (somewhat short) email, and that will force them to think about the issue more deeply and synthesize.</li>
<li>a need for a regular scheduled meeting is a sign of lack of trust, lack of natural communication and/or lack of proper task isolation: in any case, better treat the problem at the source than patching with a meeting.</li>
</ul>
<p>The key to open source success is multiple but one big component is extreme resource/time stress. This constraint leads to:</p>
<ul>
<li>very focused teams</li>
<li>limited need for sync-up style communication (hence the usual small core team)</li>
<li>proper separation of tasks to limit waste</li>
</ul>
<p>I am not against communication, I am against communication wasting time (the asymptotic version being pure noise). I favor 1-1 communication personally as the most efficient brain-picking strategy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.emmanuelbernard.com/2010/05/no-meeting-always-beats-meeting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.emmanuelbernard.com/2010/05/no-meeting-always-beats-meeting/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=no-meeting-always-beats-meeting</feedburner:origLink></item>
		<item>
		<title>Automatically lock your computer when you go away</title>
		<link>http://feedproxy.google.com/~r/NoRelationTo/~3/_gpP_E1H4ag/</link>
		<comments>http://blog.emmanuelbernard.com/2010/04/automatically-lock-your-computer-when-you-go-away/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 19:19:19 +0000</pubDate>
		<dc:creator>emmanuel</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[apple]]></category>

		<guid isPermaLink="false">http://blog.emmanuelbernard.com/?p=116</guid>
		<description><![CDATA[If you are like me, your colleagues like to pown you wh [...]]]></description>
			<content:encoded><![CDATA[<p>If you are like me, your colleagues like to pown you when you leave your laptop unlocked. Here is a super easy solution to lock your Mac automatically when you leave it: if your cellphone is out of bluetooth range, lock your computer. Easy, efficient.</p>
<p>Here is how to do it:</p>
<ul>
<li>Download <a href="http://code.google.com/p/reduxcomputing-proximity/">Proximity</a>: this application does detect bluetooth devices and lets you launch scripts upon detection or absence of detection (download page <a href="http://code.google.com/p/reduxcomputing-proximity/downloads/list">here</a>).</li>
<li>Copy Proximity.app in /Applications</li>
<li>Start the Proximity.app and open its preference panel (the application adds itself to the menu bar next to your clock)</li>
<li>Reduce the device monitoring to 30s or so (less time for your colleagues to mess around)</li>
<li>Add the device (the device needs to be linked with your computer bluetooth, you can do that in System Preference)</li>
<li>Add an AppleScript that will be run when your cellphone goes out of range (see below)</li>
<li>Optionally add an AppleScript that will be run when your cellphone goes back in range</li>
</ul>
<p>The AppleScript to lock your computer is pretty simple. Create a file name out-of-range.scpt and add:</p>
<pre>-- out-of-range.scpt

tell application "ScreenSaverEngine" to activate</pre>
<p>You can do many more things in these AppleScripts like:</p>
<ul>
<li>change your Adium and Skype status</li>
<li>unlock your screen when you come back in range</li>
</ul>
<p>This <a href="http://www.technocrat.ca/?p=44">other blog entry</a> has a fairly compete setting example. I personally purposely do not unlock the screen when I come back in range. It&#8217;s safer to ask for the password explicitly incase someone&#8230; borrows your cellphone.</p>
<p>Unlike some more complex apps, Proximity is pretty simple and does not let you decide at which range a bluetooth device is considered out-of-range. The good thing is that it is pretty soft on your cellphone battery.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.emmanuelbernard.com/2010/04/automatically-lock-your-computer-when-you-go-away/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.emmanuelbernard.com/2010/04/automatically-lock-your-computer-when-you-go-away/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=automatically-lock-your-computer-when-you-go-away</feedburner:origLink></item>
		<item>
		<title>Book review: JBoss AS 5 Development by Francesco Marchioni</title>
		<link>http://feedproxy.google.com/~r/NoRelationTo/~3/hVYkqbiL8Go/</link>
		<comments>http://blog.emmanuelbernard.com/2010/03/book-review-jboss-as-5-development-by-francesco-marchioni/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 09:12:54 +0000</pubDate>
		<dc:creator>emmanuel</dc:creator>
				<category><![CDATA[book]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://blog.emmanuelbernard.com/?p=111</guid>
		<description><![CDATA[I've been reading JBoss AS 5 Development by Francesco M [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading <a href="https://www.packtpub.com/jboss-as-5-development/book">JBoss AS 5 Development</a> by Francesco Marchioni published by Packt Publishing. I must say that I quite enjoyed the book because it is complementing my knowledge perfectly.</p>
<p>I know Java EE 5 and 6 quite well, I&#8217;ve been working on it, promoting it, yada yada yada. But when it comes to details on how to configure JBoss AS beyond the standard and the EE programmatic model, my knowledge leaves a lot to be desired.</p>
<p><strong>Good for:</strong></p>
<p>If you want to know how to:</p>
<ul>
<li>change the HTTP port</li>
<li>create two independent clusters on a single network</li>
<li>customize the thead pools of your HTTP requests, EJB 3 components etc</li>
<li>tweak the transaction manager</li>
<li>secure your JBoss AS installation</li>
<li>etc</li>
</ul>
<p>This book is a gold mine. Using the index or the table of content, you will reach the information in a minute.</p>
<p>If you want to know how the JBoss Tools can help you:</p>
<ul>
<li>create an application</li>
<li>deploy / undeploy apps</li>
<li>add new components, pages</li>
<li>etc</li>
</ul>
<p>This book will give you nice how-tos that will hold your hands from tooling installation to configuration and wizard usage.</p>
<p>Francesco also explains the basics of the EE programmatic model. This is quite handy as it helps you to kink a configuration trick to an application behavior: all configurations are described with how they impact your application behavior and what it means if you change them.</p>
<p><strong>Not good for:</strong></p>
<p>If you are looking for a book that explain the Java EE programmatic model and development practice in detail, this is not the book for you. You&#8217;re better off looking at Seam in Action or any other EE targeted book.</p>
<p>I will keep the book next to me when I develop and deploy on JBoss AS. Finding the right config or tuning will be much faster than a reckless Google search <img src='http://blog.emmanuelbernard.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Reading this book, you feel that Francesco uses every bits of JBoss AS, loves it and wants to share his knowledge. Keep going <img src='http://blog.emmanuelbernard.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Disclosure: Swati from Packt Publishing sent me the book for free. I stand by what I said in this blog though.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.emmanuelbernard.com/2010/03/book-review-jboss-as-5-development-by-francesco-marchioni/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.emmanuelbernard.com/2010/03/book-review-jboss-as-5-development-by-francesco-marchioni/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=book-review-jboss-as-5-development-by-francesco-marchioni</feedburner:origLink></item>
		<item>
		<title>Getter / Setter generation in Java</title>
		<link>http://feedproxy.google.com/~r/NoRelationTo/~3/CFUN4qkiazs/</link>
		<comments>http://blog.emmanuelbernard.com/2010/03/getter-setter-generation-in-java/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 10:32:54 +0000</pubDate>
		<dc:creator>emmanuel</dc:creator>
				<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://blog.emmanuelbernard.com/?p=88</guid>
		<description><![CDATA[Eclipse or IntelliJ typically generate getters and sett [...]]]></description>
			<content:encoded><![CDATA[<p>Eclipse or IntelliJ typically generate getters and setters this way:</p>
<pre>public class Month {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}</pre>
<p>And we all complain because that consumes a lot of screen space (9 lines). Provided that the trio attribute / getter / setter really represents a unique property, why not generate it that way?</p>
<pre>public class Month {

    public String getName() { return this.name; }
    public void setName(String name) { this.name = name; }
    private String name;

}</pre>
<p>That&#8217;s much more compact (3 lines, ie a third of what we had) and put all related constructs as a single block. You can also mutualize the JavaDoc for free <img src='http://blog.emmanuelbernard.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
What do you think?</p>
<p>Oh and please don&#8217;t tell me about Scala, Groovy or Fantom, we all know Java should have had first-class properties. But that&#8217;s life.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.emmanuelbernard.com/2010/03/getter-setter-generation-in-java/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		<feedburner:origLink>http://blog.emmanuelbernard.com/2010/03/getter-setter-generation-in-java/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=getter-setter-generation-in-java</feedburner:origLink></item>
		<item>
		<title>Podcast part I: recording</title>
		<link>http://feedproxy.google.com/~r/NoRelationTo/~3/Ez8DDb223YY/</link>
		<comments>http://blog.emmanuelbernard.com/2010/02/podcast-part-i-recording/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 16:20:28 +0000</pubDate>
		<dc:creator>emmanuel</dc:creator>
				<category><![CDATA[podcast]]></category>

		<guid isPermaLink="false">http://blog.emmanuelbernard.com/?p=82</guid>
		<description><![CDATA[I have been producing podcasts for almost a year now, p [...]]]></description>
			<content:encoded><![CDATA[<p>I have been producing podcasts for almost a year now, primarily at <a href="http://lescastcodeurs.com">Les Cast Codeurs</a> (a French podcast on Java) but also helped a bit on <a href="http://asylum.jboss.org">JBoss Community Asylum Podcast</a>.</p>
<p>I have been wanting to share my knowledge and experience for a little while now. I&#8217;ll split that in three parts:</p>
<ul>
<li>recording</li>
<li>mixing</li>
<li>publishing</li>
</ul>
<p>First things first then, for today the recording.</p>
<p><strong>The material</strong></p>
<p><em>Microphone</em></p>
<p>I use the <a href="http://www.bluemic.com/snowball/">Snowball</a> from Blue Microphones and am very very happy with it. The sound is great, I can also carry it with me to do interviews as it has an option for 360° recording. It plugs into my USB port, is self powered and looks gorgeous on my desk <img src='http://blog.emmanuelbernard.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>But in all reality, any USB microphone will do. For a long time I have been using the <a href="http://www.amazon.com/Plantronics-Foldable-USB-Optimized-470/dp/B000VVXO7E">Plantronics 470 USB</a>. The nice thing about this model is that it&#8217;s foldable and fits nicely in a traveler&#8217;s bag. Note that my version has a small bug: sometimes, after an hour or so of recording, the sound gets mangled. What I need to do is to unplug and replug the USB dongle. Hopefully, this annoying bug is no more in recent versions.</p>
<p><em>Skype</em></p>
<p>If you can, all meet in the same room to record your podcast. First, it&#8217;s nice to see people but more importantly, it will make the mixing work much much easier (see next post).</p>
<p>If you cannot, no problem, Skype is indeed surprisingly good to produce podcast. Just make sure everyone is on a decent connection and preferably on ethernet rather than WiFi. Oh and do not start the video, that will save some bandwidth and audio quality.</p>
<p><strong>Recording</strong></p>
<p><em>Recording strategy</em></p>
<p>There are two schools here.</p>
<ul>
<li>Record the sound on one computer: basically the sound coming out of Skype</li>
<li>Record each podcast speaker locally (while speaking on skype) and mix the tracks together down the road.</li>
</ul>
<p>The former is good in that it reduces the amount of mixing you have to do down the road. But it has a few drawbacks:</p>
<ul>
<li>the sound quality won&#8217;t be as good as the second approach as you are dependent on Skype&#8217;s instant quality. While it&#8217;s easy to recover missing words from a conversation while *into* it, it&#8217;s quite tedious when you are listening to a podcast.</li>
<li>people tend to speak at the same time on skype. Since you don&#8217;t have instant visual feedback, it&#8217;s quite common to speak at the same time create a lovely cacophony.</li>
</ul>
<p>You can record the Skype flux with tools like <a href="http://www.rogueamoeba.com/audiohijackpro/">Audio Hijack Pro</a> (on Mac, $32). There are free alternatives but simplicity is key for me and avoid mistakes (like not recording).</p>
<p>The second approach (ie. recording each local voice while speaking on skype) is pretty easy to set up but requires everyone to record locally. The easiest solution is to download <a href="http://audacity.sourceforge.net/">Audacity</a> (free and open source) and ask everyone to click on the record button.</p>
<p>Right before starting the podcast, make sure to have a common signal to sync the various tracks. I usually count down (3, 2, 1) and everybody say zero at the same time. And voilà, I&#8217;ve got my mark. Also ask everybody to stay silent for a couple of seconds: that will come handy during the mixing phase.</p>
<p>I personally ask everyone to record locally. I also record my Skype flux as a backup. It&#8217;s quite painful to have to re-record a podcast, so better avoid it.</p>
<p>PS: if someone can record the sound coming from Skype AND the local sound from my mic in the same file via Audio Hijack Pro, let me know. I know it&#8217;s possible but for some reason it does not work for me (not a huge problem as it&#8217;s not my workflow).</p>
<p><em>Recording format</em></p>
<p>Make sure to record in a non destructive format like WAV or AIFF. The reason is that you will apply a bunch of mixing tricks down the road and getting the real bits are going to help. The size is going to be roughly 700 MB per hour and per person.</p>
<p>What you can do to cut down the hard drive and bandwidth bill is to use the FLAC format that is a non-descructive compressed audio format. I personally use <a href="http://sbooth.org/Max/">Max</a> a free audio converter tool for Mac OS to convert my WAV or AIIF into FLAC. One hour of recording then goes down to 200 MB (around 4 times the MP3 equivalent). Audacity also can record in FLAC nateively in the latest beta version.</p>
<p><em>Backup</em></p>
<p>If you use the local recording approach, do yourself a favor, create a <a href="https://www.dropbox.com/referrals/NTY5MjMxODk">Dropbox account</a>. It&#8217;s free for up to 2 GB, it&#8217;s a breeze to share files with others even my mother can do it: Dropbox materialized itself as a local directory synchronized in the cloud and subdirectories are sharable. The link I gave is a referral link and you get an extra 250 MB free if you use it.</p>
<p>Anyway, all the podcast participants must send you their audio file. Make sure to back them up right away (yes I know I&#8217;m paranoid). One solution is to leave them on Dropbox while you are mixing them on a different copy.</p>
<p><strong>Other</strong></p>
<p>That&#8217;s pretty much it for the technical side of it. Make sure to have fun when doing your podcast. You&#8217;ll be happier, people will notice the more natural tone and you will be more popular.</p>
<p>Another trick is regularity: record your podcast regularly. It could be once a week, once every two weeks, once a month. That will set your listeners expectations. Make sure not to overestimate your commitment: one a month is big enough. As you will see in the mixing blog post, it&#8217;s a lot of work especially when you are a beginner. It&#8217;s not unheard of to spend 6 or 7 times the final podcast length to record and publish it.</p>
<p>The second part will be about Mixing your podcast.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.emmanuelbernard.com/2010/02/podcast-part-i-recording/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://blog.emmanuelbernard.com/2010/02/podcast-part-i-recording/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=podcast-part-i-recording</feedburner:origLink></item>
		<item>
		<title>JSF Days 2010 Tomorrow and Wednesday</title>
		<link>http://feedproxy.google.com/~r/NoRelationTo/~3/0w3xZutQqfc/</link>
		<comments>http://blog.emmanuelbernard.com/2010/02/jsf-days-2010-tomorrow-and-wednesday/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 10:42:24 +0000</pubDate>
		<dc:creator>emmanuel</dc:creator>
				<category><![CDATA[conference]]></category>

		<guid isPermaLink="false">http://blog.emmanuelbernard.com/?p=79</guid>
		<description><![CDATA[If the gods of French and German strikes allow me, I wi [...]]]></description>
			<content:encoded><![CDATA[<p>If the gods of French and German strikes allow me, I will be speaking at the <a href="http://jsfdays.irian.at/main/index.jsf">JSF Days conference</a> organized by Irian.</p>
<p>I will first talk about Hibernate Search and how the magic of approximation works in Full-text search and the next day I will cover Bean Validation and how it integrates in the Java ecosystem and <a href="http://www.jboss.org/jbossas">JBoss AS 6</a> Milestone 2.</p>
<p>Come and say hi if you are in the Vienna area.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.emmanuelbernard.com/2010/02/jsf-days-2010-tomorrow-and-wednesday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.emmanuelbernard.com/2010/02/jsf-days-2010-tomorrow-and-wednesday/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=jsf-days-2010-tomorrow-and-wednesday</feedburner:origLink></item>
	</channel>
</rss>
