<?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>Cinq Software &#187; code</title>
	<atom:link href="http://cinq.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://cinq.com</link>
	<description>my code</description>
	<lastBuildDate>Tue, 27 Jul 2010 18:30:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to find the jdk version used to compile a java class</title>
		<link>http://cinq.com/2010/07/23/how-to-find-the-jdk-version-used-to-compile-a-java-class/</link>
		<comments>http://cinq.com/2010/07/23/how-to-find-the-jdk-version-used-to-compile-a-java-class/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 20:35:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://cinq.com/?p=95</guid>
		<description><![CDATA[I spent a little bit of time to figure out how to find the jdk version used to compile a java class. On the site stackoverflow they have a great example of java code that can get this information. Unfortunately that did not resolve my problem so I will have to hunt down a bit [...]]]></description>
			<content:encoded><![CDATA[<p>I spent a little bit of time to figure out how to find the jdk version used to compile a java class. On the <a href="http://stackoverflow.com/questions/1293308/java-api-to-find-out-the-jdk-version-a-class-file-is-compiled-for">site stackoverflow they have a great example of java code</a> that can get this information. Unfortunately that did not resolve my problem so I will have to hunt down a bit more on why I get this:</p>
<p>Exception in thread &#8220;main&#8221; java.lang.UnsupportedClassVersionError: Bad version number in .class file<br />
at java.lang.ClassLoader.defineClass1(Native Method)<br />
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)<br />
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)<br />
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)<br />
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)<br />
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)<br />
at java.security.AccessController.doPrivileged(Native Method)<br />
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)<br />
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)<br />
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)<br />
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)<br />
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)</p>
]]></content:encoded>
			<wfw:commentRss>http://cinq.com/2010/07/23/how-to-find-the-jdk-version-used-to-compile-a-java-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How bad is it?</title>
		<link>http://cinq.com/2010/04/15/how-bad-is-it/</link>
		<comments>http://cinq.com/2010/04/15/how-bad-is-it/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 00:28:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://cinq.com/?p=84</guid>
		<description><![CDATA[Laziness is quite the creative motivator sometimes. So I have this application that accepts syslog messages and process them to generate daily stats. The glitch with the current way the code works is that it has hard coded separator for the messages. Just one hard coded separator. It may have worked somewhat fine for a [...]]]></description>
			<content:encoded><![CDATA[<p>Laziness is quite the creative motivator sometimes.</p>
<p>So I have this application that accepts syslog messages and process  them to generate daily stats.</p>
<p>The glitch with the current way the code works is that it has hard  coded separator for the messages. Just one hard coded separator. It may  have worked somewhat fine for a period of time but since I have been  monitoring the situation I can say that it is dropping quite a few  messages every day because of that limitation.</p>
<p>While looking at the code to determine the scope of the change I was  getting less enthusiastic to address the issue as I was discovering more  and more places with the hard coded value.</p>
<p>I put that aside and found something more fun to do for a few  moments.</p>
<p>Then I started to get motivated by laziness&#8230;</p>
<p>So the current idea is to parse the syslog messages that it gets and  replace the different seperator by the one that is hard coded. This  requires the least amount of energy to get it fixed. What I am not sure  is how much technical debt am I accumulating with this idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://cinq.com/2010/04/15/how-bad-is-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The cloud and good programming</title>
		<link>http://cinq.com/2010/03/26/the-cloud-and-good-programming/</link>
		<comments>http://cinq.com/2010/03/26/the-cloud-and-good-programming/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 11:01:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://cinq.com/?p=82</guid>
		<description><![CDATA[I am reading these articles about cloud infrastructure and how much ondemand power you can get for your application and batch processing. So easy and convenient. Does this raw power at pennies make the programmers less efficient? Lazy? Does it matter? I will answer yes to both questions. I think that it makes programmers lazy [...]]]></description>
			<content:encoded><![CDATA[<p>I am reading these articles about cloud infrastructure and how much ondemand power you can get for your application and batch processing. So easy and convenient.</p>
<p>Does this raw power at pennies make the programmers less efficient? Lazy?</p>
<p>Does it matter?</p>
<p>I will answer yes to both questions. I think that it makes programmers lazy because you don&#8217;t have to face the consequences of your laziness. What does it matter that it takes 10% more time because you did not optimize every line? 50%? 90% when the cost is a couple of dollars a day?</p>
<p>Yes it does matter. I inherited an application that the previous programmer did a very good job at putting up and maintaining while he was with us. Now that I took over I have a hard time seeing all the moving parts but as I have to fix and change things I can see wholes in certain places. Lately I have found the code that produces the last 6 months quick view of performance. It goes through the last 6 months of data and does a daily average. Every day. So the code needs the last 6 months of data to be present on the server to go through it over and over to produce a single file that has a 2 lines difference from the previous day. I takes 4 to 5 hours each day. Can it get any funnier? The management answer to this issue was to throw more disk space at the issue since the batch processing is done at night and does not impact the system. Hard disks are cheap.</p>
<p>Imagine this application in the cloud and management asks for a 12 months history view. Everyone would have said no problem we need to provision an other 300 to 400 Gb of space and change 1 configuration file. The cost is minimal.</p>
<p>I personally want to address it in the code and get this optimized. Do you think I am getting any time dedicated to this issue? I am too costly for that option to make sense.</p>
<p>Because I am on physical hardware in our own data center it does matter and it will get addressed by fixing the application. We are restricted since we can&#8217;t had any drive to the server. If this application was in the cloud it would not get any attention?</p>
<p>I can see both sides of the coin and the reasons for the business to make the choice it would but I still think that fixing the application is what need to be done. The technical debt that this has cannot simply be ignored.</p>
]]></content:encoded>
			<wfw:commentRss>http://cinq.com/2010/03/26/the-cloud-and-good-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Decompiler</title>
		<link>http://cinq.com/2009/09/03/java-decompiler/</link>
		<comments>http://cinq.com/2009/09/03/java-decompiler/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 14:12:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://cinq.com/?p=57</guid>
		<description><![CDATA[This is not the first time I do this and it is on the edge of embarrassing except this time I knew I had tools to get me out: lose the source code to a java application. I have this application that was done a year ago and I guess that in the rush to [...]]]></description>
			<content:encoded><![CDATA[<p>This is not the first time I do this and it is on the edge of embarrassing except this time I knew I had tools to get me out: lose the source code to a java application.</p>
<p>I have this application that was done a year ago and I guess that in the rush to get it to production I forgot to import the code in SVN.</p>
<p>A year later we have changed a few things and now I have to change a few lines in the code and add a method to it.</p>
<p>I remembered using a command line tool under Linux to decompile but since I could not remember the name of it I had to search for it. In the first few results of my google search for &#8220;java decompiler&#8221; came this site:</p>
<p><a title="JD" href="http://java.decompiler.free.fr/" target="_blank">http://java.decompiler.free.fr/</a></p>
<p>I tried to install the JD-Eclipse but I don&#8217;t see how to use it so I simply downloaded and used the JD-Gui for Linux and it works beautifully. I can see my source code in the .class file in 2 seconds and now I can easily change it. This is so convenient.</p>
]]></content:encoded>
			<wfw:commentRss>http://cinq.com/2009/09/03/java-decompiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New programming Style</title>
		<link>http://cinq.com/2009/08/18/new-programming-style/</link>
		<comments>http://cinq.com/2009/08/18/new-programming-style/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 11:40:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://cinq.com/?p=50</guid>
		<description><![CDATA[Saw this article from a twit and I am unsure how I can do all these: http://codemonkeyism.com/generation-java-programming-style/ Interesting and if I do any code with this I will post an other entry to let you know how it went.]]></description>
			<content:encoded><![CDATA[<p>Saw this article from a twit and I am unsure how I can do all these:</p>
<p><a href="http://codemonkeyism.com/generation-java-programming-style/">http://codemonkeyism.com/generation-java-programming-style/</a></p>
<p>Interesting and if I do any code with this I will post an other entry to let you know how it went.</p>
]]></content:encoded>
			<wfw:commentRss>http://cinq.com/2009/08/18/new-programming-style/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java MVC</title>
		<link>http://cinq.com/2009/06/09/java-mvc/</link>
		<comments>http://cinq.com/2009/06/09/java-mvc/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 01:48:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Java MVC]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://cinq.com/?p=45</guid>
		<description><![CDATA[I have to read a bit more on the subject but this article was interesting since it shows how to do in Java what Apple Cacao does with the MVC model. I find this twist to be easier to understand. http://java.sun.com/developer/technicalArticles/javase/mvc/]]></description>
			<content:encoded><![CDATA[<p>I have to read a bit more on the subject but this article was interesting since it shows how to do in Java what Apple Cacao does with the MVC model. I find this twist to be easier to understand.</p>
<p><a href="http://java.sun.com/developer/technicalArticles/javase/mvc/">http://java.sun.com/developer/technicalArticles/javase/mvc/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cinq.com/2009/06/09/java-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Anti-Pattern</title>
		<link>http://cinq.com/2009/05/05/java-anti-pattern/</link>
		<comments>http://cinq.com/2009/05/05/java-anti-pattern/#comments</comments>
		<pubDate>Tue, 05 May 2009 14:28:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://cinq.com/?p=39</guid>
		<description><![CDATA[http://odi.ch/prog/design/newbies.php This explains a few things that should be done differently if you want your application to perform well. Very interesting!]]></description>
			<content:encoded><![CDATA[<p><a href="http://odi.ch/prog/design/newbies.php">http://odi.ch/prog/design/newbies.php</a></p>
<p>This explains a few things that should be done differently if you want your application to perform well. Very interesting!</p>
]]></content:encoded>
			<wfw:commentRss>http://cinq.com/2009/05/05/java-anti-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Date and Time calculation simplified with Python</title>
		<link>http://cinq.com/2009/02/09/date-and-time-calculation-simplified-with-python/</link>
		<comments>http://cinq.com/2009/02/09/date-and-time-calculation-simplified-with-python/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 17:09:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://cinq.com/?p=34</guid>
		<description><![CDATA[When looking at java garbage collection logs you only get logs with a time stamp in seconds from the start of the JVM. After a few days of running the JVM it is difficult to remember when it started and when is the event your are looking at from. I was looking for a quick [...]]]></description>
			<content:encoded><![CDATA[<p>When looking at java garbage collection logs you only get logs with a time stamp in seconds from the start of the JVM. After a few days of running the JVM it is difficult to remember when it started and when is the event your are looking at from. I was looking for a quick way to calculate the time. Python has some nice facilities built-in to help with that task. Here is what I do from the command line to figure out the last time it was started:</p>
<p>[bash]$ python<br />
&gt;&gt;&gt; from datetime import datetime<br />
&gt;&gt;&gt; from datetime import timedelta<br />
&gt;&gt;&gt; datetime(2009,2,9,10,48) &#8211; timedelta(seconds=159565)<br />
datetime.datetime(2009, 2, 7, 14, 28, 35)</p>
<p>The datetime object is initialized with the date I want. In this case it was February 9, 2009 at 10:48. The timedelta object is initialized with a number of seconds but it could be days or min.</p>
<p>Very quick and convenient.</p>
]]></content:encoded>
			<wfw:commentRss>http://cinq.com/2009/02/09/date-and-time-calculation-simplified-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Python Learning</title>
		<link>http://cinq.com/2009/01/29/quick-python-learning/</link>
		<comments>http://cinq.com/2009/01/29/quick-python-learning/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 02:01:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://cinq.com/?p=33</guid>
		<description><![CDATA[A friend recommended this link and I have to admit that I am learning quite a few things about Python on this single page. http://www.poromenos.org/tutorials/python/ There are quite a few things that I will need to test to fully understand.]]></description>
			<content:encoded><![CDATA[<p>A friend recommended this link and I have to admit that I am learning quite a few things about Python on this single page.</p>
<p><a href="http://www.poromenos.org/tutorials/python">http://www.poromenos.org/tutorials/python/</a></p>
<p>There are quite a few things that I will need to test to fully understand.</p>
]]></content:encoded>
			<wfw:commentRss>http://cinq.com/2009/01/29/quick-python-learning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code kata</title>
		<link>http://cinq.com/2008/06/26/code-kata/</link>
		<comments>http://cinq.com/2008/06/26/code-kata/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 16:20:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[documentation]]></category>

		<guid isPermaLink="false">http://cinq.com/?p=25</guid>
		<description><![CDATA[Until I followed a link from a twitter friend I had never heard of this term. As a small time programmer I am always looking for ways to improve the code that I do and I also look at ways to improve myself as a programmer. Code kata is certainly a generic approach at these [...]]]></description>
			<content:encoded><![CDATA[<p>Until I followed a link from a twitter friend I had never heard of this term.</p>
<p>As a small time programmer I am always looking for ways to improve the code that I do and I also look at ways to improve myself as a programmer. Code kata is certainly a generic approach at these goals that is worth reading about.</p>
<p>Not everything they propose I will be able to try right away. It all depends on your environment.</p>
<p>It is more than just practicing at solving specific coding puzzle. It is about learning the tools that you use, communicating with the people that are around you, reading code that others do and try to maintain it, getting code reviews and much more.</p>
<p>I have to sit down and write what I will do to improve my programming ways. What I think easily make sense and that I can do rapidly:</p>
<ol>
<li>read about new features in Eclipse</li>
<li>read about codig algorithm in Java</li>
<li>learn Python</li>
<li>I have to ask a programmer at work to review some of my code</li>
</ol>
<p>If I can get those done in the next month I will see some improvement for sure.</p>
]]></content:encoded>
			<wfw:commentRss>http://cinq.com/2008/06/26/code-kata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
