<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Sijin Joseph's blog</title><subtitle type="html">My experiences with .Net</subtitle><id>http://weblogs.asp.net/sjoseph/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.asp.net/sjoseph/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2007-05-16T08:54:00Z</updated><entry><title>Windows Azure Distilled - A programmer's view</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2008/11/15/windows-azure-distilled-a-programmer-s-view.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2008/11/15/windows-azure-distilled-a-programmer-s-view.aspx</id><published>2008-11-14T20:20:00Z</published><updated>2008-11-14T20:20:00Z</updated><content type="html">I've written a quick summary on my understanding of the core Azure platform at &lt;a href="http://www.indiangeek.net/2008/11/14/windows-azure-distilled/"&gt;http://www.indiangeek.net/2008/11/14/windows-azure-distilled/&lt;a&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6736372" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>A case study in micro-optimization (Generating permutations)</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2008/08/29/a-case-study-in-micro-optimization-generating-permutations.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2008/08/29/a-case-study-in-micro-optimization-generating-permutations.aspx</id><published>2008-08-29T16:43:00Z</published><updated>2008-08-29T16:43:00Z</updated><content type="html">&lt;p&gt;I've blogged about my experiences in coming up with a fast solution to &lt;a href="http://beust.com/weblog/archives/000493.html" mce_href="http://beust.com/weblog/archives/000493.html"&gt;cedric's coding challenge&lt;/a&gt; in C# over at my &lt;a href="http://www.indiangeek.net/" mce_href="http://www.indiangeek.net/"&gt;personal blog&lt;/a&gt;. Couldn't bear the thought of the fastest solution being a Java one ;-)&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.indiangeek.net/2008/08/29/a-case-study-in-micro-optimization/" mce_href="http://www.indiangeek.net/2008/08/29/a-case-study-in-micro-optimization/"&gt;&amp;nbsp;http://www.indiangeek.net/2008/08/29/a-case-study-in-micro-optimization/&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6576120" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>What will be the next generation internet application platform?</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2008/06/24/what-will-be-the-next-generation-internet-application-platform.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2008/06/24/what-will-be-the-next-generation-internet-application-platform.aspx</id><published>2008-06-24T14:45:00Z</published><updated>2008-06-24T14:45:00Z</updated><content type="html">A few years ago I was a firm believer in the Rich Connected Client application model, which was based on running applications installed locally on the users desktop. From the time of the &lt;a href="http://en.wikipedia.org/wiki/Cambrian_explosion" title="Cambrian Explosion" mce_href="http://en.wikipedia.org/wiki/Cambrian_explosion" target="_blank"&gt;Ajaxian explosion&lt;/a&gt;, the quality and quantity of Ajax based web applications has continued to increase, applications like FaceBook have introduced new paradigms whereas apps like Live Maps have made existing apps much more convenient and accessible. Today you have to really argue hard to even consider a desktop based application for anything that is non-computation intensive (Even this category is questionable now, for e.g. a few years back movie editing web apps would have been out of the question).

So what is it that makes the web such a successful application platform
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Uniform and simple model (Web Browser, urls, can click when hand is visible)&lt;/strong&gt; - Once a user learns the basics of working with a web application that knowledge can be easily applied to other applications.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Client platform independence&lt;/strong&gt; - The decoupling of the server and client with an agreed contract  (HTML+CSS+JS) means that the traditional problems of targetting various platforms with different APIs is no longer existent on the client side.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Machine independence &lt;/strong&gt;- The user is no longer restricted to the machine on which the application was installed. This also results in a much simpler deployment model.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Data independence&lt;/strong&gt; - The user's data is now available on the network which means that not only can the user run the application from anywhere but can also access his data from anywhere.&lt;/li&gt;
&lt;/ul&gt;
Now what would the next generation internet application platform look like? I think that in addition to the above characteristics, the next generation of platforms would involve the following.
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Full use of computing resources available locally&lt;/strong&gt; - Having a powerful CPU and GPU seems like such a waste when all your applications have to be funnelled through the browser. So the next generation platform would allow access to the computing power available locally.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Better integration with the local resources&lt;/strong&gt; - This is sort of related to the point above, but would allow internet applications to access local disks, settings, registry etc.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;Better security model&lt;/strong&gt; - Of course all this has already been attempted with ActiveX and XPCOM, but the security models there have been weak and non-intutive to users, a better solution is needed.&lt;/li&gt;
&lt;/ul&gt;
So it looks like the direction being taken by &lt;a href="http://silverlight.net/" title="Microsoft Silverlight" mce_href="http://silverlight.net/" target="_blank"&gt;Microsoft Silverlight&lt;/a&gt; and &lt;a href="http://www.adobe.com/products/air/" title="Adobe AIR" mce_href="http://www.adobe.com/products/air/" target="_blank"&gt;Adobe AIR &lt;/a&gt;are steps in the right direction to building the next generation internet application platform. However Microsoft has a great oppurtunity here push the envelope with Silverlight and introduce new standards for desktop integration of internet applications, their extensive user base means that any API created by them has a very good chance of being successful and catching on with the other players in this space.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6314908" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>Subversion as a deployment tool</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2008/05/05/subversion-as-a-deployment-tool.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2008/05/05/subversion-as-a-deployment-tool.aspx</id><published>2008-05-05T15:05:00Z</published><updated>2008-05-05T15:05:00Z</updated><content type="html">I was thinking on the way to work today that subversion would be a great tool to overcome some of the difficulties associated with frequent deployments to the web serevers. Here's how I see it working

