Monday, May 15, 2006
If you've ever wondered why the increment and decrement operators weren't included in VB.NET, here's a post explaining why.

Coming from the C/C++ world, I still miss the increment (++) and decrement (--) operators, but I definitely understand why after reading. Basically, it has to do with the fact that assignments in VB are done at the statement level instead of the expression level. If you're not following, consider how you can have things like (if (x = 5) ...) in C, but you can't in VB because the = sign is used for both assignment and equality, depending on the STATEMENT. There isn't any problems in C, because equality is checked with the == sign.

Interesting.
posted on Monday, May 15, 2006 11:54:45 AM (Central Standard Time, UTC-06:00)  #    Comments [1]
 Friday, May 12, 2006

In just over 24 hours, I will be skipping my grad school graduation. For those who didn't know, I've been working on my MBA for the past two years. My employer was willing to pay half the cost of tuition, so I couldn't really turn it down, though I probably would've preferred a more technical degree (I'm a computer nerd).

I didn't really want to wait for hours on end just to hear my name mispronounced. I know Cara didn't want to wait. My parents didn't want to wait - my mom had already told me that she would rather just come visit me than sit in a crowded stadium or gym while thousands of other names were yelled out. Maybe if I had more of an attachment to the U of A (like I did with Harding), it'd be different, but I've been a parttime student. Most of my classes weren't even on campus. I honestly just want to get my degree and have free nights again.

The final reason - I've still got 9 hours to go this summer so I'd rather wait until I'm really done :-)

posted on Friday, May 12, 2006 6:49:07 AM (Central Standard Time, UTC-06:00)  #    Comments [2]
 Thursday, May 11, 2006

Prompted primarily by Karl Sequin's excellent "Understanding and Using Exceptions" post, I was recently attempting to clean up some of the generic exceptions being throw in some code and I was having trouble deciding which exception to use.

I had a BackgroundWorker that could potentially throw an exception (can't everything?) that was doing some remoting to another process. As additional information, the BackgroundWorker exposes any exceptions that might occur in the Error property off of the RunWorkerCompletedEventArgs. I didn't want to just throw e.Error because, as Karl points out, this modifies the call stack making it look my code was the source of the exception. At the same time, I couldn't just use throw, because the exception had basically already been caught and been given to me to handle.

I ended up pulling up the Object Browser in Visual Studio and filtered the list down by searching on "exception" - a nice trick to see all currently accessible exceptions. I ended up using the System.Runtime.Remoting.RemotingException, because it described exactly what I was looking at. Here's the description for it:

Public Class RemotingException

          Inherits System.SystemException

     Member of: System.Runtime.Remoting

Summary:

The exception that is thrown when something has gone wrong during remoting.

If you exclude the "during remoting" part, it basically describes any exception that can be thrown. It's almost funny in a way, because that's exactly the type of thing I was looking for. I was able to set the InnerException to my e.Error which provided me with all the information I needed.

posted on Thursday, May 11, 2006 8:27:20 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, May 10, 2006
Well, I jumped on the Share Your OPML bandwagon today...

Scott is right, too - one of the most interesting aspects of the website is the Subscriptions Like Mine section.

Is it a surprise to anyone that the subscription most like mine is Colin's? (or is mine most like his???) Also, I have to say, I can't believe that some people out there have almost 3000 feeds they subscribe to (see Most Prolific Subscribers). Can we say information overload?
posted on Wednesday, May 10, 2006 11:54:40 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Friday, May 05, 2006
Many thanks to Robert W. Anderson for this solution.

In his post VS2005 PowerShell Prompt, Robert details how to create your PowerShell profile script which will add the VS2005 environment variables to the PowerShell process. Quite nifty.

As a note, after setting this up, you may get a message about how your script isn't signed so it won't run. One solution is to run "Set-ExecutionPolicy RemoteSigned". I wouldn't recommend going farther than that, though. It will allow local scripts to run unsigned and will warn you if a script that was downloaded tries to run. There are still vulnerabilities, so be careful. The other alternative is to sign your script.
posted on Friday, May 05, 2006 8:42:14 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
I just found another nifty shortcut to finding items in Desktop Search. Let's assume you want to find an email with test in the subject in body. If you're like me, you'll find a ton of emails because you get to test a lot of code at work. HOWEVER, what if you know it was in the past couple of days? Try this then:

kind:mail test date:>5/1/2006

That will get all emails with test somewhere in it that came after May 1, 2006. Of course, you can narrow the search more by specifying test in the subject or body or whatever.

See my other tips and tricks here.
posted on Friday, May 05, 2006 7:28:21 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, May 03, 2006
Thanks to Scott Hanselman for the heads up.

I've been using Consolas for a few months now and it is easily one of the best programming fonts I've ever used... and I've tried an awful lot of them... (see here and here for others).

Once it is loaded, start pimping your IDE.
posted on Wednesday, May 03, 2006 6:42:19 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, May 01, 2006
I wanted to share an experience I had last week while working with my development team. I think I've mentioned this before, but we're the first group in my company to move to .NET 2.0. As a result, we're also the first to get to really use Visual Studio 2005. We had been working on mockups and UI designs with our users for quite a while on this project.

Finally, we were getting ready to start work on the internals. The three of us met in a conference room with a projector and I pulled up the Class Designer in Visual Studio. I've done team-coding a few times before, where one person is typing while everyone else is yelling out bugs or typos. While the process can be annoying, it also tends to produce less-buggy code. Doing the same thing with the Class Designer worked out really well. It helped us visualize how everything would tie together. We were drawing out our code, but behind the scenes, the Class Designer was also spitting out workable code!

I don't think I could use the Class Designer in all cases, but it really does force you to think about design issues and it makes for a good team development product. It also helps ease developers who aren't as comfortable with OO concepts see how inheritance is working. Give it a try and let me know how it works for you.
posted on Monday, May 01, 2006 11:36:56 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, April 27, 2006

I've really become a fan of MSN Desktop Search at work. I don't really use the toolbar at all, because I've got tabbed browsing in both Firefox and the IE7 beta, but the search features are great. I also like it better than Google's offering because the results don't pull up in a webpage. Even with all the buzz over AJAX lately, there is still a lot more interaction that can happen with a true client application.

Anyway, on to Desktop Search. It makes finding emails SO MUCH easier. The ability to use special search keywords makes it even better. For example, let's say I wanted to find all emails from me. Here's what I could do:

kind:mail from:David Mohundro

Voila! I now have all emails from me. The kind keyword lets you specify things like mail, pictures, documents, etc. If you want to get even more detailed, you can use things like the ext keyword and specify file extensions. Here's a search to find all icon files that have 'mail' in the name.

ext:ico mail

I haven't seen an all-encompassing list of all of the different keywords that you can use with Desktop Search, but there are quite a few if you'll look in the Desktop Search Help under Advanced Users.

And don't forget to use CTRL+ALT+M to get focus to your search box!

NOTE: If you're running into performance problems with it, check out this KB download. It really helped speed Desktop Search up on my PC. I couldn't work without it now.

posted on Thursday, April 27, 2006 11:47:24 AM (Central Standard Time, UTC-06:00)  #    Comments [0]