<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-4240466463218759555</atom:id><lastBuildDate>Mon, 09 Nov 2009 16:43:30 +0000</lastBuildDate><title>5pm Posts</title><description>Atypical views at the end of my work day!</description><link>http://blog.zwares.com/</link><managingEditor>noreply@blogger.com (Saket Porwal)</managingEditor><generator>Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/5pmPosts" type="application/rss+xml" /><feedburner:emailServiceId>5pmPosts</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-189048394733101787</guid><pubDate>Wed, 05 Aug 2009 20:02:00 +0000</pubDate><atom:updated>2009-08-05T15:05:58.802-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Architecture</category><category domain="http://www.blogger.com/atom/ns#">DotNet</category><title>When not to use method overload</title><description>&lt;p&gt;Method overloading is taught in OOP 101, but there are times when it should be avoided like plague. Let me explain ...&lt;/p&gt;  &lt;p&gt;During a recent implementation of Caching solution, I had to create a CacheManager which could support the creation and management of different types of Cache types - say file system based, memory based, db based etc. Each cache type comes with different options. For example, file based system could monitor a file as a dependency, which the DB based cache does not. &lt;/p&gt;  &lt;p&gt;A typical example of different overloads is as follows ...&lt;/p&gt;  &lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt;   &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: #cc7832"&gt;interface&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;ICache &lt;/span&gt;&lt;span style="background: black; color: white"&gt;{&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;void&lt;/span&gt;&lt;span style="background: black; color: white"&gt; Add&amp;lt;T&amp;gt;(&lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;string&lt;/span&gt;&lt;span style="background: black; color: white"&gt; key, T value)&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;void&lt;/span&gt;&lt;span style="background: black; color: white"&gt; Add&amp;lt;T&amp;gt;(&lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;string&lt;/span&gt;&lt;span style="background: black; color: white"&gt; key, T value, &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;string&lt;/span&gt;&lt;span style="background: black; color: white"&gt; filename);&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;void&lt;/span&gt;&lt;span style="background: black; color: white"&gt; Add&amp;lt;T&amp;gt;(&lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;string&lt;/span&gt;&lt;span style="background: black; color: white"&gt; key, T value, &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;DateTime&lt;/span&gt;&lt;span style="background: black; color: white"&gt; absoluteExpiration);&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;void&lt;/span&gt;&lt;span style="background: black; color: white"&gt; Add&amp;lt;T&amp;gt;(&lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;string&lt;/span&gt;&lt;span style="background: black; color: white"&gt; key, T value, &lt;/span&gt;&lt;span style="background: black; color: #ffc66d"&gt;CacheDependency&lt;/span&gt;&lt;span style="background: black; color: white"&gt; dependencies);&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;void&lt;/span&gt;&lt;span style="background: black; color: white"&gt; Add&amp;lt;T&amp;gt;(&lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;string&lt;/span&gt;&lt;span style="background: black; color: white"&gt; key, T value, &lt;/span&gt;&lt;span style="background: black; color: #ffc66d"&gt;CacheDependency&lt;/span&gt;&lt;span style="background: black; color: white"&gt; dependencies, &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;DateTime&lt;/span&gt;&lt;span style="background: black; color: white"&gt; absoluteExpiration, &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;TimeSpan&lt;/span&gt;&lt;span style="background: black; color: white"&gt; slidingExpiration);&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;void&lt;/span&gt;&lt;span style="background: black; color: white"&gt; Add&amp;lt;T&amp;gt;(&lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;string&lt;/span&gt;&lt;span style="background: black; color: white"&gt; key, T value, &lt;/span&gt;&lt;span style="background: black; color: #ffc66d"&gt;CacheDependency&lt;/span&gt;&lt;span style="background: black; color: white"&gt; dependencies, &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;DateTime&lt;/span&gt;&lt;span style="background: black; color: white"&gt; absoluteExpiration, &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;TimeSpan&lt;/span&gt;&lt;span style="background: black; color: white"&gt; slidingExpiration,&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;CacheItemUpdateCallback&lt;/span&gt;&lt;span style="background: black; color: white"&gt; onUpdateCallback);&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;void&lt;/span&gt;&lt;span style="background: black; color: white"&gt; Add&amp;lt;T&amp;gt;(&lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;string&lt;/span&gt;&lt;span style="background: black; color: white"&gt; key, T value, &lt;/span&gt;&lt;span style="background: black; color: #ffc66d"&gt;CacheDependency&lt;/span&gt;&lt;span style="background: black; color: white"&gt; dependencies, &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;DateTime&lt;/span&gt;&lt;span style="background: black; color: white"&gt; absoluteExpiration, &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;TimeSpan&lt;/span&gt;&lt;span style="background: black; color: white"&gt; slidingExpiration,&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;CacheItemPriority&lt;/span&gt;&lt;span style="background: black; color: white"&gt; priority, &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;CacheItemRemovedCallback&lt;/span&gt;&lt;span style="background: black; color: white"&gt; onRemoveCallback);&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;So how do we create an efficient caching solution without creating overloads for each supported options by a cache type. &lt;/p&gt;

&lt;p&gt;The solution is to create a CacheOptions class that has a union of all options supported by all the cache types. So the example above can be rewritten as follows ...&lt;/p&gt;

&lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt;
  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: #cc7832"&gt;interface&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;ICache &lt;/span&gt;&lt;span style="background: black; color: white"&gt;{&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;void&lt;/span&gt;&lt;span style="background: black; color: white"&gt; Add&amp;lt;T&amp;gt;(&lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;string&lt;/span&gt;&lt;span style="background: black; color: white"&gt; key, T value, &lt;/span&gt;&lt;span style="background: black; color: #ffc66d"&gt;CacheOptions&lt;/span&gt;&lt;span style="background: black; color: white"&gt; options);&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;}&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: #cc7832"&gt;class&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #ffc66d"&gt;CacheOptions &lt;/span&gt;&lt;span style="background: black; color: white"&gt;{&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;public&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;string&lt;/span&gt;&lt;span style="background: black; color: white"&gt; FileName { &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;get&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;set&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; }&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;public&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;DateTime&lt;/span&gt;&lt;span style="background: black; color: white"&gt; AbsoluteExpiration { &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;get&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;set&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; }&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;public&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;TimeSpan&lt;/span&gt;&lt;span style="background: black; color: white"&gt; SlidingExpiration { &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;get&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;set&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; }&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;public&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #ffc66d"&gt;CacheDependency&lt;/span&gt;&lt;span style="background: black; color: white"&gt; Dependecy { &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;get&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;set&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; }&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;public&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;CacheItemPriority&lt;/span&gt;&lt;span style="background: black; color: white"&gt; priority { &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;get&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;set&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; }&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;public&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;CacheItemUpdateCallback&lt;/span&gt;&lt;span style="background: black; color: white"&gt; OnUpdateCallback { &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;get&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;set&lt;/span&gt;&lt;span style="background: black; color: white"&gt;; }&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;This does a few things for us ...&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Simplify ICache interface, let each implementation work with the CacheOptions&lt;/li&gt;

  &lt;li&gt;Everytime we have a new Cache type, we don't have to modify the interface ICache, and thereby the other implementations&lt;/li&gt;

  &lt;li&gt;We can also initialize (with non-null values) some properties which are optional parameters. This results in cleaner code ...&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Before ...&lt;/p&gt;

&lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt;
  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;SomeCahce.Add(&lt;/span&gt;&lt;span style="background: black; color: #a5c25c"&gt;&amp;quot;key&amp;quot;&lt;/span&gt;&lt;span style="background: black; color: white"&gt;, &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;new&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;object&lt;/span&gt;&lt;span style="background: black; color: white"&gt;(), &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;new &lt;/span&gt;&lt;span style="background: black; color: #ffc66d"&gt;CacheOptions&lt;/span&gt;&lt;span style="background: black; color: white"&gt;() { AbsoluteExpiration = DateTime.MaxValue });&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;After ...&lt;/p&gt;

&lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt;
  &lt;div style="font-size: 10pt; background: white; color: black; font-family: courier new"&gt;
    &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: #cc7832"&gt;class&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #ffc66d"&gt;CacheOptions &lt;span style="background: black; color: white"&gt;&lt;/span&gt;&lt;span style="background: black; color: white"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;public&lt;/span&gt;&lt;span style="background: black; color: white"&gt; CacheOptions() &lt;/span&gt;&lt;span style="background: black; color: white"&gt;{&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background: #494949; color: gray"&gt;// Default values&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; AbsoluteExpiration = &lt;/span&gt;&lt;span style="background: black; color: #6897bb"&gt;DateTime&lt;/span&gt;&lt;span style="background: black; color: white"&gt;.MaxValue;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;&amp;#160;&amp;#160;&amp;#160; ...&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;}&lt;/span&gt;&lt;/pre&gt;

  &lt;pre style="margin: 0px"&gt;&lt;span style="background: black; color: white"&gt;SomeCahce.Add(&lt;/span&gt;&lt;span style="background: black; color: #a5c25c"&gt;&amp;quot;key&amp;quot;&lt;/span&gt;&lt;span style="background: black; color: white"&gt;, &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;new&lt;/span&gt;&lt;span style="background: black; color: white"&gt; &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;object&lt;/span&gt;&lt;span style="background: black; color: white"&gt;(), &lt;/span&gt;&lt;span style="background: black; color: #cc7832"&gt;new &lt;/span&gt;&lt;span style="background: black; color: #ffc66d"&gt;CacheOptions&lt;/span&gt;&lt;span style="background: black; color: white"&gt;());&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-189048394733101787?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/Mhw8PGpi1rY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/Mhw8PGpi1rY/when-not-to-use-method-overload.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2009/08/when-not-to-use-method-overload.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-3621900499764565877</guid><pubDate>Wed, 29 Jul 2009 16:09:00 +0000</pubDate><atom:updated>2009-08-05T15:05:15.489-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Events</category><category domain="http://www.blogger.com/atom/ns#">Architecture</category><category domain="http://www.blogger.com/atom/ns#">DotNet</category><title>Using Lambda Expressions for Events</title><description>&lt;p&gt;In the past, we created events using the following format …&lt;/p&gt;  &lt;p&gt;
