Archive for the ‘Uncategorized’ Category
Boxing & Unboxing in c# (.NET) – Why & What
This post is just yet another explanation about boxing and unboxing. Before that let us look at just in one line that what is value type and reference type.
Value Type contains actual data and it is stored always on stack. This cannot be null anytime.
Reference Type contains reference/pointer to actual data. Data is stored on heap. This can be null.
Now, as per all the website, boxing is to convert value type to reference type and unboxing is to convert reference type to value type.
But I was thinking, why to convert it from one type to another. The reason I found is, sometimes, you require value type must be passed as reference type e.g. System.Object as parameter. So if you define System.Int32, it allocates 4 bytes to the stack. And if it is passed as System.Object, it is boxed as referenced type and passed to the method. Due to that, System.Int32 behaves exactly same as object. However, in reality, it is just a 4 bytes.
So because of boxing, everything appears as Object (Reference type).
In unboxing, the reference type is converted back to the Value type. But if you look at all the unboxing code, you can find out that explicit cast is required to do the same. That is because CTS need to know whether you are converting the reference type to valid value type due to strict rules.
Quite Interesting!!!
Effective Communication really needed for success
I have just figured out from experience that there should be effective communication in everything you do. Also, this communication somehow reach to the end as it is without modification. But as in all organization, there are people who modify the things according to their own need
. Wow.. Money matters buddy…
I just find out one good article which discussed the same…
The purpose of communication (to engage in the act of information exchange) is the fulfillment of one’s physical or emotional needs. If you are tired, you start asking around for a cheap hotel.
The effectiveness of the communication is determined by the quality of the communication channel, the quality of the interaction, if you will. If there is noise on a channel, the effectiveness of communication reduces.
The risk of noise on a channel is determined by a need to cheat, and the opportunity to cheat.
The need to cheat arises when there is scarcity; when you get in direct conflict with others when trying to fulfill your needs. If the entire village is competing for the same bed, asking around will probably sent you in the wrong direction.
The opportunity to cheat appears when information can be manipulated, when it is possible to provide wrong information on purpose. If information is not clear, complex or ambiguous the opportunity to cheat increases. When there is no way to verify information, when it is difficult to get feedback the opportunity increases also. ….. (And so on. For full article, go to Purpose Of Communication- What Is It Good For-)
Managing Stress : Swami Sukhabodhananda Way
Managing Stress
Swami Sukhabodhananda
One youngster comes to me very depressed and asks this question "Why is God creating so many difficulties for us? How to handle stress?" I tell this youngster to reflect on this beautiful story:
A man goes to a shop, picks up a beautiful cup and says "my god this cup is so beautiful" and suddenly the cup starts talking to the man. The cup starts saying "O man, I am beautiful right now, but what was the state of my being before the pot-maker made me a beautiful pot?
Before I was sheer mud and the pot-maker pulled me out of the mud from the mother earth and I felt why that pot-maker is so cruel, he has separated me from mother earth. I felt a tremendous pain. And the pot-maker said, "Just wait." Then he put me and churned me, when I was churned I felt so giddy, so painful, so stressful, I asked the pot-maker "Why are you so cruel?" the pot-maker said, "Just wait." Then he put me into a oven and heated me up, I felt completely burnt. There was tremendous pain and I asked the pot-maker "Why are you so cruel?" and the pot-maker said, "Just wait."
Then he poured hot paint on me and I felt the fume and the pain, I again asked the pot-maker "Why are you so cruel?" and the pot-maker said, "Just wait." Then again he put me into an oven and heated it to make me more strong, I felt life is so painful hence pleaded the pot-maker and the pot-maker said, "Just wait." And after that the pot-maker took me to the mirror and said, "Now look at yourself". And surprisingly I found myself so beautiful.
When god gives us lot of trouble, it appears god is very cruel but we need patience and we have to wait. When bad things happen to good people, they become better and not bitter.
So, all difficulties are part of a cosmic design to make us really beautiful. We need patience, we need understanding, we need the commitment to go through in a very calm and wise way. So, all difficulties are not to tumble us but to humble us.
With this understanding, let us not be against difficulty. Understand difficulty is a part of a purifying process. A purifying process at present which we cannot understand and hence we need faith and we need trust.
Let us understand how to handle stress with this background. You can be affected by stress from two angles. There is an internal stress and there is an external stress. Nobody can avoid stress; one has to only manage stress. Managing stress can be internal and also external.
The internal stress is; your thoughts can create stress, your values can create stress, and your beliefs can create stress, meaning thereby your stress is coming from your mind more from the outer world. Many people suffer not from heart attack – they suffer from thought-attack.
For example, when somebody says you are an idiot, we get so hurt, we get so victimized. My boss has called me an idiot and I am feeling tremendous pain. Now where does this stress come from? If my boss has called me an idiot, I have to ask myself "am I an idiot"?
If I am an idiot nothing to be upset about; and if I am not an idiot, then also nothing to be upset about! It is the perception of the boss. But why do we suffer from that stress? I suffer not because my boss has called me an idiot but because of the thought-attack.
I may say the boss has called me an idiot; therefore I am suffering? It is true that the words are unpleasant. But what hurts is the interpretation of the unpleasant word. The thought in me interprets. That is pain and therefore it becomes pain. Much of our stress is our mind interpreting it as pain. So we suffer from thought-attack more than heart attack
Nice Article
Useful Software List
Disk Space
http://www.diskspacefinder.com/ (Simple and Sweet)
To-Do
http://www.abstractspoon.com/tdl_resources.html
RSI Related
http://www.workrave.org/welcome/
Start Menu
http://www.vistastartmenu.com/index.html
http://www.tidystartmenu.com/index.shtml
Launcher
IsDesignMode Issue in Visual 2005, Checking Design Mode
I used Control.IsDesignMode property but it’s behavior is strange so i am using following comparison to check for whether control is in design mode or run mode.
bool IsDesignMode = System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime ;
Hides method from the override list – could not find override method in visual studio
Recently i wanted to override dispose method and i could not find it using the automated dropdown list of visual studio after typing override and space.
I thought this is weird that i could not find the method i wanted to override. So i left that and thought this method wont be in that class.
But after doing some work, i found that it is in designer class and found out that microsoft doesn’t show the method in list if you have already override it.
Good huh
How Do You Determine the Health of a Software Development Project?
This one has come up before, but with a near year dawning, I think it’s worth revisiting. Suppose you were about to join a new medium-sized software development project — a couple of dozen people, split between two or three sites, with a couple of hundred thousand lines of moderately complex code already written. What would you do to determine how healthy the project was? Obvious things include:
- Ask the team how positive they feel about what they’re doing. (Happy teams aren’t always productive, but unhappy teams almost never are.)
- Compare their actual development practices against some kind of checklist. (Version control? Yup. Test-driven development? No, but most people still don’t actually do that. Some testing, with continuous build on the back-end, is a more reasonable expectation…)
- Read their code. In my experience, this is a lot more work than the previous two options, primarily because most projects don’t have a useful architectural overview.
What else? What would you do, and why?
Now, for bonus marks, what would you do differently if you were faced with a dozen teams, each with four to six people, and each having only ten thousand lines of code? The first case is the one I face when consulting, while the second is what I have to deal with in the classroom. I believe that our collective failure to handle the latter case well is the main reason so many junior developers have trouble coping with real-world applications, which is in turn why intermediate and senior developers’ skills are so uneven and unpredictable.
Thoughts?
taken from : http://pyre.third-bit.com/blog/archives/1858.html
Free Hide Folder 2.1
Free Hide Folder is a free computer security software to hide your private folders. It is very useful to keep your personal data away from others. Others will not know where your personal files exist and they will not be able to accidentally view them. You can hide folders simply with a few mouse clicks. Free Hide Folder is protected by a password that you can change or remove at any time.
Platform: Windows 9x/Me/NT/2000/XP/2003/Vista
File Size: 743 KB
License: Freeware
Google Crome Finally Released
Google Chrome finally moves out of beta!
Update on Silverlight 2 – and a glimpse of Silverlight 3
We shipped Silverlight 2 last month. Over the last 4 weeks, the final release of Silverlight 2 has been downloaded and installed on more than 100 million consumer machines. It has also recently been published to corporate administrators via the Microsoft SMS and Microsoft Update programs to enable them to automatically deploy across enterprises. Over 1 in 4 computers on the Internet now have some version of Silverlight installed.
Silverlight 2 was a major release, and delivered an impressive set of cross-browser, cross-platform functionality for Media and Rich Internet Application experiences. It has been great watching new sites launch using …
Read More on Scott Gu’s Article
