<?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>Changing code</title>
	<atom:link href="http://changingcode.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://changingcode.wordpress.com</link>
	<description>A personal journey through coding</description>
	<lastBuildDate>Wed, 17 Aug 2011 11:07:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='changingcode.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Changing code</title>
		<link>http://changingcode.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://changingcode.wordpress.com/osd.xml" title="Changing code" />
	<atom:link rel='hub' href='http://changingcode.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Kanban for software development</title>
		<link>http://changingcode.wordpress.com/2010/03/16/kanban-for-software-development/</link>
		<comments>http://changingcode.wordpress.com/2010/03/16/kanban-for-software-development/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 20:26:51 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[kanban]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/?p=79</guid>
		<description><![CDATA[In agile methodologies, Kanban is the new kid on the block. Extreme Programming, Scrum are ten years old, while Kanban is relatively new – less than five years. Yet, it’s quite hot: in the blogosphere, one year ago you could find almost nothing about Kanban applied to software engineering, while now it is virtually known [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=79&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In agile methodologies, Kanban is the new kid on the block.<br />
Extreme Programming, Scrum are ten years old, while Kanban is relatively new – less than five years. Yet, it’s quite hot: in the blogosphere, one year ago you could find almost nothing about Kanban applied to software engineering, while now it is virtually known to everybody.</p>
<p>But what is the meaning of Kanban applied to software engineering?<br />
The Kanban system was developed in Toyota more than half a century ago, and is one of the key points of lean manufacturing; its translation in software engineering, however, is not as straightforward and actually I am of the opinion the name is a bit misleading.</p>
<p>In our case, Kanban focuses on workflows, and their optimization.<br />
As it focuses on process improvement, Kanban may be applied to all kind of development processes; the only requirements are a whiteboard, and a good configuration management system.</p>
<p>Analyzing the process, workflow and policies are made explicit.<br />
Then, a limit is set to the work in progress – it means that each phase of the workflow is not allowed to proceed (and may even stop) until the next step is cleared.<br />
Finally, there’s the optimization, based on actual, measured data. Optimization is continuous process, and usually affects workflow itself.</p>
<p>The main advantage of the system lays in its explicitness.<br />
When the process is explicit, everybody can improve it, at any moment: any proposal may be confronted with the hard data, and changes are easier. On the other hand, issues are immediately spotted – just because they will impact on the flow, and there is no way to hide it.<br />
As the process gets streamlined, it becomes more efficient and predictable than before.﻿</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=79&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2010/03/16/kanban-for-software-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>Agile and communication</title>
		<link>http://changingcode.wordpress.com/2010/02/28/agile-and-communication/</link>
		<comments>http://changingcode.wordpress.com/2010/02/28/agile-and-communication/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 19:54:12 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/?p=71</guid>
		<description><![CDATA[I think &#8220;Agile&#8221; is now the place for quite a lot of misconceptions. It is seen as a holy grail, a set of techniques that will allow for a better (or worse, depending on the point of view) software development. But agile is all about communication: discussions between functions, and in general a product as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=71&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I think &#8220;Agile&#8221; is now the place for quite a lot of misconceptions. It is seen as a holy grail, a set of techniques that will allow for a better (or worse, depending on the point of view) software development.<br />
But agile is all about communication: discussions between functions, and in general a product as a result of cooperation and discussion.<br />
While transitioning from a traditional approach to an agile one, the communication is often kept out of the idea; and as a result, you get such dysfunctions, like the case described by Martin Fowler in <a href="http://martinfowler.com/bliki/ConversationalStories.html.">ConversationalStories</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=71&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2010/02/28/agile-and-communication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse HTML editor</title>
		<link>http://changingcode.wordpress.com/2009/01/07/eclipse-html-editor/</link>
		<comments>http://changingcode.wordpress.com/2009/01/07/eclipse-html-editor/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 00:23:10 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2009/01/07/eclipse-html-editor/</guid>
		<description><![CDATA[Most of the time I really love Eclipse; however, sometimes, I really hate it. Currently, I am still using Eclipse 3.3, and as I am doing some “web” development with Django,&#160; I thought I could use WST (Web Standard Tools). However, I could not use it: downloaded, installed, enabled – no chance to see any [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=63&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Most of the time I really love Eclipse; however, sometimes, I really hate it.    <br />Currently, I am still using Eclipse 3.3, and as I am doing some “web” development with <a href="http://djangoproject.com">Django</a>,&#160; I thought I could use WST (Web Standard Tools). However, I could not use it: downloaded, installed, enabled – no chance to see any difference in the system. I am quite sure I am doing something wrong, but, and this is what I really hate in Eclipse, I was not able to find any simple “how to” documentation that could help me in solving the issue.</p>
<p>However, the plugin ecosystem is healthy, and I was then able to find a good replacement in <a href="http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=EclipseHTMLEditor">Amateras HTML Editor Plugin</a>. I quite like it, and even if I have to edit the markup code, I can still see the preview, so it is not so bad after all. And the other tools (like palette, and especially the css editor) are well designed, and helps a lot. Yes, that’s not Dreamweaver, but for the moment I can live with that.</p>
<p>Another option, finally, is <a href="http://www.aptana.com/studio">Aptana Studio</a>. I am using it right now, and it’s better than Amateras. However, it is more invasive, and it has a slight “adware” attitude, because it has full of links for the “extended” version of the plugin, that requires some form of subscription. Nevertheless, it allows for a far better preview of html files, and if you do not care for those links, or (like me) avoid using the Aptana perspective, then it is quite OK: it still forces you to work on source level, but it has a good amount of helpers and the preview works enough to be useful.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=63&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2009/01/07/eclipse-html-editor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>import this</title>
		<link>http://changingcode.wordpress.com/2009/01/03/import-this/</link>
		<comments>http://changingcode.wordpress.com/2009/01/03/import-this/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 19:37:11 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2009/01/03/import-this/</guid>
		<description><![CDATA[The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren&#8217;t special enough to break the rules. Although practicality beats purity. Errors should never [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=62&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p>The Zen of Python, by Tim Peters </p>
<p>Beautiful is better than ugly.      <br />Explicit is better than implicit.       <br />Simple is better than complex.       <br />Complex is better than complicated.       <br />Flat is better than nested.       <br />Sparse is better than dense.       <br />Readability counts.       <br />Special cases aren&#8217;t special enough to break the rules.       <br />Although practicality beats purity.       <br />Errors should never pass silently.       <br />Unless explicitly silenced.       <br />In the face of ambiguity, refuse the temptation to guess.       <br />There should be one&#8211; and preferably only one &#8211;obvious way to do it.       <br />Although that way may not be obvious at first unless you&#8217;re Dutch.       <br />Now is better than never.       <br />Although never is often better than *right* now.       <br />If the implementation is hard to explain, it&#8217;s a bad idea.       <br />If the implementation is easy to explain, it may be a good idea.       <br />Namespaces are one honking great idea &#8212; let&#8217;s do more of those!</p>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=62&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2009/01/03/import-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>Fun to speech</title>
		<link>http://changingcode.wordpress.com/2008/12/29/fun-to-speech/</link>
		<comments>http://changingcode.wordpress.com/2008/12/29/fun-to-speech/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 21:41:55 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[text-to-speech]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2008/12/29/fun-to-speech/</guid>
		<description><![CDATA[Using windows' text to speech is really fun :-)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=61&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:10pt;color:blue;font-family:consolas;">import</span><span style="font-size:10pt;color:black;font-family:consolas;"> win32com.client     <br /></span><span style="font-size:10pt;color:black;font-family:consolas;">reader = win32com.client.Dispatch(</span><i><span style="font-size:10pt;color:#00aa00;font-family:consolas;">&quot;sapi.spvoice&quot;</span></i><span style="font-size:10pt;color:black;font-family:consolas;">)     <br /></span><span style="font-size:10pt;color:black;line-height:115%;font-family:consolas;"><span style="font-size:10pt;color:black;font-family:consolas;">reader</span>.Speak (</span><i><span style="font-size:10pt;color:#00aa00;line-height:115%;font-family:consolas;">&quot;hello, world&quot;</span></i><span style="font-size:10pt;color:black;line-height:115%;font-family:consolas;">)</span></p>
<p> As a matter of facts, this trick is pretty old – at least, as old as Windows XP.  <br />But it is the kind of discover that amuses me like a little boy :-)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=61&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2008/12/29/fun-to-speech/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>Reading list: Design by contract, by Example</title>
		<link>http://changingcode.wordpress.com/2008/05/28/reading-list-design-by-contract-by-example/</link>
		<comments>http://changingcode.wordpress.com/2008/05/28/reading-list-design-by-contract-by-example/#comments</comments>
		<pubDate>Wed, 28 May 2008 17:49:25 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Reading list]]></category>
		<category><![CDATA[Software design]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2008/05/28/reading-list-design-by-contract-by-example/</guid>
		<description><![CDATA[Design by contract, by example is a kind of nice book.I mean, for me, it failed completely to the goal of pushing towards design by contract, and still was very useful: by stressing on immutable classes and some sound design principles guidelines, and by clarifying a language &#8211; functions and objects contracts &#8211; that is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=59&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.com/exec/obidos/ASIN/0201634600/chancode-20"><img style="float:left;margin:0 20px 10px 0;" src="http://images.amazon.com/images/P/0201634600.01.MZZZZZZZ.jpg" align="left" border="0"></a> Design by contract, by example is a kind of nice book.<br />I mean, for me, it failed completely to the goal of pushing towards design by contract, and still was very useful: by stressing on immutable classes and some sound design principles guidelines, and by clarifying a language &#8211; functions and objects contracts &#8211; that is becoming more and more common because of its expressiveness of responsibilities in interfaces.</p>
<p>
<p>I bought it because I was interested in software contracts.<br />Software contracts, as defined by Meyer, are simply an enhanced (and somewhat, object-oriented) version of the pre and post conditions used in algorithm analysis since Donald Knuth.<br />The promise is exceptional: provide bug-free components, able even to avoid bugs like the one that affected the <a href="http://archive.eiffel.com/doc/manuals/technology/contract/ariane/page.html">Arianne 5 crash</a>. Not only: it should allow for an always up-to-date documentation, because it would be an effective part of the object interface.</p>
<p>Unfortunately, the book does nothing to sell really this concept. Instead, it makes it quite clear that you have to use the <a href="http://en.wikipedia.org/wiki/Eiffel_(programming_language)">Eiffel language</a> to unleash all the power of software contracts.<br />Well, sort of.<br />Dynamic languages allows for several extensions to the language, without the need of preprocessors. It is thus possible to add some DBC, like the <a href="http://wiki.python.org/moin/PythonDecoratorLibrary#head-e1a9273f88f2fc4e39faf297279f4d1dc8b2ae66">Pre-Post-Conditions</a> in the Python decorator Library.<br />Unfortunately, although not as cumbersome as using a preprocessor, these methods are not exactly a complete DBC implementation; moreover, unit tests offer a similar confidence in the software, while much easier to introduce as a development practice.
<p>That said, I would really <strong>recommend</strong> the book to anyone willing to improve his design skills.<br />DBC require a completely different design perspective, focusing on a programming style that, by separating queries by operation stress particularly on avoiding side effects, and on a programming style that can easily allow for parallel processing. If it may seems too abstract, the authors show it in a very concrete way, with a complete set of principles and guidelines, and full examples on how to apply them.
<p>The book is also a very good introduction to a terminology (software contracts) that proves very effective expressing concepts and designs &#8211; or to find flaws during a review.<br />Actually, I have found this second aspect even more compelling than the previous. Once the basic idea of software contract is well defined, analysis of interfaces, API and designs is definitely easier; and although these are concepts quite a lot in use nowadays, I still think that an operative definition (even by means of techniques and languages not used in the project) helps quite a lot in their usage and communication.
<p><a href="http://www.amazon.com/exec/obidos/ASIN/0201634600/chancode-20">Design by Contract, by Example</a><br /><b>ISBN</b>: 0201634600<br /><b>ISBN-13</b>: 9780201634600</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/59/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/59/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=59&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2008/05/28/reading-list-design-by-contract-by-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>

		<media:content url="http://images.amazon.com/images/P/0201634600.01.MZZZZZZZ.jpg" medium="image" />
	</item>
		<item>
		<title>Never trust who sends you your password</title>
		<link>http://changingcode.wordpress.com/2008/05/25/never-trust-who-sends-you-your-password/</link>
		<comments>http://changingcode.wordpress.com/2008/05/25/never-trust-who-sends-you-your-password/#comments</comments>
		<pubDate>Sat, 24 May 2008 22:46:21 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2008/05/25/never-trust-who-sends-you-your-password/</guid>
		<description><![CDATA[Because in order to send you your password, they need to know it. Passwords should always be stored as hashes (actually, they should be salted and hashed, but that&#8217;s another story); it should be common knowledge, now.Yet, several websites, even quite big ones, store passwords as plaintext. For this reason, always ask for a password [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=58&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> Because in order to send you your password, they need to know it.</p>
<p>Passwords should always be stored as hashes (actually, they should be salted and hashed, but that&#8217;s another story); it should be common knowledge, now.<br />Yet, several websites, even quite big ones, store passwords as plaintext.</p>
<p>For this reason, always ask for a password reminder. If they will send you your old password (no matter how many checks they will put), then you know they are storing it as plaintext. And that anyone is virtually able to eventually get it, and use it.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/58/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/58/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=58&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2008/05/25/never-trust-who-sends-you-your-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>Developer tests</title>
		<link>http://changingcode.wordpress.com/2008/04/18/developer-tests/</link>
		<comments>http://changingcode.wordpress.com/2008/04/18/developer-tests/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 23:24:02 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Software design]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2008/04/18/developer-tests/</guid>
		<description><![CDATA[Everybody knows what unit testing is.Well, maybe not. Actually, in most environments, unit tests are a kind of empty &#8220;enterprise&#8221; word. Unit test, in their “purest” idea, should test small unit of code (a function, an object, a file, a package) in perfect isolation; usually, this requires the use of stubs or other kind of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=55&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img style="border-width:0;margin:0 20px 10px 0;" height="164" alt="devtesting" src="http://changingcode.files.wordpress.com/2008/04/devtesting.png?w=164&#038;h=164" width="164" align="left" border="0">
<p>Everybody knows what unit testing is.<br />Well, maybe not. Actually, in most environments, unit tests are a kind of empty &#8220;enterprise&#8221; word.
<p>Unit test, in their “purest” idea, should test small unit of code (a function, an object, a file, a package) in perfect isolation; usually, this requires the use of stubs or other kind of fake objects.<br />Of course, we have to be <strong>pragmatic</strong>; sometimes, a unit is somewhat bigger than it should, and often it unit will embed a complex system, like a database.
<p>In any case, the main advantage of a unit test is that it exactly pinpoints the source of the error, without the need of complex analysis or debugging sessions. This advantage obviously decreases with the complexity of the system.
<p>That said, unit testing is only one of the possible test practices. With some simplification, we may classify them in the following way:
<ul>
<li>Unit tests<br />Focus is on a development unit and its <strong>interface</strong>.
<li>Integration tests<br />Focus is on <strong>integration</strong> between components (like a class and a database) and their integration.
<li>Functional tests<br />Focus is on complete <strong>functionalities</strong> of the program, from a user-perspective.</li>
</ul>
<p>All of these tests have one trait in common: they are developer tests, or tests written by software developers.<br />We need functional tests, in order to check a feature in its “real” environment.<br />We need integration tests, in order to work out all possible issues deriving from integrations.<br />We need unit tests, because they are able to pinpoint exactly an error in a very small unit of code.
<p>All those tests help in raising software quality, and for this reason we should go for all of them, whenever possible.<br />Of course, this approach may be quite expensive; therefore, we should always have a clear idea of testing scope, in particular what we should test, and when we should run a test.<br /><a href="http://www.junit.org/">JUnit website</a> makes it quite clear: we should test what could reasonably break, and we should run tests every time code is changed.<br />How this translates into actual projects, depend on several factors; my own suggestions is to take it as literal as possible, because it will greatly enhance the developer confidence in the final code, and finally lower the total effort for software development and maintenance.
<p>Some further reading:</p>
<ul>
<li><a href="http://c2.com/cgi/wiki?StandardDefinitionOfUnitTest">Unit test definition on C&amp;C wiki</a>
<li><a href="http://www.artima.com/forums/flat.jsp?forum=106&amp;thread=126923&amp;start=0&amp;msRange=15">Michael Feathers on unit test execution speed</a>
<li><a href="http://geosoft.no/development/unittesting.html">List of anti-patterns for tests and test suites</a>
<li><a href="http://geosoft.no/development/unittesting.html">GeoSoft.no unit testing guidelines</a>
<li><a href="http://googletesting.blogspot.com/">Google testing blog</a></li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/55/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/55/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=55&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2008/04/18/developer-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>

		<media:content url="http://changingcode.files.wordpress.com/2008/04/devtesting.png" medium="image">
			<media:title type="html">devtesting</media:title>
		</media:content>
	</item>
		<item>
		<title>Lotus Notes: replicating unread marks across different clients</title>
		<link>http://changingcode.wordpress.com/2008/04/14/lotus-notes-replicating-unread-marks-across-different-clients/</link>
		<comments>http://changingcode.wordpress.com/2008/04/14/lotus-notes-replicating-unread-marks-across-different-clients/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 08:43:15 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2008/04/14/lotus-notes-replicating-unread-marks-across-different-clients/</guid>
		<description><![CDATA[As I have started using a notebook in addition to my PC, I have also started having issues with replicas of my email.In particular, my main issue is unread marks replication: it is simply not working across the two workstations, and I have often to re-read mails over again, just to figure out if I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=52&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;margin:0 20px 10px 0;" height="148" alt="LotusNotes6Logo" src="http://changingcode.files.wordpress.com/2008/04/lotusnotes6logo2.png?w=148&#038;h=148" width="148" align="left" border="0"> As I have started using a notebook in addition to my PC, I have also started having issues with replicas of my email.<br />In particular, my main issue is unread marks replication: it is simply not working across the two workstations, and I have often to re-read mails over again, just to figure out if I have already replied them.
<p>First googling: set REPLICATOR_SYNC_UNREAD=-1 in notes.ini. From documentation, this may have a performance drawback; in any case, it is not working.<br />Second googling: starting from Notes 6.03, unread marks are actually synchronized between replicas, and the setting above is no longer used (a-ah!). There is some trick to force replication of unread marks when doing transition from previous releases, but unfortunately this does not solve my problem.
<p>A better read of documentation, and finally I understand the issue: when migrating to the new PC, I simply copied all of my data. Thus, I do not have two PC with different replicas, but two copies of the same replica.<br />In order to avoid un-necessary traffic, a replica never synchronizes with its own changes on unread marks; as the two replicas were actually the same, they were not exchanging that kind of information.
<p>Solution was then quite easy: simply create a new replica on one of the two PC and then discard the old one.<br />Of course, I could have avoided all of this if I would have created a new replica from the beginning, instead of lazily copying the same.
<p>More information on replica and unread marks:</p>
<ul>
<li><a href="http://www-1.ibm.com/support/docview.wss?uid=swg27002920">IBM &#8211; The Architecture of Unread Marks in Lotus Notes</a>
<li><a title="IBM - The enhanced unread functionality introduced in Notes/Domino 6.0.3 and 6.5" href="http://www-1.ibm.com/support/docview.wss?rs=899&amp;uid=swg21140018">IBM &#8211; The enhanced unread functionality introduced in Notes/Domino 6.0.3 and 6.5</a></li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/52/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/52/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=52&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2008/04/14/lotus-notes-replicating-unread-marks-across-different-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>

		<media:content url="http://changingcode.files.wordpress.com/2008/04/lotusnotes6logo2.png" medium="image">
			<media:title type="html">LotusNotes6Logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Hibernate not working on Windows XP</title>
		<link>http://changingcode.wordpress.com/2008/04/06/hibernate-not-working-on-windows-xp/</link>
		<comments>http://changingcode.wordpress.com/2008/04/06/hibernate-not-working-on-windows-xp/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 21:43:07 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2008/04/06/hibernate-not-working-on-windows-xp/</guid>
		<description><![CDATA[A couple of weeks ago, I received a new notebook (Latitude D830), as per company policy still equipped with Windows XP SP2.As usual for me, I immediately started playing with power settings, especially regarding Sleep and Hibernation.I like Hibernation: it allows for actually turning off the computer while still maintaining the current state. Of course, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=47&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img style="border-width:0;margin:0 20px 10px 0;" height="148" alt="hibernate" src="http://changingcode.files.wordpress.com/2008/04/hibernate.png?w=148&#038;h=148" width="148" align="left" border="0">A couple of weeks ago, I received a new notebook (Latitude D830), as per company policy still equipped with Windows XP SP2.<br />As usual for me, I immediately started playing with power settings, especially regarding Sleep and Hibernation.<br />I like Hibernation: it allows for actually turning off the computer while still maintaining the current state. Of course, this is no substitute for saving files (what if the system cannot restore?) but it is much easier and faster than each time manually restoring all open windows and files.
<p>In my settings, I set hibernation after 45 minutes of stand-by and on push of the sleep button (in case of my Dell, Fn-Esc).<br />Unfortunately, it was not working: when requesting to Hibernate, it was using a bit the hard drive, then stopped with the quite cryptic message &#8220;Insufficient System Resources Exist to Complete the API&#8221;. Furthermore, after this error the Hibernate command and options disappeared from the system until next restart.
<p>After some googling, I discovered that it is a common error, already fixed and documented in the Knowledge Base (<a href="http://support.microsoft.com/kb/909095">article</a>).<br />It happens on systems with more than 1 GB of RAM, and the latest version of Windows XP (SP2 and Media Center 2005): under certain configurations, the system is not able to obtain enough memory for the Hibernation process, thus aborting it.<br />Note: a colleague hinted the patch is also available within <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=68c48dad-bc34-40be-8d85-6bb4f56f5110&amp;displaylang=en">service pack 3</a>.
<p>The fix is easy: update to SP3 or install the patch (from the article above or directly from <a href="http://www.microsoft.com/downloads/details.aspx?familyid=9D20F96A-A8D6-4627-89F7-787CD9B3852C&amp;amp;amp;amp;amp;amp;displaylang=en">here</a>), restart the PC, and live happy &#8211; and hibernated.</p>
<p><em>[updated on May 28, 2008]</em></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/47/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/47/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=47&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2008/04/06/hibernate-not-working-on-windows-xp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>

		<media:content url="http://changingcode.files.wordpress.com/2008/04/hibernate.png" medium="image">
			<media:title type="html">hibernate</media:title>
		</media:content>
	</item>
		<item>
		<title>Debugging with Pydev Extension</title>
		<link>http://changingcode.wordpress.com/2008/03/31/debugging-with-pydev-extension/</link>
		<comments>http://changingcode.wordpress.com/2008/03/31/debugging-with-pydev-extension/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 13:59:37 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2008/03/31/debugging-with-pydev-extension/</guid>
		<description><![CDATA[Without any doubt, Pydev Extension is a wonderful environment for Python development.One of the nicest features is the &#8220;remote debugger&#8221;, that allows attaching to every python script, even if it was not launched from Eclipse; actually, where I work this was the &#8220;killer feat&#8221; that convinced management over buying it. Here is a very rough [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=43&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Without any doubt, <a href="http://www.fabioz.com/pydev/">Pydev Extension</a> is a wonderful environment for Python development.<br />One of the nicest features is the &#8220;remote debugger&#8221;, that allows attaching to every python script, even if it was not launched from Eclipse; actually, where I work this was the &#8220;killer feat&#8221; that convinced management over buying it.</p>
<p>Here is a very rough instruction for its usage (<a href="http://www.fabioz.com/pydev/manual_adv_remote_debugger.html">more details</a>):</p>
<ol>
<li>Add the directory containing the module pydevd to the PYTHONPATH environment variable. Note: actual path may change, reflecting the Pydev version installed.<br /><font face="Courier New" size="2">&nbsp; </font><span style="font-size:x-small;font-family:courier new;"><font face="Courier New" size="2">set PYTHONPATH=%PYTHONPATH%;C:\eclipse\plugins\org.python.pydev.debug_1.3.14\pysrc</font></span>
<li>From Eclipse, start Python debugging server
<li>Add the following instructions to the python script<br /><font face="Courier New" size="2">&nbsp; <font color="#0000ff">import</font> pydevd<br />&nbsp; pydevd.settrace()</font>
<li>Execute the script; when hitting the lines above, it will break and connect to Eclipse environment. From there on, you can set breakpoints, inspect variables, and use all standard debugging techniques. </li>
</ol>
<p>In my opinion, these steps are a bit cumbersome: especially changing the PYTHONPATH sounds a bit as a hack, and actually may be even impossible, for instance, when using python within a service.<br />However, regarding the last point there is a solution: because while importing modules Python uses the sys.path list, which is in turn initialized from PYTHONPATH environment variable.<br />Knowing that, here is a slightly longer suggestion that allows for including pydevd without any modification of the environment:</p>
<p><font face="Courier New" size="2"><font color="#0000ff">def</font> pydevBrk():<br />&nbsp; pydevdPath = r<font color="#00aa00">“C:\eclipse\plugins\org.python.pydev.debug_1.3.14\pysrc”</font><br />&nbsp; <font color="#0000ff">import</font> sys<br />&nbsp; <font color="#0000ff">if not </font>pydevdPath <font color="#0000ff">in</font> sys.path:<br />&nbsp;&nbsp;&nbsp; sys.path.append(pydevdPath)<br />&nbsp; <font color="#0000ff">try:</font><br />&nbsp;&nbsp;&nbsp; <font color="#0000ff">import</font> pydevd<br />&nbsp;&nbsp;&nbsp; pydevd.settrace()<br />&nbsp; <font color="#0000ff">except</font> ImportError:<br />&nbsp;&nbsp;&nbsp; <font color="#0000ff">pass</font> # Most probably, pydev is not installed on the system</font>
<p><span style="font-size:x-small;font-family:courier new;"><span style="color:#0000ff;"></span></span></p>
<p>A small advantage of this variant, it fail gracefully even in case pydev is not installed on the system &#8211; in other words, if for some reason debug code makes its road to production, it will not crash the entire application.<br />Of course, in this case the initial breakpoint will stop inside the function, and not where it is being called.</p>
<p>A final note about pydevd.settrace(): there are several parameters, which may be very useful, as the described in the docstring:</p>
<blockquote><p><font face="Courier New" color="#008000" size="2">@param host: the user may specify another host, if the debug<br />&nbsp;&nbsp;&nbsp; server is not in the same machine<br />@param stdoutToServer: when this is true, the stdout is passed<br />&nbsp;&nbsp;&nbsp; to the debug server<br />@param stderrToServer: when this is true, the stderr is passed<br />&nbsp;&nbsp;&nbsp; to the debug server so that they are printed in its<br />&nbsp;&nbsp;&nbsp; console and not in this process console.<br />@param suspend: whether a breakpoint should be emulated as<br />&nbsp;&nbsp;&nbsp; soon as this function is called.</font> </p></blockquote>
<p>Note: Remote debugging requires some further setup, in order to translate paths from the application to the server; this requires editing the module pydevd_file_utils (in the same folder as pydevd), and setting the translation table PATHS_FROM_CLIENT_TO_SERVER; although this is quite an easy and straightforward step, it has to be repeated for each new version of the plugin.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/43/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/43/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=43&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2008/03/31/debugging-with-pydev-extension/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>Scaling performance</title>
		<link>http://changingcode.wordpress.com/2007/12/20/scaling-performance/</link>
		<comments>http://changingcode.wordpress.com/2007/12/20/scaling-performance/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 19:18:23 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Software design]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2007/12/20/scaling-performance/</guid>
		<description><![CDATA[It is quite common to see software that does not scales well. Software that works well on a developer machine, and suddenly it start crawling when using real data. I have seen it in my teams, and usually it escalates to a critical emergency: all other development stops, until a solution is found, if any. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=12&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is quite common to see software that does not scales well.<br />
Software that works well on a developer machine, and suddenly it start crawling when using real data.<br />
I have seen it in my teams, and usually it escalates to a critical emergency:  all other development stops, until a  solution is found, if any.</p>
<h4>Use real-size test data for development</h4>
<p>Development is usually performed on ad-hoc databases, with few items  created just for basic testing.<br />
While this may be a useful tool for correctness tests, you will hardly ever find performance issues. Ok, you may anticipate them and add index to database at will, but there is no general recipe for performance; and without a good data set, such issues sooner or later will appear.<br />
Only testing with real-size data allows for performance findings.<br />
Note that real data means also real use cases, with target performance: good performance is only useful as long as customer appreciate it, otherwise is a worthless effort.<br />
Therefore, once equipped with a real data sets and scenarios, start profiling. Measure the performance, and make a plan. Where is the bottleneck? Is it possible to optimize that part? What is the current gap in comparison to the target?</p>
<h4>Assess complexity of every class and methods</h4>
<p>While the former approach is correct, I think we should also make a small pro actively step back, at our programming courses, when we have been taught about algorithm correctness and complexity, and how to assess it. Yep, this is a kind of lost knowledge: with the notable exception of STL, it is quite uncommon to see such analysis in the code or in its documentation.<br />
This should not be an obstacle though, and a very useful tool for tracking complexity is the so called &#8220;<a href="http://en.wikipedia.org/wiki/Big_O_notation">Big-O notation</a>&#8220;.<br />
Wikipedia has quite a good explanation, but roughly speaking, this notation gives an idea of algorithm complexity as function of the size of the input data. For instance, a linear algorithm will require about double of the time to complete for a double set of data, while a quadratic one will require four times, and a constant one will return a result in a constant time, no matter the size or the kind of the input data.<br />
It is an invaluable tool for assessing algorithm complexity; unfortunately it is not always so easy to use: a good analysis may involve calculation of series, and special thinking on statistical data; but in many cases, even a wrong, pessimistic, calculation is already a good starting point.<br />
Of the various complexity classes (again, take a look at Wikipedia article for a complete listing) the most important are (from &#8220;faster&#8221; to &#8220;slower&#8221;):</p>
<ul>
<li>Constant</li>
<li>Logarithmic</li>
<li>Linear</li>
<li>Quadratic</li>
<li>Polynomial</li>
<li>Exponential</li>
</ul>
<p>Generally speaking, you should try to avoid everything more complex than linear. Of course, this is not always possible, but then you should beware large sets of data.</p>
<h4>Be humble</h4>
<p>When your application is slow, don&#8217;t blame the operating system, the language or third party libraries.<br />
Don&#8217;t even say &#8220;it is an heavy calculation, hence it <i>must</i> be slow&#8221;.<br />
You can say whatever you want, but your application will still be slow.<br />
Instead, assess performance, ask for a target, and start profiling. Analyze and then try to remove unnecessary complexities.<br />
Be humble, and fix your errors.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=12&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2007/12/20/scaling-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>Memory management in python</title>
		<link>http://changingcode.wordpress.com/2007/12/14/memory-management-in-python/</link>
		<comments>http://changingcode.wordpress.com/2007/12/14/memory-management-in-python/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 18:03:22 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Software design]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2007/12/14/memory-management-in-python/</guid>
		<description><![CDATA[It is a quite common pitfall in python: trying to directly use knowledge gathered within other programming languages, like Java or .NET. And, usually, ends with something like &#8220;Puah, I don&#8217;t like python&#8221;. For instance, garbage collection. Mainly, Python memory management is implemented through reference counting: as soon as the number of references of an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=17&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is a quite common pitfall in python: trying to directly use knowledge gathered within other programming languages, like Java or .NET.<br />
And, usually, ends with something like &#8220;Puah, I don&#8217;t like python&#8221;.</p>
<p>For instance, garbage collection.</p>
<p>Mainly, Python memory management is implemented through <strong>reference counting</strong>: as soon as the number of references of an object reaches zero, it is deleted. What &#8220;delete&#8221; means, then, depends on the actual implementation of the python VM.<br />
CPython, for instance, uses delete the object: this means that the C++ destructor (or, in case of Python objects, the __del__ method) is called, and the memory may be released (or may return to a common pool handled directly by the python memory manager, in case of &#8220;simple&#8221; objects like integers); in other words, CPython uses deterministic finalizers.<br />
However, this behavior is not guaranteed on other implementations, like JPython or IronPython, because of the different underlying memory model.</p>
<p>Reference counting has several advantages because it is easy to implement, fast, and predictable; on the other hand, it is not able to handle some cases, in particular circular references.<br />
Circular references happens when items in a container maintain a reference to the container itself; in this particular situation, when the container goes out of scope its reference count will still remain higher than zero, and hence will cause a memory leak.<br />
For this reason, since Python  2.0, there is a new module, called gc, that perform some garbage collecting.<br />
Its main and sole purpose is to handle those particular situations, and does not change nothing on standard memory management.</p>
<p>Back to our initial problem, this is quite a big difference with, for instance, C#, where calling GC.Collect() will effectively deallocate all pending objects. In python, gc.collect() will simply run a &#8220;check&#8221; for circular references, and deallocate if necessary all pending object in such state.</p>
<p>This is the reason why, in case of problems with memory deallocation, calling gc.collect() in python is in most cases almost useless.<br />
In python, <strong>such problems are symptoms of flaws in the design</strong>, and blaming the language because it does not behave like other certainly do not help fixing them.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=17&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2007/12/14/memory-management-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>KISS</title>
		<link>http://changingcode.wordpress.com/2007/12/07/kiss/</link>
		<comments>http://changingcode.wordpress.com/2007/12/07/kiss/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 20:00:42 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Software design]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2007/12/07/kiss/</guid>
		<description><![CDATA[Software design should always follow the KISS rule: Keep It Simple, Stupid. Trying to guess future business cases is job for Program Managers, not developers. The simplest design that fits the solution is usually the best you can conceive. Refactoring is a developer best friend; in case future requirements will require an extension of the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=26&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Software design should always follow the KISS rule: Keep It Simple, Stupid.</p>
<ol>
<li>Trying to guess future business cases is job for Program Managers, not developers.</li>
<li>The simplest design that fits the solution is usually the best you can conceive.</li>
<li>Refactoring is a developer best friend; in case future requirements will require an extension of the design, simply do it.</li>
<li>Software can (and should) change over time.</li>
</ol>
<p>Nevertheless, this is something difficult to achieve.<br />
How many times we put a singleton, simply because we liked the pattern?<br />
How many times we tried to anticipate the needs of a library, spending quite big amounts of effort in developing a flexible and extensible architecture that no one but us would use?<br />
We keep creating something flexible and powerful, which in most cases is simply a waste of time; moreover it leads to  over-complicated designs, with lower performance and difficult to maintain.<br />
And very often all that flexibility is even not used at all!</p>
<p>I think, like many other Agile methodologies it is a way of thinking.<br />
Because we all know that interfaces are sacred cows of design, we want them to be right at th first iteration, and not to change them.<br />
Because we are going to design a piece of software that will stay there in the core of the system, we want to prefigure out as many possible use cases as possible.<br />
Because <strong>we love what we do</strong>, we want to think that it will be so clever that no one will attempt to (radically) change it.</p>
<p>And we forget that interfaces may be changed (or added), that refactoring is our best friend and that in general software is so easy to change.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/26/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/26/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=26&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2007/12/07/kiss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>Cleaning up Excel files</title>
		<link>http://changingcode.wordpress.com/2007/11/29/cleaning-up-excel-files/</link>
		<comments>http://changingcode.wordpress.com/2007/11/29/cleaning-up-excel-files/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 17:15:52 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Office]]></category>
		<category><![CDATA[excel]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2007/11/29/cleaning-up-excel-files/</guid>
		<description><![CDATA[With time, Excel files may become quite big. Here are a couple of tricks to reduce their size: Use a database! Very often, excel is used s a database. Please, don&#8217;t do that; if you really need a database, even Access is a better choice than a bunch of Excel sheets &#8211; for a good [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=25&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With time, Excel files may become quite big.</p>
<p>Here are a couple of tricks to reduce their size:</p>
<ol>
<li>Use a database!<br />
Very often, excel is used s a database. Please, don&#8217;t do that; if you really need a database, even Access is a better choice than a bunch of Excel sheets &#8211; for a good amount of <a href="http://jcooney.net/archive/2007/10/01/54638.aspx" target="_blank">reasons</a>.</li>
<li>Using pivot tables, un-checking the option &#8220;Save data with table layout&#8221; (right-click on the entry, then select &#8220;Table options&#8221;) will definitely help a lot. Of course, use this option with care when dealing with external data.</li>
<li>Split content in several files.<br />
Sometimes, an excel file may grow of its original scope, and incorporating useless data. Just a short analysis may help into splitting different data and views into different sheets.</li>
<li>Remove empty cells.<br />
As a result of several editing on a file, or simply because of a mistakenly change in a cell at row 48983, you may end up with a sheet with thousands of empty (non-Null) cells.<br />
To remove them, simply select all rows from the last used one on, and then delete them (the same apply to columns), then save the file.</li>
<li>Compact macros.<br />
Macros may take up quite a lot of space, and become very fragmented.<br />
In order to recover that space, export all macros, clean up all code, save and finally paste back the exported modules; this operation will very often free quite a nice amount of space.</li>
</ol>
<p>Note: all of these suggestions apply to Excel up to version 2003; I have never tested them with the new XML format introduced with Office 2007.</p>
<p><i>[updated on March 28, 2008]</i></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=25&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2007/11/29/cleaning-up-excel-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>
	</item>
		<item>
		<title>Lambda expressions in Python</title>
		<link>http://changingcode.wordpress.com/2007/11/14/lambda-expressions/</link>
		<comments>http://changingcode.wordpress.com/2007/11/14/lambda-expressions/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 22:18:43 +0000</pubDate>
		<dc:creator>Roberto Liffredo</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://changingcode.wordpress.com/2007/11/14/lambda-expressions/</guid>
		<description><![CDATA[In python, lambda expressions are simply a quick way to create anonymous functions. Their syntax is quite simple, and coherent with other python structures:lambda x: expression(x) that is equivalent todef anon(x):return expression(x) Note that, although the name, goal, python lambda expressions are not equivalent to their synonyms in functional languages because of three main limitations, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=8&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img style="border-width:0;margin:0 20px 10px 0;" height="148" alt="lambda" src="http://changingcode.files.wordpress.com/2008/04/lambda1.png?w=148&#038;h=148" width="148" align="left" border="0"> In python, lambda expressions are simply a quick way to create <strong>anonymous functions</strong>.</p>
<p>Their syntax is quite simple, and coherent with other python structures:<br /><code>lambda x: expression(x)</code></p>
<p>that is equivalent to<br /><code>def anon(x):<br />return expression(x)</code></p>
<p>Note that, although the name, goal, python lambda expressions are not equivalent to their synonyms in functional languages because of <strong>three main limitations</strong>, and thus cannot be used for &#8220;serious&#8221; functional programming:</p>
<ul>
<li>Lambda functions may only contain expressions (no statements, hence no if/then/else constructs, for example).
<li>Lambda functions are made of exactly one expression.
<li>Lambda functions do not have any local storage. </li>
</ul>
<p>That said, there are <a href="http://www.p-nand-q.com/python/stupid_lambda_tricks.html">several tricks</a> that will somewhat allow to overcome the above limitations; as all tricks, they should be used with extreme care.</p>
<p>So, when should we use lambda functions? Well, better never than often, and most of the times using lambda expressions is not a so good idea.<br />Because, although geek and cool, lambda expressions may seriously hinder code readability.</p>
<p>As a general rule, better <strong>avoid use of lambda expressions</strong>. There may be cases where having an anonymous function may be handy (like in a property getter/setter), but readability is much more important than a cool and compact code style.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/changingcode.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/changingcode.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/changingcode.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/changingcode.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/changingcode.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/changingcode.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/changingcode.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/changingcode.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/changingcode.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/changingcode.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/changingcode.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/changingcode.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/changingcode.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/changingcode.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/changingcode.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/changingcode.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=changingcode.wordpress.com&amp;blog=1804025&amp;post=8&amp;subd=changingcode&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://changingcode.wordpress.com/2007/11/14/lambda-expressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/77e50566e38e16c08091d86fb5646ca9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Roliffo</media:title>
		</media:content>

		<media:content url="http://changingcode.files.wordpress.com/2008/04/lambda1.png" medium="image">
			<media:title type="html">lambda</media:title>
		</media:content>
	</item>
	</channel>
</rss>