&lt;code&gt;public delegate void EventListener(object src, object context);   &lt;br /&gt;
public event EventListener SomeEvent;    &lt;br /&gt;
public void Init()    &lt;br /&gt;
{    &lt;br /&gt;
SomeEvent += OnSomeEvent;    &lt;br /&gt;
}    &lt;br /&gt;
public void OnSomeEvent(object src, object context)    &lt;br /&gt;
{    &lt;br /&gt;
}&lt;/code&gt;&lt;/p&gt;  &lt;p&gt;With lambda expressions, we can do the following …&lt;/p&gt;  &lt;p&gt;&lt;code&gt;public event Action&amp;lt;object, object&amp;gt; SomeEvent;   &lt;br /&gt;
public void Init()    &lt;br /&gt;
{    &lt;br /&gt;
SomeEvent += (s,c) =&amp;gt; {};    &lt;br /&gt;
} &lt;/code&gt;&lt;/p&gt;  &lt;p&gt;No doubt there are other ways to do it, but I find this simpler and more concise.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-3621900499764565877?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/G3wFAR22Q7M" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/G3wFAR22Q7M/using-lambda-expressions-for-events.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2009/07/using-lambda-expressions-for-events.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-7646570787408289369</guid><pubDate>Fri, 24 Jul 2009 21:05:00 +0000</pubDate><atom:updated>2009-07-24T16:08:08.272-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><title>Interesting reading on Web Gardens</title><description>&lt;p&gt;If you want to learn more about Web Gardens, and gains and issue you might face, read these articles. &lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;a href="http://nicholas.piasecki.name/blog/2009/02/on-web-gardens-aspnet-and-iis-60/"&gt;On Web Gardens, ASP.NET, and IIS 6.0&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://scottonwriting.net/sowblog/posts/13896.aspx"&gt;Session State Not Working? Check Your Web Garden!&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;     &lt;p&gt;&lt;em&gt;Available right-clicking an application pool and choosing Properties in the IIS Management snap-in.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;img src="http://nicholas.piasecki.name/blog/wp-content/uploads/2009/02/workerprocesses-300x272.png" /&gt;&lt;/p&gt; One good learning from these articles was 
"&lt;em&gt;Web gardening can be a good way to see if your application will be able to function in a Web farm scenario on multiple servers reasonably well&lt;/em&gt;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-7646570787408289369?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/G2O5RuHjQPY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/G2O5RuHjQPY/interesting-reading-on-web-gardens.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2009/07/interesting-reading-on-web-gardens.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-5196438219842134299</guid><pubDate>Tue, 17 Mar 2009 01:12:00 +0000</pubDate><atom:updated>2009-03-16T20:20:00.739-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">GApps</category><title>Hotmail R.I.P. (1996-2009)</title><description>&lt;p&gt;Well not dead yet, but might as well be.&lt;/p&gt;  &lt;p&gt;I have been using Hotmail since 1998, and have been using it till yesterday. As of today, I am proud to say that I am completely Hotmail-free. I am a pure GMail-er, all 100%.&lt;/p&gt;  &lt;p&gt;There is no doubt that GMail has had far superior features as compared to Hotmail or Yahoo mail, two of the most popular free providers. So what took me so long to make the switch? Two things...&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Old emails in Hotmail&lt;/li&gt;    &lt;li&gt;Inability to mass update my email addresses without causing inconvenience, both to me and to others &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I had previously posted (&lt;a href="http://blog.zwares.com/2007/11/10-indispensable-imap-with-outlook.html" target="_blank"&gt;10 Indispensable 'GMail IMAP With Outlook' Hidden Features&lt;/a&gt;) a way to import files using GMail's IMAP service. But there was no way to import mails from Hotmail, well none until recently. Microsoft recently opened POP3 access to all Hotmail accounts (see &lt;a title="http://www.ghacks.net/2009/03/14/hotmail-pop3-configuration/" href="http://www.ghacks.net/2009/03/14/hotmail-pop3-configuration/"&gt;gHacks&lt;/a&gt;). &lt;/p&gt;  &lt;p&gt;So lets see what needs to be done for the move ...&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open Settings &amp;gt; Accounts&lt;/li&gt;    &lt;li&gt;Click on 'Add a mail account you own'&lt;/li&gt;    &lt;li&gt;Enter the following details...&lt;/li&gt;    &lt;li&gt;Save&lt;/li&gt; &lt;/ol&gt; 

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh6.ggpht.com/_s0PqH5YvT60/Sb7460rQM2I/AAAAAAAAEz4/3IcL3zgBdWw/2009-03-16_200516%5B5%5D.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 660px; height: 297px;" src="http://lh6.ggpht.com/_s0PqH5YvT60/Sb7460rQM2I/AAAAAAAAEz4/3IcL3zgBdWw/2009-03-16_200516%5B5%5D.png" alt="" border="0" /&gt;&lt;/a&gt;
&lt;p&gt;That's it, it should now import you Hotmail mail. Import one folder at a time and label them accordingly. Also GMail will let you reply to mail from Hotmail with either your Hotmail address or your GMail address. This ensures that people can continue sending mail to Hotmail or if you desire, to you GMail account from that point on.&lt;/p&gt;  &lt;p&gt;Here are the settings in text form...&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Incoming Server: pop3.live.com&lt;/li&gt;    &lt;li&gt;Incoming Port: 995&lt;/li&gt;    &lt;li&gt;SSL Encryption: yes&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Not used for GMail, but rest of the settings ...&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Outgoing Server: smtp.live.com&lt;/li&gt;    &lt;li&gt;Outgoing port: 25 (use port 587 if the default port is not working)&lt;/li&gt;    &lt;li&gt;Authentication: yes&lt;/li&gt;    &lt;li&gt;TLS Or SSL: yes &lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-5196438219842134299?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/Xs6yjNUVYh0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/Xs6yjNUVYh0/hotmail-rip-1996-2009.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2009/03/hotmail-rip-1996-2009.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-6994788916212678806</guid><pubDate>Fri, 13 Mar 2009 18:55:00 +0000</pubDate><atom:updated>2009-03-13T13:55:42.939-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DotNet</category><title>Operator Overloading - Check for null value</title><description>&lt;p&gt;Height implements the operators, here is the current implantation of == operator &amp;#8230;&lt;/p&gt;  &lt;p&gt;public static bool operator ==(Height a, Height b)   &lt;br /&gt;{    &lt;br /&gt;&amp;#160; return a.CMValue == b.CMValue;    &lt;br /&gt;}&lt;/p&gt;  &lt;p&gt;#1 &amp;#8211; What&amp;#8217;s wrong with this code?&lt;/p&gt;  &lt;p&gt;What happens if you want to do the following:   &lt;br /&gt;Height a = new Height(100);    &lt;br /&gt;Height b = null;    &lt;br /&gt;a == b&lt;/p&gt;  &lt;p&gt;This will result in NullReferenceException &amp;#8230; bad bad bad&lt;/p&gt;  &lt;p&gt;Ok lets fix this &amp;#8230;   &lt;br /&gt;public static bool operator ==(Height a, Height b)    &lt;br /&gt;{    &lt;br /&gt;&amp;#160; if( a == null &amp;amp;&amp;amp; b == null) return true;    &lt;br /&gt;&amp;#160; if( a == null || b == null) return false;    &lt;br /&gt;&amp;#160; return a.CMValue == b.CMValue;    &lt;br /&gt;}&lt;/p&gt;  &lt;p&gt;#2 &amp;#8211; What&amp;#8217;s wrong with this code?&lt;/p&gt;  &lt;p&gt;Do you see the recursiveness here?   &lt;br /&gt;a == null will call the same implementation, resulting in NullReferenceException &amp;#8230; bad bad bad&lt;/p&gt;  &lt;p&gt;Ok lets fix this&amp;#8230;   &lt;br /&gt;public static bool operator ==(Height a, Height b)    &lt;br /&gt;{    &lt;br /&gt;&amp;#160; object _a = (object)a, _b = (object)b;    &lt;br /&gt;&amp;#160; if (_a == null &amp;amp;&amp;amp; _b == null) return true;    &lt;br /&gt;&amp;#160; if (_a == null || _b == null) return false;    &lt;br /&gt;&amp;#160; return a.CMValue == b.CMValue;    &lt;br /&gt;}&lt;/p&gt;  &lt;p&gt;By converting a and b to objects, we are using object&amp;#8217;s implementation of the == operator, thus avoiding a recursive call.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-6994788916212678806?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/XfczusCyUHQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/XfczusCyUHQ/operator-overloading-check-for-null.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2009/03/operator-overloading-check-for-null.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-101864901820076418</guid><pubDate>Tue, 09 Sep 2008 15:31:00 +0000</pubDate><atom:updated>2008-09-09T10:34:55.841-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Talks</category><title>Get ready for CERN: Talk on Particle Physics</title><description>&lt;p&gt;This is a follow up to the last video, to take a step further into particle physics. Get ready for the historic &lt;a href="http://cern.ch/" target="_blank"&gt;CERN&lt;/a&gt; supercollider's first beam on Sept 10th 2008. Watch Brian Cox explain the reason behind CERN.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:2a2a30c3-a7c6-4ec2-8702-830e317285dc" style="margin: 0px; padding: 0px; display: inline;"&gt;&lt;div&gt;&lt;!--cut and paste--&gt;&lt;a style="left: 0px ! important; top: 0px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-08065828052227969 visible ontop" href="http://static.videoegg.com/ted2/flash/loader.swf"&gt;&lt;/a&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="VE_Player" align="middle" width="432" height="285"&gt;&lt;param name="movie" value="http://static.videoegg.com/ted2/flash/loader.swf"&gt;&lt;param name="FlashVars" value="bgColor=FFFFFF&amp;amp;file=http://static.videoegg.com/ted/movies/BrianCox_2008_high.flv&amp;amp;autoPlay=false&amp;amp;fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&amp;amp;forcePlay=false&amp;amp;logo=&amp;amp;allowFullscreen=true"&gt;&lt;param name="quality" value="high"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="scale" value="noscale"&gt;&lt;param name="wmode" value="window"&gt;&lt;embed src="http://static.videoegg.com/ted2/flash/loader.swf" flashvars="bgColor=FFFFFF&amp;amp;file=http://static.videoegg.com/ted/movies/BrianCox_2008_high.flv&amp;amp;autoPlay=false&amp;amp;fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&amp;amp;forcePlay=false&amp;amp;logo=&amp;amp;allowFullscreen=true" quality="high" allowscriptaccess="always" bgcolor="#FFFFFF" scale="noscale" wmode="window" name="VE_Player" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" width="432" height="285"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-101864901820076418?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/ED3eHKnBSyw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/ED3eHKnBSyw/get-ready-for-cern-talk-on-particle.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/09/get-ready-for-cern-talk-on-particle.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-7592176071315095699</guid><pubDate>Mon, 25 Aug 2008 18:06:00 +0000</pubDate><atom:updated>2008-09-09T10:35:11.115-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Talks</category><title>The search for dark energy and dark matter</title><description>&lt;p&gt;Patricia Burchat's talk on TED: &lt;a href="http://www.ted.com/index.php/talks/patricia_burchat_leads_a_search_for_dark_energy.html"&gt;The search for dark energy and dark matter&lt;/a&gt;. Watch this if you are interested in astrophysics and the latest issues physicists are trying to solve.&lt;/p&gt;  &lt;p&gt;   &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:67d15895-660f-4c0c-9a4d-299467ea1fb8" style="margin: 0px; padding: 0px; display: inline;"&gt;&lt;div&gt;&lt;!--cut and paste--&gt;&lt;a style="left: 0px ! important; top: 0px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-08065828052227969 visible ontop" href="http://static.videoegg.com/ted2/flash/loader.swf"&gt;&lt;/a&gt;&lt;a style="left: 0px ! important; top: 0px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-08065828052227969 visible ontop" href="http://static.videoegg.com/ted2/flash/loader.swf"&gt;&lt;/a&gt;&lt;a style="left: 0px ! important; top: 0px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-08065828052227969 visible ontop" href="http://static.videoegg.com/ted2/flash/loader.swf"&gt;&lt;/a&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="VE_Player" align="middle" width="432" height="285"&gt;&lt;param name="movie" value="http://static.videoegg.com/ted2/flash/loader.swf"&gt;&lt;param name="FlashVars" value="bgColor=FFFFFF&amp;amp;file=http://static.videoegg.com/ted/movies/PatriciaBurchat_2008-embed-Clay_high.flv&amp;amp;autoPlay=false&amp;amp;fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&amp;amp;forcePlay=false&amp;amp;logo=&amp;amp;allowFullscreen=true"&gt;&lt;param name="quality" value="high"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="scale" value="noscale"&gt;&lt;param name="wmode" value="window"&gt;&lt;embed src="http://static.videoegg.com/ted2/flash/loader.swf" flashvars="bgColor=FFFFFF&amp;amp;file=http://static.videoegg.com/ted/movies/PatriciaBurchat_2008-embed-Clay_high.flv&amp;amp;autoPlay=false&amp;amp;fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&amp;amp;forcePlay=false&amp;amp;logo=&amp;amp;allowFullscreen=true" quality="high" allowscriptaccess="always" bgcolor="#FFFFFF" scale="noscale" wmode="window" name="VE_Player" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" width="432" height="285"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="border: 0px none ; margin: 0px; padding: 0px; position: absolute; width: 0px; display: block; z-index: -90; left: -100px; top: -100px; height: 0px;" id="autoPagerLastDiv" class="autoPagerS"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-7592176071315095699?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/zcRRWcML69I" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/zcRRWcML69I/search-for-dark-energy-and-dark-matter.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/08/search-for-dark-energy-and-dark-matter.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-4463858354039107405</guid><pubDate>Thu, 14 Aug 2008 19:37:00 +0000</pubDate><atom:updated>2008-08-14T14:39:09.016-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Finance</category><title>Making the world a better place</title><description>&lt;p&gt;I have been a little busy last few months. Getting ready to launch a new site, details coming soon!&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;
&lt;/p&gt;&lt;p&gt;In the mean while, enjoy this one:
&lt;/p&gt;&lt;img style="border: 0px none ;" alt="stocks_bottomhunting" src="http://lh3.ggpht.com/2saket/SKSJdoTc57I/AAAAAAAACO0/BzV0R7SpNIc/stocks_bottomhunting%5B4%5D.png?imgmax=800" width="660" border="0" height="443" /&gt;
&lt;p&gt;This is so typical of how most of us, me atleast, contribute to the global wealth ... sigh!&lt;/p&gt;  &lt;div style="border: 0px none ; margin: 0px; padding: 0px; position: absolute; width: 0px; display: block; z-index: -90; left: -100px; top: -100px; height: 0px;" id="autoPagerLastDiv" class="autoPagerS"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-4463858354039107405?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/VMVF_a5k20M" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/VMVF_a5k20M/making-world-better-place.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/08/making-world-better-place.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-1118482563336319037</guid><pubDate>Fri, 25 Jul 2008 19:26:00 +0000</pubDate><atom:updated>2008-09-09T10:34:24.030-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Life</category><category domain="http://www.blogger.com/atom/ns#">Talks</category><title>Randy Pausch Last Lecture: Achieving Your Childhood Dreams</title><description>&lt;p&gt;We spend our lives learning how to live, but it is mortality that teaches us what really truly matters.&lt;/p&gt;  &lt;p&gt;Watch Prof. Randy Pausch present what are successful men made of. May his soul rest in peace.
&lt;/p&gt;  &lt;p&gt;   &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:4d527ccd-07bb-467c-ac1c-4bd052ffb67a" style="margin: 0px; padding: 0px; display: inline;"&gt;&lt;div&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ji5_MqicxSo&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/ji5_MqicxSo&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="border: 0px none ; margin: 0px; padding: 0px; position: absolute; width: 0px; display: block; z-index: -90; left: -100px; top: -100px; height: 0px;" id="autoPagerLastDiv" class="autoPagerS"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-1118482563336319037?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/33Spv5WShiQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/33Spv5WShiQ/randy-pausch-last-lecture-achieving.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/07/randy-pausch-last-lecture-achieving.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-6036698567097529937</guid><pubDate>Mon, 07 Jul 2008 15:09:00 +0000</pubDate><atom:updated>2008-07-07T10:09:08.581-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Links</category><title>Links from Week 27, 2008</title><description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &amp;gt; .Net &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Config for release environment: &lt;a href="http://msdn.microsoft.com/en-us/library/7w2sway1.aspx"&gt;ASP.NET Settings Schema&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &amp;gt; DB &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Karl Seguin&lt;/strong&gt; talks about &lt;a href="http://codebetter.com/blogs/karlseguin/archive/2008/06/30/scale-cheaply-sharding.aspx"&gt;Database Sharding&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://weblogs.sqlteam.com/jeffs/archive/2007/03/30/More-SQL-Server-2005-Solutions.aspx"&gt;TOP n Per Group, Paging, and Common Table Expressions&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://weblogs.sqlteam.com/jeffs/archive/2007/09/27/sql-nullif-function.aspx"&gt;NULLIF()&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://weblogs.sqlteam.com/jeffs/archive/2007/05/21/60211.aspx"&gt;Partitions for Aggregate Functions&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://weblogs.sqlteam.com/jeffs/archive/2007/03/28/60146.aspx"&gt;PARTITION and RANK&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Tara Kizer&lt;/strong&gt;'s list on &lt;a href="http://weblogs.sqlteam.com/tarad/archive/2008/06/30/SQL-Server-jobs-on-production-instances.aspx"&gt;SQL Server jobs on production instances&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &amp;gt; Web &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Coding Horror&lt;/strong&gt;'s post on &lt;a href="http://www.codinghorror.com/blog/archives/000807.html"&gt;Reducing Your Website's Bandwidth Usage&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Techcrunch&lt;/strong&gt;'s post on &lt;a href="http://www.techcrunch.com/2008/06/29/hacking-the-facebook-platform-for-data-portability/"&gt;Hacking The Facebook Platform For Data Portability&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Finance&lt;/u&gt; &lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Roger Nusbaum&lt;/strong&gt; shows how one can &lt;a href="http://www.thestreet.com/story/10414082/1/follow-swensens-yale-endowment-fund.html"&gt;Follow Swensen's Yale Endowment Fund&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Big Picture&lt;/strong&gt;'s post on &lt;a href="http://bespokeinvest.typepad.com/bespoke/2008/06/investors-losin.html"&gt;Blue Chip&lt;/a&gt; losses so far&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Miscellaneous&lt;/u&gt; &lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Grapeshisha&lt;/strong&gt; has a good list of &lt;a href="http://www.grapeshisha.com/souks-in-Dubai.html"&gt;SOUKS IN DUBAI&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://specials.rediff.com/money/2008/jul/01video.htm"&gt;The world's first moving skyscraper!&lt;/a&gt; in Dubai &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.ted.com/2008/06/counting_down_t.php"&gt;Counting down the Top 10 TEDTalks&lt;/a&gt; ... must watch, must subscribe! &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.businessweek.com/magazine/content/08_28/b4092099153060.htm?campaign_id=rss_null"&gt;The BusinessWeek Best Seller List&lt;/a&gt; (books)&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-6036698567097529937?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/bxmdk7iRT8o" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/bxmdk7iRT8o/links-from-week-27-2008.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/07/links-from-week-27-2008.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-1857277923286499964</guid><pubDate>Mon, 16 Jun 2008 20:16:00 +0000</pubDate><atom:updated>2008-06-16T15:16:33.739-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Links</category><title>Links from Week 24, 2008</title><description>&lt;u&gt;&lt;strong&gt;Coding &amp;gt; .Net&lt;/strong&gt;&lt;/u&gt;   &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;MSDN&lt;/strong&gt;'s list of &lt;a href="http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx"&gt;101 LINQ Samples&lt;/a&gt; in C# &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;MSDN&lt;/strong&gt;'s list of &lt;a href="http://msdn.microsoft.com/en-us/vbasic/bb688085.aspx"&gt;LINQ to SQL Samples&lt;/a&gt; in VB (different from above) &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Bilal Haider&lt;/strong&gt; shows &lt;a href="http://bhaidar.net/cs/archive/2007/08/01/left-outer-join-in-linq-to-sql.aspx"&gt;LEFT OUTER JOIN in LINQ To SQL&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Wriju&lt;/strong&gt; explains &lt;a href="http://blogs.msdn.com/wriju/archive/2007/10/04/linq-to-sql-paging-data.aspx"&gt;Paging Data in LINQ to SQL&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;strong&gt;&lt;u&gt;Finance&lt;/u&gt;&lt;/strong&gt;   &lt;ul&gt;   &lt;li&gt;&lt;a href="http://seekingalpha.com/article/39273-single-country-emerging-markets-etfs-etns-and-closed-end-funds"&gt;Single Country Emerging Markets ETFs, ETNs and Closed-End Funds&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;iPath page on &lt;a href="http://www.ipathetn.com/Exchange-Traded-Notes-taxation.jsp"&gt;ETN Taxation&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Excellent reference page of &lt;a href="http://seekingalpha.com/article/31129-currency-etfs-and-etns"&gt;Currency ETFs and ETNs&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Article compares &lt;a href="http://seekingalpha.com/article/65784-elements-currency-etns-aim-to-outperform-comparable-etfs"&gt;currency ETNs and ETFs&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-1857277923286499964?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/LERlpm3i4VI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/LERlpm3i4VI/links-from-week-24-2008.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/06/links-from-week-24-2008.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-8181792035550446385</guid><pubDate>Mon, 09 Jun 2008 14:13:00 +0000</pubDate><atom:updated>2008-06-09T09:14:18.736-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Links</category><title>Links from Week 23, 2008</title><description>&lt;u&gt;&lt;strong&gt;Coding &amp;gt; .Net&lt;/strong&gt;&lt;/u&gt;   &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Marco De Sanctis&lt;/strong&gt; presents L2S UnitOfWork pattern using ASP.Net Cache: &lt;a href="http://codemetropolis.com/archive/2008/05/20/linq-to-sql-in-real-word-web-applications.aspx"&gt;Linq To Sql in real word Web applications&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;James &lt;/strong&gt;present a technique to get &lt;a href="http://blogs.ipona.com/james/archive/2008/02/15/JQuery-IntelliSense-in-Visual-Studio-2008.aspx"&gt;JQuery IntelliSense in Visual Studio 2008&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Dinesh Kulkarni &lt;/strong&gt;explains &lt;a href="http://blogs.msdn.com/dinesh.kulkarni/archive/2008/04/27/lifetime-of-a-linq-to-sql-datacontext.aspx"&gt;Lifetime of a LINQ to SQL DataContext&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Dave Ward &lt;/strong&gt;explains using jQuery to call ASP.NET &lt;a href="http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/"&gt;JSON Web Services&lt;/a&gt; and &lt;a href="http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/"&gt;AJAX page methods&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Muhammad &lt;/strong&gt;presents details on datagrid editing using &lt;a href="http://mosesofegypt.net/post/2008/05/Popup-Master-Detail-using-GridViewDetailsView-and-JQuery-with-jqModal.aspx"&gt;JQuery with jqModal&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Maarten Balliauw &lt;/strong&gt;teaches how to create a &lt;a href="http://blog.maartenballiauw.be/post/2008/06/Code-based-ASPNET-MVC-GridView.aspx"&gt;ASP.NET MVC GridView&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;u&gt;&lt;strong&gt;Coding &amp;gt; Web&lt;/strong&gt;&lt;/u&gt;   &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Noupe's &lt;/strong&gt;resource list on &lt;a href="http://www.noupe.com/jquery/"&gt;JQuery&lt;/a&gt; Article on jQuery for designers explains &lt;a href="http://jqueryfordesigners.com/coda-slider-effect/"&gt;Coda Slider Effect&lt;/a&gt;. Good screencast for &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt;, &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/1843"&gt;Firebug&lt;/a&gt; starters. &lt;/li&gt; &lt;/ul&gt; &lt;u&gt;&lt;strong&gt;Finance&lt;/strong&gt;&lt;/u&gt;   &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Mitch Tuchman &lt;/strong&gt;explains &lt;a href="http://seekingalpha.com/article/79733-why-the-s-p-smallcap-index-consistently-beats-the-russell-2000?source=feed"&gt;Why the S&amp;amp;P SmallCap Index Consistently Beats the Russell 2000&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Ray Hendon &lt;/strong&gt;has a good article explaining &lt;a href="http://seekingalpha.com/article/79456-six-ways-to-trade-foreign-currencies"&gt;Six Ways to Trade Foreign Currencies&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;strong&gt;&lt;u&gt;Travel&lt;/u&gt;&lt;/strong&gt;   &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;NYT &lt;/strong&gt;article on &lt;a href="http://travel.nytimes.com/2008/06/01/travel/01places.html"&gt;31 Places to Go This Summer&lt;/a&gt; for less &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Smashing Magazine &lt;/strong&gt;article on &lt;a href="http://www.smashingmagazine.com/2008/06/03/10-places-for-design-inspiration/"&gt;10 Places For Design Inspiration&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;strong&gt;&lt;u&gt;Misc&lt;/u&gt;&lt;/strong&gt;   &lt;ul&gt;   &lt;li&gt;Older post on &lt;a href="http://www.bloggerbuster.com/2008/05/top-50-blogger-powered-blogs.html"&gt;Top 50 Blogger Powered Blogs&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-8181792035550446385?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/n5I0lKYqzRc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/n5I0lKYqzRc/links-from-week-23-2008.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/06/links-from-week-23-2008.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-7764887184131316358</guid><pubDate>Mon, 02 Jun 2008 12:30:00 +0000</pubDate><atom:updated>2008-06-02T07:30:13.645-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Links</category><title>Links for Week 21, 2008</title><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt; Coding &amp;gt; .Net&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Scott Hanselman&lt;/strong&gt;'s reference post on &lt;a href="http://www.hanselman.com/blog/TheWeeklySourceCode22CAndVBNETLibrariesToDiggFlickrFacebookYouTubeTwitterLiveServicesGoogleAndOtherWeb20APIs.aspx"&gt;Libraries to Digg, Flickr, Facebook, YouTube, Twitter, Live Services, Google and other Web 2.0 APIs&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;David Hayden&lt;/strong&gt;'s must see screencasts on Unity as IoC Container: &lt;a href="http://www.pnpguidance.net/Screencast/UnityDependencyInjectionIoCScreencast.aspx"&gt;Unity Features&lt;/a&gt; and &lt;a href="http://www.pnpguidance.net/Screencast/UnityIoCDependencyInjectionASPNETMVCFrameworkScreencast.aspx"&gt;Getting started with Unity ASP.NET MVC&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;James Kovacs&lt;/strong&gt; presents a good case for DI, IoC and Castle Windsor in his MSDN article: &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc337885.aspx"&gt;Loosen Up Tame Your Software Dependencies for More Flexible Apps&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &amp;gt; Web &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Mashable&lt;/strong&gt; has a good list of &lt;a href="http://mashable.com/2008/05/29/another-16-firefox-add-ons-for-web-designers/"&gt;16 Firefox Add-ons For Web Designers&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Finance &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Roger Nusbaum&lt;/strong&gt; presents alternates for your ETF components in &lt;a href="http://seekingalpha.com/article/78680-complex-simplicity-a-better-portfolio-of-etfs?source=feed"&gt;A Better Portfolio of ETFs&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-7764887184131316358?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/rBqASxaesE8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/rBqASxaesE8/links-for-week-21-2008.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/06/links-for-week-21-2008.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-3356140408359119889</guid><pubDate>Tue, 27 May 2008 19:59:00 +0000</pubDate><atom:updated>2008-05-27T15:08:16.909-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DotNet</category><category domain="http://www.blogger.com/atom/ns#">Tricks</category><category domain="http://www.blogger.com/atom/ns#">TDD</category><title>TDD: Test internal methods the correct way</title><description>&lt;p&gt;The aim: write a comprehensive suite of unit tests for a library we are creating. &lt;/p&gt;  &lt;p&gt;Create a library project named Lib, which contains a class named StrExt, which contains a public method Tidy and an internal method IsBad. The implementation is as follows ...&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;namespace&lt;/span&gt; Lib
{
&lt;span style="color: rgb(0, 0, 255);"&gt;  public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;StrExt
&lt;/span&gt;  {
   &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; Tidy(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; s)
   {
       &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (IsBad(s) == &lt;span style="color: rgb(0, 0, 255);"&gt;false&lt;/span&gt;)
           &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; s.Trim();
       &lt;span style="color: rgb(0, 0, 255);"&gt;else
&lt;/span&gt;                &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;;
   }

   &lt;span style="color: rgb(0, 0, 255);"&gt;internal&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;bool&lt;/span&gt; IsBad(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; s)
   {
       &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; s == &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;;
   }
 }
}&lt;/pre&gt;To test the above class, create a test project, call it Lib.Tests. In it, create the following test method to test the public method Tidy(string)...
&lt;pre class="code"&gt;    [&lt;span style="color: rgb(43, 145, 175);"&gt;TestMethod&lt;/span&gt;]
   &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; Tidy_ReturnsCorrectValue()
   {
       &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; inStr = &lt;span style="color: rgb(163, 21, 21);"&gt;"test "&lt;/span&gt;;
       &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; expOutStr = &lt;span style="color: rgb(163, 21, 21);"&gt;"test"&lt;/span&gt;;
       &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; actualOutStr = lib.Tidy(inStr);
       &lt;span style="color: rgb(43, 145, 175);"&gt;Assert&lt;/span&gt;.AreEqual(expOutStr, actualOutStr);
   }&lt;/pre&gt;This will work fine.
