Patrick Steele's .NET Blog
Implements ICodeWithDotNet
-
Bill Wagner's MSDN Webcast
Our local user group president Bill Wagner is presenting an MSDN webcast on July 29th at 2:00pm EST. The topic will be "Understanding Avalon". Sounds very interesting!
-
Log4net's new TelnetAppender
The recently released 1.2.9-beta of log4net contains a new appender -- TelnetAppender. This appender acts like a telnet server and allows telnet clients to connect to it and monitor log4net's trace messages. I've only used log4net 1.2.8 but the TelnetAppender sounded pretty neat so I had to try it out. Here's a quick sample app I did. Note the DOMConfigurator has been deprecated and I'm now using the XmlConfigurator:
-
Avoiding IsNothing()
A few days ago I posted about my surprise on finding out what IsNothing() really does. After reviewing more code I found out another reason you should avoid this: It accepts value types! Obviously, since IsNothing() is a function that accepts an 'object', you can pass anything you want to it. If it's a value type, .NET will box it up into an object and pass it to IsNothing -- which will always return false on a boxed value!
-
IsNothing? Definitely!
While reviewing some existing code at my new job I noticed that they use the VB.NET IsNothing() function instead of using the "Is Nothing" syntax. I didn't even know there was an "IsNothing" function so I compiled some code and checked it out with ILDASM. Here's what I compiled:
-
Setting value types to Nothing?
Why in the world does VB.NET let you assign 'Nothing' to a value type? It's not that big of a deal unless you've got a structure. Consider this simple structure:
-
What about NumLock?
One of the nice things about the XP logon is that when you're in the password field, a balloon tip will pop up if your CAPS LOCK key is on to remind you that you may not be typing what you think you're typing. However, since most laptops don't have a separate numeric keypad, the NumLock key can be just as frustrating. When will we get a balloon tip for that?
-
Time to move on.
It's time to move on to new opportunities. My current employer has accepted my two week notice. I've got a little bit of coding and documentation to finish up. This will probably be the last bit of VB6 coding I do for the foreseeable future. It's been a fun 4 1/2 years and I've worked with a great bunch of people -- including one of the best architects I've had the pleasure to work with.
-
The value of unit testing.
Last week, Raymond Lewallen posted a refactoring pattern quiz. A lot people view refactoring as a "bad thing" since you're taking existing, debugged (sometimes in-production) code and changing it. While there is definitely the riesk of introducing regression bugs, Raymond addressed an important point in deflecting some of that risk:
-
More on optimization
Wallym sent me another optimization link: Optimization: Your Worst Enemy. I love this:
-
Premature Optimization
From Wallym's Blog: