<?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>using (IMHO)</title>
	<atom:link href="http://usingimho.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://usingimho.wordpress.com</link>
	<description>Andrea Dallera &#039;s blog</description>
	<lastBuildDate>Sun, 29 Jan 2012 15:19:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='usingimho.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>using (IMHO)</title>
		<link>http://usingimho.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://usingimho.wordpress.com/osd.xml" title="using (IMHO)" />
	<atom:link rel='hub' href='http://usingimho.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Avoid attachment deletion on destroy with Paperclip</title>
		<link>http://usingimho.wordpress.com/2011/10/18/avoid-attachment-deletion-on-destroy-with-paperclip/</link>
		<comments>http://usingimho.wordpress.com/2011/10/18/avoid-attachment-deletion-on-destroy-with-paperclip/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 08:06:26 +0000</pubDate>
		<dc:creator>andreadallera</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Paperclip]]></category>

		<guid isPermaLink="false">http://usingimho.wordpress.com/?p=272</guid>
		<description><![CDATA[In case you don&#8217;t know, Paperclip is a nice gem that integrates with ActiveRecord and takes care of saving binary data &#8211; like an image, a video or a pdf &#8211; as if it were an attribute of the record: basically, you call save on the entity that you declared the attachment on and the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=272&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In case you don&#8217;t know, Paperclip is a nice gem that integrates with ActiveRecord and takes care of saving binary data &#8211; like an image, a video or a pdf &#8211; as if it were an attribute of the record: basically, you call <code>save</code> on the entity that you declared the attachment on and the binary data will be persisted along with your database record. You can save the binary data directly on the server, send it somewhere else via HTTP or FTP, save it on Amazon&#8217;s s3&#8230; a lot more options are available via external plugins.</p>
<p>So, you call <code>save</code> and the attachment is persisted, you call <code>destroy</code> and the attachment gets deleted. What if you don&#8217;t want to delete the attachment when <code>destroy</code> is called on the owner? As it turns out, there&#8217;s a little option (<code>:preserve_files</code>), default <code>false</code>, that tells paperclip to leave the attachments alone when the parent entity gets destroyed. If you have an attachment declared like this:</p>
<p><pre class="brush: ruby;">
  :has_attached_file =&gt; :attachment,
                        :styles =&gt; { :thumb =&gt; 100x100! }
</pre></p>
<p>All you need to do to avoid this attachment&#8217;s deletion on destroy is to add the <code>preserve_files</code> option:</p>
<p><pre class="brush: ruby;">
  :has_attached_file =&gt; :attachment,
                        :styles =&gt; { :thumb =&gt; 100x100! },
                        :preserve_files =&gt; true
</pre></p>
<p>Hope this helps &#8211; took me a while to find out.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usingimho.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usingimho.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usingimho.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usingimho.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usingimho.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usingimho.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usingimho.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usingimho.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usingimho.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usingimho.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usingimho.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usingimho.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usingimho.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usingimho.wordpress.com/272/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=272&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usingimho.wordpress.com/2011/10/18/avoid-attachment-deletion-on-destroy-with-paperclip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b55d9706b57e8d286a4f198daf2ac69c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andreadallera</media:title>
		</media:content>
	</item>
		<item>
		<title>Smeed&#8217;s Law for programming &#8211; an explanation</title>
		<link>http://usingimho.wordpress.com/2011/10/15/smeeds-law-for-programming-an-explanation/</link>
		<comments>http://usingimho.wordpress.com/2011/10/15/smeeds-law-for-programming-an-explanation/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 10:07:12 +0000</pubDate>
		<dc:creator>andreadallera</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://usingimho.wordpress.com/?p=261</guid>
		<description><![CDATA[I&#8217;ve come across an interesting blog post a while ago &#8211; it was about Smeed&#8217;s law and how it relates to software. Basically, the blog authors said that the number of bugs in a system grows sublinearly with the size of the system itself. There&#8217;s no proof for this but it&#8217;s the same conclusion I&#8217;ve [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=261&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve come across an <a href="http://blog.vivekhaldar.com/post/10126017769/smeeds-law-for-programming">interesting blog post</a> a while ago &#8211; it was about <a href="http://en.wikipedia.org/wiki/Smeed%27s_law">Smeed&#8217;s law</a> and how it relates to software.</p>
<p>Basically, the blog authors said that <em>the number of bugs in a system grows sublinearly with the size of the system itself</em>. There&#8217;s no proof for this but it&#8217;s the same conclusion I&#8217;ve reached with the experience I&#8217;ve accumulated so far. This is my explanation for the phenomenon:</p>
<p>Say you have a small software system &#8211; for a viable example, think about a prototype, or a shell script you made to take care of trivial stuff. It is very likely that most, if not all, of its parts are not set in stone: if you ever need to add a new feature or to change the behavior of an existing one you will likely have to modify a high percentage of the existing code.</p>
<p><a href="http://usingimho.files.wordpress.com/2011/10/untitled-2.png"><img src="http://usingimho.files.wordpress.com/2011/10/untitled-2.png?w=570" alt="Yep, I suck hard at photoshop"   class="alignnone size-full wp-image-266" /></a></p>
<p>Now think about a bigger system &#8211; it might be the prototype from the previous example that now has grown to a complete product. You need to add a feature to that system. If you&#8217;ve done things the right way, it&#8217;s very unlikely that you will have to modify big parts of the system: chance is, your software&#8217;s internals will have grown some sort of API, internal DSL, call it what you want, so all you need to to is either to extend or integrate with it. Also, with time, the bugs in your system&#8217;s core will be likely found and eradicated.</p>
<p><a href="http://usingimho.files.wordpress.com/2011/10/untitled-1.png"><img src="http://usingimho.files.wordpress.com/2011/10/untitled-1.png?w=570" alt="Yep, I suck hard at photoshop"   class="alignnone size-full wp-image-266" /></a></p>
<p>Supposing that <em>if you don&#8217;t touch it, it won&#8217;t break</em>, the part of your system prone to bugs will be the &#8220;surface&#8221; (2πx), which grows slower than the total area (πx²).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usingimho.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usingimho.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usingimho.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usingimho.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usingimho.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usingimho.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usingimho.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usingimho.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usingimho.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usingimho.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usingimho.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usingimho.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usingimho.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usingimho.wordpress.com/261/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=261&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usingimho.wordpress.com/2011/10/15/smeeds-law-for-programming-an-explanation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b55d9706b57e8d286a4f198daf2ac69c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andreadallera</media:title>
		</media:content>

		<media:content url="http://usingimho.files.wordpress.com/2011/10/untitled-2.png" medium="image">
			<media:title type="html">Yep, I suck hard at photoshop</media:title>
		</media:content>

		<media:content url="http://usingimho.files.wordpress.com/2011/10/untitled-1.png" medium="image">
			<media:title type="html">Yep, I suck hard at photoshop</media:title>
		</media:content>
	</item>
		<item>
		<title>Why you should stay away from Appcelerator&#8217;s Titanium</title>
		<link>http://usingimho.wordpress.com/2011/06/14/why-you-should-stay-away-from-appcelerators-titanium/</link>
		<comments>http://usingimho.wordpress.com/2011/06/14/why-you-should-stay-away-from-appcelerators-titanium/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 17:40:33 +0000</pubDate>
		<dc:creator>andreadallera</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Titanium]]></category>

		<guid isPermaLink="false">http://usingimho.wordpress.com/?p=253</guid>
		<description><![CDATA[Let&#8217;s face it &#8211; programming on mobile devices is hard: everything&#8217;s much more complicated to accomplish than it is on the web or the desktop and, since the platform is fairly new, tools and frameworks are scarce and poorly refined. Plus, if you need your application to run on more than one target OS (iOS, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=253&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s face it &#8211; programming on mobile devices is <em>hard</em>: everything&#8217;s much more complicated to accomplish than it is on the web or the desktop and, since the platform is fairly new, tools and frameworks are scarce and poorly refined. Plus, if you need your application to run on more than one target OS (iOS, Android, Blackberry) you&#8217;re pretty much forced to write a different application for each one of them.</p>
<p>So, enter Appcelerator&#8217;s Titanium &#8211; what Titanium aims to accomplish is to solve most of these problems, by hiding all the gory implementation details behind a simple and well-defined javascript API. On top of that, it will (more or less) compile your javascript to a different language (objective-c for iOS, Java for Android and soon Blackberry) so you can deploy your application to multiple targets with (supposedly) no changes to your code. And it&#8217;s free! Support and other goodies come for a price but the library itself is free for commercial use.</p>
<p>What&#8217;s the catch then? On the surface, it&#8217;s all good &#8211; you pop up Titanium Studio (a modified version of Aptana), write some trivial javascript and you&#8217;ve got a working, native app. <em>Great, it took me a day or two to do this in native objective-c &#8211; with Titanium, it&#8217;s a couple of hours!</em> So you dive head first and build more and more complex apps &#8211; animations, database connection, networking, geolocation, it&#8217;s got it all!</p>
<p>The more complex your applications become, the more often you encounter some weird glitches &#8211; why the navbar&#8217;s title not centered? And why sometimes the navigation controller doesn&#8217;t pop the last view? Or why the focus event gets called so often, for no reason, only on the device? But you know, Titanium&#8217;s so much better than going back to native development, so you deal with all its quirks and carry on. Until <em>bad</em> stuff starts to happen. </p>
<p>Your app starts to crash, seemingly at random. The reason : <em>memory starvation</em>. You see, although Titanium is supposed to take care of memory management for you, it doesn&#8217;t always work correctly. Most of the times, especially if your application is simple and doesn&#8217;t use many images and animations, the memory leaks Titanium generates over time will be small enough that you won&#8217;t even realise that your application is actually leaking. Problem is, when your application reaches a certain level of complexity, those leaks <em>will</em> become evident &#8211; in the form of sudden, unavoidable crashes.</p>
<p>There are <a href="http://developer.appcelerator.com/question/116867/this-is-a-solution-to-your-memory-woes" title="some hacks">some hacks</a>, proposed by Titanium&#8217;s community that somewhat help to free some memory but they don&#8217;t always work and, even when they do, they don&#8217;t release all the memory they&#8217;re supposed to. Titanium doesn&#8217;t let you change your object&#8217;s reference count directly (probably because that would break some internals of theirs) so you have no way to dispose of objects yourself.</p>
<p>This leaves you stuck with a frail, buggy application that is ready to blow up at every click&#8230; and there&#8217;s nothing you can do about it except for a complete rewrite in objective-c or java. </p>
<p>Are you planning to develop mobile apps with Appcelerator&#8217;s Titanium? Think twice. It&#8217;s tempting but you really, really don&#8217;t want to find yourself stuck like it happened to me. Unless it&#8217;s either for small, simple applications, or they somehow manage to solve all their memory issues, I strongly suggest you to stay away from Titanium.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usingimho.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usingimho.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usingimho.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usingimho.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usingimho.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usingimho.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usingimho.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usingimho.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usingimho.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usingimho.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usingimho.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usingimho.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usingimho.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usingimho.wordpress.com/253/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=253&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usingimho.wordpress.com/2011/06/14/why-you-should-stay-away-from-appcelerators-titanium/feed/</wfw:commentRss>
		<slash:comments>152</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b55d9706b57e8d286a4f198daf2ac69c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andreadallera</media:title>
		</media:content>
	</item>
		<item>
		<title>What&#8217;s so special about Apple products?</title>
		<link>http://usingimho.wordpress.com/2011/05/08/whats-so-special-about-apple-products/</link>
		<comments>http://usingimho.wordpress.com/2011/05/08/whats-so-special-about-apple-products/#comments</comments>
		<pubDate>Sun, 08 May 2011 14:19:01 +0000</pubDate>
		<dc:creator>andreadallera</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://usingimho.wordpress.com/?p=209</guid>
		<description><![CDATA[Some days ago I read on Reddit about John Resig&#8217;s setup: Redditor : What is your development setup? (Software) John Resig : I use OS X on an iMac with an extra monitor. For coding I use VIM in a terminal and have a screen session open to IRC in another terminal window. I then [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=209&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some days ago I read on <a href="http://www.reddit.com/r/IAmA/comments/h42ak/i_am_john_resig_creator_of_jquery_ama/c1sejmp" title="Reddit">Reddit</a> about John Resig&#8217;s setup:<br />
<i><br />
<b>Redditor</b> : What is your development setup? (Software)</p>
<p><b>John Resig</b> : I use <b>OS X on an iMac</b> with an extra monitor. For coding I use VIM in a terminal and have a screen session open to IRC in another terminal window. I then have a plethora of browsers open (Firefox, Chrome, Safari, Opera &#8211; a VMWare with IEs) for testing. That&#8217;s pretty much all that I use and need to use (I have a very similar set up on my Macbook Pro, as well).<br />
</i></p>
<p>So, <a href="http://en.wikipedia.org/wiki/John_Resig" title="John Resig">John Resig</a> actually develops on a mac. Also, down the same thread, some other redditor points out that <em>95%</em> of the web conferences audience he goes to owns a MacBook or a MacBook Pro. </p>
<p>Well, for the last months I&#8217;ve been developing on a mac too and here&#8217;s some of the things I&#8217;ve had to deal with:</p>
<ul>
<li><b>There is NO del key</b> : the Macbook/Macbook Pro has no del key. That leads to an array of <i>Hm, now delete / ack, there&#8217;s no delete / rightarrowrightarrowrightarrow / backspacebackspacebackspace</i>, which is incredibly annoying because it completely kills the flow. Even worse, you <i>unlearn</i> to use the del key so when you switch back to a normal machine the tendency is to keep using the right arrow/backspace combo or (god forbid) the mouse.<br />

</li>
<li><b>Apple key instead of CTRL</b> : on macs, the function that is normally accomplished by the CTRL key is instead done by the Apple (command?) key, which is located pretty much where the Win key would be on a Windows keyboard. This is annoying because it forces you to unlearn the convention which you&#8217;re used to (for no apparent good reason) but the worst thing is that the behaviour is NOT consistent from application to application, meaning that in some applications (example : <code>nano</code>) the CTRL key is behaving as usual and the Apple key does nothing (or does something completely unrelated to what you want to do).<br />

</li>
<li>
<b>You can&#8217;t cut a file on Finder</b> : it seems that there is no way to cut a file and paste it somewhere else in finder. Even if there were a way to do that, there&#8217;s no keyboard shortcut for it (ctrl-x and apple-x do nothing) and there&#8217;s no mention of a cut option in the context menu. Also, since there&#8217;s no DEL key, if you want to delete a file you have to use the option in the context menu to do that.<br />

</li>
<li><b>Git is very slow</b> : <code>git commit</code> takes an eternity to complete, for no apparent good reason. A commit which takes a second or two on my old laptop running Kubuntu or on a Windows machine will take 30-60 seconds on a Mac. Also <code>git push</code> is sensibly slower but not as much as <code>git commit</code>.<br />
Since it takes an eternity to commit my work, I&#8217;ve started to commit less frequently. That lead to a big loss of work on a couple of occasions.<br />

</li>
<li><b>Limited customization</b>: I really don&#8217;t like the dock (that panel with all the applications icons) and I wanted to recreate something similar to what I use on Kubuntu, so one bar on the left with all the program launcher and a taskbar on the left. Turns out I can&#8217;t have a taskbar at all and the only thing I can do with the dock is to choose which side of the screen it has to be on.<br />

</li>
</ul>
<p>On top of all this, my impression is that Apple machines are very slow compared to PCs with similar specs: a colleague of mine needed to clone a remote git repository so I&#8217;ve asked him to open a terminal &#8211; it needed a good <i>30 seconds</i> for the terminal to start. On my Kubuntu laptop (which shares similar specs with my colleague&#8217;s MacBook) I can open a dozen in five seconds or so. Also, sometimes applications freeze for some seconds, again for no good apparent reason, and you have to wait until they come back up.</p>
<p>All in all, my experience with macs so far has been far from positive: I guess that if you&#8217;re a &#8220;normal&#8221; user you wouldn&#8217;t care one bit about all the things I pointed out but, as a programmer, I find all of this extremely annoying.</p>
<p>But anyway, since I have to work on iPhone/iPad applications, I thought that I could well pay a 100/200 € more for a mac machine and then dual boot linux &#8211; that way, I could both work on my mobile projects and still have linux on the same machine for everything else. I&#8217;ve wanted to change my laptop for a while now and <a href="http://www.eprice.it/Portatili-ACER/s-3111730" title="this">this</a> is what I had in mind, so I went to the online Apple Store and made myself a MacBook pro with similar specs</a>. And I was once again surprised at the outcome:</p>
<p><a href="http://www.eprice.it/Portatili-ACER/s-3111730">The ACER AS594, my original choice</a> &#8211; € 749.99</p>
<p><a href="http://store.apple.com/it/configure/MC723T/A?mco=MjEyOTcwNTc">A MacBook Pro with similar hardware</a> &#8211; € 2.149,00</p>
<p>That&#8217;s almost <i>3 times</i> the price. John Resig thinks it&#8217;s worth it. 95% of web developers think it&#8217;s worth it. Do you? If so, would you please tell me <i>why</i>? Because, in all honesty, I don&#8217;t understand what&#8217;s so special about Apple products.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usingimho.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usingimho.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usingimho.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usingimho.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usingimho.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usingimho.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usingimho.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usingimho.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usingimho.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usingimho.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usingimho.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usingimho.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usingimho.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usingimho.wordpress.com/209/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=209&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usingimho.wordpress.com/2011/05/08/whats-so-special-about-apple-products/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b55d9706b57e8d286a4f198daf2ac69c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andreadallera</media:title>
		</media:content>
	</item>
		<item>
		<title>How to: get Titanium WebView&#8217;s content height</title>
		<link>http://usingimho.wordpress.com/2011/04/19/how-to-get-titanium-webviews-content-height/</link>
		<comments>http://usingimho.wordpress.com/2011/04/19/how-to-get-titanium-webviews-content-height/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 11:48:43 +0000</pubDate>
		<dc:creator>andreadallera</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Titanium]]></category>

		<guid isPermaLink="false">http://usingimho.wordpress.com/?p=203</guid>
		<description><![CDATA[I&#8217;ve been working with Appcelerator Titanium and, compared to the hell that is native iOS application development, I&#8217;ve been quite satisfied so far&#8230; except from the occasional bug/glitch that forces me to write some ugly workarounds. A notable example is when you need to get the content height of a WebView. Let&#8217;s say you have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=203&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with <a href="http://www.appcelerator.com/">Appcelerator Titanium</a> and, compared to the hell that is native iOS application development, I&#8217;ve been quite satisfied so far&#8230; except from the occasional bug/glitch that forces me to write some ugly workarounds. </p>
<p>A notable example is when you need to get the content height of a <code>WebView</code>. Let&#8217;s say you have two elements inside a single <code>ScrollView</code>: one is a View of any kind with a given height (for example, an <code>ImageView</code>) and the other is a <code>WebView</code>. You want to scroll both the <code>ImageView</code> and the <code>WebView</code> at the same time so, when you slide a finger on the device vertically, the <code>ImageView</code> scrolls up and you see more of the <code>WebView</code>&#8216;s content. Problem is, there is not a <code>contentHeight</code> property on the <code>WebView</code> control and you need that height to set the height property of the <code>WebView</code> to avoid its native scrollbar to be active: if you don&#8217;t set an height to the <code>WebView</code> it will display a vertical scrollbar for its own content, hence avoiding the scroll on the external <code>ScrollView</code>.</p>
<p>Fact is, there is actually a way to get the <code>WebView</code>&#8216;s content height: the <code>WebView</code> has an <code>evalJS()</code> method which allows you to execute arbitrary JavaScript inside the <code>WebView</code> (as you would inside a browser). The trick is to ask the <code>WebView</code> for its own document.height and take that as the content&#8217;s height, as follows:</p>
<p><pre class="brush: jscript;"> 
actualHeight = webView.evalJS(&quot;document.height;&quot;);
 </pre></p>
<p>The only catch is that you will get the real content height only after the WebView has finished rendering. If you are rendering from an external URL you can use the <code>load()</code> event, which will get called when the page has finished rendering, otherwise you&#8217;ll have to set a timer, like this:</p>
<p><pre class="brush: jscript;"> 
myTimer = setInterval(function () {
    actualHeight = webView.evalJS(&quot;document.height;&quot;);
    if(actualHeight &gt; 1)
        {
            webView.height = actualHeight;
            scrollView.contentHeight = imageView.height + webView.height;            
        }
},1000);
</pre></p>
<p>and then dispose the timer with <code>myTimer.clearInterval()</code>. Hope this helps!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usingimho.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usingimho.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usingimho.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usingimho.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usingimho.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usingimho.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usingimho.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usingimho.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usingimho.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usingimho.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usingimho.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usingimho.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usingimho.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usingimho.wordpress.com/203/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=203&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usingimho.wordpress.com/2011/04/19/how-to-get-titanium-webviews-content-height/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b55d9706b57e8d286a4f198daf2ac69c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andreadallera</media:title>
		</media:content>
	</item>
		<item>
		<title>ruby-hackernews &#8211; an API to access HN&#8217;s site</title>
		<link>http://usingimho.wordpress.com/2010/09/08/ruby-hackernews-an-api-to-access-hns-site/</link>
		<comments>http://usingimho.wordpress.com/2010/09/08/ruby-hackernews-an-api-to-access-hns-site/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 09:22:34 +0000</pubDate>
		<dc:creator>andreadallera</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[hacker news]]></category>
		<category><![CDATA[mechanize]]></category>

		<guid isPermaLink="false">http://usingimho.wordpress.com/?p=192</guid>
		<description><![CDATA[I was surprised to find out that there&#8217;s no HTTP API to Hacker News. So, I wrote a simple ruby API (using Mechanize) to access the site: you can find more details about it here. It works with UseTheSource too, you just have to set the base url beforehand with ConfigurationService.base_url = "http://news.usethesource.com". I hope [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=192&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was surprised to find out that there&#8217;s no HTTP API to Hacker News. So, I wrote a simple ruby API (using Mechanize) to access the site: you can find more details about it <a href="http://github.com/bolthar/ruby-hackernews">here</a>. It works with <a href="http://news.usethesource.com/">UseTheSource</a> too, you just have to set the base url beforehand with <code>ConfigurationService.base_url = "http://news.usethesource.com"</code>.</p>
<p>I hope somebody will find this useful!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usingimho.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usingimho.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usingimho.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usingimho.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usingimho.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usingimho.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usingimho.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usingimho.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usingimho.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usingimho.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usingimho.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usingimho.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usingimho.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usingimho.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=192&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usingimho.wordpress.com/2010/09/08/ruby-hackernews-an-api-to-access-hns-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b55d9706b57e8d286a4f198daf2ac69c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andreadallera</media:title>
		</media:content>
	</item>
		<item>
		<title>It&#8217;s OK not to write unit tests &#8211; of course it is</title>
		<link>http://usingimho.wordpress.com/2010/05/26/its-ok-not-to-write-unit-tests-of-course-it-is/</link>
		<comments>http://usingimho.wordpress.com/2010/05/26/its-ok-not-to-write-unit-tests-of-course-it-is/#comments</comments>
		<pubDate>Wed, 26 May 2010 14:23:47 +0000</pubDate>
		<dc:creator>andreadallera</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Unit testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[Methodology]]></category>

		<guid isPermaLink="false">http://usingimho.wordpress.com/?p=173</guid>
		<description><![CDATA[A couple of days ago I stumbled upon this post. Now, I won&#8217;t discuss the post itself (which I think is well structured and surely worth a read) but just its title, that states: it&#8217;s OK not to write unit tests. I&#8217;ve been working in C# lately: unit testing in a static language is hell. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=173&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago I stumbled upon <a href="http://blogs.msdn.com/b/cashto/archive/2009/03/31/it-s-ok-not-to-write-unit-tests.aspx">this</a> post. Now, I won&#8217;t discuss the post itself (which I think is well structured and surely worth a read) but just its title, that states: <em>it&#8217;s OK not to write unit tests</em>. </p>
<p>I&#8217;ve been working in C# lately: unit testing in a static language is <em>hell</em>. The clutter created by all those interfaces you&#8217;re forced to create solely for mocking is enough reason for give testing up&#8230; and that&#8217;s just the beginning. So yes, if you&#8217;re working in C# (and I think it applies to Java too) it is totally OK not to write unit tests: on the contrary, you&#8217;ve gotta have a <em>damn good</em> reason to aim for 100% coverage on a C# project. And by <em>damn good</em> I mean <em>the customer is paying for it</em> because, honestly, maintaining those tests is gonna be a huge waste of time, and you better make sure you can bill that time to someone.</p>
<p>Things change big time when talking about a dynamic language, like ruby. Testing in ruby is so easy that it&#8217;s a waste <em>not</em> to do it. Tools are also much better than their .NET counterparts (think RSpec). You still have problems, especially during refactoring, but personally I didn&#8217;t feel like throwing my test suite away each time I had to break something. If it&#8217;s OK not to write unit tests in ruby? That depends on your situation, but surely the <em>cost</em> of testing is much lower.</p>
<p>Because that&#8217;s the point, and that&#8217;s what it made me think about the title in the first place: testing has a <em>cost</em> and it&#8217;s much higher than what the so-called agile mentors often promise&#8230; maybe because the &#8220;implementation details&#8221; &#8211; and the deadlines involved &#8211; are usually to be fulfilled by someone else. Telling someone that the cost of testing is lower than the cost of problems due to not testing is <em>lying</em>: it varies greatly according to the situation.</p>
<p>So of course it&#8217;s OK not to write unit tests. I wonder how we got to the point that somebody has to argument that. I feel like agile has acquired this <em>silver bullet</em> status and we know how much management love those&#8230; let&#8217;s stop this before bad things happen &#8211; the one who has to maintain the next enterprise behemoth with 2k+ tests that break at every gust of wind might be <em>you</em>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usingimho.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usingimho.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usingimho.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usingimho.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usingimho.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usingimho.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usingimho.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usingimho.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usingimho.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usingimho.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usingimho.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usingimho.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usingimho.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usingimho.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=173&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usingimho.wordpress.com/2010/05/26/its-ok-not-to-write-unit-tests-of-course-it-is/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b55d9706b57e8d286a4f198daf2ac69c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andreadallera</media:title>
		</media:content>
	</item>
		<item>
		<title>Windsor custom lifestyles</title>
		<link>http://usingimho.wordpress.com/2010/05/03/windsor-custom-lifestyles/</link>
		<comments>http://usingimho.wordpress.com/2010/05/03/windsor-custom-lifestyles/#comments</comments>
		<pubDate>Mon, 03 May 2010 07:42:11 +0000</pubDate>
		<dc:creator>andreadallera</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[IoC]]></category>
		<category><![CDATA[Windsor]]></category>

		<guid isPermaLink="false">http://usingimho.wordpress.com/?p=162</guid>
		<description><![CDATA[Windsor provides you with a pretty limited array of options when it comes to lifestyles: Singleton: each time you resolve, you get the same instance. This is, for some reason, the default lifestyle Transient: each time you resolve, you get a new instance. This is what I would have wanted as default PerThread: it pools [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=162&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Windsor provides you with a pretty limited array of options when it comes to lifestyles:</p>
<ul>
<li><strong>Singleton</strong>: each time you resolve, you get the same instance. This is, for some reason, the <em>default</em> lifestyle</li>
<li><strong>Transient</strong>: each time you resolve, you get a new instance. This is what I would have wanted as default <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li><strong>PerThread</strong>: it pools a singleton for each thread, so you&#8217;ll always get the same instance if you call resolve from the same thread. </li>
<li><strong>Pooled</strong>: the documentation is not very clear about this but from the source code it seems that a pool with a given capacity is created and on each resolve one of the objects from the pool is returned. I didn&#8217;t check how which object to return is determined.</li>
<li>there&#8217;s also an undocumented <strong>PerWebRequest</strong> lifestyle and I assume it does just what it says on the tin. </li>
</ul>
<p>Let&#8217;s say that, as it was in my case, you need a container behavior a little different than one of these: you want the container to return a different instance based on a parameter used during the type&#8217;s activation. Example:</p>
<p><pre class="brush: csharp;"> 
IDictionary argumentsOne = new Hashtable();
argumentsOne.Add(&quot;entity&quot;, apple);
_container.Resolve&lt;IViewModel&gt;(argumentsOne); // a new instance 
IDictionary argumentsTwo = new Hashtable();
argumentsTwo.Add(&quot;entity&quot;, pear);
_container.Resolve&lt;IViewModel&gt;(argumentsTwo); // another new instance
IDictionary argumentsThree = new Hashtable();
argumentsThree.Add(&quot;entity&quot;, apple);
_container.Resolve&lt;IViewModel&gt;(argumentsThree); // the same instance as when called with argumentsOne
</pre></p>
<p>So, to get this kind of behavior from your container you need to implement your own CustomLifestyle. The easy way to do it is to subclass <code>AbstractLifestyleManager</code>, which provides you with some methods you can override. The interesting ones are:</p>
<ul>
<li><strong>Resolve</strong> which gets called when you try to resolve the type</li>
<li><strong>Release</strong> which gets called when you try to release the type</li>
<li><strong>Dispose</strong> which works as usual</li>
<li><strong>Init</strong>, a callback invoked when your CustomLifestyle gets constructed</li>
</ul>
<p>Obviously, <code>Resolve</code> should return the instance of the type, be it from your cache or from calling <code>base.Resolve</code>, which should get you a new one. <code>Release</code> should delete the right element from the cache so the next time <code>Resolve</code> is called a fresh instance is returned.</p>
<p>Here follows a sample implementation for the above scenario.</p>
<p><pre class="brush: csharp;"> 
public class PerEntityLifestyleManager : AbstractLifestyleManager
    {
    private IDictionary&lt;object, object&gt; _instances = new Dictionary&lt;object, object&gt;();
        
    public override object Resolve(Castle.MicroKernel.CreationContext context)
    {           
        object param = context.AdditionalParameters[&quot;entity&quot;];
        if (!_instances.Keys.Contains(param))
        {
            _instances.Add(param, base.Resolve(context));
        }
        return _instances[param];
    }

    public override bool Release(object instance)
    {
        if (_instances.Keys.Contains(instance))
        {
            _instances.Remove(instance);
            return true;
        }
        return false;
    }
}
</pre></p>
<p>You should then apply your lifestyle to the types you want to be resolved with it as an attribute, like this:<br />
<pre class="brush: csharp;"> 
[CustomLifestyle(typeof(PerEntityLifestyleManager))]
public class MyClass : IMyInterface
{
   
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usingimho.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usingimho.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usingimho.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usingimho.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usingimho.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usingimho.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usingimho.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usingimho.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usingimho.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usingimho.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usingimho.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usingimho.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usingimho.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usingimho.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=162&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usingimho.wordpress.com/2010/05/03/windsor-custom-lifestyles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b55d9706b57e8d286a4f198daf2ac69c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andreadallera</media:title>
		</media:content>
	</item>
		<item>
		<title>[rant] C# KeyValuePair.Value = (?)</title>
		<link>http://usingimho.wordpress.com/2010/04/29/rant-c-keyvaluepair-value/</link>
		<comments>http://usingimho.wordpress.com/2010/04/29/rant-c-keyvaluepair-value/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 07:52:59 +0000</pubDate>
		<dc:creator>andreadallera</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://usingimho.wordpress.com/?p=159</guid>
		<description><![CDATA[(A couple of years ago I&#8217;d be happily coding around the issue at the moment but you know, Ruby makes you a spoiled bastard: my tolerance level for language WTFs has become zero, so I&#8217;m here ranting about this) So I&#8217;ve got my nice ICollections and I&#8217;m merrily passing them around and binding them to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=159&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>(A couple of years ago I&#8217;d be happily coding around the issue at the moment but you know, Ruby makes you a spoiled bastard: my tolerance level for language WTFs has become <em>zero</em>, so I&#8217;m here ranting about this)</p>
<p>So I&#8217;ve got my nice ICollections and I&#8217;m merrily passing them around and binding them to WPF ListBoxes&#8217; ItemSource and stuff and one of the ICollections happens to be an IDictionary. &#8220;No worries&#8221;, i thought, &#8220;It&#8217;s still an ICollection so i don&#8217;t see the problem&#8221; *type type ItemsSource=&#8221;{Binding Path=MyDictionary}&#8221; type type*. An F5 later this nice RuntimeException pats me on the back:</p>
<pre>
A TwoWay or OneWayToSource binding cannot work on the read-only property 'Value' of type 'System.Collections.Generic.KeyValuePair`2
</pre>
<p><em>Really. You&#8217;ve gotta be shitting me.</em> I mean: what happened is that I&#8217;m binding the <code>Value</code> property of each element to an editable property and the guys who designed the <code>KeyValuePair</code> class thought it was a good idea to make its <code>Value</code> property <em>readonly</em>. And it&#8217;s not over: if you try to inherit KeyValuePair to fix this WTF yourself you&#8217;ll find out that the class is <em>Sealed</em>. I am very aware that writing your personal framework class to save yourself some jumping through hoops is generally a Bad Idea but I feel that if I want to I should definitely be allowed to do that.</p>
<p>Is there a vaild reason I don&#8217;t know about that justifies this? If so, please let me know!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usingimho.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usingimho.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usingimho.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usingimho.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usingimho.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usingimho.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usingimho.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usingimho.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usingimho.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usingimho.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usingimho.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usingimho.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usingimho.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usingimho.wordpress.com/159/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=159&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usingimho.wordpress.com/2010/04/29/rant-c-keyvaluepair-value/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b55d9706b57e8d286a4f198daf2ac69c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andreadallera</media:title>
		</media:content>
	</item>
		<item>
		<title>xUnit and .NET 4.0</title>
		<link>http://usingimho.wordpress.com/2010/04/26/xunit-and-net-4-0/</link>
		<comments>http://usingimho.wordpress.com/2010/04/26/xunit-and-net-4-0/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 07:58:37 +0000</pubDate>
		<dc:creator>andreadallera</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Unit testing]]></category>
		<category><![CDATA[xUnit]]></category>

		<guid isPermaLink="false">http://usingimho.wordpress.com/?p=155</guid>
		<description><![CDATA[Trying to run xUnit tests compiled against the 4.0 framework with the visual tool (xunit.gui.x86) I was welcomed by an error message telling me that the target .dll was compiled a more recent runtime than the one in use. After some googling I was able to find a fix for the console runner (xunit.console.x86), which [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=155&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Trying to run xUnit tests compiled against the 4.0 framework with the visual tool (xunit.gui.x86) I was welcomed by an error message telling me that the target .dll was compiled a more recent runtime than the one in use. After some googling I was able to find a fix for the console runner (xunit.console.x86), which consists in adding the following config section to the XML configuration file (xunit.console.x86.exe.config):</p>
<p><pre class="brush: xml;"> 
&lt;startup&gt;
    &lt;supportedRuntime version=&quot;v4.0.30319&quot; /&gt;
&lt;/startup&gt;
</pre> </p>
<p>(your .NET framework version may vary, take a look at your %systemroot%\Microsoft.NET\Framework for more info)</p>
<p>To make the fix work for the GUI runner you can just make a copy the modified console application&#8217;s configuration file and rename it as xunit.gui.x86.exe.config</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usingimho.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usingimho.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usingimho.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usingimho.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usingimho.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usingimho.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usingimho.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usingimho.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usingimho.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usingimho.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usingimho.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usingimho.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usingimho.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usingimho.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usingimho.wordpress.com&amp;blog=9707824&amp;post=155&amp;subd=usingimho&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usingimho.wordpress.com/2010/04/26/xunit-and-net-4-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b55d9706b57e8d286a4f198daf2ac69c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andreadallera</media:title>
		</media:content>
	</item>
	</channel>
</rss>
