Skip to main content


Showing posts from January, 2013

Logging .Net Exception Details with Complete Stack

I learned today that in .Net doing a ex.ToString() would log the complete exception details including any inner exception details. The important thing here is that it would do this recursively so if there is an InnerException it would call ToString() on it, which in turn can call ToString() on the next level hence forming a recursive chain.

So we can do away with such format string

System.Diagnostics.Trace.TraceError("The error was {0}. Stack Trace {1}. InnerException Details {2}",ex.Message, ex.StackTrace,ex.InnerException.Message);

Google Driven Development GDD

In this era of TDD, BDD, DDD and all other  *DDs, we have a breed of developers doing Google Driven Development (GDD). Sounds interesting, indeed it is :).

Here is how to identify a GDD guy
This person does not believe in writing anything on his own, copy/paste from blogs, articles, source code is a way of life. And since I have not written it I don't care how it works as long as I see something working. His best friends are Ctrl-C, Ctrl-V and Google. Cannot write 5 lines of code or code for 5 minutes without doing a Google search.His productivity is directly related to performance of corporate network, and how fast Google searches. If the network is down, it's better to go for a coffee. Search hours on Google for "Object reference not set to an instance of an object" and then believes that the whole world is facing the same issue. Who cares what the context of problem is.To solve the errorHe then tries each and every solution that Google GOD provides.If by fluke he …

Azure and Package Deployment for Specific Roles

When a single Azure Subscription Service has multiple roles (Web and Worker) in it, updates to the role cannot be selective. Time and again I have had scenarios where I wanted to update the one role but did not want to touch the other. But as Azure deployment works, there is a single package and it updates all roles in the subscription.  While doing an update today I was pleasantly surprise that now while updating the site I do have an option to select which specific role to update. Here is what the dialog looks like now

So now we can update specific roles without touching other ones. Great!!!
Things to keep in mind here would be, once deployment is complete you cannot tell which role was updated and which is still running on a older version. But the deployment name does change. So i think this is a good feature for some quick fixes, else we should stick to simultaneous updates only.