&lt;p&gt;But what if we wanted to (and we should) test the internal method IsBad(string). Notice that the intellisense in the capture below does not display IsBad. This is obviously because the method IsBad, is declared internal to the Lib assembly and is therefore not visible to other assemblies such as Lib.Tests.
&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px none ;" alt="image" src="http://lh3.ggpht.com/2saket/SDxoLnSQrnI/AAAAAAAACLU/EDtjO6Z6dv8/image%5B3%5D.png?imgmax=800" border="0" height="202" width="466" /&gt;&lt;/p&gt;&lt;p&gt;Writing tests for internal methods is a very common scenario. People often use convoluted techniques like Reflection etc to invoke the internal method. An easier and the correct solution is to use &lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx" target="_blank"&gt;InternalsVisibleToAttribute&lt;/a&gt; as follows ...
&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt; System.Runtime.CompilerServices;

[&lt;span style="color: rgb(0, 0, 255);"&gt;assembly&lt;/span&gt;: &lt;span style="color: rgb(43, 145, 175);"&gt;InternalsVisibleToAttribute&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;"Lib.Tests"&lt;/span&gt;)]

&lt;span style="color: rgb(0, 0, 255);"&gt;namespace&lt;/span&gt; Lib
{
&lt;span style="color: rgb(0, 0, 255);"&gt;  public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;StrExt&lt;/span&gt; { ... &lt;span style="color: rgb(0, 128, 0);"&gt;&lt;span style="background: rgb(204, 255, 204) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;/* No change in this class */&lt;/span&gt;&lt;/span&gt; }
}&lt;/pre&gt;This makes the internal methods of the class visible to the named assembly. Now notice the intellisense ...
&lt;p&gt;&lt;img style="border: 0px none ;" alt="image" src="http://lh3.ggpht.com/2saket/SDxoMP5-qpI/AAAAAAAACLc/5VJgdGpv57I/image%5B7%5D.png?imgmax=800" border="0" height="215" width="469" /&gt; &lt;/p&gt;You can now test IsBad(string) in your test class as follows ...&lt;pre class="code"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt; Microsoft.VisualStudio.TestTools.UnitTesting;

&lt;span style="color: rgb(0, 0, 255);"&gt;namespace&lt;/span&gt; Lib
{
 [&lt;span style="color: rgb(43, 145, 175);"&gt;TestClass&lt;/span&gt;]
&lt;span style="color: rgb(0, 0, 255);"&gt;  public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;Lib_UnitTests
&lt;/span&gt;  {
   &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;StrExt&lt;/span&gt; lib = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;StrExt&lt;/span&gt;();

   [&lt;span style="color: rgb(43, 145, 175);"&gt;TestMethod&lt;/span&gt;]
   &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; Tidy_ReturnsCorrectValue()
   {
       &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; inStr = &lt;span style="color: rgb(163, 21, 21);"&gt;"test "&lt;/span&gt;;
       &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; expOutStr = &lt;span style="color: rgb(163, 21, 21);"&gt;"test"&lt;/span&gt;;
       &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; actualOutStr = lib.Tidy(inStr);
       &lt;span style="color: rgb(43, 145, 175);"&gt;Assert&lt;/span&gt;.AreEqual(expOutStr, actualOutStr);
   }

   [&lt;span style="color: rgb(43, 145, 175);"&gt;TestMethod&lt;/span&gt;]
   &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; IsBad_ReturnsTrueForNullString()
   {
       &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; inStr = &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;;
       &lt;span style="color: rgb(0, 0, 255);"&gt;bool&lt;/span&gt; result = lib.IsBad(inStr);
       &lt;span style="color: rgb(43, 145, 175);"&gt;Assert&lt;/span&gt;.IsTrue(result);
   }
 }
}&lt;/pre&gt;Look ma, no reflection!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-3356140408359119889?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/ybGwHrNWVFg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/ybGwHrNWVFg/tdd-test-internal-methods-correct-way.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/05/tdd-test-internal-methods-correct-way.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-5190470661987625593</guid><pubDate>Tue, 27 May 2008 05:05:00 +0000</pubDate><atom:updated>2008-05-27T00:05:32.031-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Links</category><title>Links for Week 20, 2008</title><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &amp;gt; .Net&lt;/u&gt;&lt;/strong&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Matt &lt;/strong&gt;explains &lt;a href="http://blog.eworldui.net/post/2008/05/ASPNET-MVC---Using-Post2c-Redirect2c-Get-Pattern.aspx"&gt;Using Post, Redirect, Get Pattern&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;MSDN article to help with &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;915599"&gt;HTTP request errors and solutions&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;New term POCO: &lt;a href="http://en.wikipedia.org/wiki/POCO"&gt;Plain Old CLR Object&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &amp;gt; .Net &amp;gt; LINQ&lt;/u&gt;&lt;/strong&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Luca Bolognese&lt;/strong&gt;'s video on &lt;a href="http://www.microsoft.com/emea/msdn/spotlight/sessionh.aspx?videoid=716"&gt;LINQ to SQL: Accessing Relational Data with Language Integrated Query&lt;/a&gt;, the single must see introductory video on the subject &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Chris Rock&lt;/strong&gt;'s reference post on &lt;a href="http://rocksthoughts.com/blog/archive/2008/02/23/linq-to-sql-tutorials-articles-and-opinions.aspx"&gt;LINQ TO SQL Tutorials, Articles and Opinions&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Benjamin Eidelman&lt;/strong&gt;'s post on the motives behind &lt;a href="http://www.codeplex.com/ULinqGen"&gt;Unplugged LINQ to SQL Generator&lt;/a&gt; and the issues in using L2S for n-tired apps: &lt;a href="http://pampanotes.tercerplaneta.com/2008/02/first-thoughts-on-designing-linq.html"&gt;First thoughts on Designing a LINQ-enabled Application Framework&lt;/a&gt;, and first view of&amp;#160;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Benjamin Eidelman&lt;/strong&gt;'s excellent post on the problems and solutions in &lt;a href="http://pampanotes.tercerplaneta.com/2008/03/implementing-n-tier-change-tracking.html"&gt;Implementing N-Tier with Linq to SQL&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Rick Strahi&lt;/strong&gt;'s must-read post on &lt;a href="http://www.west-wind.net/WebLog/posts/246222.aspx"&gt;Linq to SQL DataContext Lifetime Management&lt;/a&gt;, especially for n-tired apps&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-5190470661987625593?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/dN4LAaCwYKY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/dN4LAaCwYKY/links-for-week-20-2008.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/05/links-for-week-20-2008.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-5152095649641118382</guid><pubDate>Mon, 26 May 2008 23:20:00 +0000</pubDate><atom:updated>2008-05-26T18:23:02.637-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DotNet</category><category domain="http://www.blogger.com/atom/ns#">Tricks</category><title>Extension Methods: Why you need to check for nulls?</title><description>&lt;p&gt;Extension methods is a good feature. For example, consider the following extension method ...&lt;/p&gt;  &lt;pre class="code"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;[] ToWordArray( &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; str )
 {
     &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; str.Split( &lt;span style="color: rgb(163, 21, 21);"&gt;' '&lt;/span&gt; );
 }&lt;/pre&gt;Usage ...
&lt;pre class="code"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; s1 = &lt;span style="color: rgb(163, 21, 21);"&gt;"This is a sentence"&lt;/span&gt;;
&lt;span style="color: rgb(0, 0, 255);"&gt;    string&lt;/span&gt;[] words = s1.ToWordArray();&lt;/pre&gt;Looking at the usage, it appears to be an instance method call. But this is misleading, when compiled, calls to 'ToWordArray' extension method are transformed by the compiler into static method calls. So the usage above is translated into ...
&lt;pre class="code"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; s1 = &lt;span style="color: rgb(163, 21, 21);"&gt;"This is a sentence"&lt;/span&gt;;
&lt;span style="color: rgb(0, 0, 255);"&gt;    string&lt;/span&gt;[] words = &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;.ToWordArray(s1);&lt;/pre&gt;So, since this is not an instance call, the run-time will allow null reference to go through, resulting in NullReference exceptions. See the following example ...
&lt;pre class="code"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; s2 = &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;;
&lt;span style="color: rgb(0, 0, 255);"&gt;    string&lt;/span&gt;[] words = s2.ToWordArray(); &lt;span style="color: rgb(0, 128, 0);"&gt;&lt;span style="background: rgb(200, 255, 145) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;// will result in exception&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;To avoid such issues, extension methods must test for null parameters. The above extension should be correctly implemented as below ...
&lt;pre class="code"&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;[] ToWordArray( &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; str )
 {
     &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; ( str == &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt; )
         &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;;
     &lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; ( str.Length == 0 )
         &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;[ 0 ];
     &lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&lt;span style="background: rgb(200, 255, 145) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;// empty string has 0 words
&lt;/span&gt;&lt;/span&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; str.Split( &lt;span style="color: rgb(163, 21, 21);"&gt;' '&lt;/span&gt; );
 }&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-5152095649641118382?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/XHJBAhVzEv8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/XHJBAhVzEv8/extension-methods-why-you-need-to-check.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/05/extension-methods-why-you-need-to-check.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-1977575659582431681</guid><pubDate>Fri, 23 May 2008 20:13:00 +0000</pubDate><atom:updated>2008-05-23T15:13:25.135-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Notes</category><category domain="http://www.blogger.com/atom/ns#">Threads</category><category domain="http://www.blogger.com/atom/ns#">DotNet</category><title>WaitHandle</title><description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Description&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Used to synchronize threads' activities &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Class Hierarchy&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;WaitHandle      &lt;ul&gt;       &lt;li&gt;Mutex &lt;/li&gt;        &lt;li&gt;Semaphore &lt;/li&gt;        &lt;li&gt;EventWaitHandle          &lt;ul&gt;           &lt;li&gt;EventWaitHandle              &lt;ul&gt;               &lt;li&gt;AutoResetEvent &lt;/li&gt;                &lt;li&gt;ManualResetEvent &lt;/li&gt;             &lt;/ul&gt;           &lt;/li&gt;         &lt;/ul&gt;       &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Mutex: provides exclusive access to a resource. It uses more system resources than Monitor class, but can be marshaled across application domain boundaries, can be used with multiple waits, and can be used to synchronize threads in different processes&lt;/p&gt;  &lt;p&gt;Semaphores: represent a named (system wide) or local semaphore, can be used to control access to a pool of resources&lt;/p&gt;  &lt;p&gt;AutoResetEvent: provide exclusive access to a resource. When set, the event releases the waiting thread and immediately resets, blocking subsequent threads.&lt;/p&gt;  &lt;p&gt;ManualResetEvent is useful when one thread must complete an activity before other threads can proceed.&lt;/p&gt;  &lt;ul&gt;   &lt;ul&gt;     &lt;h2&gt;&lt;/h2&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Important Methods&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;WaitOne &lt;/li&gt;    &lt;li&gt;WaitAny &lt;/li&gt;    &lt;li&gt;WaitAll &lt;/li&gt;    &lt;li&gt;SignalAndWait &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;SignalAndWait: A thread can signal an EventWaitHandle and then block on it, as an atomic operation, by calling this static method&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;hr /&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;References&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;MSDN page on &lt;a href="http://msdn.microsoft.com/en-us/library/kad9xah9.aspx" target="_blank"&gt;WaitHandle&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-1977575659582431681?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/fJUwc_neRBE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/fJUwc_neRBE/waithandle.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/05/waithandle.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-4838764555354046999</guid><pubDate>Mon, 19 May 2008 05:30:00 +0000</pubDate><atom:updated>2008-05-19T00:30:10.706-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Links</category><title>Links for Week 19, 2008</title><description>&lt;strong&gt;&lt;u&gt;Coding &amp;gt; .Net &lt;/u&gt;&lt;/strong&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Joe&lt;/strong&gt; provides information on &lt;a href="http://weblogs.asp.net/joestagner/archive/2008/05/14/net-3-5-enhancements-training-kit.aspx"&gt;.NET 3.5 Enhancements Training Kit&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Adrian&lt;/strong&gt; has a good post on &lt;a href="http://adrianvintu.com/blogengine/post/Unloadable-plugins.aspx"&gt;Unloadable plugins&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;strong&gt;&lt;u&gt;Coding &amp;gt; SQL&lt;/u&gt;&lt;/strong&gt;   &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Daniel Turini &lt;/strong&gt;lists &lt;a href="http://www.codeproject.com/KB/database/sqldodont.aspx?display=Print"&gt;SQL Server DO's and DONT's&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms189989.aspx"&gt;Basic Guidelines for Bulk Importing Data&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms190421.aspx"&gt;Optimizing Bulk Import Performance&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Boris Milrud&lt;/strong&gt; provides a tip to &lt;a href="http://www.devx.com/dbzone/10MinuteSolution/22191/1954?pf=true"&gt;Optimize Massive DELETE Operation&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;u&gt;Finance&lt;/u&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Don Dion&lt;/strong&gt;'s must-read article on &lt;a href="http://seekingalpha.com/article/76542-currency-precious-metal-and-futures-etfs-don-t-get-caught-in-the-tax-trap?source=feed"&gt;Currency, Precious Metal and Futures ETFs: Don't Get Caught in the Tax Trap&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-4838764555354046999?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/5PLTi377Iwk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/5PLTi377Iwk/links-for-week-19-2008_19.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/05/links-for-week-19-2008_19.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-6318574589335649101</guid><pubDate>Wed, 14 May 2008 18:29:00 +0000</pubDate><atom:updated>2008-05-14T13:29:43.323-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Finance</category><title>Commodities, USA Chinese Economies, USD and Yuan - The Relation</title><description>&lt;p&gt;As of May 2008, USA is seeing a slow down, China is seeing higher inflation, Commodities are at all time highs. I tried to think logically through all this to see what some of the outcomes could be. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Chinese inflation at 8.5% yoy, near record highs      &lt;ol&gt;       &lt;li&gt;Increased production costs, higher export prices [6]          &lt;ol&gt;           &lt;li&gt;Imported consumer goods get more expensive in USA [6]              &lt;ol&gt;               &lt;li&gt;Additional upward pressure on USA inflation [12]                  &lt;ol&gt;                   &lt;li&gt;US Fed eventually increase fed rates [18]                      &lt;ol&gt;                       &lt;li&gt;USD rises [18]                          &lt;ol&gt;                           &lt;li&gt;Commodities cool down [18] &lt;/li&gt;                         &lt;/ol&gt;                       &lt;/li&gt;                     &lt;/ol&gt;                   &lt;/li&gt;                 &lt;/ol&gt;               &lt;/li&gt;             &lt;/ol&gt;           &lt;/li&gt;            &lt;li&gt;Less US demand for imported consumer goods , especially with high gas and food prices [12]              &lt;ol&gt;               &lt;li&gt;Less production in China&amp;#160; [18]                  &lt;ol&gt;                   &lt;li&gt;Chinese economy slows down&amp;#160; [24] &lt;/li&gt;                    &lt;li&gt;Less demand for commodities from China [18]                      &lt;ol&gt;                       &lt;li&gt;Commodities cool down [18] &lt;/li&gt;                     &lt;/ol&gt;                   &lt;/li&gt;                 &lt;/ol&gt;               &lt;/li&gt;             &lt;/ol&gt;           &lt;/li&gt;         &lt;/ol&gt;       &lt;/li&gt;        &lt;li&gt;Chinese Yuan rises [6]          &lt;ol&gt;           &lt;li&gt;Exports become less profitable [6]              &lt;ol&gt;               &lt;li&gt;Chinese economy slows down [12] &lt;/li&gt;             &lt;/ol&gt;           &lt;/li&gt;         &lt;/ol&gt;       &lt;/li&gt;        &lt;li&gt;Chinese central bank controls inflation (this week boosted bank reserve requirements by 50 basis points to a record high of 16.5%) [12]          &lt;ol&gt;           &lt;li&gt;Chinese economy slows down [18] &lt;/li&gt;         &lt;/ol&gt;       &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt; To conclude, over the next 2 years, I expect to see the following in chronological order:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Higher Chinese inflation&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;USA further slows down &lt;/li&gt;      &lt;li&gt;Chinese Yuan rises &lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;Chinese economy slows down &lt;/li&gt;        &lt;ul&gt;         &lt;li&gt;Commodities cool down &lt;/li&gt;          &lt;li&gt;USD rises&lt;/li&gt;       &lt;/ul&gt;     &lt;/ul&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-6318574589335649101?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/cayk5ylRvNQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/cayk5ylRvNQ/commodities-usa-chinese-economies-usd.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/05/commodities-usa-chinese-economies-usd.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-2853880099449845929</guid><pubDate>Sun, 11 May 2008 01:24:00 +0000</pubDate><atom:updated>2008-05-12T09:09:54.842-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Links</category><title>Links for Week 18, 2008</title><description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &amp;gt; SQL&lt;/u&gt;&lt;/strong&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Another smart post by &lt;strong&gt;Jeff&lt;/strong&gt; on &lt;a href="http://weblogs.sqlteam.com/jeffs/archive/2008/05/05/group-by-all.aspx"&gt;GROUP BY ALL&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Finance&lt;/strong&gt;&lt;/u&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Richard Shaw&lt;/strong&gt; presents a good study on &lt;a href="http://seekingalpha.com/article/75637-major-asset-class-1-3-5-10-15-year-returns?source=feed"&gt;Major Asset Class 1, 3, 5, 10 &amp;amp; 15 Year Returns&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Kirk&lt;/strong&gt;'s posts on &lt;a href="http://www.thekirkreport.com/lazy_portfolios/index.html"&gt;Lazy Portfolios&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Roger Nusbaum&lt;/strong&gt;'s posts on &lt;a href="http://randomroger.blogspot.com/search?q=lazy"&gt;Lazy Portfolios&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Paul Merriman&lt;/strong&gt; provides some good tips on fund comparison in his: &lt;a href="http://paulmerriman.blogspot.com/2008/02/how-does-wells-fargo-advantage-small.html"&gt;article&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Jeff Merriman&lt;/span&gt; on how to create &lt;a href="http://www.merrimanberkmannext.com/living/articles/perfect_portfolio.asp"&gt;The perfect portfolio&lt;/a&gt;
&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.fxstreet.com/fundamental/interest-rates-table/"&gt;World Interest Rates Table&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-2853880099449845929?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/f9xTuR6ED7g" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/f9xTuR6ED7g/links-for-week-19-2008.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/05/links-for-week-19-2008.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-6975028025309990213</guid><pubDate>Sat, 10 May 2008 17:29:00 +0000</pubDate><atom:updated>2008-05-18T11:26:05.706-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Threads</category><category domain="http://www.blogger.com/atom/ns#">DotNet</category><title>ThreadAbortException in your C# .Net code?</title><description>&lt;p&gt;I was recently asked by someone to help debug a ThreadAbortException. Here's the simplified code ...&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;MyThread
&lt;/span&gt;{
 &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; Run()
 {
     &lt;span style="color: rgb(0, 0, 255);"&gt;while&lt;/span&gt;( &lt;span style="color: rgb(0, 0, 255);"&gt;true&lt;/span&gt; )
     {
         &lt;span style="color: rgb(0, 0, 255);"&gt;try
&lt;/span&gt;            {
             &lt;span style="color: rgb(0, 0, 255);"&gt;lock&lt;/span&gt;( LockObj )
             {
                 &lt;span style="color: rgb(43, 145, 175);"&gt;Monitor&lt;/span&gt;.Wait( LockObj );
         }   }
         &lt;span style="color: rgb(0, 0, 255);"&gt;catch&lt;/span&gt;( &lt;span style="color: rgb(43, 145, 175);"&gt;Exception&lt;/span&gt; ex )
         {
             &lt;span style="color: rgb(43, 145, 175);"&gt;Console&lt;/span&gt;.WriteLine( ex.Message );
}   }   }   }&lt;/pre&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; ThreadRunTest()
{
 &lt;span style="color: rgb(43, 145, 175);"&gt;MyThread&lt;/span&gt; thread = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;MyThread&lt;/span&gt;();
 &lt;span style="color: rgb(43, 145, 175);"&gt;ThreadStart&lt;/span&gt; ts = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;ThreadStart&lt;/span&gt;( thread.Run );
 &lt;span style="color: rgb(43, 145, 175);"&gt;Thread&lt;/span&gt; t = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;Thread&lt;/span&gt;( ts );
 t.Start();
}&lt;/pre&gt;&lt;p&gt;Running this results in the following exception message:&lt;/p&gt;&lt;pre class="code"&gt;A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll&lt;/pre&gt;&lt;p&gt;As the exception suggests, it seems MyThread is being aborted during execution. Running this sample code as a test case, you can reproduce the problem. Notice ThreadRunTest starts the thread, but does not wait for its completion. So when ThreadRunTest ends, all thread are forced to abort resulting in ThreadAbortException. So this should be a simple fix ...&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; ThreadRunTest()
{
&lt;span style="color: rgb(43, 145, 175);"&gt;MyThread&lt;/span&gt; thread = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;MyThread&lt;/span&gt;();
&lt;span style="color: rgb(43, 145, 175);"&gt;ThreadStart&lt;/span&gt; ts = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;ThreadStart&lt;/span&gt;( thread.Run );
&lt;span style="color: rgb(43, 145, 175);"&gt;Thread&lt;/span&gt; t = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;Thread&lt;/span&gt;( ts );
t.Start();
t.Join();
}&lt;/pre&gt;&lt;p&gt;Here are MSDN page on &lt;a href="http://msdn.microsoft.com/en-us/system.threading.threadabortexception.aspx"&gt;ThreadAbortException Class&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/95hbf2ta%28VS.80%29.aspx"&gt;Thread.Join Method&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;UPDATE: If you are using ThreadPool.QueueUserWorkItem, consider doing the following:&lt;/p&gt;&lt;pre&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;MyClass
&lt;/span&gt;{
 &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; Main()
 {
   &lt;span style="color: rgb(43, 145, 175);"&gt;AutoResetEvent&lt;/span&gt; autoEvent = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;AutoResetEvent&lt;/span&gt;( &lt;span style="color: rgb(0, 0, 255);"&gt;false&lt;/span&gt; );
   &lt;span style="color: rgb(43, 145, 175);"&gt;ThreadPool&lt;/span&gt;.QueueUserWorkItem( &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;WaitCallback&lt;/span&gt;( WorkMethod ), autoEvent );
   autoEvent.WaitOne(); &lt;span style="color: rgb(0, 128, 0);"&gt;// Wait for background thread to end&lt;/span&gt;
 }
&lt;/pre&gt;&lt;pre&gt;  &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; WorkMethod( &lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt; stateInfo )
  {
    &lt;span style="color: rgb(43, 145, 175);"&gt;Console&lt;/span&gt;.WriteLine( &lt;span style="color: rgb(163, 21, 21);"&gt;"executing WorkMethod"&lt;/span&gt; );
    ( (&lt;span style="color: rgb(43, 145, 175);"&gt;AutoResetEvent&lt;/span&gt;)stateInfo ).Set(); &lt;span style="color: rgb(0, 128, 0);"&gt;// Signal that this thread is finished
&lt;/span&gt;  }
}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-6975028025309990213?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/R0Pyh7qA538" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/R0Pyh7qA538/threadabortexception-in-your-c-net-code.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/05/threadabortexception-in-your-c-net-code.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-4991472891186035097</guid><pubDate>Sun, 04 May 2008 04:45:00 +0000</pubDate><atom:updated>2008-05-08T09:28:47.510-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Links</category><title>Links for Week 17, 2008</title><description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &gt; .Net &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Some introductory &lt;a href="http://asp.net/learn/3.5-extensions-videos/default.aspx#mvc"&gt;ASP.NET 3.5  Extensions Videos&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;The author explains &lt;a href="http://biasecurities.com/blog/2008/how-to-enable-pretty-urls-with-asp-net-mvc-and-iis6/"&gt;how  to enable pretty urls with Asp.Net MVC and IIS6&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Scott Hanselman&lt;/strong&gt; has a good post on &lt;a href="http://www.hanselman.com/blog/TheWeeklySourceCode25OpenIDEdition.aspx"&gt;OpenID&lt;/a&gt;  and how to use in .Net applications  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Scott Hanselman&lt;/strong&gt; talks about &lt;a href="http://www.hanselman.com/blog/TheWeeklySourceCode24ExtensibilityEditionPlugInsProvidersAttributesAddInsAndModulesInNET.aspx"&gt;Extensibility  in .Net&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mark Dunn &lt;/strong&gt;on &lt;a href="http://www.dnrtv.com/default.aspx?showNum=109"&gt;Scaling and Persistence in  Workflow Foundation on DNR TV&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;&lt;u&gt;Coding &gt; .Net &gt;  MVC&lt;/u&gt;&lt;/strong&gt;  &lt;ul&gt;&lt;li&gt;&lt;a href="http://weblogs.asp.net/craigshoemaker/archive/2008/04/24/47-asp-net-mvc-resources-to-rock-your-development.aspx"&gt;47  ASP.NET MVC Resources to Rock Your Development&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;   &lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &gt; .Net &gt; TDD &amp;amp; Mocks &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Phil Haack&lt;/strong&gt; on &lt;a href="http://haacked.com/archive/2007/12/07/tdd-and-dependency-injection-with-asp.net-mvc.aspx"&gt;TDD  and Dependency Injection with ASP.NET MVC&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Phil Haack&lt;/strong&gt; presents a basic issue with &lt;a href="http://haacked.com/archive/2007/12/09/writing-unit-tests-for-controller-actions.aspx"&gt;Writing  Unit Tests For Controller Actions&lt;/a&gt; and presents TDD techniques using &lt;a href="http://haacked.com/archive/2007/12/06/test-specific-subclasses-vs-partial-mocks.aspx"&gt;Test  Specific Subclasses&lt;/a&gt; and &lt;a href="http://haacked.com/archive/2007/11/05/rhino-mocks-extension-methods-mvc-crazy-delicious.aspx"&gt;Rhino  Mocks Extension Methods&lt;/a&gt;. Although the controller testing is much improved in  the latest &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/04/16/asp-net-mvc-source-refresh-preview.aspx"&gt;ASP.NET  MVC Source Refresh Preview&lt;/a&gt; by returning ActionResult, these techniques can  still be used elsewhere  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Doga Oztuzun&lt;/strong&gt; lists &lt;a href="http://www.dogaoztuzun.com/post/Free-Training-on-ASPNET-MVC---ASPNET-Dynamic-Data---Entity-Framework---ADONET-Data-Services.aspx"&gt;Free  Training on ASP.NET MVC - ASP.NET Dynamic Data - Entity Framework - ADO.NET Data  Services&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;u&gt;&lt;strong&gt;Coding &gt; .Net &gt; IoC &amp;amp; DI &lt;/strong&gt;&lt;/u&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;strong&gt;David Hayden&lt;/strong&gt; screencasts on &lt;a href="http://www.pnpguidance.net/Screencast/UnityIoCDependencyInjectionASPNETMVCFrameworkScreencast.aspx"&gt;Unity  IoC - Dependency Injection in ASP.NET MVC Framework&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Scott Hanselman&lt;/strong&gt;'s &lt;a href="http://www.hanselman.com/blog/ListOfNETDependencyInjectionContainersIOC.aspx"&gt;List  of .NET Dependency Injection Containers (IOC)&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &gt; HTML&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Antonio Lupetti&lt;/strong&gt; has some really good techniques on &lt;a href="http://woork.blogspot.com/2008/04/top-down-approach-to-simplify-your-css.html"&gt;Top-Down  approach to simplify your CSS code&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://devkick.com/blog/useful-jquery-a-compilation-of-jquery-utilities/"&gt;Useful  jQuery: a Compilation of jQuery Utilities&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Coding &gt; HTML &gt; CSS&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="http://www.smashingmagazine.com/2007/05/10/70-expert-ideas-for-better-css-coding/"&gt;70  Expert Ideas For Better CSS Coding&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.smashingmagazine.com/2008/05/02/improving-code-readability-with-css-styleguides/"&gt;Improving  Code Readability With CSS Styleguides&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.smashingmagazine.com/2006/09/02/list-of-css-tools/"&gt;List  of CSS Tools&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Entrepreneurship&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;strong&gt;Rob Webb&lt;/strong&gt; presents a great list of &lt;a href="http://blog.robwebb2k.com/2008/03/31/my-picks-the-best-service-providers-for-startups/"&gt;The  best service providers for startups&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;Startup financing cycle in an picture ... &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;img alt="Startup financing cycle" src="http://3.bp.blogspot.com/_bSecIhbdvuQ/SBYy4Hj6aKI/AAAAAAAAAFo/ZiCVTAbdHCc/s400/Startup_financing_cycle.JPG" /&gt;  &lt;/p&gt; &lt;p&gt;&lt;span style="font-weight: bold;"&gt;&lt;u&gt;Finance&lt;/u&gt;&lt;/span&gt; &lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;span&gt;&lt;span style="font-weight: bold;"&gt;Roger Nusbaum&lt;/span&gt; talks about PBP  BWV BEP:&lt;/span&gt;&lt;span&gt; &lt;a href="http://www.thestreet.com/_yahoo/funds/etf/10395934.html?cm_ven=YAHOO&amp;amp;cm_cat=FREE&amp;amp;cm_ite=NA"&gt;A  Better ETF Solution for Call-Writing Funds&lt;/a&gt; &lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Phillip Lyon&lt;/span&gt; explains &lt;a href="http://seekingalpha.com/article/74334-why-the-fed-should-leave-interest-rates-unchanged?source=feed"&gt;Why  the Fed Should Leave Interest Rates Unchanged&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;New term &lt;a href="http://www.investopedia.com/terms/a/agflation.asp"&gt;Agflation&lt;/a&gt;  &lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;&lt;u&gt;Finance &gt; Commodities&lt;/u&gt;&lt;/strong&gt;  &lt;ul&gt;&lt;li&gt;Excellent reference post: &lt;a href="http://seekingalpha.com/article/30369-commodity-etfs-and-etns"&gt;Commodity  ETFs and ETNs&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;A case for Commodities &amp;amp; introduction to Jim Rogers: &lt;a href="http://seekingalpha.com/article/71800-food-prices-will-only-rise-the-time-to-buy-is-now"&gt;Food  Prices Will Only Rise: The Time to Buy is Now&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;A case for Commodity ETF slicing: &lt;a href="http://seekingalpha.com/article/23529-is-commodity-etf-slicing-and-dicing-necessary"&gt;Is  Commodity ETF Slicing and Dicing Necessary?&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;Commodity funds by performance and composition: &lt;a href="http://seekingalpha.com/article/64220-commodity-etf-overview"&gt;Commodity  ETF Overview&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;A case for Agriculture: &lt;a href="http://seekingalpha.com/article/74048-not-all-commodities-are-created-equal-a-look-at-agriculture"&gt;A  Look At Agriculture&lt;/a&gt;. I tend to agree with author, I want my commodity  portfolio to look like GCC&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Jay Walker&lt;/span&gt; presents a case for  Agriculture in &lt;a href="http://seekingalpha.com/article/74383-agricultural-commodities-playing-an-acknowledged-theme?source=feed"&gt;Agricultural  Commodities: Playing an Acknowledged Theme&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Gaurav&lt;/span&gt; presents the contrarian case  against Commodities &lt;a href="http://seekingalpha.com/article/74392-time-to-short-commodities-via-smn?source=feed"&gt;Time  to Short Commodities?&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;u&gt;&lt;span style="font-weight: bold;"&gt;Noticeable&lt;/span&gt; &lt;/u&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Did you hear about the SQL injection attacks, funny related strip ... &lt;img title="Her daughter is named Help I'm trapped in a driver's license factory." alt="Exploits of a Mom" src="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" /&gt;  &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-4991472891186035097?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/_Hyq0c2WZGk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/_Hyq0c2WZGk/links-for-week-17-2008.html</link><author>noreply@blogger.com (Saket Porwal)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_bSecIhbdvuQ/SBYy4Hj6aKI/AAAAAAAAAFo/ZiCVTAbdHCc/s72-c/Startup_financing_cycle.JPG" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/05/links-for-week-17-2008.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-5815787800240266048</guid><pubDate>Wed, 30 Apr 2008 19:27:00 +0000</pubDate><atom:updated>2008-04-30T14:27:30.886-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Life</category><category domain="http://www.blogger.com/atom/ns#">Finance</category><title>Free Trading: Zecco vs. Bank Of America vs. Wells Fargo - A Comparison</title><description>&lt;p&gt;I am trying to streamline my investments and one of the items on my agenda is to consolidate my banking accounts. Here's what I want from my new institute ...&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Free/cheap basket or bucket trading&lt;/li&gt;    &lt;li&gt;Umbrella institute for checking/saving/trading accounts&lt;/li&gt;    &lt;li&gt;Support stocks/options/mutual funds/IRAs&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I currently have account with Fidelity that comes close to what I need, but not close enough. So, here is an up-to-date (as of 4/30/2008) comparative chart on the institutes that meet one or more of these criteria...&lt;/p&gt;  &lt;table style="width: 574pt; border-collapse: collapse" cellspacing="1" cellpadding="0" width="765" border="1" x:str="x:str"&gt;&lt;colgroup&gt;&lt;col style="width: 219pt; mso-width-source: userset; mso-width-alt: 10678" width="292" /&gt;&lt;col style="width: 94pt; mso-width-source: userset; mso-width-alt: 4571" span="span" width="125" /&gt;&lt;col style="width: 167pt; mso-width-source: userset; mso-width-alt: 8118" width="222" /&gt;&lt;/colgroup&gt;&lt;tbody&gt;     &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; width: 219pt; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&amp;#160;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; width: 94pt; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;&lt;strong&gt;Zecco Trading&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; width: 94pt; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;&lt;strong&gt;Bank of America&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; width: 167pt; border-bottom: #e2e2e2; background-color: transparent" width="221"&gt;&lt;font face="Arial" size="2"&gt;&lt;strong&gt;Wells Fargo&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Free Trades Limit #&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;10/day, 40/month&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;30/month&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221"&gt;&lt;font face="Arial" size="2"&gt;100/year&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Free Trades Minimum to Qualify $&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;2500&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;25000 (uninvested)&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221"&gt;&lt;font face="Arial" size="2"&gt;25000 (combined)&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Stocks Penny Stocks $&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;0&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;0&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221"&gt;&lt;font face="Arial" size="2"&gt;Greater of $24.95 or 2.5% of principal&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Stocks Max Margin Rate (on 4/30/2008) %&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;7.2&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;7.5&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;7.75&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Stocks Broker Assisted $&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;19.99&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;42.5&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;25&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Options Trade $ (contract $)&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;4.50 (0.50)&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;19.95 (1.50)&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221"&gt;&lt;font face="Arial" size="2"&gt;9.95 (1.00)&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Options Broker Assisted $ (contract $)&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;19.99 (0.75)&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;39.95 (1.75)&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221"&gt;&lt;font face="Arial" size="2"&gt;34.95 (1.00)&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Mutual Fund NTF #&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&amp;#160;&lt;/td&gt;        &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&amp;#160;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221" x:num="x:num"&gt;800&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Mutual Fund No Load Internet $&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;10&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;45 (minimum)&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;0&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td class="xl24" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Mutual Fund No Load Broker Assisted $&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;19.99&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;45 (minimum)&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;25&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;IRA Annual Fees $&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;30&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;0&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;0&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;IRA Termination Fee $&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;30&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;75&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;50&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Outgoing Account Transfer (ACAT) Fees $&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;50&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;75&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221" x:num="x:num"&gt;&lt;font face="Arial" size="2"&gt;50&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr style="height: 12.75pt" height="17"&gt;       &lt;td style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; height: 12.75pt; background-color: transparent" width="289" height="17"&gt;&lt;font face="Arial" size="2"&gt;Fees Web Site&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;&lt;a href="http://www.zecco.com/trading/FreeTrading.aspx?tab=CompareUs" target="_blank"&gt;Fee Schedule&lt;/a&gt;&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="124"&gt;&lt;font face="Arial" size="2"&gt;&lt;a href="https://www.baisidirect.com/Static/SelfDirected/Commissions/commissions.html?sub=null&amp;amp;main=Fees" target="_blank"&gt;Fee Schedule&lt;/a&gt;&lt;/font&gt;&lt;/td&gt;        &lt;td class="xl25" style="border-right: #e2e2e2; border-top: #e2e2e2; border-left: #e2e2e2; border-bottom: #e2e2e2; background-color: transparent" width="221"&gt;&lt;font face="Arial" size="2"&gt;&lt;a href="https://www.wellsfargo.com/investing/styles/wt/com_fees/fees" target="_blank"&gt;Fee Schedule&lt;/a&gt;&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Hope that helps.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-5815787800240266048?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/_b8H7446dQY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/_b8H7446dQY/free-trading-zecco-vs-bank-of-america.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/04/free-trading-zecco-vs-bank-of-america.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-5164557320007431454</guid><pubDate>Tue, 29 Apr 2008 17:07:00 +0000</pubDate><atom:updated>2008-05-07T23:03:58.342-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WinApps</category><category domain="http://www.blogger.com/atom/ns#">WinVista</category><category domain="http://www.blogger.com/atom/ns#">WinXP</category><title>Supporting admin and non-admin users in Windows XP/Vista applications</title><description>&lt;p&gt;Recently at work, in one of our windows based desktop application, we needed to support both admin and non-admin users in Windows Vista and Windows XP/2000&lt;/p&gt;  &lt;p&gt;Here are some of my takeaways:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;[For admin/XP] When an admin user executes an application, XP gives full admin rights to this application. With these privileges, there should be no problem reading / writing to any folder/registry. &lt;/li&gt;    &lt;li&gt;[For admin/Vista] Unlike Windows XP, Windows Vista's &lt;a href="http://msdn.microsoft.com/windowsvista/prodinfo/what/security/default.aspx?pull=/library/en-us/dnlong/html/AccProtVista.asp" target="_blank"&gt;UAC&lt;/a&gt; feature executes applications with standard privileges. So even if the user is logged in as an admin, the application has read-only access to the following common locations:       &lt;ul&gt;       &lt;li&gt;C:\ &lt;/li&gt;        &lt;li&gt;C:\Program Files &lt;/li&gt;        &lt;li&gt;C:\Windows &lt;/li&gt;        &lt;li&gt;HKLM &lt;/li&gt;        &lt;li&gt;'All Users' profile or Application.CommonAppDataPath &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;[For non-admin/XP/Vista] Typically application data, which is common to all users (in a multi-user Windows desktop application), should be stored under 'All Users' profile or Application.CommonAppDataPath. This works great, except that a non-admin user has read-only permissions to this folder. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Point #1 is not really an issue. This is the easiest scenario to support. &lt;/p&gt;  &lt;p&gt;For issues #2, a number of relevant solutions have been discussed in Dave's post "&lt;a href="http://blog.dmbcllc.com/2008/04/08/unauthorizedaccessexception-writing-to-hklm/"&gt;UnauthorizedAccessException writing to HKLM&lt;/a&gt;". But in case an application must store information in say HKLM or CommonAppDataPath, you can request UAC for elevated privileges. In order to do this, create a file called &amp;lt;projectname&amp;gt;.exe.manifest under the project root folder.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;xml&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;1.0&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;encoding&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;utf-8&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;standalone&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;yes&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;assembly&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;urn:schemas-microsoft-com:asm.v1&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;manifestVersion&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;1.0&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;
 &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;assemblyIdentity&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;version&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;1.0.0.0&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;processorArchitecture&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;X86&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;name&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;Clean&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;win32&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;
 &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;trustInfo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;urn:schemas-microsoft-com:asm.v3&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;
     &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;security&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;
         &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;requestedPrivileges&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;
&lt;strong&gt;                &amp;lt;&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;requestedExecutionLevel&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;level&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 255);"&gt;requireAdministrator&lt;/span&gt;"&lt;/strong&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;strong&gt;/&amp;gt;
&lt;/strong&gt;            &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;requestedPrivileges&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;
     &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;security&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;
 &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;trustInfo&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;assembly&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;The following step is optional, but recommended since it adds the manifest file as an embedded resource in the final exe. Under "&amp;lt;project&amp;gt; &amp;gt; Properties &amp;gt; Build Events &amp;gt; Post Build Events", add the following line:
