Archive for November, 2006

Dispose Finalize and Resource Management

November 30, 2006 Leave a comment
One hell of an entry about ‘Dispose Finalize and Resource Management’. Don’t know how I missed it.
Categories: Great Links

Resurrection in .NET

November 29, 2006 Leave a comment
I was asked in one of the interviews about resurrection:
I knew what it meant but was not able to explain it, So I just picked this from Jeffrey’s article on MSDN magazine.
This should help me put it into words the next time.
"When an application is no longer accessing a live object, the garbage collector considers the object to be dead. However, if the object requires finalization, the object is considered live again until it is actually finalized, and then it is permanently dead. In other words, an object requiring finalization dies, lives, and then dies again. This is a very interesting phenomenon called resurrection. Resurrection, as its name implies, allows an object to come back from the dead.
I’ve already described a form of resurrection. When the garbage collector places a reference to the object on the freachable queue, the object is reachable from a root and has come back to life. Eventually, the object’s Finalize method is called, no roots point to the object, and the object is dead forever after. But what if an object’s Finalize method executed code that placed a pointer to the object in a global or static variable?"
I also remember one of the uses of resurrection is an object pool, where you do not allow objects (which are expensive to create) to be Garbage Collected. I guess I read this in Applied Microsoft .NET Framework Programming, If I am right.
Categories: .NET Framework

Talking about Struggle a little

November 29, 2006 Leave a comment

Thiru writes about ‘struggle in life’. So very true, I am reminded of Paulo Coleho’s Alchemist.


Struggle a little
Sometimes Struggles are exactly what we need in our life.  

If we were to go through life without any obstacles,  

It would cripple us.  

We would not be as strong as we could have been  

And we could never fly.  

So next time you are faced with an obstacle,  

A challenge, or a problem,  

Struggle a little- then fly.

Categories: Inspirational Stuff

Talking about The Great Indian Management

November 28, 2006 Leave a comment

What an article, Thanks to Prakash and Srinivasan. 


The Great Indian Management

My colleague Srinivasan has pointed me to this interesting post on the great indian management. Interesting Read…
"Ideally speaking, business is a form of serving the society. When we serve the societal needs, society rewards the business in the form of money that it allows the business to make.

In any business, all the people involved in the business from the CEO to office assistant supplying snacks and drinks, play different roles. Every one of them is involved in the business and are contributing to the business in their own ways. In a way, every one of them own that business. Every one is a worker and every one is a owner too. Based on their levels of contribution, everybody makes their money from the company.
There is nothing like worker, executive or owner in a business. In these days of educated enlightenment, where feudalistic loyalties do not count, only way people can work together in a business is by understanding that everybody is a part of business.
If at all levels exist, they are for administrative and co-ordination purposes and not to indicate inferiority or superiority. This is what needs to be taught to ‘owners’, ‘executives’ and ‘workers’ alike."
Categories: Uncategorized

The transition from development to project management

November 28, 2006 Leave a comment
Amit Rathore has a really nice writeup on the transition from development to project management.
A good read.
Categories: Great Links

Talking about Motivation Daily

November 28, 2006 2 comments

Thiru keeps coming up with real good  stuff.


Motivation Daily

“People often say that motivation doesn’t last.

Well, neither does bathing – that’s why we recommend it daily.”

Zig Ziglar

See, who’s Talking!the space that motivates you daily!

Categories: Uncategorized

Nine things developers want more than money

November 28, 2006 Leave a comment
I just happenned to read this nice article on
It is about "Nine things developers want more than money".
Quoted from the article:
1. Being Set Up to Succeed
2. Having Excellent Management
3. Learning New Things
4. Exercising Creativity and Solving the Right Kind of Problems
5. Having a Voice
6. Being Recognized for Hard Work
7. Building Something that Matters
8. Building Software without an Act of Congress
9. Having Few Legacy Constraints
Absolutely spot on.
Go ahead read the full article here
Also from the article,
"Most large companies I can think of would be lucky to score a 1. Google would probably score an 8 or a 9." 🙂
Categories: Great Links

