<?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>The Telio Blog &#187; All</title>
	<atom:link href="http://www.telio.be/blog/category/all/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.telio.be/blog</link>
	<description>&#34;Du choc des idées jaillit la lumière&#34;</description>
	<lastBuildDate>Mon, 15 Mar 2010 16:47:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>&#8220;Gestion Documentaire Agile&#8221; Telemis TTT 18/06/2009</title>
		<link>http://www.telio.be/blog/2009/07/06/gestion-documentaire-agile-telemis-ttt-18062009/</link>
		<comments>http://www.telio.be/blog/2009/07/06/gestion-documentaire-agile-telemis-ttt-18062009/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 13:53:07 +0000</pubDate>
		<dc:creator>Pierre Florent</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Gestion électronique des documents (GED)]]></category>

		<guid isPermaLink="false">http://www.telio.be/blog/2009/07/06/gestion-documentaire-agile-telemis-ttt-18062009/</guid>
		<description><![CDATA[Voici une présentation sur la gestion documentaire agile donnée lors des TTT chez Telemis




PFL
]]></description>
			<content:encoded><![CDATA[<p>Voici une présentation sur la gestion documentaire agile donnée lors des <a href="http://www.telemis.com/content/default.asp?id=6281" title="Telemis TTT">TTT</a> chez Telemis</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/QV-lzPEUFNQ&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/QV-lzPEUFNQ&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/WY2EZd6Lp5g&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/WY2EZd6Lp5g&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/mn6PBqZTyo8&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/mn6PBqZTyo8&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/oBmtc-0Ztzo&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/oBmtc-0Ztzo&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>PFL</p>
]]></content:encoded>
			<wfw:commentRss>http://www.telio.be/blog/2009/07/06/gestion-documentaire-agile-telemis-ttt-18062009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paperless Office using the Fujitsu ScanSnap S510 on OS X</title>
		<link>http://www.telio.be/blog/2008/11/21/paperless-office-using-the-fujitsu-scansnap-s510-on-os-x/</link>
		<comments>http://www.telio.be/blog/2008/11/21/paperless-office-using-the-fujitsu-scansnap-s510-on-os-x/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 18:06:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.telio.be/blog/2008/11/21/paperless-office-using-the-fujitsu-scansnap-s510-on-os-x/</guid>
		<description><![CDATA[I have been using the Fujitsu ScanSnap S510M at home for about 6 month now and it has given very good results. We are now scanning everything and it already saved my life a couple of times (i might be exagerating a bit  &#160;To get good results, the scanner is not enough. I use [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using the Fujitsu ScanSnap S510M at home for about 6 month now and it has given very good results. We are now scanning everything and it already saved my life a couple of times (i might be exagerating a bit <img src='http://www.telio.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <br />&nbsp;<br />To get good results, the scanner is not enough. I use <a href="http://www.devon-technologies.com/products/devonthink/index.html">DevonThink Office Pro</a> which integrates IRIS OCR which gives very good results. </p>
<p>At the office however we are of course using PC&#8217;s and so I had bought the S510 (1 week after the S510M) version of the Fujitsu ScanSnap, but I must say I never really used it because I have not found a viable equivalent of DevonThink. It was also a nightmare since you had to wait for a &#8220;scan&#8221; to be completed (physical scan+PDF+OCR) before you could scan something else.<br />&nbsp;<br />But now that I made &#8220;<a href="http://www.telio.be/blog/2008/11/10/the-switch/">the switch</a>&#8220;, I could finally install DevonThink on mac and go paperless at the office !</p>
<p>The only issue was that the ScanSnap S510 is for PC only and is not supposed to be used with a Mac. But after searching on the internet I found this <a href="http://www.themaclawyer.com/the_mac_lawyer/2007/08/i-previously-po.html">nice article</a> explaining how to get it to work anyway.</p>
<p>Here are the steps summarized : 
<ol>
<li>Download <a href="http://scansnap.fujitsu.com/downloads/jp/jscan/driver/data/105-intel/ScanSnap_V21L20.dmg">ScanSnap_V21L20.dmg</a> from the Fujitsu Japanese website (Japanese version)</li>
<li>Download <a href="http://www.fujitsu.com/downloads/COMP/fcpa/scanners/drivers/ScanSnap_V21L11.dmg">ScanSnap_V21L11.dmg</a> from this link (English version)</li>
<li>Install Japanese package completely</li>
<li>Explore contents of English package and replace the language resources as mentionned in <a target="_blank" href="http://forums.macosxhints.com/showthread.php?t=32046&amp;page=7">this article</a></li>
<li>Restart ScanSnap Manager and it will be in english</li>
</ol>
<p>Now you can choose to install the software of your choice. If you need OCR, nothing rivals DevonThink Pro. If you don&#8217;t need OCR and prefer plain tagging, you can try Yep! or something alike.</p>
<p>Pierre</p>
]]></content:encoded>
			<wfw:commentRss>http://www.telio.be/blog/2008/11/21/paperless-office-using-the-fujitsu-scansnap-s510-on-os-x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quote of the day #1</title>
		<link>http://www.telio.be/blog/2008/11/21/quote-of-the-day-1/</link>
		<comments>http://www.telio.be/blog/2008/11/21/quote-of-the-day-1/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 17:20:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.telio.be/blog/2008/11/21/quote-of-the-day-1/</guid>
		<description><![CDATA[A complex system that works is invariably found to have evolved from
a simple system that worked. A complex system designed from scratch
never works and cannot be patched up to make it work. You have to start
over, beginning with a working simple system.
—John Gall
seen on Signal vs. Noise
]]></description>
			<content:encoded><![CDATA[<p>A complex system that works is invariably found to have evolved from<br />
a simple system that worked. A complex system designed from scratch<br />
never works and cannot be patched up to make it work. You have to start<br />
over, beginning with a working simple system.</p>
<p>—John Gall</p>
<p>seen on <a href="http://www.37signals.com/svn/posts/1414-a-complex-system-that-works-is-invariably">Signal vs. Noise</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.telio.be/blog/2008/11/21/quote-of-the-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The switch</title>
		<link>http://www.telio.be/blog/2008/11/10/the-switch/</link>
		<comments>http://www.telio.be/blog/2008/11/10/the-switch/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 08:47:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.telio.be/blog/2008/11/10/the-switch/</guid>
		<description><![CDATA[After a first unsuccessful trial, I finally dumped my dell laptop and started working on a Macbook Pro 15&#8221;.
And I must say that I am still amazed at how things just work. Here is my setup :
Hardware :

Macbook Pro 15&#8221; 4Gb Ram, 320Gb HD 7200 rpm

Software installed : 

PathFinder as file browser
IntelliJ as Java IDE
Skitch
Things [...]]]></description>
			<content:encoded><![CDATA[<p>After a first unsuccessful trial, I finally dumped my dell laptop and started working on a Macbook Pro 15&#8221;.</p>
<p>And I must say that I am still amazed at how things just work. Here is my setup :</p>
<p><strong>Hardware :<br />
</strong><br />
Macbook Pro 15&#8221; 4Gb Ram, 320Gb HD 7200 rpm<br />
<strong><br />
Software installed : </strong></p>
<ol>
<li>PathFinder as file browser</li>
<li>IntelliJ as Java IDE</li>
<li>Skitch</li>
<li>Things (synced with iPhone)</li>
<li>Adium (IM)</li>
<li>Firefox</li>
<li>Smultron (Text editor)</li>
<li>SugarSync (sync files betweek multiple laptops)</li>
<li>Parallels (to run windows, see more below)</li>
<li>Text Expander (this is a must have ..)</li>
<li>Witch (faster app switcher)</li>
</ol>
<p><strong>Specific challenges </strong></p>
<p>I need to be able to run Oracle. After a quick search I decided that I would run it under parallels since the same customer I need Oracle for, also requires me to connect to their network using a specific Connectra client which does not work for Leopard (yet?).</p>
<p>I first installed a bootcamp partition, but quicky switched to a complete virtual disk since I can&#8217;t &#8220;pause&#8221; the bootcamp partition under parallels and I don&#8217;t see why I would need to boot natively in windows.</p>
<p>That was basically the only challenge. Everything else works like a charm.</p>
<p>Printers were detected automatically, windows shares are already there. VPN (PPTP) connection is the matter of entering host / username / password ..</p>
<p>Never got that to work as fast in windows ..</p>
<p><strong>To do</strong></p>
<p>Learn to use Quicksilver. It seems and feels productive but the learning curve looks a little steep to me.<br />
Get all my iPhone synchronisation in place (contacts, calendar, iTunes, &#8230;)</p>
<p>Pierre</p>
]]></content:encoded>
			<wfw:commentRss>http://www.telio.be/blog/2008/11/10/the-switch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WTF/min</title>
		<link>http://www.telio.be/blog/2008/10/28/wtfmin/</link>
		<comments>http://www.telio.be/blog/2008/10/28/wtfmin/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 11:40:51 +0000</pubDate>
		<dc:creator>plosson</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.telio.be/blog/2008/10/28/wtfmin/</guid>
		<description><![CDATA[Just bought the &#8220;Clean Code&#8221; book from Amazon and while browsing through it, I came across this picture.
This can&#8217;t be closer from the truth : 

Pierre
]]></description>
			<content:encoded><![CDATA[<p>Just bought the &#8220;Clean Code&#8221; book from <a href="http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882">Amazon</a> and while browsing through it, I came across this picture.</p>
<p>This can&#8217;t be closer from the truth : </p>
<p><img style="max-width: 800px;" src="http://www.telio.be/blog/wp-content/uploads/2008/10/wtf-metric-3.jpg"  / rel="lightbox[roadtrip]"></p>
<p>Pierre</p>
]]></content:encoded>
			<wfw:commentRss>http://www.telio.be/blog/2008/10/28/wtfmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not so far from the (future) truth &#8230;</title>
		<link>http://www.telio.be/blog/2008/10/12/not-so-far-from-the-future-truth/</link>
		<comments>http://www.telio.be/blog/2008/10/12/not-so-far-from-the-future-truth/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 09:54:38 +0000</pubDate>
		<dc:creator>plosson</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.telio.be/blog/2008/10/12/not-so-far-from-the-future-truth/</guid>
		<description><![CDATA[The jobpar trescourt
]]></description>
			<content:encoded><![CDATA[<div><object width="420" height="339"><param name="movie" value="http://www.dailymotion.com/swf/k1Z6mLABmvpzV8MYtK" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://www.dailymotion.com/swf/k1Z6mLABmvpzV8MYtK" type="application/x-shockwave-flash" width="420" height="339" allowFullScreen="true" allowScriptAccess="always"></embed></object><br /><b><a href="http://www.dailymotion.com/swf/k1Z6mLABmvpzV8MYtK">The job</a></b><br /><i>par <a href="http://www.dailymotion.com/trescourt">trescourt</a></i></div>
]]></content:encoded>
			<wfw:commentRss>http://www.telio.be/blog/2008/10/12/not-so-far-from-the-future-truth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s put Hibernate to sleep ?</title>
		<link>http://www.telio.be/blog/2008/10/08/lets-put-hibernate-to-sleep/</link>
		<comments>http://www.telio.be/blog/2008/10/08/lets-put-hibernate-to-sleep/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 10:44:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.telio.be/blog/2008/10/08/lets-put-hibernate-to-sleep/</guid>
		<description><![CDATA[Don&#8217;t get me wrong, Hibernate is a great tool written by very smart people, but I keep wondering how this technology has become so popular.
Maybe it&#8217;s just me, but for the past 3 years now I have not come across one single developer that grasps half of the concepts needed to understand how Hibernate works. [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t get me wrong, Hibernate is a great tool written by very smart people, but I keep wondering how this technology has become so popular.</p>
<p>Maybe it&#8217;s just me, but for the past 3 years now I have not come across one single developer that grasps half of the concepts needed to understand how Hibernate works. They use it and don&#8217;t understand it.</p>
<p>This is a trend I have been witnessing more and more. Developers pick a technology because it is the hype of the moment, start to use it, get a hard time to get it to do what they want, <strong>but keep using it</strong> and advocate it. Probably because they don&#8217;t want to admit to the world they don&#8217;t understand it.</p>
<p>This is in my opinion what makes Hibernate (and the like) so popular.</p>
<p>To illustrate my point, we were just contracted by one of our customers to take over the maintenance of a codebase written by another company.</p>
<p>I will make no comment on the code itself, since I tend not to judge code written by others since code is always written in a specific &#8220;context&#8221; and, in my opinion, can not be judged without knowing that context.</p>
<p>The main complaint of the customer was that the application was getting slow. He had to wait from 5 minutes to 15 minutes to get one specific screen to dispay (I am not exagerating).</p>
<p>So we started  a code analysis and had the chance to witness exactly what I was mentioning above. All the code was written exactly as if practice existed in &#8220;theory&#8221;.</p>
<p>The application had a magnificent (ironic) data model with 50 tables (entirely generated by Hibernate). An object graph sometimes 5 or 6 level deep.</p>
<p>While looking at it, I could hear the developer say on day 1 : Wouaw, this is so cool &#8230; I can do getEmployee().getDepartment().getRegion().getXXXX().getYYY().add(new ZZZ()) .. and it all works ..</p>
<p>And then the nightmare begins : lazy loading, hibernate session (open session in view issues), object identity, HQL, slow queries, etc ..</p>
<p>And so the developer (which never abandons) tries to &#8220;understand&#8221; by finding workarounds, tricks, breaks his architecture and does everything that is needed to make this nightmare work.</p>
<p>And so in day 15 (or 200 depending on the company you work for) : the code works (or seems to work) and nobody can touch it anymore because nobody understands it (except of course the main developer).</p>
<p>In our case, in production with real data (1.000.000 records or so &#8211; which is not even that big) the application is &#8220;curiously&#8221; verrrrrry slow ..</p>
<p>Just turning on the &#8220;show sql&#8221; in hibernate generated 3 Mb logs on every click &#8230;</p>
<p>The conclusion here is that, in my opinion, it is not a good idea to try to &#8220;hide&#8221; your database behind a &#8220;magic&#8221; object model. Even if Hibernate does its best to achieve just that, I think the challenge is not worth it .. The database will always pop back on you .. So embrace it ..</p>
<p>So we decided to remove the Hibernate layer and replaced it with IBatis. Hopefully the code was well structured and we were able to replace the Hibernate DAO layer by and equivalent (somewhat adapted) IBatis layer but not touching the above service layers.</p>
<p>When we choose a technology, we usually expect the following :</p>
<ul>
<li>It should pass the 10 minute test</li>
<li>The learning curve should not be too steep</li>
<li>It should serve a specific purpose and serve it well</li>
<li>The technology should be <strong>understandable</strong> by a junior developer after 30 min introduction</li>
</ul>
<p>Pierre</p>
]]></content:encoded>
			<wfw:commentRss>http://www.telio.be/blog/2008/10/08/lets-put-hibernate-to-sleep/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What do they learn in school ?</title>
		<link>http://www.telio.be/blog/2008/09/02/what-do-they-learn-in-school/</link>
		<comments>http://www.telio.be/blog/2008/09/02/what-do-they-learn-in-school/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 18:03:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.telio.be/blog/2008/09/02/what-do-they-learn-in-school/</guid>
		<description><![CDATA[In the past year we hired two junior java developers and I am starting to wonder what they really learn in school. Don&#8217;t get me wrong, we are more than happy with our new collegues but since I am starting to get to know them very well by now I am entitled to raise this [...]]]></description>
			<content:encoded><![CDATA[<p>In the past year we hired two junior java developers and I am starting to wonder what they really learn in school. Don&#8217;t get me wrong, we are more than happy with our new collegues but since I am starting to get to know them very well by now I am entitled to raise this issue.</p>
<p>Note: we don&#8217;t hire college graduates (they are too expensive) but developers who took 3 years of IT courses (called graduate school here in Belgium).</p>
<p>When they start at TELIO, we usually assign them with a simple and well defined project just mentionning the technologies they have to use. For the rest they are free to use and do things the way they want to.</p>
<p>This allows us to evaluate their strong and weak points and see how to do things and specifically how they react to a technical stack they don&#8217;t know.</p>
<p>Well, it&#8217;s a great experience but sometimes a sad one &#8230;</p>
<p>Here are some thing they don&#8217;t know :</p>
<p><strong>Theory</strong></p>
<ul>
<li>They have a very vague view of network protocols that basically run the world today (TCP/IP, DNS, HTTP, SMT, etc ..)</li>
<li>They never heard of the word &#8220;socket&#8221; except at the store by two size 42 ..</li>
<li>They don&#8217;t clearly understand what a server / client model is</li>
<li>They have absolutely no understanding on how HTTP works and more generally what happens &#8220;behind the scenes&#8221; when you click on a link in a web page.</li>
</ul>
<p><strong>Practice</strong></p>
<ul>
<li>They have never used (or sometimes even heard) of Ant</li>
<li>They have never used (or sometimes even heard) of a version control system.</li>
<li>They rename classes by hand and don&#8217;t use &#8220;refactoring&#8221; that is supported by their favorite IDE.</li>
<li>If you ask them to work outside their favorite IDE they are completely lost.</li>
<li>They rarely have the reflex to &#8220;google&#8221; for something, they prefer trial and error ..</li>
<li>Debugging = System.out .. they have never used a debugger (even inside the IDE) so don&#8217;t even think about attaching to a remote JVM.</li>
</ul>
<p>Now based on that my question is : What the h&#8230; do they learn in school during these 3 years.</p>
<p>Here is a list of things they know :</p>
<ul>
<li>Run tomcat inside the IDE &#8211; but have no clue that it can run as a standalone application. Sometimes they even think it&#8217;s part of NetBeans, Eclipse etc ..</li>
<li>The &#8220;theory&#8221; of object orientation, forget about practice.</li>
<li>They &#8220;know&#8221; hibernate .. at least they think they do .. I personnaly don&#8217;t understand how you could honestly say you &#8220;understand&#8221; hibernate when you don&#8217;t know what ORM stands for or have a basic understanding of databases.</li>
<li>They &#8220;know&#8221; struts 2 (or 1) and they love using the word MVC and always try to figure out if what they are coding fits the MVC definition (or what they remember of it)</li>
</ul>
<p>The list goes on and on. Now they are not to blame (their teachers are) but this does not reassure me on the quality of the IT resources coming out of our education system.</p>
<p>In about 2 weeks however we try to get them going.</p>
<p>The most important thing for <em>them</em> is to :</p>
<ol>
<li><strong>Admit</strong> (even if it&#8217;s sometimes hard) that they did not learn anything in school</li>
<li><strong>Realize</strong> that they are capable of learning anything they want if they trade &#8220;using&#8221; against &#8220;understanding&#8221; ..</li>
</ol>
<p>Computer science is about fundamentals and basics. If you get the basics you can grasp almost anything. And the basics are simple, so computer science is simple.</p>
<p>But all these juniors seem afraid of looking under the hood, not because they were told not to, just because they were told they would not be capable of understanding what they would find.</p>
<p>That&#8217;s a shame.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.telio.be/blog/2008/09/02/what-do-they-learn-in-school/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting the file owner in Java using JNI</title>
		<link>http://www.telio.be/blog/2007/06/26/getting-the-file-owner-in-java-using-jni/</link>
		<comments>http://www.telio.be/blog/2007/06/26/getting-the-file-owner-in-java-using-jni/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 08:57:11 +0000</pubDate>
		<dc:creator>plosson</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.telio.be/blog/2007/06/26/getting-the-file-owner-in-java-using-jni/</guid>
		<description><![CDATA[Since i needed this for a project, I thought it was worth a post.
Basically I needed to watch a directory for incoming files and perform a given action based on the owner of the file, in Java.
For the polling part, no problem, but how can I get the owner of a file in Java ? [...]]]></description>
			<content:encoded><![CDATA[<p>Since i needed this for a project, I thought it was worth a post.</p>
<p>Basically I needed to watch a directory for incoming files and perform a given action based on the <strong>owner </strong>of the file, in Java.</p>
<p>For the polling part, no problem, but how can I get the owner of a file in Java ? Well after 1 hour searching the internet and concluding that :</p>
<ul>
<li>It is not possible in pure Java at least up to 1.5</li>
<li>It should be done using native code through JNI</li>
</ul>
<p>I decided to give it a shot since I had another hour in front of me. Here a the steps I followed :</p>
<p>1. Try to find some code that does this in C++ : <a href="http://msdn2.microsoft.com/en-us/library/aa446629.aspx" title="http://msdn2.microsoft.com/en-us/library/aa446629.aspx">http://msdn2.microsoft.com/en-us/library/aa446629.aspx</a></p>
<p>2. Try to compile this code <img src='http://www.telio.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Since I have no Visual Studio or other C++ IDE, let&#8217;s go find one .. :</p>
<p><a href="http://www.bloodshed.net/devcpp.html">http://www.bloodshed.net/devcpp.html</a></p>
<p>3. Install Dev++ and compile the code .. and to my great surprise, it works (I must say I have bad college memories about C++, compilers, make files, compiler directives, etc&#8230;)</p>
<p>4. Now let&#8217;s tackle the JNI part .. since I never used JNI before (but know what it&#8217;s about), I type &#8216;jni tutorial&#8217; in google .. and find :</p>
<p><a href="http://www.codetoad.com/java_simpleJNI.asp">http://www.codetoad.com/java_simpleJNI.asp</a></p>
<p>I chose this page because it seemed to have an example of passing a String parameter and getting back a String result &#8211; which is exactly what I need since I will pass a file path and get back the file owner.</p>
<p>5. Create a java class</p>
<pre lang="java">
import java.io.*;
public class getowner
{
	private static native String getowner(String arg);
        public static void main(String[] args)
	{
	 	System.load("c:/temp/java/getowner.dll");
		File f = new File(args[0]);
		File[] children = f.listFiles();
		for (int i=0; i &lt; children.length;i++)
		{
			if (children[i].isFile())
				System.out.println(getowner(children[i].getPath()));
	 	}
	}
}</pre>
<p>6. Compile the class and generate the header file using javah</p>
<pre lang="bash">javac getowner.java</pre>
<pre lang="bash">javah getowner</pre>
<p>Which generates the following header file :</p>
<pre lang="cpp">
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class getowner */

#ifndef _Included_getowner
#define _Included_getowner
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     getowner
 * Method:    getowner
 * Signature: (Ljava/lang/String;)Ljava/lang/String;
 */
JNIEXPORT jstring JNICALL Java_getowner_getowner
  (JNIEnv *, jclass, jstring);

#ifdef __cplusplus
}
#endif
#endif
</jni.h></pre>
<p>7. Write the implementation by modifying the code used in step 2</p>
<p>(see attachment for the complete source code)</p>
<p>8. Compile the whole thing, don&#8217;t forget in the project settings to add 2 include directories pointing to the JDK <strong>include</strong> and <strong>include/win32</strong> folder</p>
<p>If you&#8217;re lucky you should get a nice <strong>getowner.dll</strong> file</p>
<p>9. You can now run the java program :</p>
<pre lang="bash">java getowner c:windows</pre>
<p>which will output the owner of all the file in you windows directory.</p>
<p>You can download the source code zip <a href="http://www.telio.be/blog/wp-content/uploads/2007/06/getowner.zip" title="getowner.zip">getowner.zip</a> that contains  :</p>
<ul>
<li>the project file</li>
<li>the cpp source file</li>
<li>the generated header file</li>
<li>the java class</li>
</ul>
<p>Have fun !</p>
<p>P.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.telio.be/blog/2007/06/26/getting-the-file-owner-in-java-using-jni/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Goodbye Thunderbird :-(</title>
		<link>http://www.telio.be/blog/2007/06/07/goodbye-thunderbird/</link>
		<comments>http://www.telio.be/blog/2007/06/07/goodbye-thunderbird/#comments</comments>
		<pubDate>Thu, 07 Jun 2007 15:32:41 +0000</pubDate>
		<dc:creator>plosson</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.telio.be/blog/2007/06/07/goodbye-thunderbird/</guid>
		<description><![CDATA[After a few month hesitation, we finally moved all our email to Google Apps for your Domain, so I won&#8217;t be using Thunderbird anymore (although I could of course  )
The migration to Google Apps for your domain went without problems and everything seems to be functional. We are basically using google calendar and google [...]]]></description>
			<content:encoded><![CDATA[<p>After a few month hesitation, we finally moved all our email to Google Apps for your Domain, so I won&#8217;t be using Thunderbird anymore (although I could of course <img src='http://www.telio.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> )</p>
<p>The migration to Google Apps for your domain went without problems and everything seems to be functional. We are basically using google calendar and google mail. We are somewhat starting to use Google Talk but the integration with other IM systems seems to me (who is not a big IM fan or user) very complicated. I managed to configure this with my previous standard gmail account but I can&#8217;t manage to get things working with our GAFYD accounts.</p>
<p>Anyways, for 50 USD per user / per year we get :</p>
<ul>
<li>10 gig email</li>
<li>Effective Anti spam</li>
<li>Splendid Webmail features</li>
<li>Web based calendar (with sharing and PDA sync on my QTek S110 &#8211; see <a href="http://www.telio.be/blog/wp-admin/www.goosync.com">www.goosync.com)</a></li>
</ul>
<p>And of course</p>
<ul>
<li>A big brother watching you <img src='http://www.telio.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<p>Btw, I also had to use <a href="http://gmailnotifier.net/Default.aspx">http://gmailnotifier.net/</a> to have a working mail notifier for GAFYD</p>
<p>P.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.telio.be/blog/2007/06/07/goodbye-thunderbird/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