&lt;pre&gt;&lt;span&gt;&lt;p&gt;"$(DevEnvDir)..\..\SDK\v2.0\bin\mt.exe" -manifest "$(ProjectDir)$(TargetName).exe.manifest" –outputresource:"$(TargetDir)$(TargetFileName)";#1&lt;/p&gt;&lt;/span&gt;&lt;/pre&gt;
For issue #3, we could not find a clean solution. We needed a way to provide write permissions to a folder for both the admin and the non-admin users. In our case, the application was to be installed in a lab environment by an admin and then used by non-admin users. In this type of setup, during installation, we moved the application data folder to say C:\ or D:\ and enabled write permissions for all users. This is not the most elegant solution, but I don't know of a better one. If there is a better solution, I am very interested to learn more, please add a comment below.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-5164557320007431454?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/Mfkm49PlYHw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/Mfkm49PlYHw/supporting-admin-and-non-admin-users-in.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/04/supporting-admin-and-non-admin-users-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4240466463218759555.post-1844045182256207855</guid><pubDate>Thu, 03 Apr 2008 16:31:00 +0000</pubDate><atom:updated>2008-04-03T12:03:21.492-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.Net</category><category domain="http://www.blogger.com/atom/ns#">DotNet</category><title>Microsoft MCTS .Net 3.5 Certification &amp; Free Training Courses</title><description>&lt;a style="font-weight: bold;" href="http://www.microsoft.com/learning/exams/70-562.mspx"&gt;70-562 - Microsoft .NET Framework 3.5, ASP.NET Application Development&lt;/a&gt;&lt;span style="font-weight: bold;"&gt; (June 2008)&lt;/span&gt;
Training:
&lt;ol&gt;&lt;li&gt;Microsoft E-Learning - Collection 6463AE (June 2008)&lt;/li&gt;&lt;li&gt;Book - &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2Fgp%2Foffer-listing%2F0735625271%3Fie%3DUTF8%26qid%3D1156801743%26sr%3D1-1&amp;amp;tag=5pmpost-20&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=9325"&gt;Programming Microsoft® ASP.NET 3.5&lt;/a&gt; (February 2008)&lt;/li&gt;&lt;li&gt;Beta Exam 70-562 - See &lt;a href="http://blogs.msdn.com/user/Profile.aspx?UserID=53494"&gt;Gerry O'Brien's&lt;/a&gt; post on &lt;a href="http://blogs.msdn.com/gerryo/archive/2008/04/02/asp-net-and-ado-net-beta-exams-extended.aspx"&gt;ASP.NET and ADO.NET Beta Exams&lt;/a&gt; (expires May 2008)&lt;/li&gt;&lt;/ol&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=5pmpost-20&amp;amp;l=ur2&amp;amp;o=1" alt="" style="border: medium none  ! important; margin: 0px ! important; display: none;" border="0" height="1" width="1" /&gt;
&lt;a style="font-weight: bold;" href="http://www.blogger.com/post-create.g?blogID=4240466463218759555"&gt;70-561 - Microsoft .NET Framework 3.5, ADO.NET Application Development&lt;/a&gt;
Training:
&lt;ol&gt;&lt;li&gt;Microsoft E-Learning - Collection 6464AE (April 2008)&lt;/li&gt;&lt;li&gt;Book - &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Furl%3Dsearch-alias%253Daps%26field-keywords%3DMicrosoft%2B.NET%2BFramework%2B3.5%2B-%2BADO.NET%26x%3D0%26y%3D0&amp;amp;tag=5pmpost-20&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=9325"&gt;Microsoft .NET Framework 3.5 - ADO.NET&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=5pmpost-20&amp;amp;l=ur2&amp;amp;o=1" alt="" style="border: medium none  ! important; margin: 0px ! important; display: none;" border="0" height="1" width="1" /&gt; (June 2008)&lt;/li&gt;&lt;li&gt;Book - &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Furl%3Dsearch-alias%253Daps%26field-keywords%3DMicrosoft%2B.NET%2BFramework%2B3.5%2B-%2BADO.NET%26x%3D0%26y%3D0&amp;amp;tag=5pmpost-20&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=9325"&gt;Programming the Microsoft ADO.NET Entity Framework&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=5pmpost-20&amp;amp;l=ur2&amp;amp;o=1" alt="" style="border: medium none  ! important; margin: 0px ! important; display: none;" border="0" height="1" width="1" /&gt; (December 2008)&lt;/li&gt;&lt;li&gt;Beta Exam 70-562 - See &lt;a href="http://blogs.msdn.com/user/Profile.aspx?UserID=53494"&gt;Gerry O'Brien's&lt;/a&gt; post on &lt;a href="http://blogs.msdn.com/gerryo/archive/2008/04/02/asp-net-and-ado-net-beta-exams-extended.aspx"&gt;"&lt;/a&gt; (expires May 2008)&lt;/li&gt;&lt;/ol&gt;
Please note that in order to get MCTS certification, you must first pass &lt;a href="http://www.microsoft.com/learning/exams/70-536.mspx"&gt;Microsoft .NET Framework 2.0—Application Development Foundation&lt;/a&gt; exam.