The Microsoft Bureaucracy

November 27, 2006 Leave a comment
Joel Spolsky, criticizes the Windows Vista Menu here. The program manager (Moishe Lettvin) for the feature responds here. Very disappointed to hear the bureaucracy involved in Microsoft. Joel responds back to Moishe Lettvin here. Joel says, "The only way Microsoft has managed to hire so many people has been by lowering their hiring standards significantly. ". Must be true because I know the kind of people who went into Microsoft Hyderabad from one of the Indian service giants I used to work for ;-). I am getting to hate the word Corporate by now. It almost looks to me like google is the only option among the corporate giants. I wish I could raise to their level :-).
Categories: Great Links

Talking about Change the World!

November 26, 2006 Leave a comment

As always, Thiru has a nice entry going here. Worth reading


Change the World!

When I was young and free
and my imagination had no limits
I dreamed of changing the world.

As I grew older and wiser,
I discovered the world
would not change,

so I shortened my sights somewhat
and decided to change
only my country.

But it too seemed immovable.
As I grew into my twilight years,
in one desperate attempt,

I settled for changing m y family,
but alas, they would have none of it.

And now, as I lie on my deathbed,
I suddenly realize;

If I had changed myself first,
then by example
I might have changed my family.

From their inspiration
and encouragement
I would then have been able
to better my country

and who knows, I may even have
changed the world.

-Tomb inscription in the crypts
of Westminster Abbey, circa 1100 AD

Categories: Inspirational Stuff

Partial Types in .NET 2.0

November 24, 2006 Leave a comment
Partial types is a new feature in .NET 2.0
They allow splitting the definition of a class / interface / struct into different files or different parts in the same file.
public partial class MyForm {
// …
// Designer generated code
// …
public partial class MyForm {
// …
// User Code
// …
Here we are defining a C# class in two different files MyForm.designer.cs and MyForm.cs
Benefits of partial types:
  • Very large classes (where it’s cumbersome to navigate with an editor through a single file). Though the first question to ask is why the hell do you have such a large class ;-).
  • Allowing multiple developers to work on a single class, without the need for later merging files in source control.
  • Easing the writing of automatic code generators, such as visual designers. Code generators have had a hard time trying to manage the generated code when it was placed in the human-written code. Passive code generators generate code only once and do not think about modifying / updating the generated code. Active code generators on the other hand are more realistic, assume the need to modify the generated code. If you have to add your own code on top of the generated code, then it’s pain. I often faced this issue when i had to modify the VS.NET(wsdl.exe actually) generated proxy code for web service clients. My changes will be lost if I do a update web reference in VS.NET. The windows forms designer generated code does some active generation using regions. Partial types is an elegant way of doing active code generation.
  • A class does not have access to the private members of another class. However, a nested class can access any part of the nesting class. By writing the unit test classes, occasionally, as a nested class is beneficial. But,keeping my code to be tested and a test code for it in the same file has two problems. My file becomes larger and it is also harder to exclude the tests from a build. Partial classes can help here. It allows me to keep the class in one file and its nested test class(es) in separate file(s). Via ‘The Agile Developer’ Venky.
Some rules:
  • All the partial definitions must be qualified with the partial keyword.
  • The whole class can inherit from only one class. This can be speicified in either one of the partial definitions or all of them. If inheritance is specified in more than one partial definition then it has to be from the same class.
  • Each parital definition can add(implement) one or more interfaces.
  • If any of the partial definitions are declared abstract, then the entire type is considered abstract.
  • If any of the partial definitions are declared sealed, then the entire type is considered sealed.
  • All of the partial definitions must be available at compile time to form the final type.
  • All the partial definitions must have the same accessibility, such as public, private, and so on.
Collected from / Credits to:
Categories: .NET Framework