<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkUEQ3k4fip7ImA9WhRVFU8.&quot;"><id>tag:blogger.com,1999:blog-8638674</id><updated>2012-01-14T09:20:02.736+03:30</updated><category term="Personal" /><category term="C#" /><category term=".net" /><category term="Craft" /><category term="Twitter" /><category term="Fun" /><category term="Temp" /><category term="Web" /><category term="Review" /><category term="Books" /><category term="Blogging" /><title>System.IO.StringWriter</title><subtitle type="html">An Iranian software developer's perspective</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://bahadorn.blogspot.com/" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/stringwriter" /><feedburner:info uri="stringwriter" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUcFRH45eCp7ImA9WxNTEU0.&quot;"><id>tag:blogger.com,1999:blog-8638674.post-4383805577912169140</id><published>2009-08-13T00:26:00.001+04:30</published><updated>2009-08-13T00:26:55.020+04:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-13T00:26:55.020+04:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Craft" /><category scheme="http://www.blogger.com/atom/ns#" term="Books" /><title>Doing One Thing at a Time</title><content type="html">&lt;p&gt;A while ago, I started applying the &lt;a href="http://www.pomodorotechnique.com/"&gt;Pomodoro technique&lt;/a&gt; in my work days, which essentially says that you must pick some tasks to do, and start doing them one by one. It talks about time-boxing, giving yourself breaks in between, handling interrupts, etc. But the main point is: do only one thing at a time, and handle all distraction in a way that they don't disrupt your focus. &lt;/p&gt;  &lt;p&gt;It was a pretty successful experience. It increased my focus. It also helped me become more proactive, that is, doing what I think is effective to do, in the midst of all the things that world throws at me. &lt;/p&gt;  &lt;p&gt;Now, on an entirely different planet, I was reading Michael Feathers’ book, &lt;a href="http://www.amazon.com/Working-Effectively-Legacy-Robert-Martin/dp/0131177052"&gt;Working Effectively with Legacy Code&lt;/a&gt;. In chapter 23, he says: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“I have this little mantra that I repeat to myself when I'm working: &amp;quot;Programming is the art of doing one thing at a time.&amp;quot;”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This quote is from a chapter named “How do I know that I’m not breaking anything?”. So, doing this will increase the quality of the code you’re writing and decrease the possibility breaking something.&lt;/p&gt;  &lt;p&gt;And it perfectly resonates with me. Every time I try to make many simultaneous changes to the code, it makes me more nervous, and I fall into the “code-and-pray” mode.&lt;/p&gt;  &lt;p&gt;Even when I’m just trying to accomplish one single goal, I break it into smaller steps like &amp;quot;introduce a new constructor argument of type IFoo&amp;quot;, &amp;quot;Write a new implementer of IFoo that does this and that&amp;quot;, &amp;quot;Pass that new implementer as the constructor argument to the first class and make sure they work fine together&amp;quot; (ok, you get the idea),&amp;#160; do them separately, and make sure that the tests pass after each one of them.&lt;/p&gt;  &lt;p&gt;From now on, I will repeat this mantra to myself and advertise it to others too: “Programming is the art of doing one thing at a time.” When you stumble upon some ugliness or some unrelated thing that you want to change in code, just note it down to do later, and continue with the task in hand. It also helps you to check-in your code more frequently, which is always a good thing.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8638674-4383805577912169140?l=bahadorn.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=DIowZMJU-qY:u2n6MSzLhm8:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=DIowZMJU-qY:u2n6MSzLhm8:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=DIowZMJU-qY:u2n6MSzLhm8:XQ266DUsA9M"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=XQ266DUsA9M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=DIowZMJU-qY:u2n6MSzLhm8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=DIowZMJU-qY:u2n6MSzLhm8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=DIowZMJU-qY:u2n6MSzLhm8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=DIowZMJU-qY:u2n6MSzLhm8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=DIowZMJU-qY:u2n6MSzLhm8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=DIowZMJU-qY:u2n6MSzLhm8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=DIowZMJU-qY:u2n6MSzLhm8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stringwriter/~4/DIowZMJU-qY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/4383805577912169140/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8638674&amp;postID=4383805577912169140" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/4383805577912169140?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/4383805577912169140?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/stringwriter/~3/DIowZMJU-qY/doing-one-thing-at-time.html" title="Doing One Thing at a Time" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://bahadorn.blogspot.com/2009/08/doing-one-thing-at-time.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEHRH09fyp7ImA9WxNTEEQ.&quot;"><id>tag:blogger.com,1999:blog-8638674.post-3376503463914523998</id><published>2009-08-12T20:27:00.001+04:30</published><updated>2009-08-12T20:27:15.367+04:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-12T20:27:15.367+04:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Temp" /><title>Testing Syntax Highlighter</title><content type="html">Just to check if the new syntax highlighter works:  &lt;pre class="brush: csharp;"&gt;r.InstanceOf&amp;lt;IDataProvider&amp;lt;File&amp;gt;&amp;gt;()
    .Is.OfConcreteType&amp;lt;NHibernateDataProvider&amp;lt;File&amp;gt;&amp;gt;()
    .CtorDependency&amp;lt;ICriteriaCreator&amp;lt;File&amp;gt;&amp;gt;().Is&amp;lt;FileDataEntryService&amp;gt;()
    .WithName(&amp;quot;FileDataEntryDataProvider&amp;quot;);&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;I’m using Alex Gorbatchev’s &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter"&gt;SyntaxHighlighter&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8638674-3376503463914523998?l=bahadorn.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=tuwCo-KbZxY:movgg0pbStM:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=tuwCo-KbZxY:movgg0pbStM:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=tuwCo-KbZxY:movgg0pbStM:XQ266DUsA9M"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=XQ266DUsA9M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=tuwCo-KbZxY:movgg0pbStM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=tuwCo-KbZxY:movgg0pbStM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=tuwCo-KbZxY:movgg0pbStM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=tuwCo-KbZxY:movgg0pbStM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=tuwCo-KbZxY:movgg0pbStM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=tuwCo-KbZxY:movgg0pbStM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=tuwCo-KbZxY:movgg0pbStM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stringwriter/~4/tuwCo-KbZxY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/3376503463914523998/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8638674&amp;postID=3376503463914523998" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/3376503463914523998?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/3376503463914523998?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/stringwriter/~3/tuwCo-KbZxY/testing-syntax-highlighter.html" title="Testing Syntax Highlighter" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><thr:total>6</thr:total><feedburner:origLink>http://bahadorn.blogspot.com/2009/08/testing-syntax-highlighter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkAMQ3g8fCp7ImA9WxdRF04.&quot;"><id>tag:blogger.com,1999:blog-8638674.post-2202523867119582226</id><published>2008-06-06T12:17:00.001+04:30</published><updated>2008-06-06T12:23:02.674+04:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-06T12:23:02.674+04:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Web" /><category scheme="http://www.blogger.com/atom/ns#" term="Review" /><title>Quick Notes About My Experience with LiveMesh</title><content type="html">&lt;p&gt;&lt;a href="http://www.mesh.com/"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="41" alt="LiveMesh logo" src="http://lh5.ggpht.com/bahador.nooraei/SEjrcev3yXI/AAAAAAAAAJ8/Y6qNVTQxWG8/LiveMesh%20logo%5B4%5D.jpg?imgmax=800" width="188" align="right" border="0" /&gt;&lt;/a&gt;These are the things that caught my attention using &lt;a href="http://www.mesh.com/"&gt;LiveMesh&lt;/a&gt; for one hour: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Download took long (the download speed was slow (around 10KB). I don't know if this was their fault or my ISP, or &amp;#8230; ). &lt;/li&gt;    &lt;li&gt;I like the &amp;quot;Devices&amp;quot; interface! Its simple and nicely done, and gives me the feeling that I'm going to create a mesh! ;) &lt;/li&gt;    &lt;li&gt;Signing up and adding a device was easy and straightforward. Just click the &amp;quot;Add Device&amp;quot; button and it starts downloading the software to the current device you're browsing from. &lt;/li&gt;    &lt;li&gt;For now, you can just add a PC as a device (They say that Mac and Windows Mobile phone support is on the way). It has a 64-bit version of the software, which made me feel supported and warmed my heart ;) &lt;/li&gt;    &lt;li&gt;&amp;quot;Product does not support running under an elevated administrator account or with UAC disabled.&amp;quot; So I had to enable UAC and restart the system, just for the installer to start installing.      &lt;ul&gt;       &lt;li&gt;There is a good explanation about this strange requirement on the &lt;a href="http://blogs.msdn.com/livemesh/archive/2008/04/28/get-mesh-and-why-we-require-uac.aspx"&gt;LiveMesh teams's blog&lt;/a&gt;. But I'm not sure why they *must* have used per-user COM objects. I'm not an expert on the subject, but whatever the reasoning behind that is, not sure if it is worth forcing end users enable UAC for the setup. Bear in mind that it is just the first tech preview. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;The remote desktop functionality is great. Now we have a free application that provides us with complete remote desktop functionality, which is a huge step forward from &lt;a href="https://www.foldershare.com/"&gt;FolderShare&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;Speaking of FolderShare, I really miss the remote &lt;em&gt;browsing&lt;/em&gt; (not remote &lt;em&gt;desktop&lt;/em&gt;) feature of it. It was fast (given my Internet connection, full remote desktop over Internet is very sluggish!), and allows me to get files from my PC over the Internet. If you haven't tried it yet, forget about LiveMesh and &lt;a href="https://www.foldershare.com/"&gt;go&lt;/a&gt; give it a try. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/bahador.nooraei/SEjstktCZAI/AAAAAAAAAKA/8J6wzRsIR44/s1600-h/FolderShare%20remote%20access%5B5%5D.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="308" alt="FolderShare remote access" src="http://lh4.ggpht.com/bahador.nooraei/SEjrgAsX9AI/AAAAAAAAAKE/i-BjWtk_GWA/FolderShare%20remote%20access_thumb%5B3%5D.jpg?imgmax=800" width="644" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Remote desktop feature is implemented using ActiveX, so it is IE only. &lt;/li&gt;    &lt;li&gt;It detected that I'm trying to connect remotely to the same computer that I'm working on now and showed me a meaningful message! It was just fun to try :D &lt;/li&gt;    &lt;li&gt;A synced folder has a distinguishable blue icon in windows explorer. Nice! &lt;/li&gt;    &lt;li&gt;When you open a synced folder, a LiveMesh sidebar appears on its right that shows you recent &amp;quot;news&amp;quot;, and devices and people that have access to this folder.&lt;/li&gt; &lt;/ul&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/bahador.nooraei/SEjrg2J0nGI/AAAAAAAAAKI/Zfw5D4zk5JA/s1600-h/LiveMesh%20Sidebar%5B8%5D.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="352" alt="LiveMesh Sidebar" src="http://lh5.ggpht.com/bahador.nooraei/SEjriF18A_I/AAAAAAAAAKM/Uo7HD1PsQjw/LiveMesh%20Sidebar_thumb%5B6%5D.jpg?imgmax=800" width="232" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The &amp;quot;news&amp;quot; interface is clean and readable. I always had problem with FolderShare's activity window. &lt;/li&gt;    &lt;li&gt;Members can only be Owner of a given folder in the current version. So you cannot give read-only access to someone. Then again, it is just the first tech preview of the software. &lt;/li&gt;    &lt;li&gt;I'm not a fan of mimicking desktop interfaces in a web application; but in this case the Vista-ish windows in the browser were a real treat and enable the user to have a consistent experience whether he is using the web interface or browsing his local hard drive using Windows Explorer. Just look at the following screenshot, taken from the web interface, and compare it to the one above. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/bahador.nooraei/SEjrjZKarAI/AAAAAAAAAKQ/uc-OhJ2JRcY/s1600-h/LiveMesh%20Live%20Desktop%5B4%5D.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="289" alt="LiveMesh Live Desktop" src="http://lh4.ggpht.com/bahador.nooraei/SEjrkshhzUI/AAAAAAAAAKU/uyoVbZ7DC6w/LiveMesh%20Live%20Desktop_thumb%5B2%5D.jpg?imgmax=800" width="618" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The coolest feature of the service in the current release, is the Live Desktop. It appears as a device in your devices page and gives you about 5GB of storage space in the cloud. You can sync a folder in the Live Desktop, with a folder on your PC's hard drive and you can always access its content over the Internet &lt;em&gt;no matter your home PC is on or off&lt;/em&gt;. And when you want to get it, you are not limited by your PC's Internet connection's speed (again, it is important for me here), you are accessing it from your Microsoft-provided online storage. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you have a broadband connection, you owe it to yourself to try &lt;a href="http://www.mesh.com/"&gt;LiveMesh&lt;/a&gt; or &lt;a href="https://www.foldershare.com/"&gt;FolderShare&lt;/a&gt;. As &lt;a href="http://www.hanselman.com/blog/ScottHanselmans2007UltimateDeveloperAndPowerUsersToolListForWindows.aspx"&gt;Soctt Hanselman says about FolderShare&lt;/a&gt;, &amp;quot;Truly change the way you use your machine. Save a file in a folder and it will always been on your other three machines when you need it. Also access files, if you like, from remote locations. And it's free.&amp;quot;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8b6e3762-52cc-4eb3-97af-694f2b9ab382" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/LiveMesh" rel="tag"&gt;LiveMesh&lt;/a&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8638674-2202523867119582226?l=bahadorn.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=t_sBX9zsG00:TgktaSFC7k4:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=t_sBX9zsG00:TgktaSFC7k4:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=t_sBX9zsG00:TgktaSFC7k4:XQ266DUsA9M"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=XQ266DUsA9M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=t_sBX9zsG00:TgktaSFC7k4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=t_sBX9zsG00:TgktaSFC7k4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=t_sBX9zsG00:TgktaSFC7k4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=t_sBX9zsG00:TgktaSFC7k4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=t_sBX9zsG00:TgktaSFC7k4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=t_sBX9zsG00:TgktaSFC7k4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=t_sBX9zsG00:TgktaSFC7k4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stringwriter/~4/t_sBX9zsG00" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/2202523867119582226/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8638674&amp;postID=2202523867119582226" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/2202523867119582226?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/2202523867119582226?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/stringwriter/~3/t_sBX9zsG00/quick-notes-about-my-experience-with.html" title="Quick Notes About My Experience with LiveMesh" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/bahador.nooraei/SEjrcev3yXI/AAAAAAAAAJ8/Y6qNVTQxWG8/s72-c/LiveMesh%20logo%5B4%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://bahadorn.blogspot.com/2008/06/quick-notes-about-my-experience-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EARng-fCp7ImA9WxdTGEo.&quot;"><id>tag:blogger.com,1999:blog-8638674.post-4020476921426007041</id><published>2008-05-14T20:13:00.002+04:30</published><updated>2008-05-15T21:44:07.654+04:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-15T21:44:07.654+04:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Why C# Compiler Is so Picky About Type Parameter Constraints' Positions?</title><content type="html">&lt;p&gt;&lt;a href="http://bahadorn.blogspot.com/2008/04/on-c-30-lambdas-or-why-heck-you-are.html"&gt;Last time&lt;/a&gt; I wrote about how smart C# compiler is, this time I want to point at a seemingly unintelligent compile error:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The 'class' or 'struct' constraint must come before any other constraints.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;or:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The new() constraint must be the last constraint specified.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;For example, if you write the following code the compiler complains that you must swap the constraints' position:&lt;/p&gt;  &lt;pre&gt;&lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Foo&amp;lt;T&amp;gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;where&lt;/span&gt; T : IDisposable, &lt;span style="color: #0000ff"&gt;class&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;}&lt;/pre&gt;

