<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>hasan&#039;s blog (বল্গ) &#187; Java</title>
	<atom:link href="http://we4tech.wordpress.com/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://we4tech.wordpress.com</link>
	<description>work for fun!!!</description>
	<lastBuildDate>Wed, 25 Jan 2012 11:56:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='we4tech.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/77f5f3e5f84d83c83da12540728f5cb3?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>hasan&#039;s blog (বল্গ) &#187; Java</title>
		<link>http://we4tech.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://we4tech.wordpress.com/osd.xml" title="hasan&#039;s blog (বল্গ)" />
	<atom:link rel='hub' href='http://we4tech.wordpress.com/?pushpress=hub'/>
		<item>
		<title>semantic-repository-0.5.2: deploymet update</title>
		<link>http://we4tech.wordpress.com/2008/06/06/semantic-repository-052-deploymet-update/</link>
		<comments>http://we4tech.wordpress.com/2008/06/06/semantic-repository-052-deploymet-update/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 09:00:14 +0000</pubDate>
		<dc:creator>nhm tanveer hossain khan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[java ee]]></category>
		<category><![CDATA[semantic repository]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://hasan.we4tech.com/semantic-repository-052-deploymet-update/</guid>
		<description><![CDATA[hi, as some of you know, semantic repository version 0.5.2 has some problem with IOException (too many files open) which was stopping repository to perform further search. thats what was reason to get empty search result. after searching a while, we found the problem (which was also mentioned in lucene FAQ document). by default bash &#8230; <a href="http://we4tech.wordpress.com/2008/06/06/semantic-repository-052-deploymet-update/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=413&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>hi,<br />
as some of you know, semantic repository version 0.5.2 has some problem with IOException (too many files open)<br />
which was stopping repository to perform further search. thats what was reason to get empty search result.<br />
after searching a while, we found the problem (which was also mentioned in lucene FAQ document).</p>
<p>by default bash shell allow limited files to open, since we had many index files, lucene has to open them up during performing search.<br />
so when it exceeds the limit of 1025 files (which is default on our production environment). our application threw the following exception -<br />
Caused by: java.io.FileNotFoundException: /var/indexes/ads-index/_gm.tvd (Too many open files)<br />
at java.io.RandomAccessFile.open(Native Method)<br />
at java.io.RandomAccessFile.(RandomAccessFile.java:212)<br />
at org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor.(FSDirectory.java:506)<br />
at org.apache.lucene.store.FSDirectory$FSIndexInput.(FSDirectory.java:536)<br />
at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)<br />
at org.apache.lucene.index.TermVectorsReader.(TermVectorsReader.java:70)</p>
<p>after increasing this limit to 10,000 we didn&#8217;t find such problem exists. we had to apply &#8220;ulimit -n 10000&#8243; command on bash shell to make it works.</p>
<p>TODO: possible bug, probable our system is opening up several index searcher.</p>
<div style="background:lightYellow none repeat scroll 0 0;font-size:10px;padding:10px;">
<div class="line" id="LC60"><a href="http://github.com/we4tech/semantic-repository/tree"><em><strong>about semantic repositroy &#8211; </strong></em></a></div>
<div class="line" id="LC60"><span title="Click to edit!" class="edit">semantic repository service is intended for indexing content from different sources and maintain multi indexes for different types of content and perform different types of search. yet another solr type indexing service on top of lucene but it will gradually support content versioning and more semantic search result.</span></div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/we4tech.wordpress.com/413/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/we4tech.wordpress.com/413/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we4tech.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we4tech.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we4tech.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we4tech.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we4tech.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we4tech.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we4tech.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we4tech.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we4tech.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we4tech.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we4tech.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we4tech.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we4tech.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we4tech.wordpress.com/413/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=413&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we4tech.wordpress.com/2008/06/06/semantic-repository-052-deploymet-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4bb774de244da2d6e7f39a189b905077?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hasan</media:title>
		</media:content>
	</item>
		<item>
		<title>lucene based semantic-repository 0.5.2: major performance improvement now 24,000 items imported in 19 minutes</title>
		<link>http://we4tech.wordpress.com/2008/06/02/lucene-based-semantic-repository-052-major-performance-improvement-now-24000-items-imported-in-19-minutes/</link>
		<comments>http://we4tech.wordpress.com/2008/06/02/lucene-based-semantic-repository-052-major-performance-improvement-now-24000-items-imported-in-19-minutes/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 15:29:01 +0000</pubDate>
		<dc:creator>nhm tanveer hossain khan</dc:creator>
				<category><![CDATA[benchmark]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[java ee]]></category>
		<category><![CDATA[Java SE]]></category>
		<category><![CDATA[lucene]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[semantic repository]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://hasan.we4tech.com/lucene-based-semantic-repository-052-major-performance-improvement-now-24000-items-imported-in-19-minutes/</guid>
		<description><![CDATA[when we started using semantic repository, we had only one lucene index to make our content search able, later we came up with another integration with one php based service aawaj. on aawaj service they had  more than 150,000 items to index. we tried with our current release 0.5.1 to index all contents but we &#8230; <a href="http://we4tech.wordpress.com/2008/06/02/lucene-based-semantic-repository-052-major-performance-improvement-now-24000-items-imported-in-19-minutes/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=412&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>when we started using semantic repository, we had only one lucene index to make our content search able,<br />
later we came up with another integration with one php based service <a href="http://aawaj.com">aawaj</a>.</p>
<p>on aawaj service they had  more than 150,000 items to index. we tried with our current release 0.5.1 to index all contents but we ended with extremely performance outage. later we released another version 0.5.2, where we added queued request handling and threw index optimization over an restful service uri &#8211; /rest/service/optimize/</p>
<p>here is the simple benchmark report -</p>
<blockquote><p>version &#8211; 0.5.1 &#8211; first 100 items  ended in &#8211; 13.611 seconds.<br />
version &#8211; 0.5.2 &#8211; first 100 items  ended in &#8211; 5.6152 seconds.</p></blockquote>
<p>the change is really different and significant, later today we had anoter import on our repository, interestingly it took 1 hour to index 150,000 items. which was bit surprising since we were unable to do it with 0.5.1</p>
<p>actually we added single thread executor which keeps everything in queue and execute one by one. so we could remove  synchronized method.</p>
<p>here is an example code -</p>
<blockquote>
<div class="line" id="LC52">
<div class="line" id="LC45"><span class="k">private</span> <span class="k">final</span> <span class="n">Executor</span> <span class="n">mIndexTaskExecutor</span> <span class="o">=</span></div>
<div class="line" id="LC46"><span class="n">Executors</span><span class="o">.</span><span class="na">newSingleThreadExecutor</span><span class="o">();</span></div>
</div>
<div class="line" id="LC52"><span class="k">public</span> <span class="kt">void</span> <span class="nf">addDocument</span><span class="o">(</span><span class="k">final</span> <span class="n">Document</span> <span class="n">pDocument</span><span class="o">)</span> <span class="o">{</span></div>
<div class="line" id="LC53"><span class="n">mIndexTaskExecutor</span><span class="o">.</span><span class="na">execute</span><span class="o">(</span></div>
<div class="line" id="LC54"><span class="k">new</span> <span class="nf">Runnable</span><span class="o">()</span> <span class="o">{</span></div>
<div class="line" id="LC55"><span class="k">public</span> <span class="kt">void</span> <span class="nf">run</span><span class="o">()</span> <span class="o">{</span></div>
<div class="line" id="LC56"><span class="n">getLuceneIndexTemplate</span><span class="o">().</span><span class="na">addDocument</span><span class="o">(</span><span class="n">pDocument</span><span class="o">);</span></div>
<div class="line" id="LC57"><span class="o">}</span></div>
<div class="line" id="LC58"><span class="o">}</span></div>
<div class="line" id="LC59"><span class="o">);</span></div>
<div class="line" id="LC60"><span class="o">}</span></div>
<div class="line" id="LC60"><a href="http://github.com/we4tech/semantic-repository/tree/master/development/idea-repository-core/src/main/java/com/ideabase/repository/core/index/impl/RepositoryItemIndexImpl.java"> </a></div>
</blockquote>
<div style="background:lightYellow none repeat scroll 0 0;font-size:12px;padding:5px;">
<div class="line" id="LC60"><a href="http://github.com/we4tech/semantic-repository/tree"><em><strong>about semantic repositroy &#8211; </strong></em></a></div>
<div class="line" id="LC60"><span title="Click to edit!" class="edit">semantic repository service is intended for indexing content from different sources and maintain multi indexes for different types of content and perform different types of search. yet another solr type indexing service on top of lucene but it will gradually support content versioning and more semantic search result.</span></div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/we4tech.wordpress.com/412/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/we4tech.wordpress.com/412/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we4tech.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we4tech.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we4tech.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we4tech.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we4tech.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we4tech.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we4tech.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we4tech.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we4tech.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we4tech.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we4tech.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we4tech.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we4tech.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we4tech.wordpress.com/412/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=412&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we4tech.wordpress.com/2008/06/02/lucene-based-semantic-repository-052-major-performance-improvement-now-24000-items-imported-in-19-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4bb774de244da2d6e7f39a189b905077?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hasan</media:title>
		</media:content>
	</item>
		<item>
		<title>GITIdea intelliJ idea plugin for GIT</title>
		<link>http://we4tech.wordpress.com/2008/05/03/gitidea-intellij-idea-plugin-for-git/</link>
		<comments>http://we4tech.wordpress.com/2008/05/03/gitidea-intellij-idea-plugin-for-git/#comments</comments>
		<pubDate>Sat, 03 May 2008 09:10:21 +0000</pubDate>
		<dc:creator>nhm tanveer hossain khan</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://hasan.we4tech.com/gitidea-intellij-idea-plugin-for-git/</guid>
		<description><![CDATA[i just started using GIT, i say i love it. since i have been using IntellIJ idea for a long while, in GIT world i felt like alone though i was using idea but not getting any idea how to live without some IDE&#8217;s version control support. i want to compare my changes before i &#8230; <a href="http://we4tech.wordpress.com/2008/05/03/gitidea-intellij-idea-plugin-for-git/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=408&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>i just started using GIT, i say i love it.</p>
<p>since i have been using IntellIJ idea for a long while, in GIT world i felt like alone though i was using idea but not getting any idea how to live without some IDE&#8217;s version control support.</p>
<p>i want to compare my changes before i commit, i want to see more user friendly diff merging tool which idea is providing with other version control support.</p>
<p>so i found <a href="http://github.com/Fudge/gitidea/tree/master">GITIDEA</a> over here http://github.com/Fudge/gitidea/tree/master, after cloning and building this project.</p>
<p>i found it wasn&#8217;t working. so looking into code i found, it is executing &#8220;git&#8221; command. since my &#8220;git&#8221; executable is not under /usr/s|bin, i had to create a new symblink to make it work.</p>
<p>now it is working great, i can see where i have changed just by looking at the code (which bhaves like the usual svn support).</p>
<p>thanks <a href="http://github.com/Fudge/gitidea/tree/master">fudge</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/we4tech.wordpress.com/408/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/we4tech.wordpress.com/408/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we4tech.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we4tech.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we4tech.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we4tech.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we4tech.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we4tech.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we4tech.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we4tech.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we4tech.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we4tech.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we4tech.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we4tech.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we4tech.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we4tech.wordpress.com/408/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=408&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we4tech.wordpress.com/2008/05/03/gitidea-intellij-idea-plugin-for-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4bb774de244da2d6e7f39a189b905077?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hasan</media:title>
		</media:content>
	</item>
		<item>
		<title>problem with lucene number range filter</title>
		<link>http://we4tech.wordpress.com/2008/04/25/problem-with-lucene-number-range-filter/</link>
		<comments>http://we4tech.wordpress.com/2008/04/25/problem-with-lucene-number-range-filter/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 17:41:51 +0000</pubDate>
		<dc:creator>nhm tanveer hossain khan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[lucene]]></category>
		<category><![CDATA[weekend product]]></category>

		<guid isPermaLink="false">http://hasan.we4tech.com/problem-with-lucene-number-range-filter/</guid>
		<description><![CDATA[today i was almost stucked with lucene RangeFilter. here is description - i have used this query &#8211; &#8220;price:[0 TO 2000]&#8221; to find all items which are bellow 2000. but my search result was also including 12000 any clue ? good news is i got my solution though it took bit longer to find my &#8230; <a href="http://we4tech.wordpress.com/2008/04/25/problem-with-lucene-number-range-filter/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=407&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>today i was almost stucked with lucene RangeFilter. here is description -<br />
</p>
<blockquote><p>i have used this query &#8211; &#8220;price:[0 TO 2000]&#8221; to find all items which are bellow 2000.<br />
but my search result was also including 12000 any clue ?</p></blockquote>
<p>good news is i got my solution though it took bit longer to find my actual reason.</p>
<p>the quick answer is i have to use NumberTools.longToString(&#8230;) to index my number fields and to perform range search i have to convert my range value using NumberTools.</p>
<p>you can see my code here -<br />
<a title="GIT HuB" href="http://github.com/we4tech/semantic-repository/tree/master/development/idea-repository-core/src/main/java/com/ideabase/repository/core/index/ExtendedQueryParser.java">source view</a></p>
<p>just digging through lucene source code here is what i found -<br />
to perform range query (which is later rewrite to range filter), it tooks lower token for example price: [0 TO 1000] here &#8217;0&#8242; is the lower token. it asks <a title="source" href="http://svn.apache.org/viewvc/lucene/java/tags/lucene_2_3_1/src/java/org/apache/lucene/index/TermInfosReader.java?view=log">TermInfosReader</a> to return a list of available terms for a specific field (such as price here).</p>
<p>RangeFilter iterate through each suggested term and seek for the token position in a random access segment file.</p>
<p>the problem is, the suggested terms are not sorted. also i didn&#8217;t find any way to sort them before filtering out.</p>
<p>though i index my content after sorting them properly. but it didn&#8217;t affect any result.</p>
<p>since lucene treats everything as string, and it uses String::compare to determine the range position, i think NumberTools, DateTools are the only way out there.</p>
<p>anyway, i am satisfy with what i got.<br />
best wishes,<br />
&#8220;&#8230;i do what i love to do&#8230;&#8221;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/we4tech.wordpress.com/407/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/we4tech.wordpress.com/407/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we4tech.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we4tech.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we4tech.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we4tech.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we4tech.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we4tech.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we4tech.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we4tech.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we4tech.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we4tech.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we4tech.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we4tech.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we4tech.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we4tech.wordpress.com/407/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=407&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we4tech.wordpress.com/2008/04/25/problem-with-lucene-number-range-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4bb774de244da2d6e7f39a189b905077?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hasan</media:title>
		</media:content>
	</item>
		<item>
		<title>create new url protocol to load spring configuration resource from the relative path</title>
		<link>http://we4tech.wordpress.com/2008/04/18/create-new-url-protocol-to-load-spring-configuration-resource-from-the-relative-path/</link>
		<comments>http://we4tech.wordpress.com/2008/04/18/create-new-url-protocol-to-load-spring-configuration-resource-from-the-relative-path/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 18:17:42 +0000</pubDate>
		<dc:creator>nhm tanveer hossain khan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[java ee]]></category>
		<category><![CDATA[spring framework]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://hasan.we4tech.com/create-new-url-protocol-to-load-spring-configuration-resource-from-the-relative-path/</guid>
		<description><![CDATA[i had a problem with spring framework, as you know while we are defining dependency over the xml documents, it becomes less changeable unless you know about my recent post about ext-util namespace handler and if you know any other alternatives. before digging inside the problem better i clarify my context - i have been &#8230; <a href="http://we4tech.wordpress.com/2008/04/18/create-new-url-protocol-to-load-spring-configuration-resource-from-the-relative-path/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=405&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>i had a problem with spring framework, as you know while we are defining dependency over the xml documents, it becomes less changeable unless you know about my recent post about <a href="http://hasan.we4tech.com/ext-utilresource-new-spring-namespace-for-loading-property-from-different-scope-ie-system-test-dev/">ext-util namespace handler</a> and if you know any other alternatives.</p>
<p>before digging inside the problem better i clarify my context -</p>
<p>i have been working with one of my projects, where i have a several configurations which suppose to be different in different deployment environment, for example &#8211; to make my service avail, user has to define his database, his content index directory, server port, ip address and few more.</p>
<p>all these configurations were kept within the spring bean declaration scope. though few of them were moved to the properties file through <a href="http://hasan.we4tech.com/ext-utilresource-new-spring-namespace-for-loading-property-from-different-scope-ie-system-test-dev/">ext-util namespace handler</a>.</p>
<p>previously to make those configuration changeable i kept those files under WEB-INF/classes so it overrides the default bundled resource.</p>
<p>but still it wasn&#8217;t user friendly, since my user has to change one xml document to add more index services also he has to edit different configurations from java properties file.</p>
<p>again when i started bundling jetty with my whole application i found it is tricker to keep those xml outside of application, since i don&#8217;t wanna make my user confused with lot of xml files. and i have to keep few xml out of  my classpath context, so spring has to load my configuration from my &#8220;config/index-configuration/&#8221; directory.</p>
<p>though by default spring can do it over &#8220;file:///absolute/path/to/file.xml&#8221; since spring is using java URL class to locate this resource.  but in my case i can&#8217;t put any aboslute path.<br />
so i found a simple way out there to support relative path reference.</p>
<p>previously i had the following xml document -</p>
<p><!-- import index services --></p>
<p><!-- available item index services --></p>
<p>now i have replaced them with the following change -</p>
<p><!-- import index services --><br />
<strong><br />
</strong></p>
<p><!-- available item index services --></p>
<p>if you observe closely you will find &#8220;extfile:///&#8221; protocol reference, which is not standard url protocol. so to make it work i used the following bunch of code and configuration -</p>
<p>1. i have created a class &#8220;Handler&#8221; under the &#8220;com.ideabase.repository.core.protocols.extfile&#8221; package.<br />
this package and class name is conventional, though you can change them lets sun <a href="http://java.sun.com/developer/onlineTraining/protocolhandlers/">explain about it.</a></p>
<p>2. i wrote the following code -</p>
<p>public class Handler extends URLStreamHandler {<br />
protected URLConnection openConnection(final URL pURL) throws IOException {<br />
final String path = pURL.getPath();<br />
final URL resourceUrl;<br />
if (path.startsWith(&#8220;/./&#8221;)) {<br />
resourceUrl = new File(path.substring(1, path.length())).toURL();<br />
} else {<br />
throw new RuntimeException(&#8220;Unsupported url schema. currently you can &#8221; +<br />
&#8220;use only extfile:///./path/to/somewhere/in&#8221;);<br />
}<br />
return resourceUrl.openConnection();<br />
}<br />
}<br />
3. i registered my protocol package through the system property -</p>
<p>System.setProperty(&#8220;java.protocol.handler.pkgs&#8221;, &#8220;com.ideabase.repository.core.protocols&#8221;);</p>
<p>now have a look on the main applicationContext.xml</p>
<p><strong><br />
</strong><br />
if you observe closely again you could find the difference, on the normal case i have used relative path reference. so it must be from classloader or if it is loaded through file system based resource locator it will be located from the file system.</p>
<p>but now i can use cross context (relative file system and class loader path reference) resource file path reference. you can see i have imported &#8220;indexer-beans.xml&#8221; from the application relative path &#8220;config/index-configuration/&#8230;&#8221; where &#8220;data-access-layer-beans.xml&#8221; is loaded from the class loader.<br />
now have a quick look on my configuration directory, to get an idea how i have improved configuration ability.<br />
<img class="alignleft size-medium wp-image-431" title="picture-1" src="http://we4tech.files.wordpress.com/2008/04/picture-1.png?w=300&#038;h=66" alt="picture-1" width="300" height="66" /></p>
<p>hope this will help you to solve similar problem.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/we4tech.wordpress.com/405/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/we4tech.wordpress.com/405/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we4tech.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we4tech.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we4tech.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we4tech.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we4tech.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we4tech.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we4tech.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we4tech.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we4tech.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we4tech.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we4tech.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we4tech.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we4tech.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we4tech.wordpress.com/405/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=405&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we4tech.wordpress.com/2008/04/18/create-new-url-protocol-to-load-spring-configuration-resource-from-the-relative-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4bb774de244da2d6e7f39a189b905077?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hasan</media:title>
		</media:content>

		<media:content url="http://we4tech.files.wordpress.com/2008/04/picture-1.png?w=300" medium="image">
			<media:title type="html">picture-1</media:title>
		</media:content>
	</item>
		<item>
		<title>builder pattern with fluent interface just an example while i was doing by routine work :)</title>
		<link>http://we4tech.wordpress.com/2008/01/26/builder-pattern-with-fluent-interface-just-an-example-while-i-was-doing-by-routine-work/</link>
		<comments>http://we4tech.wordpress.com/2008/01/26/builder-pattern-with-fluent-interface-just-an-example-while-i-was-doing-by-routine-work/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 07:53:52 +0000</pubDate>
		<dc:creator>nhm tanveer hossain khan</dc:creator>
				<category><![CDATA[code fun]]></category>
		<category><![CDATA[Introduction]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://hasan.we4tech.com/builder-pattern-with-fluent-interface-just-an-example-while-i-was-doing-by-routine-work/</guid>
		<description><![CDATA[today while i was working with one of my projects, i was wondering how this came up with a bit more fluent with my credential object. just i can&#8217;t resists myself to share this code with every one. assertNotNull(mProfileManager.authenticate( Credential.Builder .aNew().userName(userName).password(password).build()));<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=391&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>today while i was working with one of my projects, i was wondering how this came up with a bit more fluent with my credential object.<br />
just i can&#8217;t resists myself to share this code with every one.</p>
<blockquote><p>
assertNotNull(mProfileManager.authenticate(<br />
<strong>Credential.Builder</strong><br />
<strong> .<em>aNew()</em>.userName(userName).password(password).<em>build()</em></strong>));</p>
</p>
</blockquote>
<p><!--1e31f1dafc84371667674d744216c2bf--></p>
</p>
<p><!--5a9385d584f6c138a1f305cc6c76fda2--></p>
</p>
<p><!--67b366b94392f61f35f27d197a1d1076-->
</p>
<p><!--642ffb0edb84e66ba06d2d6b23834f92--></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/we4tech.wordpress.com/391/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/we4tech.wordpress.com/391/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we4tech.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we4tech.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we4tech.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we4tech.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we4tech.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we4tech.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we4tech.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we4tech.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we4tech.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we4tech.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we4tech.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we4tech.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we4tech.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we4tech.wordpress.com/391/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=391&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we4tech.wordpress.com/2008/01/26/builder-pattern-with-fluent-interface-just-an-example-while-i-was-doing-by-routine-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4bb774de244da2d6e7f39a189b905077?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hasan</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;ext-util:resource&#8221; new spring namespace for loading property from different scope i.e. system, test, dev</title>
		<link>http://we4tech.wordpress.com/2007/12/02/ext-utilresource-new-spring-namespace-for-loading-property-from-different-scope-ie-system-test-dev/</link>
		<comments>http://we4tech.wordpress.com/2007/12/02/ext-utilresource-new-spring-namespace-for-loading-property-from-different-scope-ie-system-test-dev/#comments</comments>
		<pubDate>Sun, 02 Dec 2007 08:46:24 +0000</pubDate>
		<dc:creator>nhm tanveer hossain khan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[java ee]]></category>
		<category><![CDATA[namespace]]></category>
		<category><![CDATA[spring framework]]></category>

		<guid isPermaLink="false">http://hasan.we4tech.com/ext-utilresource-new-spring-namespace-for-loading-property-from-different-scope-ie-system-test-dev/</guid>
		<description><![CDATA[within spring container i was getting problem with managing multi level configuration. for example while i am developing i got a specific filesystem path, database configuration and so on. this configuration are mostly get changed while i an deploying them on the test or production environment. this type of scenario is common on most of &#8230; <a href="http://we4tech.wordpress.com/2007/12/02/ext-utilresource-new-spring-namespace-for-loading-property-from-different-scope-ie-system-test-dev/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=389&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>within spring container i was getting problem with managing multi level configuration.<br />
for example while i am developing i got a specific filesystem path, database configuration and so on.<br />
this configuration are mostly get changed while i an deploying them on the test or production environment.</p>
<p>this type of scenario is common on most of the projects. managing different scoped configuration is one of the bothering stuff. so i was always thinking some simpler way with in spring container.</p>
<p>so i wrote &#8220;ext-util&#8221; namespace handler, which is locating property from multi scoped resource.<br />
lets give you a more details use case -</p>
<p>in my test environment i have a property &#8220;index.directory=/Users/&#8230;/index&#8221;<br />
in my test server i use &#8220;index.directory=/var/index&#8221;<br />
in my production server i use &#8220;index.directory=/nfs/index&#8221;</p>
<p>here i have a bean which need this property.</p>
<blockquote></blockquote>
<p>you can see the hardcoded configuration. which is not easy to manage.<br />
thats why here my &#8220;ext-util&#8221; goes with the simplest solution -</p>
<blockquote></blockquote>
<p>now my property resource is locating from &#8220;test&#8221; scope.</p>
<p>you might think, this &#8220;scope=&#8217;test&#8217;&#8221; is again hardcoded stuff, so i also support the following value -<br />
scope=&#8221;sys:env&#8221;, now you have to define &#8220;-Denv=test&#8221; while you running your application, and spring bean will find the right property.</p>
<p>so what ever you put over your spring are no longer hardcoded as long as you locate them through &#8220;ext-util&#8221; which is stands for &#8220;extended utility&#8221;.</p>
<p><a title="spring namespace ext-util for locating system or scoped properties" href="http://hasan.we4tech.com/files/spring-namespace-ext-util.zip">here is my attached source code &#8211; (i just extracted them from my on going project, thats why no build script or prebuilt package or maven artifact is bundled)</a></p>
<p><strong>how to use -</strong><br />
include the source file with in your project<br />
keep &#8220;META-INF&#8221; while you building your jar or keep them inside your classpath.<br />
change your spring configuration -</p>
<p>xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221;<br />
xmlns:lang=&#8221;http://www.springframework.org/schema/lang&#8221;<br />
xmlns:aop=&#8221;http://www.springframework.org/schema/aop&#8221;<br />
<em><strong>xmlns:ext-util=&#8221;http://dev.somewherein.net/schema/ext-util&#8221;</strong></em><br />
xsi:schemaLocation=&#8221;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd<br />
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd<br />
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd<br />
<strong><em>http://dev.somewherein.net/schema/ext-util http://dev.somewherein.net/resources/schemas/ext-util-0.1.xsd</em></strong>&#8220;/&gt;<br />
<strong>basic properties of ext-util -</strong></p>
<blockquote><p>1. <strong>from-property</strong> &#8211; which property you are looking for.</p>
<p>2. <strong>or-default</strong> &#8211; define default value if no property is found from default scope (system properties) this value is returned.</p>
<p>3. <strong>scope</strong> &#8211; define scope name, by default whatever you set except &#8220;sys:&#8221; prefixed string, will search for &#8220;classpath:&#8221;. also you can use &#8220;sys:abc&#8221; where abc is located from system properties.</p>
<p>4. <strong>path-prefix</strong> &#8211; you can define scope properties path prefix, this prefix can be &#8220;file:///, classpath:&#8221;. this value also can be prefixed by &#8220;sys:abc&#8221; where abc is located from system properties.</p></blockquote>
<p><a title="spring namespace ext-util for locating system or scoped properties" href="http://hasan.we4tech.com/files/spring-namespace-ext-util.zip">[download source code]</a><br />
<a href="http://hasan.we4tech.com/files/ext-util-01xsd.zip">[download missing xsd file]</a></p>
<p>best wishes,</p>
<p><!--fc37dc39b783d0125ea3aa50675127f9--></p>
<p><!--e9927b35c96f3a5d11179320bda2993b--></p>
<p><!--b0ea32c2559a8e05ab2f7fc04e0ff6b5--></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/we4tech.wordpress.com/389/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/we4tech.wordpress.com/389/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we4tech.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we4tech.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we4tech.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we4tech.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we4tech.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we4tech.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we4tech.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we4tech.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we4tech.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we4tech.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we4tech.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we4tech.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we4tech.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we4tech.wordpress.com/389/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=389&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we4tech.wordpress.com/2007/12/02/ext-utilresource-new-spring-namespace-for-loading-property-from-different-scope-ie-system-test-dev/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4bb774de244da2d6e7f39a189b905077?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hasan</media:title>
		</media:content>
	</item>
		<item>
		<title>emacs color scheme for intelliJ idea</title>
		<link>http://we4tech.wordpress.com/2007/10/30/emacs-color-scheme-for-intellij-idea/</link>
		<comments>http://we4tech.wordpress.com/2007/10/30/emacs-color-scheme-for-intellij-idea/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 03:36:14 +0000</pubDate>
		<dc:creator>nhm tanveer hossain khan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java tools]]></category>

		<guid isPermaLink="false">http://hasan.we4tech.com/emacs-color-scheme-for-intellij-idea</guid>
		<description><![CDATA[i had no experience of using emacs as development environment, so never had any knowledge about emacs color scheme. once when i had been to norway for an official task, i met with one of our escenic colleague &#8220;harald khur&#8221;. i was surprised while i had a look on his intelliJ idea color scheme, it &#8230; <a href="http://we4tech.wordpress.com/2007/10/30/emacs-color-scheme-for-intellij-idea/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=377&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>i had no experience of using emacs as development environment, so never had any knowledge about emacs color scheme. once when i had been to norway for an official task, i met with one of our escenic colleague &#8220;harald khur&#8221;.</p>
<p>i was surprised while i had a look on his intelliJ idea color scheme, it all was dark, at the beginning i had a belief that  dark color is stressful for eyes. recently when i got introduce with TextMate and their dark color scheme, i was really impressed.</p>
<p>so i didn&#8217;t make any delay to let harald know about my interest on his color scheme. he sent me his generated scheme for intelliJ idea. it was simply awesome.</p>
<p><span class="imagelink"><img class="alignnone size-medium wp-image-441" title="idea-vi-color-scheme" src="http://we4tech.files.wordpress.com/2007/10/idea-vi-color-scheme.gif?w=300&#038;h=273" alt="idea-vi-color-scheme" width="300" height="273" /><br />
</span></p>
<p>here i have added screen snap of one of my ruby code in dark scheme. i have also attached my modified color scheme as well as the original one, which i received from harad.</p>
<p><a id="p393" title="modified intelliJ idea emacs color scheme" href="http://hasan.we4tech.com/wp-content/uploads/2007/10/idea-emacs-color-scheme.zip">modified intelliJ idea emacs color scheme</a></p>
<p><a id="p394" title="original intelliJ idea emacs color scheme by harald" href="http://hasan.we4tech.com/wp-content/uploads/2007/10/original-from-harald-idea-color-settings.zip">original intelliJ idea emacs color scheme by harald</a><!--17a9f3e8a7de19ba08bfe55b2eb5a4eb--></p>
<p><!--b321744357bc62079383e5d9dd171f83--></p>
<p><!--3e2346202fe4850cea122eb6c299f91e--></p>
<div class="ad-line">A <a href="http://www.businesshostingprovider.com">cheap web hosting</a> fells the site. Therefore donít compromise only for the <a href="http://www.businesshostingprovider.com/domain-registration.htm">domain name registration</a>. Go for <a href="http://www.businesshostingprovider.com/dedicated-server.htm">dedicated servers</a> only. Try <a href="http://www.businesshostingprovider.com/hosting/hostgator.htm">hostgator</a> or <a href="http://www.businesshostingprovider.com/hosting/easycgi.htm">easycgi</a> for starters.</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/we4tech.wordpress.com/377/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/we4tech.wordpress.com/377/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we4tech.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we4tech.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we4tech.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we4tech.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we4tech.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we4tech.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we4tech.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we4tech.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we4tech.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we4tech.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we4tech.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we4tech.wordpress.com/377/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we4tech.wordpress.com/377/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we4tech.wordpress.com/377/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=377&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we4tech.wordpress.com/2007/10/30/emacs-color-scheme-for-intellij-idea/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4bb774de244da2d6e7f39a189b905077?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hasan</media:title>
		</media:content>

		<media:content url="http://we4tech.files.wordpress.com/2007/10/idea-vi-color-scheme.gif?w=300" medium="image">
			<media:title type="html">idea-vi-color-scheme</media:title>
		</media:content>
	</item>
		<item>
		<title>EiD recipe special : few conventions and best practice for software developer</title>
		<link>http://we4tech.wordpress.com/2007/10/15/eid-recipe-special-few-conventions-and-best-practice-for-software-developer/</link>
		<comments>http://we4tech.wordpress.com/2007/10/15/eid-recipe-special-few-conventions-and-best-practice-for-software-developer/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 07:54:42 +0000</pubDate>
		<dc:creator>nhm tanveer hossain khan</dc:creator>
				<category><![CDATA[best practice]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://hasan.we4tech.com/eid-recipe-special-few-conventions-and-best-practice-for-software-developer</guid>
		<description><![CDATA[i just gathered a few of my known conventions and best practices. i belief this will help many of us. few of my previously written posts - usages of &#8220;final&#8221; keyword in java - http://www.somewhereinblog.net/blog/hasan/28708715 usages of comment and coding http://www.somewhereinblog.net/blog/hasan/28704020 let&#8217;s check out my recipes - 1. code from your peer developer perspective view. &#8230; <a href="http://we4tech.wordpress.com/2007/10/15/eid-recipe-special-few-conventions-and-best-practice-for-software-developer/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=369&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>i just gathered a few of my known conventions and best practices. i belief this will help many of us.</p>
<blockquote><p>
few of my previously written posts -<br />
usages of &#8220;final&#8221; keyword in java -</p>
<p>http://www.somewhereinblog.net/blog/hasan/28708715</p>
</p>
</blockquote>
<blockquote><p>
usages of comment and coding<br />
http://www.somewhereinblog.net/blog/hasan/28704020</p>
</p>
</blockquote>
<p>let&#8217;s check out my recipes -</p>
<p><strong> 1. code from your peer developer perspective view.</strong><br />
while you writing your code, always think your code will be reviewed by some other developers, who is not like you,<br />
who is very serious in simple fault and ignorance in writing code. your code will reflect who you are, so better be careful while you exposing yourselves (through writing code).</p>
<p><strong>2. variable convention -</strong><br />
never write short variable name, always write variable which reflects it usages.<br />
for example -</p>
<blockquote><p>
$user = new User() instead of $u = new User(). follow same convention when you have nested &#8220;loop&#8221;</p>
</p>
</blockquote>
<p><strong>3. source file naming convention (except java)</strong><br />
set your file name in such a way that will reflect the usages of the file.<br />
for example -</p>
<blockquote><p>
verify_user_authentication.php (or in a packaging manner &#8211; user_util_verify_authentication.php). in java you better know how to write package.</p>
</p>
</blockquote>
<p><strong><br />
4. keep your url domain centric</strong><br />
all urls should be inherited by some specific problem domain for example -</p>
<blockquote><p>http://abc.com/user/login</p>
<p>http://abc.com/user/register</p>
<p>http://abc.com/user/update</p>
</p>
</blockquote>
<p>here &#8220;user&#8221; is problem domain and &#8220;login|register|update&#8221; are actions or you could say problem.</p>
<p><strong>5. method naming convention -</strong><br />
write method name in such a format that will reflect it usages. or simply make it self describing.<br />
for example -</p>
<blockquote><p>
<strong>function</strong> verify_user_credentials() {}<br />
<strong>def</strong> verify_whether_user_profile_is_complete() {}<br />
<strong>private</strong> void checkUserFlyLimit() {}</p>
</p>
</blockquote>
<p><strong>6. don&#8217;t write query from controller:</strong><br />
build or execute query from DAO or helper or utility or domain itself. don&#8217;t put it over controller which limits the reuability and later extendability and interception</p>
<p><strong>7. single concern</strong><br />
while coding, keep your method slim and less concerned about other implementation. for example -</p>
<blockquote><p>
private void isAuthorizedUser(pUser, pAction) {<br />
if (userAlreadyLoggedOn(pUser) &amp;&amp; userIsNotBlocked(pUser) &amp;&amp; userHasPermission(pUser, pAction)) {<br />
// boooooooooooooooomm&#8230;<br />
}<br />
}</p>
</p>
</blockquote>
<p><strong>8. think from testability</strong><br />
while writing your code always think from testable perspective view. this means, how you could testify your work or module<br />
or bunch of code which your company is paying for.</p>
<p><strong>9. follow coding norms -</strong><br />
i. think before coding</p>
<blockquote><p>
whatever you want to put on your code try to think or imagine before start coding.</p>
</p>
</blockquote>
<p>ii. dump your think in comment</p>
<blockquote><p>
whatever you thought just write it down over comment or paper or in a common place where you or future developers could have look on. (better place in comment)</p>
</p>
</blockquote>
<p>iii. write your algorithm in comment.</p>
<blockquote><p>
whatever you planned write in comment before kick start your coding.</p>
</p>
</blockquote>
<p>iv. set up your unit test case.</p>
<blockquote><p>
find all probable assertion points from use case, put them over your unit test case.</p>
</p>
</blockquote>
<p>v. write your code<br />
vi. coding routine -</p>
<blockquote><p>
(1) test -&gt; (2) code &#8211; go to &gt; (1) [recursively]</p>
</p>
</blockquote>
<p><strong>10. always put your tag over the source file,</strong><br />
whatever you wrote, that reflects your confident and work efficiency, so better you tag your name over every source code you have written or modified. good for tech lead or project manager, because tagging each file with author name, it creates a hidden responsibility for the author <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  good for both parties.<br />
for example -</p>
<blockquote><p>
/**<br />
* @author someone<br />
*/</p>
</p>
</blockquote>
<p><!--7e470a64f907b914df4ea1da80ed7076--></p>
</p>
<p><!--8a66c7a17469a1d33340db5a4d3efca1-->
</p>
<p><!--f94b42ad9fc910c14d38c03db3aa3cd7--></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/we4tech.wordpress.com/369/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/we4tech.wordpress.com/369/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we4tech.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we4tech.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we4tech.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we4tech.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we4tech.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we4tech.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we4tech.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we4tech.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we4tech.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we4tech.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we4tech.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we4tech.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we4tech.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we4tech.wordpress.com/369/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=369&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we4tech.wordpress.com/2007/10/15/eid-recipe-special-few-conventions-and-best-practice-for-software-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4bb774de244da2d6e7f39a189b905077?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hasan</media:title>
		</media:content>
	</item>
		<item>
		<title>JETTY RUNNER version 0.2</title>
		<link>http://we4tech.wordpress.com/2007/10/15/jetty-runner-version-02/</link>
		<comments>http://we4tech.wordpress.com/2007/10/15/jetty-runner-version-02/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 06:50:06 +0000</pubDate>
		<dc:creator>nhm tanveer hossain khan</dc:creator>
				<category><![CDATA[Introduction]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[java ee]]></category>
		<category><![CDATA[java swing]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://hasan.we4tech.com/jetty-runner-version-02</guid>
		<description><![CDATA[those who doesn&#8217;t know about JETTY RUNNER: JETTY RUNNER is a standalone swing based application which is used to bundle java ee based application along with jetty container. it comes with simple web app configuration xml file and global properties manager through a simple properties file. actually i have been using this project for my &#8230; <a href="http://we4tech.wordpress.com/2007/10/15/jetty-runner-version-02/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=368&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>those who doesn&#8217;t know about JETTY RUNNER:</strong><br />
JETTY RUNNER is a standalone swing based application which is used to bundle java ee based application along with jetty container. it comes with simple web app configuration xml file and global properties manager through a simple properties file.</p>
<p><em>actually i have been using this project for my own development solution, so i belief this project will become a great strengthen feature  gradually.<br />
</em></p>
<p>JETTY RUNNER is now running on max OSX, i have removed system try support in new tag v-0.2, soon i will release *.dmg package for mac osx. here are few screen snaps -</p>
<p><a class="imagelink" title="jetty runner v0.2" href="http://hasan.we4tech.com/wp-content/uploads/2007/10/jetty_runner_02_main.gif"><img src="http://hasan.we4tech.com/wp-content/uploads/2007/10/jetty_runner_02_main.gif" alt="jetty runner v0.2" /></a><br />
figure &#8211; 1: server console main window<br />
<a class="imagelink" title="jetty_runner_02_settings.gif" href="http://hasan.we4tech.com/wp-content/uploads/2007/10/jetty_runner_02_settings.gif"><br />
<img class="alignnone size-medium wp-image-445" title="jetty_runner_02_settings" src="http://we4tech.files.wordpress.com/2007/10/jetty_runner_02_settings.gif?w=300&#038;h=264" alt="jetty_runner_02_settings" width="300" height="264" /><br />
</a></p>
<p>figure &#8211; 2: global properties editor<strong></strong></p>
<p>change logs -<br />
1. removed system tray support<br />
2. removed default jmx configuration<br />
3. added &#8220;start.sh&#8221; to launch JETTY RUNNER on *nix based platform where ruby script is installed.<br />
here are few screen snaps, which i have taken from the newly added ruby script! -<br />
<span class="imagelink"><img class="alignnone size-medium wp-image-446" title="jetty_runner_02_ruby_script" src="http://we4tech.files.wordpress.com/2007/10/jetty_runner_02_ruby_script.gif?w=300&#038;h=157" alt="jetty_runner_02_ruby_script" width="300" height="157" /><br />
figure &#8211; 3: newly added jetty runner on ruby</span></p>
<p><img class="alignnone size-medium wp-image-448" title="jetty_runner_02_ruby_class" src="http://we4tech.files.wordpress.com/2007/10/jetty_runner_02_ruby_class.gif?w=228&#038;h=300" alt="jetty_runner_02_ruby_class" width="228" height="300" /><br />
figure &#8211; 4: newly added jetty runner implementation in ruby</p>
<p>this script really great <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> , at least i like it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <!--c82dba895f8889446523b8cdcdc3ed69--><!--58e72d18e19c83075072f92fd663767b--></p>
<p><!--d2d5c28daa9950f44c955f557cfff203--></p>
<p><!--9944f2ccdefec3d746e9eb8b0445663b--></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/we4tech.wordpress.com/368/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/we4tech.wordpress.com/368/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we4tech.wordpress.com/368/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we4tech.wordpress.com/368/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we4tech.wordpress.com/368/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we4tech.wordpress.com/368/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we4tech.wordpress.com/368/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we4tech.wordpress.com/368/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we4tech.wordpress.com/368/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we4tech.wordpress.com/368/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we4tech.wordpress.com/368/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we4tech.wordpress.com/368/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we4tech.wordpress.com/368/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we4tech.wordpress.com/368/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we4tech.wordpress.com/368/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we4tech.wordpress.com/368/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we4tech.wordpress.com&amp;blog=537526&amp;post=368&amp;subd=we4tech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we4tech.wordpress.com/2007/10/15/jetty-runner-version-02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4bb774de244da2d6e7f39a189b905077?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hasan</media:title>
		</media:content>

		<media:content url="http://hasan.we4tech.com/wp-content/uploads/2007/10/jetty_runner_02_main.gif" medium="image">
			<media:title type="html">jetty runner v0.2</media:title>
		</media:content>

		<media:content url="http://we4tech.files.wordpress.com/2007/10/jetty_runner_02_settings.gif?w=300" medium="image">
			<media:title type="html">jetty_runner_02_settings</media:title>
		</media:content>

		<media:content url="http://we4tech.files.wordpress.com/2007/10/jetty_runner_02_ruby_script.gif?w=300" medium="image">
			<media:title type="html">jetty_runner_02_ruby_script</media:title>
		</media:content>

		<media:content url="http://we4tech.files.wordpress.com/2007/10/jetty_runner_02_ruby_class.gif?w=228" medium="image">
			<media:title type="html">jetty_runner_02_ruby_class</media:title>
		</media:content>
	</item>
	</channel>
</rss>
