Willem Odendaal

the coder's point of view

<November 2008>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456


Navigation

I Read

Subscriptions

Post Categories



Tuesday, April 12, 2005 - Posts

Dont use exceptions, use return codes (?!)

There's a discussion going on at Alex Papadimouli's blog about exceptions. According to an MVP, return codes should be used instead of exceptions (because they are faster). Hmmm.

Most people are saying - don't use exceptions for program flow, only use them in exceptional circumstances. There's a good quote for this - “Don't piss in your pants just to check if your fly is open.” That's what I believe as well.

posted Tuesday, April 12, 2005 6:34 AM by willemo

String Comparisons

In Java you were not allowed to compare strings using the == operator (the == operator would do a reference comparison). So you had to use the Equals() method instead. For example...

if (userName.Equals(”Willem”)) { ... }

Instead of...

if (userName == “Willem“) {...}

That stuck with me. Now, in C#, I always compare strings using the Equals() method. However, according to this acticle, System.String overloads the == operator and calls Equals() internally. Good to have that one cleared up.

On the rare occasion that you really do want to do a reference comparison, I guess you would have to use Object.ReferenceEquals.

posted Tuesday, April 12, 2005 5:43 AM by willemo

Cyrus on Intellisense

Cyrus is Mr. Intellisense. He wrote a very interesting post - When capabilities don't meet requirements, where he discusses two bugs found in the Visual Studio 2005 Intellisense system. A nice read that talks about some of the Intellisense inner workings.

posted Tuesday, April 12, 2005 1:54 AM by willemo

Windows Tip

Here's a nice Windows XP tip - when in Explorer(or Internet Explorer), hit F11.

Ba-da-bing... fullscreen!

posted Tuesday, April 12, 2005 1:39 AM by willemo




Powered by Dot Net Junkies, by Telligent Systems