&lt;p&gt;So how is that the glamorous C# compiler that &lt;a href="http://bahadorn.blogspot.com/2008/04/on-c-30-lambdas-or-why-heck-you-are.html"&gt;reads my mind&lt;/a&gt;, demands me to change the ordering of those constraints or else!&lt;/p&gt;

&lt;p&gt;The error message sounds like a &amp;quot;semantic error&amp;quot; and that's what kept me wondering why the compiler is so picky. I went ahead and looked up the C# language specification and found out that this is in fact a syntactic error, coming from &amp;quot;syntax analyzer&amp;quot; of the compiler, if we speak in &lt;a href="http://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811/"&gt;Dragon&lt;/a&gt; terms.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Side note: &lt;/strong&gt;You can find the specification in your own computer, at &amp;quot;%ProgramFiles%\Microsoft Visual Studio 9.0\VC#\Specifications\1033&amp;quot;. Change the VS version, if you have an earlier version installed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is the syntax, pasted from the specification:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;em&gt;type-parameter-constraints: 
      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; primary-constraint 

      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; secondary-constraints 

      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; constructor-constraint 

      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; primary-constraint , secondary-constraints 

      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; primary-constraint , constructor-constraint 

      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; secondary-constraints , constructor-constraint 

      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; primary-constraint , secondary-constraints , constructor-constraint&lt;/em&gt;&lt;/p&gt;

  &lt;br /&gt;

  &lt;p&gt;&lt;em&gt;primary-constraint: 
      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; class-type 

      &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;

  &lt;pre&gt;  class&lt;/pre&gt;

  &lt;pre&gt;  struct&lt;/pre&gt;

  &lt;p&gt;&lt;em&gt;secondary-constraints: 
      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; interface-type 

      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; type-parameter 

      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; secondary-constraints , interface-type 

      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; secondary-constraints , type-parameter&lt;/em&gt;&lt;/p&gt;

  &lt;p&gt;&lt;em&gt;constructor-constraint: &lt;/em&gt;&lt;/p&gt;

  &lt;pre&gt;  new ( )&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;This way, the C# syntax is limited in a way that you can specify one of the three &lt;em&gt;primary-constraints&lt;/em&gt;, any number of &lt;em&gt;secondary-constraints&lt;/em&gt;, and a &lt;em&gt;constructor &lt;/em&gt;(new()) constraint. There can be one or more of these three constraint types specified, but they must appear in that particular order; that's part of the syntax.&lt;/p&gt;

