http://weblogs.asp.net/mhawley/archive/2004/05/11/129824.aspx
December 29, 2008
Productivity Tips
As we are moving to a new year, we tend to look for productivity tips which help to improve our productivity. But how many people actually keep continuing? Well, it’s easy to start but hard to continue. I have tried different kind of GTD (Getting things done).
There are plenty of ways where you can manage your Things to do list. A good start would be GTD. But for me I would like to keep things simple. Some of the simple but effective productivity tips which may help you in new year :
· Maintain a simple todo list ( Gmail Tasks)
· Break tasks into small workable items.
· If a task takes 2 min to complete, do it at the same time and do not procrastinating
· Have a weekly review and clear up all the tasks.
Even If its sound so simple, it’s hard to continue. Good luck and have a productive new year!!
Some useful readings :
http://www.lifeoptimizer.org/2007/05/09/top-5-productivity-tips-most-people-know-but-do-not-do/
December 23, 2008
Merry X'mas and Happy New year
November 28, 2008
November 26, 2008
ASP.NET Charts
August 27, 2008
Generic List removing duplicates
static ListremoveDuplicates(List inputList)
{
DictionaryuniqueStore = new Dictionary ();
ListfinalList = new List ();
foreach (string currValue in inputList)
{
if (!uniqueStore.ContainsKey(currValue))
{
uniqueStore.Add(currValue, 0);
finalList.Add(currValue);
}
}
return finalList;
}
July 4, 2008
Url Rewriting in IIS 7
When there is no file extension in the url, IIS directly processing it with its own ISAPI filter rather than processing it through the ASP.NET handler. But with IIS 7, all we have to do is to add the HttpModule into the IIS web app. All the requests are process through the HttpModule. So if we request http://localhost/Products, it will go through the HttpModule, which we can easily integrate our url rewriting.
June 6, 2008
Coding Styles
May 24, 2008
April 26, 2008
Url Rewriting for SEO
April 16, 2008
Use your computer to print, scan, and fax
http://www.microsoft.com/windowsxp/using/setup/hwandprograms/printfaxscan.mspx
March 26, 2008
OpenSocial
March 12, 2008
How Google keeps our information secure
February 19, 2008
ASP.NET Futures
download futures : http://www.asp.net/downloads/futures/
January 10, 2008
.Net 3.5 Extensions Part 2
In my previous post I have talk about "what is a method extension" and "how we can use that in our development". Let’s move into more detail.
Extension has change the way we design our applications. With previous versions of .net, which didn’t supports features like multiple inheritances, but with extensions we can design our applications to meet all those functionality. So here what I’m going to show is how we can program to interfaces using method extensions.
To start with we will take simple interface class scenario. We use interface to implement multiple features to a given class. Below is example of implementing multiple inheritances on a single class using interfaces.
public interface IFlyable {
void Fly();
}
Public interface IRunnable {
void Run();
}
Public interface ISwimming {
Void Swim();
Void BreatheInWater();
}
Public class Bird: IFlyable, IRunnable, ISwimming {
Public class Animal() {
}
Public void Fly() {
//Implement flying logic
}
Public void Run() {
//Implement Running Logic
}
Public void Swim() {
//Implement Swim Logic
}
Public void BreatheInWater() {
//Implement Breathe in water logic
}
}
What if there is a another class which needs to implement the same Swim logic in ISwimming, infact lets say all the classes which implement ISwimming has the same swim logic, but BreatheInWater logic is differs. How do we achieve this?
Public class Fish: ISwimming {
Public void Swim() {
//Implement same swim logic
}
Public void BreatheInWater() {
//Implement different Breathe in water logic
}
}
We could achieve this using some of the design patterns, but here I just wanted to show how easily we can do this using method extensions. Since Swim has the same logic in every class we can see as it’s a perfect method to use as an extensions. So we can implement the Swim logic in one place. To do that we need to remove the Swim method from ISwimming interface and place that in out method extension class as below.
//Implment the same swim logic
}
Note that we have this keyword before the ISwimming interface. This tells the compiler that ISwimming type has Swim method extension. So after implement the method extensions for the ISwimming interface we could modify the code as below.
public interface IFlyable {
void Fly();
}
Public interface IRunnable {
void Run();
}
Public interface ISwimming {
Void BreatheInWater();
}
Public class Bird: IFlyable, IRunnable, ISwimming {
Public class Animal() {
}
Public void Fly() {
//Implement flying logic
}
Public void Run() {
//Implement Running Logic
}
Public void BreatheInWater() {
//Implement Breathe in water logic
}
}
Public class Fish: ISwimming {
Public void BreatheInWater() {
//Implement different Breathe in water logic
}
}
Please note that we have removed the Swim method from the interface as well as from all the implementation classes. We only wrote the Swim method in our extensions class. This makes our code cleaner and easier to write. So when ever we create an object which implements ISwimming interface we get Swim method as an extension.
So here I covered how we can easily use Method extensions in our interfaces. Hope this helps!