&lt;ol&gt;&lt;li&gt;Create a production/live build folder in your source tree and add it to the repository.&lt;/li&gt;
&lt;li&gt;Modify our build system to create the live builds in this folder and commit to the repository.&lt;/li&gt;
&lt;li&gt;On the live server the site is deployed as a checkout of the live build folder.&lt;/li&gt;
&lt;li&gt;Once the build passes unit tests and QA all we need to deploy is to update the working copy on the live server. The big advantage here is that rollbacks etc. are automatically handled because we can always roll back to a  previous version. Also you get a nice history of all the updates to the live server.&lt;/li&gt;&lt;/ol&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6159610" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>Programmer Competency Matrix</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2008/04/30/programmer-competency-matrix.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2008/04/30/programmer-competency-matrix.aspx</id><published>2008-04-30T16:49:00Z</published><updated>2008-04-30T16:49:00Z</updated><content type="html">&lt;P&gt;Having worked with programmers with an extreme variance in skills, I sometimes get the feeling that there is an big lack of good programmers but when I thought about it a little more I realized that it's not very clear cut, some of the programmers have strong areas and if you confine the tasks into their strong areas then they tend to deliver well. So I started thinking about all the lines on which we can evaluate a programmer, here's what I have so far...&lt;/P&gt;
&lt;P&gt;&lt;A title="Programmer Competency Matrix" href="http://www.indiangeek.net/programmer-competency-matrix/" mce_href="http://www.indiangeek.net/programmer-competency-matrix/"&gt;Programmer Competency Matrix&lt;/A&gt; (the table is too big to fit on this blog post and needs a whole page of it's own) &lt;/P&gt;
&lt;P&gt;After having spent a whole afternoon on this I realize that even this is not comprehensive, this matrix is more biased towards non-visual programmers, so a big majority of web devs will not be able to relate well to this matrix, but I am tired and will come back to this at a later time.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6145154" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>An alternative model of computation for concurrency</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2008/04/12/an-alternative-model-of-computation-for-concurrency.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2008/04/12/an-alternative-model-of-computation-for-concurrency.aspx</id><published>2008-04-12T12:11:00Z</published><updated>2008-04-12T12:11:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;I recently came across an old article that I had written for my company newsletter, it's always fun to discover old stuff that you've written and see how much your perception has changed since then. Copied verbatim below, this was a print article which is why the links are not hyperlinked.&lt;/p&gt;&lt;p&gt;&lt;br&gt;Concurrency is one of the hot subjects in computer science today. This has partly to do with the fact that processors (1) are reaching their physical limits and thus we need to start looking at new avenues of achieving performance. Herb Sutter the renowned author has written an excellent article (2) named “The Free Lunch Is Over - A Fundamental Turn Toward Concurrency in Software” which captures very beautifully why concurrency is going to be important in the years ahead.&lt;br&gt;&lt;br&gt;Let us look at a few issues surrounding concurrency today and also look at an alternative model of computation that solves these problems.&lt;br&gt;&lt;br&gt;The most prevalent model of computation in both hardware and software today is the Von Neumann architecture (3) which is an implementation of the Turing (4) machine which in turn is based on the work of Alan Turing(5).&amp;nbsp; Programs written in this model have a shared memory area also known as the store which can be to store data. The store is divided into chunks called cells and named cells are called variables. &lt;br&gt;&lt;br&gt;A function written in the Neumann model can make use of the store to aid in its computation, thus any time a function uses data other than those provided as parameters to the function, it is in fact using the store.&lt;br&gt;&lt;br&gt;The alternative model of computation we'll look at is called the functional model. The functional model is based on the work of Alonzo Church (6) called Lambda Calculus(7), who came up with this model at approximately the same time as Alan Turing. The good thing though is that both models of computation are equivalent i.e. any computation that can be expressed in one model can also be expressed in the other.&lt;br&gt;&lt;br&gt;The functional model is based on mathematics, in this model there is no store and all computation is done by evaluating mathematical functions. A mathematical function is one in which the value of a function is totally dependent on the values of the parameters and not on any external state. Also the term variable in this model refers to a named value and not to a named cell.&lt;br&gt;&lt;br&gt;Consider a simple function&lt;br&gt;f(x) = g(x) + h(x)&lt;br&gt;&lt;br&gt;The function f takes x as a parameters and returns the result of evaluating function g with parameter x and adding it to the result of evaluating the function h with parameter x.&lt;br&gt;&lt;br&gt;In Neumann style programs it is possible that f will return a different output for the same value of x, where as in functional style programs it is guaranteed that no matter how many times f is called with a particular value of x, the output will always be the same. This is because functional programs do their computations without the use of any external state whereas the computations in Neumann style programs are affected by the state of the store.&lt;br&gt;&lt;br&gt;Let us understand this with a concrete example&lt;br&gt;int y = 2;&lt;br&gt;foo(x)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return x *y;&lt;br&gt;}&lt;br&gt;&lt;br&gt;bar(x)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int y = 2;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return x * y;&lt;br&gt;}&lt;br&gt;&lt;br&gt;The function foo uses a variable y from the free store to do its computation, thus if some other function were to alter the value of the cell y, foo would start returning different results.&lt;br&gt;&lt;br&gt;On the other hand bar does not use any external state and for any value of x it will always return twice of x.&lt;br&gt;&lt;br&gt;It is possible to write functional programs in Neumann languages by totally avoiding the use of store and modeling the entire computation using only functions that use local variables. On the other hand functional languages do not have the concept of a shared store so writing Neumann style programs in them is not possible.&lt;br&gt;&lt;br&gt;Now let's take a look at how these computation models interact with concurrency. There are two ways parallelize programs, implicitly and explicitly.&lt;br&gt;&lt;br&gt;In implicit parallelization, the compiler does the hard work of looking at the program and deciding what instruction sequences can be parallelized. This is the most commonly used method of parallelization and in fact most of the programmers are not even aware that the compiler does this under the hood.&lt;br&gt;&lt;br&gt;Neumann style programs are hard to optimize for parallelization since functions can be implicitly dependent on each other via the store. For e.g.&lt;br&gt;baz(x)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foo(x);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return bar(x);&lt;br&gt;}&lt;br&gt;&lt;br&gt;int y = 0;&lt;br&gt;foo(x)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = 2 * x;&lt;br&gt;}&lt;br&gt;&lt;br&gt;bar(x)&lt;br&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return y * 6;&lt;br&gt;}&lt;br&gt;In this case foo and bar need to execute sequentially because they make use of the cell 'y' from the store. This is an extremely simple example but hidden dependencies like this can get incredibly complicated to figure out. Thus the compiler has to be conservative about what it can parallelize and only parallelize code that it absolutely knows is safe to do so which unfortunately is not a lot.&lt;br&gt;&lt;br&gt;On the other hand since functions written in a functional language are not dependent on external state they can be very easily parallelized by evaluating different functions in parallel.&lt;br&gt;For e.g.&lt;br&gt;baz(x)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foo(x);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bar(x)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; combo(foo(x));&lt;br&gt;}&lt;br&gt;Since foo, bar and combo are purely mathematical functions, the evaluation of baz can be parallelized by evaluating foo and bar in parallel and then evaluating combo, since combo depends on the value from foo.&lt;br&gt;&lt;br&gt;Now let’s turn our attention to explicit parallelism, where the programmer explicitly programs parallelism. This is done by creating parallel execution sequences called threads that are scheduled by the operating system to execute on the available processors.&lt;br&gt;&lt;br&gt;In the Neumann style the problem that arises with explicit parallelism is that since all threads share the same common store they need to be careful not to overwrite the data of other threads. The canonical way to handle this has been to but checks around code that accesses shared data to ensure that only a single thread has access to shared data at any point of time. This blocking behavior in turns leads to issues like deadlock where all threads keep waiting for access to a shared location on the store. Further the complexity of this solution increases exponentially with the number of threads, number of shared data areas and the number of places where the shared data is accessed. &lt;br&gt;&lt;br&gt;A better solution to this problem is actually doing the lock on the memory itself rather than on the code that accesses the memory. Transactional memory systems (8) have started making their way into mainstream computing but they're still a long way off from being an ideal solution.&lt;br&gt;&lt;br&gt;In 1978 C.A.R Hoare(9) (best known for inventing QuickSort) wrote a paper titled Communicating Sequential Processes (10), this classic paper introduces a new way to tackle the problem of explicit parallelism, which is in a way similar to the model used by functional programming languages. In this model concurrent processes share state information by passing messages to each other rather than sharing a common store. These messages can be passed asynchronously or synchronously. Thus the whole problem of preventing access to shared data is made non-existent.&lt;br&gt;&lt;br&gt;There is one language today that combines aspects of functional programming and message passing concurrency to come up as an ideal distributed computing platform. That language is Erlang (11) from Ericsson laboratories.&amp;nbsp; This language and platform came about as the result of research in 1980s to find out which features of computer languages were suited for programming telecommunication systems. In addition to concurrency, this language has some other cool features like error recovery and hot updates that enable any system built using Erlang to keep on running. Joe Armstrong, the brains behind Erlang has written a very good article (12) on all the fuss about Erlang and I would encourage anyone who is interested to take a look at it.&lt;br&gt;&lt;br&gt;I had originally intended for this article to be an introduction to Erlang but ran out of my 1000 word limit even before I could get past the introduction, thus I decided to pick up the one big feature of Erlang which is concurrency and focus on that. In terms of support for reliability and concurrency, Erlang is unrivaled and I believe that in the years ahead some aspects of Erlang or Erlang itself will become mainstream the way has Ruby has.&lt;br&gt;&lt;br&gt;References&lt;br&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; www.cise.ufl.edu/research/revcomp/physlim/PhysLim-CiSE/PhysLim-CiSE-5.doc - Physical limits of computing.&lt;br&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.gotw.ca/publications/concurrency-ddj.htm - The free lunch is over.&lt;br&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://en.wikipedia.org/wiki/Von_Neumann_architecture - The Von Neumann architecture.&lt;br&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://en.wikipedia.org/wiki/Turing_machine - Turing machine.&lt;br&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://en.wikipedia.org/wiki/Alan_Turing - Alan Turing&lt;br&gt;6.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://en.wikipedia.org/wiki/Alonzo_Church - Alonzo Church&lt;br&gt;7.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://en.wikipedia.org/wiki/Lambda_calculus - Lambda calculus&lt;br&gt;8.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://en.wikipedia.org/wiki/Transactional_memory - Software Transactional Memory&lt;br&gt;9.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://en.wikipedia.org/wiki/C._A._R._Hoare -&amp;nbsp; C.A.R. Hoare&lt;br&gt;10.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://en.wikipedia.org/wiki/Communicating_sequential_processes - Communicating Sequential Processes&lt;br&gt;11.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.erlang.org/ - Erlang&lt;br&gt;12.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.pragmaticprogrammer.com/articles/erlang.html -&amp;nbsp; More about Erlang&lt;br&gt;13.&amp;nbsp;&amp;nbsp;&amp;nbsp; http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&amp;amp;tid=10142 - Concepts, Techniques, and Models of Computer Programming – This is an amazing book that talks about the various models of computation.&lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6091142" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>First alternative to google that I actually liked</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2008/03/28/first-alternative-to-google-that-i-actually-liked.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2008/03/28/first-alternative-to-google-that-i-actually-liked.aspx</id><published>2008-03-28T11:20:00Z</published><updated>2008-03-28T11:20:00Z</updated><content type="html">&lt;p&gt;&lt;a href="http://www.searchme.com/" title="SearchMe" mce_href="http://www.searchme.com/"&gt;SearchMe &lt;/a&gt;- Still in beta and I was able to get an account easily. Check out the screenshot of their search results

&lt;img src="http://www.indiangeek.net/wp-content/uploads/searchme.png" mce_src="http://www.indiangeek.net/wp-content/uploads/searchme.png" title="SearchMe" border="0"&gt;

&lt;/p&gt;&lt;p&gt;Not only are the results categorized but I loved the visual search results that don't require me to open the page in another window to further filter interesting results.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6040508" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>How to leak memory in .Net - Statics and Event Handlers</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2007/08/03/how-to-leak-memory-in-net-statics-and-event-handlers.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2007/08/03/how-to-leak-memory-in-net-statics-and-event-handlers.aspx</id><published>2007-08-03T06:43:00Z</published><updated>2007-08-03T06:43:00Z</updated><content type="html">&lt;p&gt;For the past few days I’ve been investigating some memory leak issues in our desktop application. The problem started showing up when we saw that opening new documents and then closing them didn’t have any negative impact on the memory usage. Initial tests using &lt;a href="http://support.microsoft.com/kb/927229" mce_href="http://support.microsoft.com/kb/927229" target="_blank"&gt;vadump &lt;/a&gt;and &lt;a href="http://www.microsoft.com/technet/sysinternals/utilities/ProcessExplorer.mspx" mce_href="http://www.microsoft.com/technet/sysinternals/utilities/ProcessExplorer.mspx" target="_blank"&gt;process explorer&lt;/a&gt; confirmed that there was an issue and so we the developers started looking into it.&lt;/p&gt;

&lt;p&gt;Initially it looked like the problem was that certain event handlers were causing references to closed documents to hang on a couple of ones that I remember are Application.Idle and SystemEvents.PowerModeChanged. Next there were some references via event handlers that were being held by &lt;i&gt;Singleton &lt;/i&gt; objects and some service objects and those were easily handled as well.&lt;/p&gt;
&lt;p&gt;After this we could see that the references were still hanging around, btw we were using a combination of &lt;a href="http://www.red-gate.com/products/ants_profiler/index.htm" mce_href="http://www.red-gate.com/products/ants_profiler/index.htm" target="_blank"&gt;ANTS profiler&lt;/a&gt;, &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" mce_href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" target="_blank"&gt;WinDBG &lt;/a&gt;(dumpheap + gcroot) and the VS.Net debugger all this while to investigate the issue. After fixing the obvious issues we struggled to find the root cause of the memory leaks. Then I looked around for alternate profilers and came across &lt;a href="http://memprofiler.com/" mce_href="http://memprofiler.com/" target="_blank"&gt;.Net Memory Profiler&lt;/a&gt; from SciTec, using this gave a much clearer picture into the issue, you see the new profiler gave you allocation stacks for all references and the ability to reflect over the instance fields, using this I started seeing that two third-party components that we were using were causing the issue.&lt;/p&gt;
&lt;p&gt;Basically both third-party components, one a very well known UI toolkit and another one that provides skinning support to controls were storing references to controls in static hashtables. In one toolkit a bug in the code caused the reference from the hashtable to remain even after it was not required and in the second case I think those guys just didn’t know how to remove an entry from a hashtable, they were simply setting the value of the key to be null causing a reference to the key to be held by the static hashtable.&lt;/p&gt;

&lt;p&gt;We now need to hack around these issues either by using Reflection or getting an updated build from the vendors.&lt;/p&gt;
&lt;p&gt;Some of the lessons I’ve learnt from this&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always, Always have source code for any third-party component that you are using in your application. For any non-trivial usage you’ll always end up fixing bugs in the component.&lt;/li&gt;
&lt;li&gt;When putting any data in static fields, double check to make sure that it’s really required and keep in mind the memory impact of the decision also provide a clean API to clean up the static data.&lt;/li&gt;
&lt;li&gt;If your’re hooking onto an event then make sure to unhook when it’s no longer required.&lt;/li&gt;
&lt;/ul&gt;

&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3378707" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term=".Net" scheme="http://weblogs.asp.net/sjoseph/archive/tags/.Net/default.aspx" /><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>.Net framework hotfix wreaks havoc</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2007/07/18/net-framework-hotfix-wreaks-havoc.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2007/07/18/net-framework-hotfix-wreaks-havoc.aspx</id><published>2007-07-18T12:46:00Z</published><updated>2007-07-18T12:46:00Z</updated><content type="html">&lt;font face="Verdana, sans-serif"&gt;Last week all of us were baffled when suddenly one part of our application that uploads files to a FTP server stopped working. The strange thing was that the same build has been working without any issues for the past one week. We looked at everything that could have gone wrong, server, configuration, code but everything was setup fine and hadn't been changed. Also interestingly it stopped working for everyone except the developer who was responsible for the feature.&lt;br&gt;&lt;br&gt;The first thing we did was to enable detailed logging to see what was happening, the logs showed two problems&lt;br&gt;&lt;/font&gt;&lt;ol&gt;&lt;li&gt;&lt;font face="Verdana, sans-serif"&gt;We were incorrectly formatting the path of file to upload&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font face="Verdana, sans-serif"&gt;The .Net framework code was changing folders after login to the root folder of the ftp where it didn't have permissions to upload the file&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;Further investigation showed that &lt;font face="Verdana, sans-serif"&gt;the second issue was not coming on the developer's machine. Most puzzling indeed.&lt;br&gt;&lt;br&gt;Then I remembered that last week .Net had issued a critical hotfix for .Net 2.0, could this be the issue. We verified that the developer didn't have the hotfix and all machines which were failing did have, Strike 1! Next we uninstalled the hotfix from one of the machines and the FTP uploads started working, Strike 2!! Finally we fixed the incorrect formatting of the ftp url and the issue got resolved on all machines with or without the hotfix, Strike 3! Issue resolved!&lt;br&gt;&lt;br&gt;The problem was that the hotfix changed the implementation of the FTP code inside the .Net framework so that it behaved differently when passed an incorrectly formatted url.&lt;br&gt;&lt;br&gt;This was the first time I saw a working app fail because of the way an incorrect argument was handled by a newer version of the framework. It was a good learning experience though :) Also this strengthens my belief in asserting all assumptions in code because if we had asserted that the url was infact of the format that we were expecting, this issue would never have happened in the first place.&lt;br&gt;&lt;/font&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3206337" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term=".Net" scheme="http://weblogs.asp.net/sjoseph/archive/tags/.Net/default.aspx" /><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>In defense of hacking</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2007/07/09/in-defense-of-hacking.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2007/07/09/in-defense-of-hacking.aspx</id><published>2007-07-09T05:44:00Z</published><updated>2007-07-09T05:44:00Z</updated><content type="html">&lt;p&gt;I read a very interesting essay today - &lt;a href="http://www.hacknot.info/hacknot/action/showEntry?eid=96" mce_href="http://www.hacknot.info/hacknot/action/showEntry?eid=96"&gt;Hacknot - To Those About to Hack&lt;/a&gt;&lt;br&gt;that talks about why planning upfront always pays in the long run. There is a very nice story that illustrates the value of planning upfront.&lt;/p&gt;

&lt;p&gt;I think that when people write essays like this they tend to provide an analogy that suits the point that they’re trying to make, for e.g. in this case Pro BDUF and Agile bashing.&lt;/p&gt;
&lt;p&gt;There are a couple of reasons why the analogy is not quite relevant in this case. Firstly software is not like chopping wood, it’s not like construction infact any comparison that tries to compare software development with any kind of physical object creation is flawed. Physical objects have limitations with respect to the time and effort required to shape them or construct them. The values of these physical constants are irrelevant when it comes to software and in some cases the physical limitations do not exist at all.&lt;/p&gt;
&lt;p&gt;Secondly the requirements in almost every software product that I’ve worked on always change after the initial code has been implemented, first because the customer/user is himself not very clear on what is required. It’s quite difficult to describe a large state machine for a CS grad let alone a layman. Also usability design itself is an iterative process for for a product with a UI the requirement churn rate is absurdly high when compared to any physical engineering activity. &lt;/p&gt;
&lt;p&gt;So given that requirements are bound to change doesn’t it make sense to practice the one thing that you know for sure is going to happen i.e. change. No amount of planning is going to prepare you for change, you need to practice for change day in and day out by following the training regime of agile methods. TDD, pair programming, daily meetings, refactoring, rejection of BDUF etc. these things prepare the programmer for the inevitable.&lt;/p&gt;
&lt;p&gt;I can imagine a version of the story that favors the Agile camp in which the carpenter in the middle of the day decides that he does not need a big log of wood at all! But the fact that wood chopping is a physical activity again prevents me from going ahead on that analogy.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3071885" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>What they don't teach you in CS class</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2007/05/26/what-they-don-t-teach-you-in-cs-class.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2007/05/26/what-they-don-t-teach-you-in-cs-class.aspx</id><published>2007-05-26T10:58:00Z</published><updated>2007-05-26T10:58:00Z</updated><content type="html">&lt;h3&gt;Software Engineering!!!&lt;/h3&gt;
&lt;blockquote&gt;&lt;p&gt;A scientist builds in order to learn; an engineer learns in order to build. - Fred Brooks in the Mythical Man-Month.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Following up on my post about the &lt;a href="http://www.indiangeek.net/?p=161" mce_href="http://www.indiangeek.net/?p=161" target="_blank"&gt;need for a CS degree for programmers&lt;/a&gt;, I had started writing this post on how software engineering requires a different set of skills than what is required for a computer scientist. But then I saw that most of what I wanted to say had already been very well captured by a lot of other very famous people, so instead of reiterating, I’ll be posting links to some good reads on this topic. &lt;/p&gt;
&lt;p&gt;But before that here is a quick summary of what I think are the most important skills for a programmer, which has somethings in common with those required by a computer scientist but also some that are not.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Given a system, have a very good understanding of it’s rules. The systems that a programmer typically works with are the language, the OS, the implementation platform(Java, .Net, Python etc.) and libraries. This knowledge is essential when writing code as well as when debugging issues. Most good programmers have encyclopedic knowledge of the systems that they’re working with, one of the best examples that I can think of is &lt;a href="http://blogs.msdn.com/oldnewthing/" mce_href="http://blogs.msdn.com/oldnewthing/" target="_blank"&gt;Raymond Chen&lt;/a&gt;.&lt;/li&gt;

&lt;li&gt;Be able to come up with efficient ways to get a particular task done using the rules of the system. I think this is something that you’re born and although this can potentially be learnt, I think the best programmers have an innate talent for this aspect of programming. Some common techniques for solving problems are taught in CS class, but the ones most used in reality are mostly based on common sense. One of the most excellent books that I’ve read on abstract problem solving is “&lt;a href="http://www.amazon.com/How-Solve-Heuristics-Zbigniew-Michalewicz/dp/3540224947/ref=pd_bbs_sr_2/104-1489240-1727125?ie=UTF8&amp;amp;s=books&amp;amp;qid=1180175907&amp;amp;sr=8-2" mce_href="http://www.amazon.com/How-Solve-Heuristics-Zbigniew-Michalewicz/dp/3540224947/ref=pd_bbs_sr_2/104-1489240-1727125?ie=UTF8&amp;amp;s=books&amp;amp;qid=1180175907&amp;amp;sr=8-2" target="_blank"&gt;How to solve it: Modern Heuristics&lt;/a&gt;” by Zbigniew Michalewicz and David B. Fogel&lt;/li&gt;
&lt;li&gt;Be able to express their thoughts in a manner that can be easily understood by other programmers. This aspect is something that can only be learnt by experience. This is one area that is very important yet gets very little weightage in CS class. I’ve seen some extremely unreadable code, that when deciphered showed extraordinary problem solving ability. For examples, browse some of the solutions submitted by top rankers at TopCoder.com. One of the best books on this aspect and my recommendation as a first book for any programmer is &lt;a href="http://www.amazon.com/Code-Complete-Second-Steve-McConnell/dp/0735619670/ref=pd_bbs_sr_1/104-1489240-1727125?ie=UTF8&amp;amp;s=books&amp;amp;qid=1180176052&amp;amp;sr=8-1" mce_href="http://www.amazon.com/Code-Complete-Second-Steve-McConnell/dp/0735619670/ref=pd_bbs_sr_1/104-1489240-1727125?ie=UTF8&amp;amp;s=books&amp;amp;qid=1180176052&amp;amp;sr=8-1" target="_blank"&gt;Code Complete&lt;/a&gt; by Steve McConnell&lt;/li&gt;
&lt;li&gt;Be a good problem solver, this includes having related abilities like systematic elimination of possibilities to reach a solution, hypothesis testing to narrow down causes etc. This again is something that you’re born with and can potentially be learnt to some level. Best book on this aspect that I’ve read is &lt;a href="http://www.amazon.com/Debugging-Microsoft-NET-2-0-Applications/dp/0735622027/ref=pd_bbs_sr_2/104-1489240-1727125?ie=UTF8&amp;amp;s=books&amp;amp;qid=1180176104&amp;amp;sr=8-2" mce_href="http://www.amazon.com/Debugging-Microsoft-NET-2-0-Applications/dp/0735622027/ref=pd_bbs_sr_2/104-1489240-1727125?ie=UTF8&amp;amp;s=books&amp;amp;qid=1180176104&amp;amp;sr=8-2" target="_blank"&gt;Debugging Applications&lt;/a&gt; by John Robbins of NuMega, although this book is windows specific, some of the chapters that deal with debugging strategies and techniques to prevent bugs are invaluable.&lt;/li&gt;

&lt;li&gt;Use your experience to prevent mistakes. This is another area about which very little is written but you can easily make out professional code by the way in which bugs are fixed. Newbies tend to fix the bug at the point of its happening and that’s it, a professional on the other hand thinks about what caused this kind of error to get introduced in the first place and then puts in checks to ensure that similar kinds of issues don’t enter into code and if they do then get flushed out immediately. Also when faced with similar types of problems, good programmers are able to look at the meta problem and come up with reusable solutions for them.&lt;/li&gt;
&lt;li&gt;Experience, nothing can compare to having written and maintained 1000000+ lines of code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And here are the links on the CS vs SE question…&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.gamasutra.com/features/19991216/mcconnell_01.htm" mce_href="http://www.gamasutra.com/features/19991216/mcconnell_01.htm" target="_blank"&gt;Software Engineering is Not Computer Science&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://c2.com/cgi/wiki?ProfessorsDontCode" mce_href="http://c2.com/cgi/wiki?ProfessorsDontCode" target="_blank"&gt;Professors Dont Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://forums.devshed.com/software-design-43/software-engineering-vs-computer-science-406839.html" mce_href="http://forums.devshed.com/software-design-43/software-engineering-vs-computer-science-406839.html" target="_blank"&gt;Software Engineering VS. Computer Science&lt;br&gt;
&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="http://www.onlamp.com/pub/wlg/7757" mce_href="http://www.onlamp.com/pub/wlg/7757" target="_blank"&gt;What would you put in a Computer Science Curriculum?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://stafford.typepad.com/the_next_america/2004/10/computer_scienc.html" mce_href="http://stafford.typepad.com/the_next_america/2004/10/computer_scienc.html" target="_blank"&gt;Computer Science vs. Software Engineering&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://philip.greenspun.com/teaching/undergrad-cs" mce_href="http://philip.greenspun.com/teaching/undergrad-cs" target="_blank"&gt;What’s wrong with the standard undergraduate computer science curriculum? - Philip Greenspun&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2661626" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>Programmer's tools</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2007/05/21/programmer-s-tools.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2007/05/21/programmer-s-tools.aspx</id><published>2007-05-21T14:30:00Z</published><updated>2007-05-21T14:30:00Z</updated><content type="html">
&lt;p&gt;Here are some of the tools that I currently have installed on my dev machine. Most of them are freeware or have free versions available.&lt;/p&gt;
&lt;h3&gt;IDEs&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/vstudio/default.aspx" mce_href="http://msdn2.microsoft.com/en-us/vstudio/default.aspx" target="_blank"&gt;Visual Studio 2003 and 2005&lt;/a&gt; - The essential IDE for any professional windows developer, I only have C# and C++ installed btw to keep resource usage to a minimum. The Visual Studio series are some of the best IDEs I have used, everything can be easily customized and the whole product has great automation and command line support, for e.g. instead of searching for a file to open in the Solution Explorer, you can simply open the command window and say “open &amp;lt;filename&amp;gt;”, you even get autocomplete help for all commands and filenames. If you don’t have Visual Studio 2005 professional, you can get the freely available &lt;a href="http://msdn.microsoft.com/vstudio/express/" mce_href="http://msdn.microsoft.com/vstudio/express/" target="_blank"&gt;Visual Studio Express&lt;/a&gt; editions which are good enough for most purposes.&lt;/li&gt;

&lt;ul&gt; Addins
&lt;li&gt;&lt;a href="http://www.anticipatingminds.com/content/products/devMetrics/devMetrics.aspx" mce_href="http://www.anticipatingminds.com/content/products/devMetrics/devMetrics.aspx" target="_blank"&gt;DevMetrics &lt;/a&gt;- Allows you to generate project statistics like LoC, Cyclomatic Complexity etc.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.roland-weigelt.de/ghostdoc/" mce_href="http://www.roland-weigelt.de/ghostdoc/" target="_blank"&gt;GhostDoc &lt;/a&gt;- Fantastic add-in that generates comments.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.testdriven.net/" mce_href="http://www.testdriven.net/" target="_blank"&gt;TestDriven.Net&lt;/a&gt; - Great support for Test Driven Development without ever leaving the IDE.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;a href="http://www.eclipse.org/" mce_href="http://www.eclipse.org/" target="_blank"&gt;Eclipse 3.2 &lt;/a&gt;- Great IDE for Java development. One of the things I disliked about it is the number of configuration options you have to make to customize a basic install. An alternative that has better defaults out of the box is &lt;a href="http://www.netbeans.org/" mce_href="http://www.netbeans.org/" target="_blank"&gt;NetBeans&lt;/a&gt; 5.5 but I found that to be a bigger resource hog than Eclipse and finally uninstalled it.&lt;/li&gt;

&lt;ul&gt;Plugins
&lt;li&gt;&lt;a href="http://www.eclipse.org/webtools/wst/main.php" mce_href="http://www.eclipse.org/webtools/wst/main.php" target="_blank"&gt;WST&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;a href="http://www.aptana.com/" mce_href="http://www.aptana.com/" target="_blank"&gt;Aptana &lt;/a&gt;- This is the new kid on the block, targeted at web developers, this IDE provides great support for HTML, CSS and  JS editing and debugging. The latest milestone 8 release incorporates a Javascript debugger that is integrated with firefox and also works with FireBug. Another awesome feature is the content-assist(intellisense) for javascript files. In fact the content-assist is so cool that for core js methods it actually shows the DOM level compatibility and supported browsers as well.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Editors&lt;br&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://notepad-plus.sourceforge.net/uk/site.htm" mce_href="http://notepad-plus.sourceforge.net/uk/site.htm" target="_blank"&gt;Notepad++&lt;/a&gt; - I like Notepad++ for primarily for its visual appeal and keyboard shortcuts that are more or less like VS.Net, which I find quite comfortable to work with. Also this is the one editor I use most frequently for editing plain text. This rocks as a Notepad replacement.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pspad.com/" mce_href="http://www.pspad.com/" target="_blank"&gt;PSPad &lt;/a&gt;- This is a great programmer oriented editor, it has tons of functions that you can use to make editing code easy, like code explorer, hash generator, lorem ipsum generator, autocomplete, char codes, inbuilt hex editor, file comparer, macros and tons more. Also PSPad has excellent multifile and project support.&lt;/li&gt;

&lt;li&gt;&lt;a href="http://www.activestate.com/products/komodo_edit/" mce_href="http://www.activestate.com/products/komodo_edit/" target="_blank"&gt;Komodo Edit 4.0&lt;/a&gt; - Stripped down version of &lt;a href="http://www.activestate.com/products/komodo_ide/" mce_href="http://www.activestate.com/products/komodo_ide/" target="_blank"&gt;Komodo IDE&lt;/a&gt;, but still has the most useful functions of editing and intellisense for dynamic languages like Perl, PHP, Python, Ruby and Tcl; plus has support for browser-side code including JavaScript, CSS, HTML and XML. I found the intellisense for JS, CSS and HTML to be lacking when compared to Aptana.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Debugging&lt;br&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" mce_href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" target="_blank"&gt;Microsoft Debugging Tools for Windows&lt;/a&gt; - Includes WinDbg and the console debuggers, useful for some low level windows debugging.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ollydbg.de/" mce_href="http://www.ollydbg.de/" target="_blank"&gt;OllyDbg &lt;/a&gt;- I use both OllyDbg and WinDbg , OllyDbg has a more intuitive UI, but WinDbg is more powerful in the commands that it provides, not to mention that for .Net debugging there is no other alternative than WinDbg&lt;/li&gt;

&lt;/ul&gt;
&lt;h3&gt;System monitoring&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/technet/sysinternals/Utilities/SysinternalsSuite.mspx" mce_href="http://www.microsoft.com/technet/sysinternals/Utilities/SysinternalsSuite.mspx" target="_blank"&gt;SysInternals tools&lt;/a&gt; - One of the first tools I install on a new system, awesome set of utilities from Mark Russinovich and Bryce Cogswell, Mark is one of the authors of the best book on windows internals, aptly named &lt;a href="http://www.amazon.com/Microsoft-Windows-Internals-Fourth-Pro-Developer/dp/0735619174/ref=pd_bbs_sr_1/104-1489240-1727125?ie=UTF8&amp;amp;s=books&amp;amp;qid=1179748546&amp;amp;sr=8-1" mce_href="http://www.amazon.com/Microsoft-Windows-Internals-Fourth-Pro-Developer/dp/0735619174/ref=pd_bbs_sr_1/104-1489240-1727125?ie=UTF8&amp;amp;s=books&amp;amp;qid=1179748546&amp;amp;sr=8-1" target="_blank"&gt;Windows Internals&lt;/a&gt;. Process Explorer is an essential replacement for Windows Task Manager, Autoruns to get rid of those pesky startup items and a whole host of other things that delay startup, and process monitor to monitor registry and filesystem activity of a process are the top 3 tools from this suite that I use.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=aa8be06d-4a6a-4b69-b861-2043b665cb53&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=aa8be06d-4a6a-4b69-b861-2043b665cb53&amp;amp;displaylang=en" target="_blank"&gt;Microsoft Network Monitor 3.0&lt;/a&gt; - Sort of like &lt;a href="http://www.ethereal.com/" mce_href="http://www.ethereal.com/" target="_blank"&gt;ethereal &lt;/a&gt;but with Microsoft branding, great for examining low-level network traffic to debug communication issues.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.fiddler2.com/fiddler2/" mce_href="http://www.fiddler2.com/fiddler2/" target="_blank"&gt;Fiddler 2&lt;/a&gt; - Awesome tool from Microsoft to intercept HTTP traffic.&lt;/li&gt;

&lt;/ul&gt;
&lt;h3&gt;.Net&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.aisto.com/roeder/dotnet/" mce_href="http://www.aisto.com/roeder/dotnet/" target="_blank"&gt;Reflector&lt;/a&gt; - Absolutely essential for a professional .Net developer, decompiles .Net assemblies and has a host of wonderful plugins.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sliver.com/dotnet/SnippetCompiler/" mce_href="http://www.sliver.com/dotnet/SnippetCompiler/" target="_blank"&gt;Snippet Compiler&lt;/a&gt; - A nifty little tool to quickly test out code snippets, without creating a full fledged VS.Net project.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sourceforge.net/projects/regulator/" mce_href="http://sourceforge.net/projects/regulator/" target="_blank"&gt;Regulator&lt;/a&gt; - Essential companion to any sort of regular expression work, initially written by &lt;a href="http://weblogs.asp.net/rosherove/" mce_href="http://weblogs.asp.net/rosherove/" target="_blank"&gt;Roy Osherove&lt;/a&gt;.&lt;/li&gt;

&lt;/ul&gt;
&lt;h3&gt;Image Editing&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.getpaint.net/index2.html" mce_href="http://www.getpaint.net/index2.html" target="_blank"&gt;Paint.Net&lt;/a&gt; - I use this as my standard image editor, Paint.Net replaces &lt;a href="http://www.gimp.org/" mce_href="http://www.gimp.org/" target="_blank"&gt;GIMP &lt;/a&gt;which I used to use a couple of years back.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.irfanview.com/" mce_href="http://www.irfanview.com/" target="_blank"&gt;IrfanView with plugins&lt;/a&gt; - Best tool for image viewing, has tons of plugins and the base application allows gives you the most information possible about an image and has excellent support for the most basic of image manipulation functions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Browsers and Add-ons&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.mozilla.com/en-US/firefox/" mce_href="http://www.mozilla.com/en-US/firefox/" target="_blank"&gt;Firefox&lt;/a&gt; - Standard browser.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.getfirebug.com/" mce_href="http://www.getfirebug.com/" target="_blank"&gt;&amp;nbsp;FireBug &lt;/a&gt;- One of the best ff add-ons for web developers. Supports DOM and CSS manipulation on the fly which really cuts down on the development time.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.mozilla.org/projects/venkman/" mce_href="http://www.mozilla.org/projects/venkman/" target="_blank"&gt;Javascript Debugger&lt;/a&gt; - Great for debugging javascript&lt;/li&gt;
&lt;li&gt;&lt;a href="http://chrispederick.com/work/web-developer/" mce_href="http://chrispederick.com/work/web-developer/" target="_blank"&gt;Web Developer toolbar&lt;/a&gt; - Another useful web developer centric add-on&lt;/li&gt;

&lt;/ul&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/windows/products/winfamily/ie/default.mspx" mce_href="http://www.microsoft.com/windows/products/winfamily/ie/default.mspx" target="_blank"&gt;IE 7.0&lt;/a&gt; - Can’t help it.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en" target="_blank"&gt;IE Developer toolbar&lt;/a&gt; - MS’s answer to Firebug, more limited in functionality though.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.bayden.com/Other/" mce_href="http://www.bayden.com/Other/" target="_blank"&gt;Tamper IE&lt;/a&gt; - For intercepting HTTP GET and POST requests. Great for security testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;li&gt;&lt;a href="http://www.opera.com/" mce_href="http://www.opera.com/" target="_blank"&gt;Opera&lt;/a&gt; - For testing, love the speed dial.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Utilities&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.bayden.com/SlickRun/" mce_href="http://www.bayden.com/SlickRun/" target="_blank"&gt;SlickRun &lt;/a&gt;- Extensively used to launch most tasks that I do on a daily basis. This is a small window that floats on your desktop, which you can use to launch applications and commands. Very lightweight and stable.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.launchy.net/" mce_href="http://www.launchy.net/" target="_blank"&gt;Launchy &lt;/a&gt;- A recent addition, but this has now become my fav and most used util, this is like spotlight on the Mac OSX if you’ve used it, basically allows you to quickly launch applications, documents and files. I’ve never had to open up my programs menu since I’ve started using this. A must for every power user.&lt;/li&gt;

&lt;li&gt;&lt;a href="http://winmerge.org/" mce_href="http://winmerge.org/" target="_blank"&gt;WinMerge &lt;/a&gt;- For resolving conflicts and for checking file differences.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.zhornsoftware.co.uk/stickies/" mce_href="http://www.zhornsoftware.co.uk/stickies/" target="_blank"&gt;Stickies &lt;/a&gt;- A free desktop post-it like notes tool. Recently released but quite good. I was using &lt;a href="http://turbonote.com/" mce_href="http://turbonote.com/" target="_blank"&gt;TurboNotes &lt;/a&gt;free edition before switching to this.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.codinghorror.com/blog/archives/000368.html" mce_href="http://www.codinghorror.com/blog/archives/000368.html" target="_blank"&gt;Clean Sources Plus&lt;/a&gt; - I use this on almost a daily basis to clean out my vs.net code tree with all unnecessary files and folders like .suo, .user, bin, obj etc. &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.foxitsoftware.com/pdf/rd_intro.php" mce_href="http://www.foxitsoftware.com/pdf/rd_intro.php" target="_blank"&gt;Foxit PDF reader 2.0&lt;/a&gt; - This is seriously fast, makes you wonder what the Adobe people are upto.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://zabkat.com/x2lite.htm" mce_href="http://zabkat.com/x2lite.htm" target="_blank"&gt;xPlorer2 Lite&lt;/a&gt; - An excellent replacement for the standard windows explorer, has tab support, multi-panes and tons of useful utilities.&lt;/li&gt;

&lt;li&gt;&lt;a href="http://windirstat.info/" mce_href="http://windirstat.info/" target="_blank"&gt;WinDirStat &lt;/a&gt;- For finding out where your hard disk space is going.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://bluemars.org/clipx/" mce_href="http://bluemars.org/clipx/" target="_blank"&gt;ClipX &lt;/a&gt;- This is another one of those small utilities that make life so much easier. This basically works like an extended clipboard and remembers everything you ever copied to the clipboard, including images. highly customizable and works with all applications, simply press Ctrl+Shift+V(default) and up pops the last 25 items you had copied.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.r2.com.au/software.php?page=2&amp;amp;show=startdelay" mce_href="http://www.r2.com.au/software.php?page=2&amp;amp;show=startdelay" target="_blank"&gt;Startup Delayer&lt;/a&gt; - It took me a while to understand the concept of this, but it really works. Basically it allows you to time when each of your startup applications will launch after the machine starts up, also it shows a small progress bar at the top, which allows you to pause or stop the startup of the tasks if needed.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.daemon-tools.cc/dtcc/download.php" mce_href="http://www.daemon-tools.cc/dtcc/download.php" target="_blank"&gt;Daemon Tools&lt;/a&gt; - For loading all those ISOs into a virtual CD-ROM drive. Has support for SafeDisk and other copy protection mechanisms if you’re into gaming.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx" mce_href="http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx" target="_blank"&gt;Microsoft Virtual PC 2007&lt;/a&gt; - I use this to have a clean WinXP system, where I can test out various things.&lt;/li&gt;

&lt;li&gt;&lt;a href="http://www.vmware.com/products/server/" mce_href="http://www.vmware.com/products/server/" target="_blank"&gt;VMWare Server&lt;/a&gt; - A truly professional Virtual machine application. I found this to be less resource intensive than VPC and also the guest image has better performance when run on VMWare as compared to VPC.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.camstudio.org/" mce_href="http://www.camstudio.org/" target="_blank"&gt;CamStudio &lt;/a&gt;- For making flash demo movies of your application.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.rarlab.com/" mce_href="http://www.rarlab.com/" target="_blank"&gt;WinRar &lt;/a&gt;- My preferred archiving tool.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.7-zip.org/" mce_href="http://www.7-zip.org/" target="_blank"&gt;7-Zip&lt;/a&gt; - Another archiving tool, I use this mainly for commandline scripting of archiving actions.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ccleaner.com/" mce_href="http://www.ccleaner.com/" target="_blank"&gt;CCleaner&lt;/a&gt; - Cleans out crap from your system, like temp files, invalid registry entries, browser caches etc.&lt;/li&gt;

&lt;li&gt;&lt;a href="https://www.foldershare.com/" mce_href="https://www.foldershare.com/" target="_blank"&gt;FolderShare &lt;/a&gt;- For sharing files between you own PCs and keeping them in sync.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://keepass.info/" mce_href="http://keepass.info/" target="_blank"&gt;KeePass &lt;/a&gt;- Allows you to keep all your secrets safe, I use this to store all my online passwords. Has great support for USB based operations as well so that you can carry all your important passwords on a USB.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://support.microsoft.com/kb/290301" mce_href="http://support.microsoft.com/kb/290301" target="_blank"&gt;Windows Install Cleanup&lt;/a&gt; - For cleaning up those corrupted installations. If you ever run into windows installer errors because of a corrupted or unfinished installation give this tool from Microsoft a try.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://icofx.xhost.ro/" mce_href="http://icofx.xhost.ro/" target="_blank"&gt;IcoFX &lt;/a&gt;- Icon editor.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ntwind.com/software/winsnap.html" mce_href="http://www.ntwind.com/software/winsnap.html" target="_blank"&gt;WinSnap &lt;/a&gt;- Screenshot taker.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.gadwin.com/printscreen/" mce_href="http://www.gadwin.com/printscreen/" target="_blank"&gt;Gadwin PrintScreen&lt;/a&gt; - Another screenshot taker. Predecessor to WinSnap.&lt;/li&gt;

&lt;li&gt;&lt;a href="http://wistinga.online.fr/safarp/" mce_href="http://wistinga.online.fr/safarp/" target="_blank"&gt;Safe Add-Remove programs &lt;/a&gt;- A really fast alternative to the windows add/remove programs. The only downside is that you need to be careful with Microsoft product installs, since they tend to be spread out across multiple entries when seen through this tool.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.wbloggar.com/" mce_href="http://www.wbloggar.com/" target="_blank"&gt;w.Bloggar&lt;/a&gt; - What I am using to write this post.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://tortoisesvn.tigris.org/" mce_href="http://tortoisesvn.tigris.org/" target="_blank"&gt;TortoiseSVN &lt;/a&gt;and &lt;a href="http://www.tortoisecvs.org/" mce_href="http://www.tortoisecvs.org/" target="_blank"&gt;TortoiseCVS &lt;/a&gt;- For accessing source of the various internal and open source code repositories.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Misc&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://nsis.sourceforge.net/Main_Page" mce_href="http://nsis.sourceforge.net/Main_Page" target="_blank"&gt;NSIS &lt;/a&gt;- For whipping up a quick windows installer.&lt;/li&gt;

&lt;li&gt;&lt;a href="http://www.vectormediasoftware.com/atmlitehome.htm" mce_href="http://www.vectormediasoftware.com/atmlitehome.htm" target="_blank"&gt;Atmosphere Lite&lt;/a&gt; - Listen to natural sounds and relaxing waves, great for concentration while working.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.foobar2000.org/" mce_href="http://www.foobar2000.org/" target="_blank"&gt;Foobar 2000&lt;/a&gt;- Lightweight and excellent music player from one of the developers on Winamp. Great for listening to music while working.&lt;/li&gt;
&lt;/ul&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2629130" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author></entry><entry><title>Make sure you know what you're fixing</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2007/05/18/make-sure-you-know-what-you-re-fixing.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2007/05/18/make-sure-you-know-what-you-re-fixing.aspx</id><published>2007-05-18T16:13:00Z</published><updated>2007-05-18T16:13:00Z</updated><content type="html">&lt;p&gt;I’ve been working on this bug for the past one week, basically a call to the GDI+ APIs MeasureString and DrawString was failing with a very useful exception “A generic GDI+ error has occured” &lt;img src="http://www.indiangeek.net/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley"&gt; , my initial hypotehesis was that the problem was coming because of the length of the string that we were trying to measure, at that time around 100000+ characters. In retrospect this now seems like such a foolish thing to hypotheize.&lt;/p&gt;
&lt;p&gt;So anyways the bug kept bouncing between me and the tester who did a great job of coming up with new scenarios to cause the crash and we came up with all sorts of complicated rules about how we should trim the length of the string etc. Then today the tester got a crash scenario which was dependent on the number of newlines in the string, this really got me thinking and I realized that my original guess about the length of the string being a problem could not be an issue because so many of the controls display text in excess of 100000 characters without any issue and all of them internally use DrawString.&lt;/p&gt;
&lt;p&gt;So then I started testing out my guess that it was the newlines in the string that was causing the issue and this did in fact turn out to be the root cause. The GDI+ MeasureString API makes my 2GHz laptop behave line a Pentium Pro when asked to measure a string containing ~7000 newlines and at 8000+ it starts failing with the generic GDI+ error.&lt;/p&gt;
&lt;p&gt;I think I learned an important lesson today that spending some time thinking about the root causes of issues and doing a simple analysis can go a long way in making sure that a bug that is once fixed does not pop up again in some other form.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2615729" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term=".Net" scheme="http://weblogs.asp.net/sjoseph/archive/tags/.Net/default.aspx" /><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>A new kind of adsense scam?</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2007/05/16/a-new-kind-of-adsense-scam.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2007/05/16/a-new-kind-of-adsense-scam.aspx</id><published>2007-05-16T08:55:00Z</published><updated>2007-05-16T08:55:00Z</updated><content type="html">&lt;p&gt;I was reading this article today &lt;a href="http://hemnoonews.tripod.com/few-secrets-you-need-to-know-about-client-side-scripting.html"&gt;A Few Secrets You Need to Know about Client-Side Scripting&lt;/a&gt; which I picked up from &lt;a href="http://joel.reddit.com"&gt;joel.reddit.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The odd thing is that the site is not a blog, its just one page that someone has setup on tripod, I then remembered reading similarly formatted sites yesterday and for sure they were there in the hot list of joel sub-reddit, check them out&lt;/p&gt;
&lt;p&gt;&lt;a href="http://zisweenews.tripod.com/things-to-consider-before-redesigning-or-redeveloping-a-website.html"&gt;http://zisweenews.tripod.com/things-to-consider-before-redesigning-or-redeveloping-a-website.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://kjctyynews.tripod.com/the-web-effect-the-characteristics-of-a-web-website.html"&gt;http://kjctyynews.tripod.com/the-web-effect-the-characteristics-of-a-web-website.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;These sites only have this one page and even the usernames seem like fakes. So it seems that someone is setting up these one off pages and then getting them to the top of the ranking in reddit, virtually guaranteeing traffic. The only reason I can think of for someone to do this would be to make money from google adsense.&lt;/p&gt;
&lt;p&gt;Also this could be a test-bed before attempting to try the same on Digg.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2604519" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="Community News" scheme="http://weblogs.asp.net/sjoseph/archive/tags/Community+News/default.aspx" /></entry><entry><title>Is a CS degree required to make a good programmer?</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sjoseph/archive/2007/05/16/is-a-cs-degree-required-to-make-a-good-programmer.aspx" /><id>http://weblogs.asp.net/sjoseph/archive/2007/05/16/is-a-cs-degree-required-to-make-a-good-programmer.aspx</id><published>2007-05-16T02:54:00Z</published><updated>2007-05-16T02:54:00Z</updated><content type="html">&lt;p&gt;I&amp;rsquo;ve been thinking about this for some time now and wanted to jot down my thoughts, but this post &lt;a href="http://www.lambdassociates.org/Blog/hackers.htm"&gt;Hackers and Fighters &lt;/a&gt; by Mark Traver captures beautifully my feelings on this subject.&lt;/p&gt;
&lt;p&gt;There are a few things which are different in Indian universities which I&amp;rsquo;ll talk about in another post.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2602970" width="1" height="1"&gt;</content><author><name>Sijin Joseph</name><uri>http://weblogs.asp.net/members/Sijin-Joseph.aspx</uri></author><category term="General Software Development" scheme="http://weblogs.asp.net/sjoseph/archive/tags/General+Software+Development/default.aspx" /></entry></feed>