&lt;p&gt;So when you write something like the Foo class that I've shown you before, the syntax analyzer sees a &lt;em&gt;secondary-constraint&lt;/em&gt; and then a comma, now it expects another &lt;em&gt;secondary-constraint&lt;/em&gt; or the &lt;em&gt;constructor-constraint&lt;/em&gt;; but it encounters neither of them, so it reports an error: &amp;quot;Expected: interface, type-parameter, or new().&amp;quot; At least that's what an old-school compiler should have thrown more or less; but apparently the C# designers at Microsoft replaced the message with a more human readable error: &amp;quot;The 'class' or 'struct' constraint must come before any other constraints.&amp;quot; (And I think they've done the right thing; that's way more expressive.)&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Side note: &lt;/strong&gt;If you write anything other than &lt;em&gt;class &lt;/em&gt;or &lt;em&gt;struct&lt;/em&gt; in there, it gives you a syntactic error: &amp;quot;Type expected.&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When designing a language, it is a good thing that you capture as much information as you can in the syntax; and leave less for the semantic analyzer to check; it makes the specification more expressive (it's specially important when you want to submit it for standardization), and the implementation simpler. But IMHO, in this case they could have relaxed the syntax a little bit, and added some semantic rules (there already exist a lot of semantic rules in the specification of this feature, like &amp;quot;there must be no cycles in the dependency graph of type parameters&amp;quot;, or &amp;quot;A type must not be specified more than once in a given where clause&amp;quot;). These new semantic rules would be something like these:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;There must not be more that one &lt;em&gt;new() &lt;/em&gt;constraint specified. &lt;/li&gt;

  &lt;li&gt;One and only one of the following constraints must be present: &lt;em&gt;class&lt;/em&gt;, &lt;em&gt;struct&lt;/em&gt;, &lt;em&gt;class-type.&lt;/em&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Post script: &lt;/strong&gt;I know, it is just a tiny little thing; but I can't stop thinking about it whenever a build fails because of it (it happens a lot when people are newly introduced to this feature).&lt;/p&gt;