If you are looking for additional .Net Framework 3.5 training, get some for free from Microsoft:
&lt;ol&gt;&lt;li&gt;&lt;a href="https://www.microsoftelearning.com/eLearning/offerDetail.aspx?offerPriceId=213184"&gt;Collection 6261: Developing Rich Experiences using Microsoft .NET Framework 3.5 &amp;amp; Visual Studio 2008&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://www.microsoftelearning.com/eLearning/courseDetail.aspx?courseId=89466"&gt;Clinic 6262: Introducing Windows Workflow Foundation using .Net Framework 3.5 &amp;amp; Visual Studio 2008&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://www.microsoftelearning.com/eLearning/courseDetail.aspx?courseId=89626"&gt;Clinic 6263: Introducing Windows Presentation Foundation using .Net Framework 3.5 &amp;amp; Visual Studio 2008&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://www.microsoftelearning.com/eLearning/courseDetail.aspx?courseId=89499"&gt;Clinic 6264: Introducing Windows Communication Foundation using .Net Framework 3.5 &amp;amp; Visual Studio 2008&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;
BTW, if you have doubts about the beta exams, here's a very informative quote from &lt;a href="http://blogs.msdn.com/user/Profile.aspx?UserID=53494"&gt;Gerry O'Brien's&lt;/a&gt; &lt;a href="http://blogs.msdn.com/gerryo/default.aspx"&gt;blog&lt;/a&gt;:
&lt;blockquote&gt;Passing the beta exam is equivalent to passing the live exam. Do you get certified? Only when all prerequisites are met. In other words, you must pass 70-536 and this exam to get an actual certification. This exam by itself does not award you the MCTS certification.

For beta exams, you will not know if you pass or fail. The score report will indicate that you have failed but don't worry, the passing score has not been set so you haven't failed it, yet. Beta exam results are not made available until the exam is published live. We don't know the passing score until we finalize the questions after the beta.

The difference between a beta and a live exam is that in the beta, you will typically take 100 or more questions whereas on the live, it can be 40 to 60 questions.

Plan on a maximum of 4 hours for the beta exam.&lt;/blockquote&gt;Good Luck!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4240466463218759555-1844045182256207855?l=blog.zwares.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/5pmPosts/~4/xWDZtESXxAs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/5pmPosts/~3/xWDZtESXxAs/microsoft-mcts-net-35-certification.html</link><author>noreply@blogger.com (Saket Porwal)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.zwares.com/2008/04/microsoft-mcts-net-35-certification.html</feedburner:origLink></item></channel></rss>
