Welcome to MSDN Blogs Sign in | Join | Help

December 2006 - Posts

Names of Indian Cities

The biggest issue with the names of Indian cities is that they change :). I know of some other countries where it changes as well. Of the 4 largest cities in India, 3 have changed names in the recent past. Calcutta became Kolkata (2001), Madras became
Posted by abhinaba | 4 Comments

Conditional methods and their Parameter evaluation

In .NET the System.Diagnostics.ConditionalAttribute can be used for conditional compilation. A method can be marked with this attribute as follows using System.Diagnostics; static class Logger { [Conditional("TRACE")] static public void Info(string message)
Posted by abhinaba | 4 Comments
Filed under:

Creating Immutable types

Someone asked on a C# DL " How do I create an immutable type " The answer was obviously by creating a type in which you don't allow writeable fields or properties or have methods that change the state of the type. However, the questions started revolving
Posted by abhinaba | 2 Comments
Filed under:

Is object oriented programming good?

When we use a tool for a long time we get used to it and think in its terms rather than using it to help materialize our thoughts. Mostly this is not a good idea. We were taught OOP in college and kind of told that even though functional programming sounds
Posted by abhinaba | 5 Comments
Filed under:

switches and jump tables

In my last post I had discussed about how only constants can be used with C# switches. From the post's comments and later discussing with other folks I learnt something that came to me as a surprise. A lot of people working on managed code consider switch-case
Posted by abhinaba | 2 Comments
Filed under:

Why can we only use constants in a switch-case statement?

Why can we only use constants in a switch-case statement? The following code fails to compile with the error “A constant value is needed” for someStr as it is not a constant string. static void func(string str) { switch(str) { case "Zaphod": Console.WriteLine("The
Posted by abhinaba | 15 Comments
Filed under:

Test-driven development

A lot have already been said about Test Driven Development (TDD) by a lot of people, but I'd still like to add my 0.02paisa. We have an internal requirement of checking in UnitTests along with the product code and the code coverage for the unit tests
Posted by abhinaba | 2 Comments
Filed under:

Conditional Text

We have moved to a new Satellite TV provider some time back. It is time to pay the quarterly bill, so I dug up their manual to look for online payment options. Sure enough there was a section on "Internet payments". I opened the section and it had one

Change the world or go home

Saw this via Steve Clayton's blog. This is going to be my new wallpaper...
Posted by abhinaba | 1 Comments
Filed under:

Funny messages are not always funny

I used to work in a Company where Easter Eggs used to be considered a feature and there used to be a official maintainer for it (I used to maintain both the Easters listed here and more). I used to feel that Microsoft shouldn't have moved away from inserting
Posted by abhinaba | 8 Comments

Binary banner

BoingBoing has a story of a store that sells t-shirts with offensive messages spelled out in binary. I think its a nice way to generate email signature or web-page banner where you can really say offensive stuff and get away with it. I wrote the following
Posted by abhinaba | 2 Comments
Filed under: ,
 
Page view tracker