&lt;p&gt;&lt;font color="#ff0000"&gt;Update:&lt;/font&gt; Corrected a typo. Thanks Mohammad.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8638674-4020476921426007041?l=bahadorn.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=EFs8NjZaoF4:GIXTRU1Tor8:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=EFs8NjZaoF4:GIXTRU1Tor8:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=EFs8NjZaoF4:GIXTRU1Tor8:XQ266DUsA9M"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=XQ266DUsA9M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=EFs8NjZaoF4:GIXTRU1Tor8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=EFs8NjZaoF4:GIXTRU1Tor8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=EFs8NjZaoF4:GIXTRU1Tor8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=EFs8NjZaoF4:GIXTRU1Tor8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=EFs8NjZaoF4:GIXTRU1Tor8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=EFs8NjZaoF4:GIXTRU1Tor8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=EFs8NjZaoF4:GIXTRU1Tor8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stringwriter/~4/EFs8NjZaoF4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/4020476921426007041/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8638674&amp;postID=4020476921426007041" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/4020476921426007041?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/4020476921426007041?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/stringwriter/~3/EFs8NjZaoF4/why-c-compiler-is-so-picky-about-type.html" title="Why C# Compiler Is so Picky About Type Parameter Constraints&amp;#39; Positions?" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bahadorn.blogspot.com/2008/05/why-c-compiler-is-so-picky-about-type.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcAQHwzeip7ImA9WxZaFUU.&quot;"><id>tag:blogger.com,1999:blog-8638674.post-5156173693045536182</id><published>2008-04-30T23:55:00.008+04:30</published><updated>2008-05-01T00:37:21.282+04:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-01T00:37:21.282+04:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>On C# 3.0 Lambdas, or Why the Heck You Are Still Using C# 2.0, Even If You Still Want to Target the 2.0 Framework?</title><content type="html">&lt;p&gt;&lt;/p&gt;  &lt;p&gt;After months of using C# 3.0 and Visual Studio 2008, I still delight in using lambda expressions, even in their simplest form; let alone writing complex LINQ queries! Every time I'm using it, I think of all the smartness it takes on the compiler side, that allow me to express my intent in the most concise form.&lt;/p&gt;  &lt;p&gt;Here I'm going to show you, in a simple example, how C# 3.0 saves you from wasting a lot of keystrokes by providing a very relaxed syntax, and uses its knowledge to infer types at compile time. It can also be considered an unusual approach to introduce lambda expressions to those who already get anonymous delegates.&lt;/p&gt;  &lt;p&gt;In a program, I had a list of Category objects that I wanted to delete, and a delete method that accepted an array of type &lt;em&gt;int?&lt;/em&gt; (Category "Id"s).&lt;/p&gt;  &lt;p&gt;In other words I have this:&lt;/p&gt;  &lt;p class="csharpcode" style="font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;"&gt;List&amp;lt;Category&amp;gt; toDelete = GetCategoriesToDelete();&lt;/p&gt;and want to extract the category Ids and fill the following array:

&lt;p class="csharpcode" style="font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;"&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt;?[] a;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Side note: &lt;/strong&gt;There's nothing wrong with writing the plain old &lt;em&gt;for&lt;/em&gt; code, but I prefer a little functional-ish code that allows me to specify more of &lt;em&gt;what&lt;/em&gt;, instead of &lt;em&gt;how&lt;/em&gt;; although the old code may be better (micro-)performance-wise; depending on the compiler and JITer optimizations. Anyway, it's not my concern here.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;We can write the following intentionally verbose 2.0 code, using anonymous delegates:&lt;/p&gt;&lt;p class="csharpcode" style="font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;"&gt;toDelete.ConvertAll&amp;lt;&lt;span class="kwrd"&gt;int&lt;/span&gt;?&amp;gt;(&lt;span class="kwrd"&gt;new&lt;/span&gt; Converter&amp;lt;Category, &lt;span class="kwrd"&gt;int&lt;/span&gt;?&amp;gt; (&lt;span class="kwrd"&gt;delegate&lt;/span&gt;(Category c)
{
    &lt;span class="kwrd"&gt;return&lt;/span&gt; c.Id;
})).ToArray();&lt;/p&gt;The result of ConvertAll() is a List&amp;lt;int?&amp;gt;, and we call its ToArray() method to get an array of &lt;em&gt;int?&lt;/em&gt;.

Even C# 2.0 allows us to omit the &lt;em&gt;new Converter &lt;/em&gt;part, and just write the delegate as the parameter to ConvertAll:

