May 2005 - Posts

Top 20 Replies by Programmers when their programs do not work

20. "That's weird..."

19. "It's never done that before."

18. "It worked yesterday."

17. "How is that possible?"

16. "It must be a hardware problem."

15. "What did you type in wrong to get it to crash?"

14. "There is something funky in your data."

13. "I haven't touched that module in weeks!"

12. "You must have the wrong version."

11. "It's just some unlucky coincidence."

10. "I can't test everything!"

9. "THIS can't be the source of THAT."

8. "It works, but it hasn't been tested."

7. "Somebody must have changed my code."

6. "Did you check for a virus on your system?"

5. "Even though it doesn't work, how does it feel?

4. "You can't use that version on your system."

3. "Why do you want to do it that way?"

2. "Where were you when the program blew up?"

And the Number One Reply by Programmers when their programs doesn't

work:

1. "It works on my machine."

Google personalization

Now you can personalize you search page by adding some services to it, like weather, news , quote of the day. Check this out http://www.google.com/ig/customize 

How to create template control in ASP.NET

I wrote an article about creating template controls in ASP.NET. This is my first article. Hope it will help someone... Apreciate your feedbacks

Catch enter press event

To catch windows form's keyboard press event Form.KeyPreview property must be enabled.
Next step is to add a delegate to this form:

this
.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.FormSearch_KeyPress);

Enter has ascii code of 13 so

private
void FormSearch_KeyPress(object sender, KeyPressEventArgs e)
{
  byte[] key = System.Text.Encoding.ASCII.GetBytes(e.KeyChar.ToString());
  if(key[0].ToString()=="13")
  {
     // do something
  }
}

That's it...

50 more invitations to Gmail

Cool :)), along with growing storage, many people would join gmail. Almost all my friends already have gmail account so whom I would invite? :)) My wife just refuse move from yahoo (with 250MB) and I fail to convice her. What can I say , women.... :)