<?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>BlogtimeException</title>
	<atom:link href="http://www.behrang.org/en/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.behrang.org/en/blog</link>
	<description>By Behrang Saeedzadeh (7th incarnation)</description>
	<lastBuildDate>Fri, 08 Mar 2013 14:49:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>A gorgeous login form concept</title>
		<link>http://www.behrang.org/en/blog/2011/06/26/a-gorgeous-login-form-concept/</link>
		<comments>http://www.behrang.org/en/blog/2011/06/26/a-gorgeous-login-form-concept/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 22:55:02 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Concept]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=222</guid>
		<description><![CDATA[These days I am working on a couple of semi-stealth hobby Web apps in my spare time and, well, I want them to look gorgeous. Yesterday I was thinking about styling the login form for one of the apps and make it somewhat different to all those boring login forms we see everyday and everywhere [...]]]></description>
				<content:encoded><![CDATA[<p>These days I am working on a couple of semi-stealth hobby Web apps in my spare time and, well, I want them to look gorgeous. Yesterday I was thinking about styling the login form for one of the apps and make it somewhat different to all those boring login forms we see everyday and everywhere on the web.</p>
<p>Sometime ago I read an article about this idea of showing labels behind fields rather than next to them and fade them out as soon as the user types in some text and I liked it. The login form that I have designed is based on the same idea but it&#8217;s even more gorgeous!</p>
<p>They say a demo is worth a thousand words so without further ado here&#8217;s the <a href="http://behrang.org/demo/gorgeous-login-form/index.html">demo</a> page. Go ahead and type in some text in the fields to see the effect.</p>
<p>As you can see rather than fading out the label, we move it to sit on top of the field. But the devil is in the details. In other words, the login form renders well even under the following conditions:</p>
<ul>
<li>In browsers that do not support stylesheets (e.g. in Lynx)</li>
<li>With JavaScript disabled</li>
<li>In IE 6 (IE 6 is still sooo popular in archaic environments). Well, no, just kidding. I don&#8217;t care about that creepy wombat anymore.</li>
</ul>
<h2>HTML Page</h2>
<p><script src="http://gist.github.com/1046992.js"></script></p>
<h2>CSS</h2>
<p><script src="http://gist.github.com/1046993.js"></script></p>
<h2>JavaScript</h2>
<p><script src="http://gist.github.com/1046994.js"></script></p>
<h2>Update 1 &#8211; 3 July 2011:</h2>
<p>I found a bug in the initial implementation given above a couple of days ago. Suppose that the login field contains one character and then the user quickly presses backspace and writes another character. This leads to the label staying behind the field while it&#8217;s not empty. Changing installAnimation like below fixes this bug:</p>
<h2>Fixed installAnimation</h2>
<p><script src="http://gist.github.com/1062094.js"></script></p>
<p>This alternative implementation stops all the currently queued animations for the label element before starting a new animation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2011/06/26/a-gorgeous-login-form-concept/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Introducing the Robot Attack theme for WordPress</title>
		<link>http://www.behrang.org/en/blog/2011/06/19/introducing-the-robot-attack-theme-for-wordpress/</link>
		<comments>http://www.behrang.org/en/blog/2011/06/19/introducing-the-robot-attack-theme-for-wordpress/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 13:53:39 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RobotAttack]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=215</guid>
		<description><![CDATA[Robot Attack is a weblog theme originally developed by Opera for their My Opera service. I used to blog on Opera before switching to WordPress and I really liked their themes. After the switch I searched and searched but didn&#8217;t find a WP theme that I liked enough. Most beautiful WP themes out there are [...]]]></description>
				<content:encoded><![CDATA[<p>Robot Attack is a weblog theme originally developed by <a href="http://www.opera.com">Opera</a> for their <a href="http://my.opera.com">My Opera</a> service. I used to blog on Opera before switching to WordPress and I really liked their themes. After the switch I searched and searched but didn&#8217;t find a WP theme that I liked enough. Most beautiful WP themes out there are not suitable for programming blogs. So I finally reverse engineered the Robot Attack theme and converted it to a WP theme with some minor tweaks here and there. An initial version of Robot Attack for Opera is available at <a href="https://github.com/behrangsa/robot_attack">Github</a>. However right now it&#8217;s far from perfect. For one, currently it doesn&#8217;t support widgets. And then, the profile photo should be changed manually.</p>
<p>So, if you are a PHP guru, like this theme, and want to make it even better, you are more than welcome to contribute to the project by forking it and submitting your patches.</p>
<p>One thing that surprised me quite a bit was how easy PHP is to read and how quickly you can become productive writing PHP code. The learning curve is so gentle that you can hardly notice it. Another surprising thing I found in WP&#8217;s codebase is that rather than passing multiple parameters to a given method, they encode all the parameters for that method in a string and then pass that in. Weird.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2011/06/19/introducing-the-robot-attack-theme-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducting Trimify</title>
		<link>http://www.behrang.org/en/blog/2011/06/12/introducting-trimify/</link>
		<comments>http://www.behrang.org/en/blog/2011/06/12/introducting-trimify/#comments</comments>
		<pubDate>Sun, 12 Jun 2011 08:45:42 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyGems]]></category>
		<category><![CDATA[Trimify]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=203</guid>
		<description><![CDATA[Quite often users accidentally add redundant white spaces before or after text they enter in web forms. This can lead to an inconsistent database and also complicate, or even worse, break model validation. As such it&#8217;s necessary to intercept all textual data and remove these extraneous white spaces before models are validated and form data [...]]]></description>
				<content:encoded><![CDATA[<p>Quite often users accidentally add redundant white spaces before or after text they enter in web forms.  This can lead to an inconsistent database and also complicate, or even worse, break model validation. As such it&#8217;s necessary to intercept all textual data and remove these extraneous white spaces before models are validated and form data are persisted. Trimify is a Ruby gem that automates this process.</p>
<p>For example, let&#8217;s pretend that we have a Post model that has a title and a body. In order to trim content of title and body before validation, all we have to do is:</p>
<p><script src="http://gist.github.com/1021350.js"></script></p>
<p>By default, trimify converts blank strings to <tt>nil</tt>. This can be overridden by setting the <tt>:nilify</tt> option to <tt>false</tt>:</p>
<p><script src="http://gist.github.com/1021351.js"></script></p>
<p>The current version of Trimify is only compatible with Rails 2.3 but I am planning to release a Rails 3 compatible version soon. To use Trimify simply install it by running <tt>gem install trimify</tt>. The project is hosted at <a href="https://github.com/behrangsa/trimify">Github</a>.</p>
<h2>Acknowledgments</h2>
<p>Trimify is inspired by the <a href="https://github.com/grobie/nilify">nilify</a> plugin written by Tobias Schmidt.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2011/06/12/introducting-trimify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby/Rails vs Java</title>
		<link>http://www.behrang.org/en/blog/2010/12/29/rails-vs-java/</link>
		<comments>http://www.behrang.org/en/blog/2010/12/29/rails-vs-java/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 03:06:39 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=173</guid>
		<description><![CDATA[You guys remember this 2005 comparison? Fast forward to 2010 (almost 2011). Now check this: (Source: Zen and the Art of Programming) Muhahaha!]]></description>
				<content:encoded><![CDATA[<p>You guys remember this 2005 <a href="http://www.amedias.org/archives/20050922/comparativa-grafica-entre-java-y-rails/">comparison</a>?</p>
<p><img onload="NcodeImageResizer.createOn(this);" src="http://www.amedias.org/img/java_vs_rails_books.jpg" alt="Rails vs Java - 2005" /></p>
<p>Fast forward to 2010 (almost 2011). Now check this:</p>
<p><img onload="NcodeImageResizer.createOn(this);" src="http://programmingzen.com/images/bookpile.png" alt="Rails - 2010" /></p>
<p>(Source: <a href="http://programmingzen.com">Zen and the Art of Programming</a>)</p>
<p>Muhahaha! <img onload="NcodeImageResizer.createOn(this);" src='http://www.behrang.org/en/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/12/29/rails-vs-java/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Closures for Java open a new door for logging: Logosure</title>
		<link>http://www.behrang.org/en/blog/2010/12/27/closures-for-java-open-a-new-door-for-logging-logosure/</link>
		<comments>http://www.behrang.org/en/blog/2010/12/27/closures-for-java-open-a-new-door-for-logging-logosure/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 06:24:49 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Closures]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[SL4J]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=167</guid>
		<description><![CDATA[For a long time we Java programmers have relied on conditional blocks to guard against unneeded string concatenations and other expensive computations that occur when we want to create complex log messages. In other words, we want those concatenations to occur only when the logger will actually log them. While SL4J&#8217;s use of vararg parameters [...]]]></description>
				<content:encoded><![CDATA[<p>For a long time we Java programmers have relied on conditional blocks to guard against unneeded string concatenations and other expensive computations that occur when we want to create complex log messages. In other words, we want those concatenations to occur only when the logger will actually log them.</p>
<p>While SL4J&#8217;s use of vararg parameters eliminates a huge chunk of these conditional blocks, there still are (possibly rare) cases that creating a log message involves more than just string concatenations and as such it is still necessary to guard the block of logging logic inside a conditional block.</p>
<p>Thanks to Java closures this is not true anymore. In what follows I present a basic implementation of a prototype proof-of-concept logger called Logosure that relies on BGGA closures and skips execution of chunks of logging logic when their corresponding levels are turned off.</p>
<h1>The Logger</h1>
<p>Our logger is very simple. It only contains two different logging levels: INFO and WARNING. For the sake of simplicity, the levels do not have parent-child relationship. In other words, if the logger&#8217;s level is set to INFO, it only emits INFO level logging messages and when it&#8217;s set to WARNING it only emits WARNING level log messages.</p>
<p>Again, for the sake of simplicity, our logger only prints to the standard output.</p>
<p><script src="http://gist.github.com/1007513.js"></script></p>
<p>And Level is an enum:</p>
<p><script src="http://gist.github.com/1007515.js"></script></p>
<p>The only interesting part of this logger class is the first log method: it receives a function type as its second parameter that returns a String object. It invokes the logging block passed to it only if the current logging level is equal to the level passed in as the argument. Using this Logger is very simple:</p>
<p><script src="http://gist.github.com/1007516.js"></script></p>
<p>In the example above the code inside the third logging block won&#8217;t be executed at all. This happens all without littering our source code with conditional blocks.</p>
<p>As Java closures are still work in progress and the syntax is still a matter of debate it is too soon to implement a full-fledged closure based logger, but I believe that once Java closures become finalized we will see logging frameworks adopt closures in similar ways.</p>
<p>You can fork the current version of Logosure from <a href="https://github.com/behrangsa/logosure">Github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/12/27/closures-for-java-open-a-new-door-for-logging-logosure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A small Groovy script for &#8220;cleaning&#8221; your Delicious bookmarks</title>
		<link>http://www.behrang.org/en/blog/2010/11/22/a-small-groovy-script-for-cleaning-your-delicious-bookmarks/</link>
		<comments>http://www.behrang.org/en/blog/2010/11/22/a-small-groovy-script-for-cleaning-your-delicious-bookmarks/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 10:21:18 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Delicious]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=161</guid>
		<description><![CDATA[This is a quick-and-dirty Groovy scriptlet I created yesterday to transform all my delicious tags to lowercase: Now someone should &#8220;dash-separatize&#8221; all my compound keywords! Duh!]]></description>
				<content:encoded><![CDATA[<p>This is a quick-and-dirty Groovy scriptlet I created yesterday to transform all my delicious tags to lowercase:</p>
<p><script src="http://gist.github.com/1007517.js"></script></p>
<p>Now someone should &#8220;dash-separatize&#8221; all my compound keywords! Duh!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/11/22/a-small-groovy-script-for-cleaning-your-delicious-bookmarks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Java and XSLT: A bug story</title>
		<link>http://www.behrang.org/en/blog/2010/11/13/java-and-xslt-a-bug-story/</link>
		<comments>http://www.behrang.org/en/blog/2010/11/13/java-and-xslt-a-bug-story/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 02:18:51 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Xalan]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=147</guid>
		<description><![CDATA[A few days ago I was busy removing our project&#8217;s dependency on Apache Xalan and Xerces (we wanted to use Java&#8217;s built-in implementation of XML and XSL APIs). In some of our XSL files, we use Xalan-Java Extensions to call Java methods from the stylesheet file. After removing the Xalan and Xerces JAR files from [...]]]></description>
				<content:encoded><![CDATA[<p>A few days ago I was busy removing our project&#8217;s dependency on Apache Xalan and Xerces (we wanted to use Java&#8217;s built-in implementation of XML and XSL APIs). In some of our XSL files, we use <a href="http://xml.apache.org/xalan-j/extensions.html">Xalan-Java Extensions</a> to call Java methods from the stylesheet file. After removing the Xalan and Xerces JAR files from the class-path and deleting all the references to Xalan specific namespaces and tags from the stylesheet files, all stylesheet parsing and compilation errors disappeared, but the output generated by Java&#8217;s built-in version of XSL [cci lang="java"]TransformerFactory[/cci] was different to what used to be generated by Xalan.</p>
<p>After some investigation it turned out that <em>some</em> calls to Java code from the XSLT files are being ignored by the transformer. Debugging the code and stepping through all the method calls down to XSLTC and other internal classes did not uncover the reason for the mysterious skipping of these Java calls.</p>
<p>Suddenly something came to my attention: in some of the XSLT files, we are not interested in the value returned by the Java call; we only call a method to modify the state of the Java class. To do so, we declare a variable in the form of:</p>
<p><script src="http://gist.github.com/1007520.js"></script></p>
<p>To call [cci lang="java"]aUtilityMethod()[/cci] and then never use [cci lang="XML"]$ununsedVariable[/cci] anywhere in the XSLT file again. I decided to use one of these variables in the XSLT file to see if that forces the XSL transformer to call the method, so I added a harmless comment right after the variable declaration in the form of:</p>
<p><script src="http://gist.github.com/1007523.js"></script></p>
<p>Voila! Now the transformer is calling [cci lang="java"]aUtilityMethod()[/cci]. It turned out that Java&#8217;s default built-in version of [cci lang="Java"]TransformerFactory[/cci] is either skipping running the select expression for unused variables or is doing it lazily. Considering that XPath expressions are side-effect free and that they only return a set of nodes, it makes sense to implement suchlike optimizations, but the optimizer should check the select expression and omit the optimization if it is a Java call.</p>
<p>But is it a bug? Well, yes and no. The truth is that it&#8217;s not working correctly. But on the other hand, as this feature is an undocumented and internal feature of the default XSLT implementation of the JDK, it is an unsupported feature and it is better to avoid its use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/11/13/java-and-xslt-a-bug-story/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Layer vs Tier</title>
		<link>http://www.behrang.org/en/blog/2010/11/02/layer-vs-tier/</link>
		<comments>http://www.behrang.org/en/blog/2010/11/02/layer-vs-tier/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 05:42:43 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[SCEA]]></category>
		<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=140</guid>
		<description><![CDATA[Some architects use the term &#8220;layer&#8221; when they to refer to logical grouping of components and &#8220;tier&#8221; to refer to their physical grouping. However Mark Cede and Humphrey Sheil, in their book on the SCEA exam, define layer and tier somewhat differently. They define tier as &#8230; logical or physical organization of components into an [...]]]></description>
				<content:encoded><![CDATA[<p>Some architects use the term &#8220;layer&#8221; when they to refer to logical grouping of components and &#8220;tier&#8221; to refer to their physical grouping. However Mark Cede and Humphrey Sheil, in their book on the SCEA exam, define layer and tier somewhat differently. They define tier as <q>&#8230; logical or physical organization of components into an ordered chain of service providers and consumers</q>. They refer to client, web/presentation, business, integration, and resource as traditional tiers in architecture. Makes sense.</p>
<p>Then they define a layer as a piece of the hardware and software stack that hoses services within a given tier. This definition of layer is different to other definitions I&#8217;ve seen so far. They list virtual platform, application, infrastructure, enterprise services, compute and storage, and networking structure as typical layers of an architecture.</p>
<p>While this definition is somehow different, it makes total sense to consider all these aspects when designing an architecture: Are we going to deploy to Weblogic or JBoss? Are we deploying to Windows or Linux? Will we deploy the application on one or more many-core servers or cheaper multi-core systems? Will we use a high performance PCI-e based solid state storage as our storage system or are we going to use traditional rack-based NAS storages? What DBMS are we going to choose and why?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/11/02/layer-vs-tier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decomposition, coupling and cohesion, and volatility</title>
		<link>http://www.behrang.org/en/blog/2010/11/02/decomposition-coupling-and-cohesion-and-volatility/</link>
		<comments>http://www.behrang.org/en/blog/2010/11/02/decomposition-coupling-and-cohesion-and-volatility/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 04:30:57 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[SCEA]]></category>
		<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=137</guid>
		<description><![CDATA[Decomposition by &#8220;coupling and cohesion&#8221; and &#8220;volatility&#8221; are two architectural decomposition methods that are unlikely to be used together in the same project. However it&#8217;s possible to first decompose by CoC and identify the parts of the system that should be kept together, and then use decomposition by volatility to isolate the parts that are [...]]]></description>
				<content:encoded><![CDATA[<p>Decomposition by &#8220;coupling and cohesion&#8221; and &#8220;volatility&#8221; are two architectural decomposition methods that are unlikely to be used together in the same project. However it&#8217;s possible to first decompose by CoC and identify the parts of the system that should be kept together, and then use decomposition by volatility to isolate the parts that are likely to change in the future. This means that we might need to reduce the cohesion of the system to some extent, but it should make changing or replacing the volatile parts of the system less of a hassle.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/11/02/decomposition-coupling-and-cohesion-and-volatility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Complexity vs Sophistication</title>
		<link>http://www.behrang.org/en/blog/2010/08/17/quotable-quotes-4/</link>
		<comments>http://www.behrang.org/en/blog/2010/08/17/quotable-quotes-4/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 02:07:38 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Quotes]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=132</guid>
		<description><![CDATA[Increasingly, people seem to misinterpret complexity as sophistication, which is baffling &#8212; the incomprehensible should cause suspicion rather than admiration. — Nikolaus Wirth]]></description>
				<content:encoded><![CDATA[<blockquote><p>Increasingly, people seem to misinterpret complexity as sophistication, which is baffling &#8212; the incomprehensible should cause suspicion rather than admiration. — Nikolaus Wirth</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/08/17/quotable-quotes-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One more reason to like IntelliJ IDEA</title>
		<link>http://www.behrang.org/en/blog/2010/08/14/one-more-reason-to-like-intellij-idea/</link>
		<comments>http://www.behrang.org/en/blog/2010/08/14/one-more-reason-to-like-intellij-idea/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 11:23:55 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[IntelliJ IDEA]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[NetBeans]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=124</guid>
		<description><![CDATA[So in my last post I complained about Eclipse developers&#8217; unwillingness for fixing long standing bugs. Now less than a year ago, I suggested to JetBrains to add a feature to IDEA that can come in handy when you want to quickly setup a project: Defining Libraries as Maven Coordinates This enables developers to quickly [...]]]></description>
				<content:encoded><![CDATA[<p>So in my last post I complained about Eclipse developers&#8217; unwillingness for fixing long standing bugs. Now less than a year ago, I <a href="http://youtrack.jetbrains.net/issue/IDEABKL-5789?query=by%3A+behrangsa">suggested</a> to JetBrains to add a feature to IDEA that can come in handy when you want to quickly setup a project:</p>
<blockquote><h3>Defining Libraries as Maven Coordinates</h3>
<p>This enables developers to quickly define libraries as Maven coordinates even in projects that do not use Maven and then IDEA can download the appropriate JAR files for the project from Maven repos.</p>
<p>This can be done either by asking the developer to enter the dependencies in a text field like:</p>
<p><script src="http://gist.github.com/1007528.js"></script></p>
<p>And also by providing a text field for entering additional repositories:</p>
<p><script src="http://gist.github.com/1007529.js"></script></p>
<p>[or] Alternatively, a short form syntax might be used for declaring the coordinates:</p>
<p><script src="http://gist.github.com/1007530.js"></script></p>
<p>Also there should be selectable options for downloading source and JavaDocs for the libraries from Maven as well.</p></blockquote>
<p>And yes my friends! IDEA gurus do pay attention to their users&#8217; requests. This feature has now been <a href="http://blogs.jetbrains.com/idea/2010/08/getting-external-libraries-easily/?utm_source=feedburner&#038;utm_medium=feed&#038;utm_campaign=Feed%3A+jetbrains_intellijidea+%28JetBrains+IntelliJ+IDEA+Blog%29&#038;utm_content=Twitter">added</a> to IntelliJ IDEA X, the next version of the IDE:</p>
<blockquote><h3>Getting External Libraries Easily</h3>
<p>JARs of many frameworks and their dependencies get updated too often now. But you do not want to turn your project into a Maven project just because of this? Then this feature is just for you.</p>
<p>In IntelliJ IDEA 10 you can search for &#038; download libraries with dependencies for any framework published on some public maven repository. Minimum Maven experience is required. Just click ‘Attach Classes from Repository…‘</p></blockquote>
<p>Now let&#8217;s see when they will add my other feature request to IDEA: <a href="http://youtrack.jetbrains.net/issue/IDEA-57477?query=by%3A+behrangsa">@SuppressWarnings like feature for HTML elements</a>.</p>
<p>To be fair, the NetBeans team has also fixed all the bugs that I&#8217;ve reported to them very quickly. But, Eclipse&#8230; no matter how great you are and how great your architecture is, your WTP is <em>sooo</em> buggy and years after Maven&#8217;s debut, you still don&#8217;t have a rock solid Maven plugin. Shame on you mate!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/08/14/one-more-reason-to-like-intellij-idea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse Helios: Fail!</title>
		<link>http://www.behrang.org/en/blog/2010/07/31/eclipse-helios-fail/</link>
		<comments>http://www.behrang.org/en/blog/2010/07/31/eclipse-helios-fail/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 21:58:06 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Helios]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=119</guid>
		<description><![CDATA[Eclipse developers have failed to fix a bug that was first reported about 7 years ago: Bug 41431 Bug 153692]]></description>
				<content:encoded><![CDATA[<p>Eclipse developers have failed to fix a bug that was first reported about 7 years ago:</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/7FsYrZoiSNc&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/7FsYrZoiSNc&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=41431">Bug 41431</a><br />
<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=153692">Bug 153692</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/07/31/eclipse-helios-fail/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Abstraction vs. Vagueness</title>
		<link>http://www.behrang.org/en/blog/2010/07/26/quotable-quotes-3/</link>
		<comments>http://www.behrang.org/en/blog/2010/07/26/quotable-quotes-3/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 23:58:10 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Quotes]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=116</guid>
		<description><![CDATA[Being abstract is something profoundly different from being vague&#8230; The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise. &#8212; Edsger Dijkstra Source: Best Programming Quotes]]></description>
				<content:encoded><![CDATA[<blockquote><p>Being abstract is something profoundly different from being vague&#8230; The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise. &mdash; Edsger Dijkstra</p></blockquote>
<p>Source: <a href="http://www.linfo.org/q_programming.html">Best Programming Quotes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/07/26/quotable-quotes-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three tools for testing email sending using SMTP</title>
		<link>http://www.behrang.org/en/blog/2010/07/17/three-tools-for-testing-email-sending-using-smtp/</link>
		<comments>http://www.behrang.org/en/blog/2010/07/17/three-tools-for-testing-email-sending-using-smtp/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 13:40:56 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Mocking]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=108</guid>
		<description><![CDATA[1: smtp4dev: Windows 7/Vista/XP/2003/2010 compatible dummy SMTP server. Sits in the system tray and does not deliver the received messages. The received messages can be quickly viewed, saved and the source/structure inspected. Useful for testing/debugging software that generates email. I have been using this for quite some time now and it is working seamlessly. 2: [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.behrang.org/en/blog/wp-content/uploads/2010/07/email.jpg"><img onload="NcodeImageResizer.createOn(this);" src="http://www.behrang.org/en/blog/wp-content/uploads/2010/07/email.jpg" alt="Email" title="Email" width="257" height="300" class="alignright size-full wp-image-109" /></a>1: <a href="http://smtp4dev.codeplex.com/">smtp4dev</a>: <q>Windows 7/Vista/XP/2003/2010 compatible dummy SMTP server. Sits in the system tray and does not deliver the received messages. The received messages can be quickly viewed, saved and the source/structure inspected. Useful for testing/debugging software that generates email.</q> I have been using this for quite some time now and it is working seamlessly.</p>
<p>2: <a href="http://mocksmtpapp.com/">MockSMTP.app</a>: <q>MockSMTP is a native Mac application that embeds its own SMTP server. It also features an e-mail client browser, enabling instant viewing of both raw content and HTML rendering, so you can see how your mail looks when delivered.</q> A nice product overall but is buggy.</p>
<p>3: <a href="http://quintanasoft.com/dumbster/">Dumbster</a>: <q>The Dumbster is a very simple fake SMTP server designed for unit and system testing applications that send email messages. It responds to all standard SMTP commands but does not deliver messages to the user. The messages are stored within the Dumbster for later extraction and verification.</q> The best option among the three for unit testing Java applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/07/17/three-tools-for-testing-email-sending-using-smtp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL, Foreign Keys, InnoDB, and ERROR 1005</title>
		<link>http://www.behrang.org/en/blog/2010/07/16/mysql-foreign-keys-innodb-and-error-1005/</link>
		<comments>http://www.behrang.org/en/blog/2010/07/16/mysql-foreign-keys-innodb-and-error-1005/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 16:02:35 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[CHARSET]]></category>
		<category><![CDATA[Foreign Key]]></category>
		<category><![CDATA[InnoDB]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=100</guid>
		<description><![CDATA[For quite some time I had faced this mysterious problem with MySQL where it was refusing to create a new table in our application&#8217;s database with a foreign key relationship to one of its existing tables. The error message MySQL was displaying was not very helpful: [cc]ERROR 1005 (HY000): Can&#8217;t create table &#8216;DB_NAME.TBL_NAME&#8217; (errno: 150)[/cc] [...]]]></description>
				<content:encoded><![CDATA[<p>For quite some time I had faced this mysterious problem with MySQL where it was refusing to create a new table in our application&#8217;s database with a foreign key relationship to one of its existing tables. The error message MySQL was displaying was not very helpful:<br />
[cc]ERROR 1005 (HY000): Can&#8217;t create table &#8216;DB_NAME.TBL_NAME&#8217; (errno: 150)[/cc]<br />
[cci lang="sql"]SHOW INNODB STATUS[/cci] was not helpful either:<br />
[cc lang="sql"]<br />
LATEST FOREIGN KEY ERROR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
100716  1:27:25 Error in foreign key constraint of table DB_NAME/TBL_NAME:<br />
foreign key (COL_NAME) references ANOTHER_TBL_NAME(ID_COL_NAME)) default charset=&#8217;UTF8&#8242; engine=InnoDB:<br />
Cannot find an index in the referenced table where the<br />
referenced columns appear as the first columns, or column types<br />
in the table and the referenced table do not match for constraint.<br />
Note that the internal storage type of ENUM and SET changed in<br />
tables created with &gt;= InnoDB-4.1.12, and such columns in old tables<br />
cannot be referenced by such columns in new tables.<br />
See http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html<br />
for correct foreign key definition.<br />
[/cc]<br />
Oddly enough MySQL had no problem creating two new tables with a foreign key relationship between them. Well, long story short, it turned out that the old tables were using <tt>latin1</tt> charset whereas the default charset for my MySQL installation was <tt>UTF8</tt> and also the columns that had a foreign key relationship between them were <tt>varchar</tt> columns<sup>*</sup>.</p>
<p>The solution was quite easy: explicitly setting the charset to <tt>latin1</tt> in create table statements (or alternatively changing the default charset of the database to <tt>latin1</tt>).</p>
<p><sup>*</sup>Use of VARCHARS should be avoided in primary key columns.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/07/16/mysql-foreign-keys-innodb-and-error-1005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programmer&#8217;s Drinking Song</title>
		<link>http://www.behrang.org/en/blog/2010/07/15/quotable-quotes-2/</link>
		<comments>http://www.behrang.org/en/blog/2010/07/15/quotable-quotes-2/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 12:08:37 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Quotes]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=95</guid>
		<description><![CDATA[Programmer&#8217;s Drinking Song (sung to the tune of &#8220;100 Bottles of Beer&#8221;) 99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again 101 little bugs in the code. 101 little bugs in the code&#8230; (Repeat until BUGS = 0) Well, this one was quite funny. Probably one more [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p>
Programmer&#8217;s Drinking Song (sung to the tune of &#8220;100 Bottles of Beer&#8221;)<br />
99 little bugs in the code,<br />
99 bugs in the code,<br />
fix one bug, compile it again<br />
101 little bugs in the code.<br />
101 little bugs in the code&#8230;<br />
(Repeat until BUGS = 0)
</p></blockquote>
<p>Well, this one was quite funny. Probably one more reason to write tests? Also, in Java and a number of other languages, <q>Repeat until BUGS = 0</q> is just <q>one little bug in the code</q> <img onload="NcodeImageResizer.createOn(this);" src='http://www.behrang.org/en/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/07/15/quotable-quotes-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On software meeting its specifications</title>
		<link>http://www.behrang.org/en/blog/2010/07/12/quotable-quotes-1/</link>
		<comments>http://www.behrang.org/en/blog/2010/07/12/quotable-quotes-1/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 08:00:48 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Quotes]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=92</guid>
		<description><![CDATA[Writing software that fully meets its specifications is like walking on water. For each, the former is easy if the later is frozen and near impossible if fluid. Source: Quotes on Requirements and Users]]></description>
				<content:encoded><![CDATA[<blockquote><p>Writing software that fully meets its specifications is like walking on water. For each, the former is easy if the later is frozen and near impossible if fluid.</p></blockquote>
<p>Source: <a href="http://www.c2.com/cgi-bin/wiki?QuotesOnRequirementsAndUsers">Quotes on Requirements and Users</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/07/12/quotable-quotes-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JCP Specs should be published in ePub format too</title>
		<link>http://www.behrang.org/en/blog/2010/06/25/jcp-specs-should-be-published-in-epub-format-too/</link>
		<comments>http://www.behrang.org/en/blog/2010/06/25/jcp-specs-should-be-published-in-epub-format-too/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 14:33:12 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ePub]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[JCP]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=74</guid>
		<description><![CDATA[With the ever increasing popularity of electronic book readers such as Amazon&#8217;s Kindle and Apple&#8217;s iPad, JCP should now publish all the Java specs in ePub format too. Unlike their PDF counterparts, ePub readers can render text with the user&#8217;s choice of font family and size. They also use the available display real-estate more efficiently. [...]]]></description>
				<content:encoded><![CDATA[<p>With the ever increasing popularity of electronic book readers such as Amazon&#8217;s Kindle and Apple&#8217;s iPad, JCP should now publish all the Java specs in <a href="http://en.wikipedia.org/wiki/EPUB">ePub</a> format too. Unlike their PDF counterparts, ePub readers can render text with the user&#8217;s choice of font family and size. They also use the available display real-estate more efficiently.</p>
<p>In the near future ePub will be at least as important as PDF when it comes to electronic documents and books.</p>
<p>Simply send an email to the <a href="http://jcp.org/en/resources/contacts">JCP PMO</a> and let them know that you&#8217;d like the JCP specs to be published as ePub documents too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/06/25/jcp-specs-should-be-published-in-epub-format-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Microsoft working on a version of .NET for OS X?</title>
		<link>http://www.behrang.org/en/blog/2010/05/28/is-microsoft-working-on-a-version-of-net-for-os-x/</link>
		<comments>http://www.behrang.org/en/blog/2010/05/28/is-microsoft-working-on-a-version-of-net-for-os-x/#comments</comments>
		<pubDate>Thu, 27 May 2010 14:02:41 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=69</guid>
		<description><![CDATA[Looks like Steve Ballmer will be part of this year&#8217;s WWDC keynote presentation: According to Trip Chowdhry, an analyst with tiny Global Equities Research, 7 minutes of Steve Jobs&#8217; keynote is allotted for Microsoft. Microsoft will reportedly be talking about their development tool Visual Studio 2010. The new version of Visual Studio will reportedly allow [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.macrumors.com/2010/05/26/microsofts-steve-ballmer-to-present-during-wwdc-2010-keynote/">Looks</a> like Steve Ballmer will be part of this year&#8217;s WWDC keynote presentation:</p>
<blockquote><p>According to Trip Chowdhry, an analyst with tiny Global Equities Research, 7 minutes of Steve Jobs&#8217; keynote is allotted for Microsoft. Microsoft will reportedly be talking about their development tool Visual Studio 2010. The new version of Visual Studio will reportedly allow developers to write native applications for the iPhone, iPad and Mac OS. </p></blockquote>
<p>But could it be more than that? What if Microsoft announce that they are bringing .NET to OS X as well?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/05/28/is-microsoft-working-on-a-version-of-net-for-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing &#8220;Content Assist&#8221; for implicit objects of JSP pages in Eclipse</title>
		<link>http://www.behrang.org/en/blog/2010/04/06/fixing-content-assist-for-implicit-objects-of-jsp-pages-in-eclipse/</link>
		<comments>http://www.behrang.org/en/blog/2010/04/06/fixing-content-assist-for-implicit-objects-of-jsp-pages-in-eclipse/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 09:30:01 +0000</pubDate>
		<dc:creator>Behi</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Content Assist]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[JBoss Tools]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://www.behrang.org/en/blog/?p=52</guid>
		<description><![CDATA[While Eclipse recognizes implicit objects in JSP pages, it fails to show the content assist popup for them. This can be fixed by adding the appropriate JSP/Servlet JAR files of your application to your project.]]></description>
				<content:encoded><![CDATA[<p>While Eclipse recognizes implicit objects in JSP pages, it fails to show the content assist popup for them. This can be fixed by adding the appropriate JSP/Servlet JAR files of your application to your project. If your target application server is Tomcat 6.0.x, for example, you can create a <em>User Library</em> and add the following Tomcat JAR files to it:</p>
<ul>
<li>annotations-api.jar</li>
<li>el-api.jar</li>
<li>jasper-el.jar</li>
<li>jsp-api.jar</li>
<li>servlet-api.jar</li>
</ul>
<p>And then add this User Library to your project. Now Content Assist should work for implicit objects as well. Alternatively, if your target application server is JBoss and you have JBoss Tools installed, you can select the <em>J2EE 5.0 libraries</em> from the <em>Add Library&#8230;</em> window to enable content assist for your Web app.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.behrang.org/en/blog/2010/04/06/fixing-content-assist-for-implicit-objects-of-jsp-pages-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