toDelete.ConvertAll&amp;lt;&lt;span class="kwrd"&gt;int&lt;/span&gt;?&amp;gt;(&lt;span class="kwrd"&gt;delegate&lt;/span&gt;(Category c)
&lt;p class="csharpcode" style="font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;"&gt;{
    &lt;span class="kwrd"&gt;return&lt;/span&gt; c.Id;
}).ToArray();&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Now that's better. But the compiler already knows the type of Category.Id is int?, and the delegate returns c.Id, where c is a Category. So why we must specify the type argument for ConvertAll? C# 3.0 does the inferring and allow us to omit the type argument for ConvertAll (&amp;lt;int?&amp;gt; is removed):&lt;/p&gt;&lt;p class="csharpcode" style="font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;"&gt;toDelete.ConvertAll(&lt;span class="kwrd"&gt;delegate&lt;/span&gt;(Category c)
{
    &lt;span class="kwrd"&gt;return&lt;/span&gt; c.Id;
}).ToArray();&lt;/p&gt;&lt;p&gt;When you try to compile the above code in C# &lt;strong&gt;2.0&lt;/strong&gt;, the compiler says: "The type arguments for method cannot be inferred from the usage." Because it won't bother to analyze the body of anonymous method and find out about its return type.
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Side note: &lt;/strong&gt;The funny part is that the 2.0 compiler actually verifies the returned value's consistency with the type argument provided to ConvertAll, so if you write: (notice the &lt;em&gt;string&lt;/em&gt; type argument)&lt;/p&gt;&lt;p class="csharpcode" style="font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;"&gt;toDelete.ConvertAll&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;(&lt;span class="kwrd"&gt;delegate&lt;/span&gt;(Category c)
{
     &lt;span class="kwrd"&gt;return&lt;/span&gt; c.Id;
}).ToArray();&lt;/p&gt;&lt;p&gt;2.0 compiler gives a compile error: "cannot convert from 'anonymous method' to 'System.Converter&amp;lt;Temp.Category,string&amp;gt;'." So the information is there, but the 2.0 compiler is just too lazy to use it to infer the type argument ;)&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Now with C# 3.0, we can use the lambda expression syntax, which makes the statement shorter (the delegate keyword is removed), and more readable (at least when you get used to it).&lt;/p&gt;&lt;p class="csharpcode" style="font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;"&gt;toDelete.ConvertAll((Category c) =&amp;gt;
{
    &lt;span class="kwrd"&gt;return&lt;/span&gt; c.Id;
}).ToArray();&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;But the compiler already knows that the converter must convert a &lt;em&gt;Category&lt;/em&gt; to something else; because we already declared toDelete as a List of &lt;em&gt;Category&lt;/em&gt;s. How about omitting it from the lambda expression’s left-hand side and just declare the parameter's name (in this case, &lt;em&gt;c&lt;/em&gt;)?&lt;/p&gt;&lt;p class="csharpcode" style="font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;"&gt;toDelete.ConvertAll(c =&amp;gt;
{
    &lt;span class="kwrd"&gt;return&lt;/span&gt; c.Id;
}).ToArray();&lt;/p&gt;&lt;p&gt;Ok, I hear you C# 3.0 experts: what’s with the braces and the &lt;em&gt;return&lt;/em&gt; keyword, when we have just a single sentence that returns a value? Removing all that clutter leaves us with:&lt;/p&gt;&lt;p class="csharpcode" style="font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;"&gt;toDelete.ConvertAll(c =&amp;gt; c.Id).ToArray();&lt;/p&gt;&lt;p&gt;Now that's a beautiful one-liner, and the kind of code I write in my everyday programming now, and it still amazes me how VS infers the types seamlessly and provides me with cool IntelliSense support:&lt;/p&gt;&lt;p&gt;&lt;img style="border-width: 0px;" alt="lambda intellisense" src="http://lh5.ggpht.com/bahador.nooraei/SBjHkJOsL0I/AAAAAAAAAG4/_DUUyfBxY4c/lambda%20intellisense%5B4%5D.jpg?imgmax=800" border="0" height="131" width="473" /&gt; &lt;/p&gt;&lt;p&gt;&lt;img style="border-width: 0px;" alt="Is it reading my mind?" src="http://lh5.ggpht.com/bahador.nooraei/SBjHmJOsL1I/AAAAAAAAAHA/fUvFkZ05B94/ToArray%20intellisense%5B6%5D.jpg?imgmax=800" border="0" height="72" width="424" /&gt;&lt;/p&gt;&lt;p&gt;Specially in the case of the latter screenshot, even though the inference is so simple and trivial, I kina feel it reads my mind! I loves himself a C# 3.0!&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Note: &lt;/strong&gt;The above code works even when you're targeting .NET Framework 2.0, using VS2008.&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7675fa9d-f7e6-4830-988d-b74aa456f58f" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/.net" rel="tag"&gt;.net&lt;/a&gt;,&lt;a href="http://technorati.com/tags/C#" rel="tag"&gt;C#&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8638674-5156173693045536182?l=bahadorn.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=N2tQY74NWP8:rQ8K-JH93is:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=N2tQY74NWP8:rQ8K-JH93is:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=N2tQY74NWP8:rQ8K-JH93is:XQ266DUsA9M"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=XQ266DUsA9M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=N2tQY74NWP8:rQ8K-JH93is:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=N2tQY74NWP8:rQ8K-JH93is:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=N2tQY74NWP8:rQ8K-JH93is:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=N2tQY74NWP8:rQ8K-JH93is:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=N2tQY74NWP8:rQ8K-JH93is:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=N2tQY74NWP8:rQ8K-JH93is:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=N2tQY74NWP8:rQ8K-JH93is:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stringwriter/~4/N2tQY74NWP8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/5156173693045536182/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8638674&amp;postID=5156173693045536182" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/5156173693045536182?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/5156173693045536182?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/stringwriter/~3/N2tQY74NWP8/on-c-30-lambdas-or-why-heck-you-are.html" title="On C# 3.0 Lambdas, or Why the Heck You Are Still Using C# 2.0, Even If You Still Want to Target the 2.0 Framework?" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/bahador.nooraei/SBjHkJOsL0I/AAAAAAAAAG4/_DUUyfBxY4c/s72-c/lambda%20intellisense%5B4%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://bahadorn.blogspot.com/2008/04/on-c-30-lambdas-or-why-heck-you-are.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MAQ3c5fCp7ImA9WxZaEko.&quot;"><id>tag:blogger.com,1999:blog-8638674.post-5347221680549894791</id><published>2008-04-26T19:36:00.001+04:30</published><updated>2008-04-27T11:27:22.924+04:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-27T11:27:22.924+04:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Fun" /><title>Free Will</title><content type="html">&lt;p&gt;I saw this in a blog that I visited recently; where do you want to bookmark to?&lt;/p&gt;  &lt;p&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="175" alt="Bookmark To" src="http://lh5.ggpht.com/bahador.nooraei/SBNE6zp23qI/AAAAAAAAAGw/KkUDl6SLd4o/BookmarkTo%5B4%5D.jpg?imgmax=800" width="557" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;As Satan (Al Pacino) said in the movie The Devil's Advocate: &amp;quot;Free will, it's a b*tch!&amp;quot;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8638674-5347221680549894791?l=bahadorn.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=eeM9SKOFAJc:ZT0-y4N8Nvg:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=eeM9SKOFAJc:ZT0-y4N8Nvg:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=eeM9SKOFAJc:ZT0-y4N8Nvg:XQ266DUsA9M"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=XQ266DUsA9M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=eeM9SKOFAJc:ZT0-y4N8Nvg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=eeM9SKOFAJc:ZT0-y4N8Nvg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=eeM9SKOFAJc:ZT0-y4N8Nvg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=eeM9SKOFAJc:ZT0-y4N8Nvg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=eeM9SKOFAJc:ZT0-y4N8Nvg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=eeM9SKOFAJc:ZT0-y4N8Nvg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=eeM9SKOFAJc:ZT0-y4N8Nvg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stringwriter/~4/eeM9SKOFAJc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/5347221680549894791/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8638674&amp;postID=5347221680549894791" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/5347221680549894791?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/5347221680549894791?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/stringwriter/~3/eeM9SKOFAJc/free-will.html" title="Free Will" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/bahador.nooraei/SBNE6zp23qI/AAAAAAAAAGw/KkUDl6SLd4o/s72-c/BookmarkTo%5B4%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://bahadorn.blogspot.com/2008/04/free-will.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUMQno4fip7ImA9WxZaEU8.&quot;"><id>tag:blogger.com,1999:blog-8638674.post-1040168071029048036</id><published>2008-04-25T16:04:00.001+04:30</published><updated>2008-04-25T16:04:43.436+04:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-25T16:04:43.436+04:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><title>A Simple Usage of Yahoo! Pipes</title><content type="html">&lt;p&gt;Today, &lt;a href="http://farzadfattahi.com/"&gt;a friend of mine&lt;/a&gt; asked if I have a feed of my twitter that doesn't contain @reply entries. I checked out Twitter and it seems that they do not provide such a feed out of the box.&lt;/p&gt;  &lt;p&gt;I quickly turned to &lt;a href="http://pipes.yahoo.com/" target="_blank"&gt;Yahoo! Pipes&lt;/a&gt;. They provide you &lt;a href="http://pipes.yahoo.com"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="60" alt="Yahoo Pipes" src="http://lh4.ggpht.com/bahador.nooraei/SBHByDp23oI/AAAAAAAAAGg/f4cvHJYEA0g/Yahoo%20Pipes%5B4%5D.jpg?imgmax=800" width="149" align="right" border="0" /&gt;&lt;/a&gt;with a very intuitive ajaxi interface to define a mashup and/or manipulator of feeds. &lt;/p&gt;  &lt;p&gt;I went ahead and created a pipe and dragged a &lt;strong&gt;Fetch &lt;strong&gt;Feed&lt;/strong&gt; &lt;/strong&gt;and a &lt;strong&gt;Filter&lt;/strong&gt; module to the design surface. Just pointed the Fetch Feed to my &lt;a href="http://twitter.com/statuses/user_timeline/14510594.rss" target="_blank"&gt;Twitter feed&lt;/a&gt;, and defined the filter as &lt;em&gt;those items that contain a &amp;quot;bahadorn: @&amp;quot; in their title&lt;/em&gt;. Then wired them up, and I'm good to go!&lt;/p&gt;  &lt;p&gt;Here is the resulting design surface:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="480" alt="Pipe Design" src="http://lh5.ggpht.com/bahador.nooraei/SBHB0Tp23pI/AAAAAAAAAGo/xddnH5p1VBI/Yahoo%20Pipes%20--%20Twitter%20Without%20Replies%5B4%5D.jpg?imgmax=800" width="512" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;Now it gives me a feed and I've burnt that with &lt;a href="http://www.feedburner.com/"&gt;FeedBurner&lt;/a&gt; to make the URL more publishing-friendly: &lt;a title="http://feeds.feedburner.com/BahadornTwitterMinusReplies" href="http://feeds.feedburner.com/BahadornTwitterMinusReplies"&gt;http://feeds.feedburner.com/BahadornTwitterMinusReplies&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The whole process took about 10 minutes of my time, and it was my first experience with Pipes.&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Postscript&lt;/font&gt;: Noticed that the RSS provided by the pipe is out of sync with the main feed. I wonder if it's just a delay or a serious problem.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:176a0455-39fc-4e1f-a3dd-a869995e8686" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Twitter" rel="tag"&gt;Twitter&lt;/a&gt;,&lt;a href="http://technorati.com/tags/YahooPipes" rel="tag"&gt;YahooPipes&lt;/a&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8638674-1040168071029048036?l=bahadorn.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=zelxBJ0dYtU:eVnaVleXlxs:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=zelxBJ0dYtU:eVnaVleXlxs:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=zelxBJ0dYtU:eVnaVleXlxs:XQ266DUsA9M"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=XQ266DUsA9M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=zelxBJ0dYtU:eVnaVleXlxs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=zelxBJ0dYtU:eVnaVleXlxs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=zelxBJ0dYtU:eVnaVleXlxs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=zelxBJ0dYtU:eVnaVleXlxs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=zelxBJ0dYtU:eVnaVleXlxs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=zelxBJ0dYtU:eVnaVleXlxs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=zelxBJ0dYtU:eVnaVleXlxs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stringwriter/~4/zelxBJ0dYtU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/1040168071029048036/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8638674&amp;postID=1040168071029048036" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/1040168071029048036?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/1040168071029048036?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/stringwriter/~3/zelxBJ0dYtU/simple-usage-of-yahoo-pipes.html" title="A Simple Usage of Yahoo! Pipes" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/bahador.nooraei/SBHByDp23oI/AAAAAAAAAGg/f4cvHJYEA0g/s72-c/Yahoo%20Pipes%5B4%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://bahadorn.blogspot.com/2008/04/simple-usage-of-yahoo-pipes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQAQXczeyp7ImA9WxZaEEk.&quot;"><id>tag:blogger.com,1999:blog-8638674.post-1695695977284556969</id><published>2008-04-24T18:42:00.001+04:30</published><updated>2008-04-24T18:42:20.983+04:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-24T18:42:20.983+04:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><category scheme="http://www.blogger.com/atom/ns#" term="Personal" /><title>Twitter</title><content type="html">&lt;p&gt;It's not much of a secret that I'm not an Instant Messenger kind of person. The problem is, I find many communication that must be done via email, will channel through IM whenever you're showing yourself as online; and IM brings a lot of chit-chat with it.&lt;/p&gt;  &lt;p&gt;Yes, I know, one must only be online when he is really available for open talk; but for me, this strategy has always resulted in &lt;strong&gt;not&lt;/strong&gt; being online at all. There was times that IM served me well, and I still use that here and there, but oftentimes I'm not in the mood to be out in the open, ready to be &lt;strike&gt;interrupted&lt;/strike&gt; contacted by anyone who feels like it!&lt;/p&gt;  &lt;p&gt;The problem is I still want to be in touch with my friends and keep myself updated on their status. And even better, chat with them, just not necessarily &lt;em&gt;instantly&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;What must I do? Well, the above paragraph sounds like the &lt;a href="http://twitter.com" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="53" alt="Twitter" src="http://lh5.ggpht.com/bahador.nooraei/SBCVQjp23nI/AAAAAAAAAGY/n7yWjyN41A4/twitter%5B4%5D.jpg?imgmax=800" width="214" align="right" border="0" /&gt;&lt;/a&gt;definition of &lt;a href="http://twitter.com/"&gt;Twitter&lt;/a&gt;!&amp;#160; I signed up an hour ago, and started twitting. So far so good. I'm currently using &lt;a href="http://code.google.com/p/wittytwitter/" target="_blank"&gt;Witty&lt;/a&gt; as my twitter client, which is an open source WPF application.&lt;/p&gt;  &lt;p&gt;Unfortunately, Twitter is not widely adopted in my circle of friends yet (the majority of them are using &lt;a href="http://360.yahoo.com/" target="_blank"&gt;Yahoo 360&lt;/a&gt;, but I prefer the simplicity of twitter). So I invite you, dear friends, to come and join Twitter and &lt;a href="http://twitter.com/bahadorn"&gt;look me up&lt;/a&gt; in there.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9f416253-929f-4cf8-b7d8-c22e7d386443" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Twitter" rel="tag"&gt;Twitter&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Yahoo360" rel="tag"&gt;Yahoo360&lt;/a&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8638674-1695695977284556969?l=bahadorn.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=5808qoc3XSo:1zaJEEzvKYg:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=5808qoc3XSo:1zaJEEzvKYg:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=5808qoc3XSo:1zaJEEzvKYg:XQ266DUsA9M"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=XQ266DUsA9M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=5808qoc3XSo:1zaJEEzvKYg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=5808qoc3XSo:1zaJEEzvKYg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=5808qoc3XSo:1zaJEEzvKYg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=5808qoc3XSo:1zaJEEzvKYg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=5808qoc3XSo:1zaJEEzvKYg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=5808qoc3XSo:1zaJEEzvKYg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=5808qoc3XSo:1zaJEEzvKYg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stringwriter/~4/5808qoc3XSo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/1695695977284556969/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8638674&amp;postID=1695695977284556969" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/1695695977284556969?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/1695695977284556969?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/stringwriter/~3/5808qoc3XSo/twitter.html" title="Twitter" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/bahador.nooraei/SBCVQjp23nI/AAAAAAAAAGY/n7yWjyN41A4/s72-c/twitter%5B4%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://bahadorn.blogspot.com/2008/04/twitter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMDQHgzeyp7ImA9WxZaEk8.&quot;"><id>tag:blogger.com,1999:blog-8638674.post-4648374010807315117</id><published>2008-04-23T20:52:00.001+04:30</published><updated>2008-04-26T19:54:31.683+04:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-26T19:54:31.683+04:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Web" /><category scheme="http://www.blogger.com/atom/ns#" term="Blogging" /><title>CAPTCHA to fight humans?</title><content type="html">&lt;p&gt;&lt;font color="#ff0000"&gt;Update:&lt;/font&gt; Just saw a highly digged post point out the new RapidShare CAPTCHAs: &lt;a href="http://depressedprogrammer.wordpress.com/2008/04/20/worst-captcha-ever/"&gt;Worst Captcha Ever&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In my very few visits to the file sharing site &lt;a href="http://rapidshare.com/"&gt;RapidShare&lt;/a&gt;, I noticed that they are not fueled by advertisement at all. Instead, they try their best to convert the visitors, from free to premium users.&lt;/p&gt;  &lt;p&gt;They are using the age-old strategy of inflicting pain in users and putting them under pressure so they would &lt;em&gt;pay&lt;/em&gt; to upgrade to an &lt;em&gt;acceptable &lt;/em&gt;experience. RapidShare is a file sharing site, but limits a non-premium user's bandwidth, doesn't allow him to use a download manager, wastes his time with a pointless countdown before the download starts, limits him to one download at a time, and after a download is finished, bans him from using the site for some time. The list just goes on and on.&lt;/p&gt;  &lt;p&gt;When I see a site or piece of software like this, I always think of the&amp;#160; programmers behind it: part of their job is to make the site hard to use for users, the exact opposite of what we all have learned about creating software. I have seen this before, but a few days ago I saw something that showed me how creative one can be in that regard :D&lt;/p&gt;  &lt;p&gt;I stumbled upon a link to a file that was shared on RapidShare, when I followed the link, and after the countdown finished and everything, it showed me some CAPTCHA:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://lh6.ggpht.com/bahador.nooraei/SA9iWDp23jI/AAAAAAAAAFk/RZsP14S3RWw/s1600-h/RS_Captcha%5B3%5D.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="165" alt="RapidShare&amp;#39;s Captcha Sample" src="http://lh6.ggpht.com/bahador.nooraei/SA9iYDp23kI/AAAAAAAAAFs/ovDv4yNgAP4/RS_Captcha_thumb%5B1%5D.jpg?imgmax=800" width="518" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The first sentence in the &lt;a href="http://en.wikipedia.org/wiki/Captcha"&gt;wikipedia entry about CAPTCHA&lt;/a&gt; says (emphasis mine): &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;A CAPTCHA is a type of challenge-response test used in computing to determine that the response &lt;strong&gt;is not generated by a computer.&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I think RapidShare's implementation is currently impossible for computers to break, but that's not the point here! They have managed to introduce a new use for CAPTCHA: fighting humans! Note that even above their CAPTCHA they are saying that &lt;em&gt;because you are not a premium user, you must go through this pain&lt;/em&gt;. Pay us and you won't see this excruciating challenge/response! (Seriously, try answering the one provided in the above screenshot; the blur alone hurts my eyes).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Side note 1:&lt;/strong&gt; I think they obtained the general idea from an old MSR project called &lt;a href="http://research.microsoft.com/asirra/"&gt;Asirra&lt;/a&gt;. :D&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Side note 2: &lt;/strong&gt;IMHO, in the long run this kind of business model is doomed. Sure RapidShare's got a huge market share now, but the advertisement model is the way of the future. Look at web-based mail: just four years ago we had around 10MB of free space, and there was a paid &lt;em&gt;premium&lt;/em&gt; upgrade option. Now I've got 6652 MB in my GMail account - free of charge.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ea4f3a06-b773-4c19-b5a8-33f63f120ac6" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Web" rel="tag"&gt;Web&lt;/a&gt;,&lt;a href="http://technorati.com/tags/RapidShare" rel="tag"&gt;RapidShare&lt;/a&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8638674-4648374010807315117?l=bahadorn.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=q7dn7IOgCBE:MHnLnj41xbQ:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=q7dn7IOgCBE:MHnLnj41xbQ:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=q7dn7IOgCBE:MHnLnj41xbQ:XQ266DUsA9M"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=XQ266DUsA9M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=q7dn7IOgCBE:MHnLnj41xbQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=q7dn7IOgCBE:MHnLnj41xbQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=q7dn7IOgCBE:MHnLnj41xbQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=q7dn7IOgCBE:MHnLnj41xbQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=q7dn7IOgCBE:MHnLnj41xbQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=q7dn7IOgCBE:MHnLnj41xbQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=q7dn7IOgCBE:MHnLnj41xbQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stringwriter/~4/q7dn7IOgCBE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/4648374010807315117/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8638674&amp;postID=4648374010807315117" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/4648374010807315117?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/4648374010807315117?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/stringwriter/~3/q7dn7IOgCBE/captcha-to-fight-humans.html" title="CAPTCHA to fight humans?" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/bahador.nooraei/SA9iYDp23kI/AAAAAAAAAFs/ovDv4yNgAP4/s72-c/RS_Captcha_thumb%5B1%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://bahadorn.blogspot.com/2008/04/captcha-to-fight-humans.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UHRHc7eSp7ImA9WxZbFU4.&quot;"><id>tag:blogger.com,1999:blog-8638674.post-2171670526280837744</id><published>2008-04-18T13:20:00.001+04:30</published><updated>2008-04-18T20:43:55.901+04:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-18T20:43:55.901+04:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Blogging" /><category scheme="http://www.blogger.com/atom/ns#" term="Personal" /><title>Another Start</title><content type="html">&lt;p&gt;It's my second attempt at becoming a serious blogger. Last time I miserably failed at it, just because after I started, I realized it is going to consume time!    &lt;br /&gt;Blogging seems a trivial thing at first, but when you start DOING, you understand the huge amount of time required to create something readable, even by your own standards. That's the problem thousands of people face everyday; look at all the blogs that are created around the world wide west; and how many of them vanish into thin air after just a few posts.     &lt;br /&gt;There are some bloggers that I enjoy reading their writings; mainly technical people like &lt;a href="http://www.hanselman.com/blog/"&gt;Scott Hanselman&lt;/a&gt;, &lt;a href="http://codebetter.com/blogs/jeremy.miller/"&gt;Jeremy D. Miller&lt;/a&gt;, and &lt;a href="http://www.codinghorror.com/blog/"&gt;Jeff Atwood&lt;/a&gt;. By reading their posts I learn a lot, there's no question about it, but I also have the casual experience of reading a &lt;em&gt;blog&lt;/em&gt;: the writer's informal dump of thought, his unique point of view about the world, his&amp;#160; past and present experiences, and even his journey to &lt;a href="http://graysmatter.codivation.com/HowIAmBecomingABetterDeveloperPart1OfInfinity.aspx"&gt;become a better software developer&lt;/a&gt;. I consider them as the masters of dev-blogging; and they are in my &lt;em&gt;essentials&lt;/em&gt; folder in Google Reader.     &lt;br /&gt;Being on somebody's &lt;em&gt;essentials&lt;/em&gt; list is my ultimate goal with this, which is not something trivial in this vast ocean of blogs!     &lt;br /&gt;But for now, I will use this blog as my personal dump of thought, anything that I find interesting, plus a repository of technical challenges that I encounter developing software. It is always good to keep a log of your problems, your solutions to them, and even your line of thought in arriving at the solution, together in someplace searchable; so why not share them with all world? How many times you had a problem, and found the solution by searching the web?     &lt;br /&gt;It is already longer than what I expected to be just a simple &amp;quot;Hello World&amp;quot; post, so I'll cut it here. I you still want more, do a &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=%22start+a+blog%22&amp;amp;btnG=Google+Search"&gt;Google search of &amp;quot;start a blog&amp;quot;&lt;/a&gt;; it gives you 2,190,000&lt;strong&gt; &lt;/strong&gt;search results! :D&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a7156927-bf72-42e4-994b-9cc9e25b41be" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Blogging" rel="tag"&gt;Blogging&lt;/a&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8638674-2171670526280837744?l=bahadorn.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=fSADT-o1-PM:UZbjDjYcXiU:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=fSADT-o1-PM:UZbjDjYcXiU:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=fSADT-o1-PM:UZbjDjYcXiU:XQ266DUsA9M"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=XQ266DUsA9M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=fSADT-o1-PM:UZbjDjYcXiU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=fSADT-o1-PM:UZbjDjYcXiU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=fSADT-o1-PM:UZbjDjYcXiU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=fSADT-o1-PM:UZbjDjYcXiU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=fSADT-o1-PM:UZbjDjYcXiU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?i=fSADT-o1-PM:UZbjDjYcXiU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/stringwriter?a=fSADT-o1-PM:UZbjDjYcXiU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stringwriter?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stringwriter/~4/fSADT-o1-PM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bahadorn.blogspot.com/feeds/2171670526280837744/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8638674&amp;postID=2171670526280837744" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/2171670526280837744?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8638674/posts/default/2171670526280837744?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/stringwriter/~3/fSADT-o1-PM/another-start.html" title="Another Start" /><author><name>Bahador</name><uri>http://www.blogger.com/profile/09298730609538736795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://bp3.blogger.com/_gjvPn5nGnKs/R_XkXOYstdI/AAAAAAAAAFU/oGUD_4S-CYA/S220/Bahador+Brain.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://bahadorn.blogspot.com/2008/04/another-start.html</feedburner:origLink></entry></feed>

