<?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>Misfiring Neurons &#187; Programming</title>
	<atom:link href="http://pavel.tcholakov.net/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://pavel.tcholakov.net</link>
	<description>Just another geek with a blog</description>
	<lastBuildDate>Wed, 24 Feb 2010 16:30:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Annotation-based dispatch for Spring ApplicationEvents</title>
		<link>http://pavel.tcholakov.net/2009/04/annotation-based-dispatch-for-spring-applicationevents/</link>
		<comments>http://pavel.tcholakov.net/2009/04/annotation-based-dispatch-for-spring-applicationevents/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 13:20:33 +0000</pubDate>
		<dc:creator>Pavel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Spring Framework]]></category>

		<guid isPermaLink="false">http://pavel.tcholakov.net/?p=131</guid>
		<description><![CDATA[I created a little extension that allows you to dispatch Spring application context events in a clean and type-safe way to POJO beans. Instead of implementing the ApplicationListener interface, one can simply create a handler as follows:

public class EventListener {
    @EventHandler
    public void onAppEvent(MyCustomEvent event) {
        // ...
    }
}

The code is available as a zipped [...]]]></description>
			<content:encoded><![CDATA[<p>I created a little extension that allows you to dispatch Spring application context events in a clean and type-safe way to POJO beans. Instead of implementing the ApplicationListener interface, one can simply create a handler as follows:</p>
<blockquote>
<pre><span style="color: #888888;">public class EventListener {
    @EventHandler
    public void onAppEvent(MyCustomEvent event) {
        // ...
    }
}</span></pre>
</blockquote>
<p>The code is available as a <a href="http://pavel.tcholakov.net/code/eventhandler-annotation-20090408.zip">zipped up Maven project</a> or via Git:</p>
<pre style="padding-left: 30px;"><span style="color: #888888;">git clone http://pavel.tcholakov.net/code/eventhandler-annotation.git/</span></pre>
<p><a href="http://forum.springsource.org/showthread.php?t=70171">Related Spring forum thread</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pavel.tcholakov.net/2009/04/annotation-based-dispatch-for-spring-applicationevents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick and easy image resizing with Java ImageIO</title>
		<link>http://pavel.tcholakov.net/2008/12/quick-and-easy-image-resizing-with-java-imageio/</link>
		<comments>http://pavel.tcholakov.net/2008/12/quick-and-easy-image-resizing-with-java-imageio/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 17:28:07 +0000</pubDate>
		<dc:creator>Pavel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[imageio]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[jpg]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[servlet]]></category>
		<category><![CDATA[thumbnail]]></category>

		<guid isPermaLink="false">http://kay.za.net/?p=120</guid>
		<description><![CDATA[There are quite a lot of examples of image resizing floating around the web but they all seem to access all sort of hidden features and classes deep inside the JDK to achieve their goal. Here is the most straightforward method that I could come up with - all in all just 5 lines of [...]]]></description>
			<content:encoded><![CDATA[<p>There are quite a lot of examples of image resizing floating around the web but they all seem to access all sort of hidden features and classes deep inside the JDK to achieve their goal. Here is the most straightforward method that I could come up with - all in all just 5 lines of code. It requires ImageIO and requires Java 1.4 or later to run. If the ImageIO.write() method accepted plain ol' AWT Image arguments it could have been reduced further still to three lines, but you have to give it a BufferedImage instance as input.</p>
<p>The snippet below assumes that there exist the following variables (coloured <span style="color: #339966;">green</span> in the code):</p>
<ul>
<li>an input stream to read from</li>
<li>a desired width variable (specifying the height as -1 tells the toolkit to preserve the original aspect ratio)</li>
<li>and an output stream to write the encoded image to.</li>
</ul>
<p>Sample code:</p>
<pre style="padding-left: 30px;"><strong><span style="color: #000080;">import </span></strong>java.awt.Image;
<strong><span style="color: #000080;">import </span></strong>java.awt.image.BufferedImage;
<strong><span style="color: #000080;">import </span></strong>javax.imageio.ImageIO;</pre>
<pre style="padding-left: 30px;">// ...

BufferedImage sourceImage = ImageIO.<em>read</em>(<span style="color: #339966;">inputStream</span>);
Image thumbnail = sourceImage.getScaledInstance(<span style="color: #339966;">width</span>, <span style="color: #0000ff;">-1</span>, Image.<em><span style="color: #800080;">SCALE_SMOOTH</span></em>);
BufferedImage bufferedThumbnail = <strong><span style="color: #333399;">new </span></strong>BufferedImage(thumbnail.getWidth(<span style="color: #333399;"><strong>null</strong></span>),
                                                    thumbnail.getHeight(<strong><span style="color: #333399;">null</span></strong>),
                                                    BufferedImage.<em><span style="color: #800080;">TYPE_INT_RGB</span></em>);
bufferedThumbnail.getGraphics().drawImage(thumbnail, <span style="color: #0000ff;">0</span>, <span style="color: #0000ff;">0</span>, <strong><span style="color: #333399;">null</span></strong>);
ImageIO.<em>write</em>(bufferedThumbnail, <span style="color: #0000ff;">"jpeg"</span>, <span style="color: #339966;">outputStream</span>);</pre>
]]></content:encoded>
			<wfw:commentRss>http://pavel.tcholakov.net/2008/12/quick-and-easy-image-resizing-with-java-imageio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Effective Java Updated</title>
		<link>http://pavel.tcholakov.net/2008/06/effective-java-updated/</link>
		<comments>http://pavel.tcholakov.net/2008/06/effective-java-updated/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 18:29:52 +0000</pubDate>
		<dc:creator>Pavel</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[enums]]></category>
		<category><![CDATA[generics]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[threading]]></category>

		<guid isPermaLink="false">http://kay.za.net/?p=69</guid>
		<description><![CDATA[Brush up on your Java 5 bag of tricks with this talk by Joshua Bloch based on his updated Effective Java book (can't recommend it highly enough).

A colleague of mine commented that this book has about the same information density as maths textbooks, so don't be mislead by the low number of pages - it [...]]]></description>
			<content:encoded><![CDATA[<p>Brush up on your Java 5 bag of tricks with this talk by Joshua Bloch based on his updated <a href="http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683">Effective Java</a> book (can't recommend it highly enough).</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/pi_I7oD_uGI"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/pi_I7oD_uGI" type="application/x-shockwave-flash" wmode="transparent" width="425" height="344"></embed></object></p>
<p>A colleague of mine commented that this book has about the same information density as maths textbooks, so don't be mislead by the low number of pages - it is excellent value for money <img src='http://pavel.tcholakov.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://pavel.tcholakov.net/2008/06/effective-java-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QCon Enterprise Service Bus Presentation</title>
		<link>http://pavel.tcholakov.net/2008/06/qcon-enterprise-service-bus-presentation/</link>
		<comments>http://pavel.tcholakov.net/2008/06/qcon-enterprise-service-bus-presentation/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 21:41:14 +0000</pubDate>
		<dc:creator>Pavel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[esb]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[soa]]></category>

		<guid isPermaLink="false">http://kay.za.net/?p=68</guid>
		<description><![CDATA[Jim Webber and Martin Fowler discuss ESBs, agile methods, and... ASCII man-boob p0rn. Must see!
Video at InfoQ.
]]></description>
			<content:encoded><![CDATA[<p>Jim Webber and Martin Fowler discuss ESBs, agile methods, and... ASCII man-boob p0rn. Must see!</p>
<p><a href="http://www.infoq.com/presentations/soa-without-esb">Video at InfoQ</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pavel.tcholakov.net/2008/06/qcon-enterprise-service-bus-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JetBrains&#8217; Dmitry Jemerov on Scala</title>
		<link>http://pavel.tcholakov.net/2008/06/jetbrains-dmitry-jemerov-on-scala/</link>
		<comments>http://pavel.tcholakov.net/2008/06/jetbrains-dmitry-jemerov-on-scala/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 08:08:55 +0000</pubDate>
		<dc:creator>Pavel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jetbrains]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[static typing]]></category>

		<guid isPermaLink="false">http://kay.za.net/?p=66</guid>
		<description><![CDATA[I can rave about JetBrains' IntelliJ IDEA until the cows come home - it is simply a superbly executed and very well focused product. What I found especially interesting  is the following quote on Scala becoming a dominant language for the JVM:
I don't believe that, however: Scala is very complicated, it's tricky, and has a [...]]]></description>
			<content:encoded><![CDATA[<p>I can rave about JetBrains' IntelliJ IDEA until the cows come home - it is simply a superbly executed and very well focused product. What I found especially interesting  is the following quote on Scala becoming a dominant language for the JVM:</p>
<blockquote><p><em>I don't believe that, however: Scala is very complicated, it's tricky, and has a lot of surprises and edge-cases. I would say that Scala is at least as complicated as C++, and with C++ you need a hundred-page style guide before you even start writing C++   code, otherwise you'll end up writing C++   code that nobody will understand.</em></p></blockquote>
<p>Scala gives an impression of great elegance and simplicity at first glance but the same goes for Perl as well. The one feature of Scala I really like is the language-level support for traits which allow reusing multiple concrete implementations similarly to multiple inheritance, but with fewer gotchas.</p>
<p>Via Artima: <a href="http://www.artima.com/lejava/articles/javaone_2008_dmitry_jemerov.html">JetBrains' Dmitry Jemerov on IntelliJ 8, Flex, and Scala</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pavel.tcholakov.net/2008/06/jetbrains-dmitry-jemerov-on-scala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Donald Knuth Interview</title>
		<link>http://pavel.tcholakov.net/2008/05/donald-knuth-interview/</link>
		<comments>http://pavel.tcholakov.net/2008/05/donald-knuth-interview/#comments</comments>
		<pubDate>Tue, 06 May 2008 16:57:54 +0000</pubDate>
		<dc:creator>Pavel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[interview]]></category>

		<guid isPermaLink="false">http://kay.za.net/?p=62</guid>
		<description><![CDATA[I came across this fascinating Donald Knuth interview via Artima. A couple of snippets to pique your interest, one on the subject of open source software:
[...] I think that a few programs, such as Adobe Photoshop, will always be superior to competitors like the Gimp—for some reason, I really don’t know why! I’m quite willing [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this fascinating <a href="http://en.wikipedia.org/wiki/Donald_Knuth">Donald Knuth</a> <a href="http://www.informit.com/articles/article.aspx?p=1193856">interview</a> via Artima. A couple of snippets to pique your interest, one on the subject of open source software:</p>
<blockquote><p><em>[...] I think that a few programs, such as Adobe Photoshop, will always be superior to competitors like the Gimp—for some reason, I really don’t know why! I’m quite willing to pay good money for really good software [...]</em></p></blockquote>
<p>And his opinon of reuse, with which I wholeheartedly agree:</p>
<blockquote><p><em>I also must confess to a strong bias against the fashion for reusable code. To me, "re-editable code" is much, much better than an untouchable black box or toolkit. I could go on and on about this. If you’re totally convinced that reusable code is wonderful, I probably won’t be able to sway you anyway, but you’ll never convince me that reusable code isn’t mostly a menace.</em></p></blockquote>
<p>Other interesting topics he touches on include multi-core processor architectures and <a href="http://en.wikipedia.org/wiki/Extreme_Programming">XP</a>. Happy reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://pavel.tcholakov.net/2008/05/donald-knuth-interview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
