Presentation Follow up

Thanks to everyone who showed up at the presentation on monday.  For those interested, I’ve uploaded the contents of the presentation here.  I was unable to upload the large DB file used during the demo due to size limitations (sky drive will only let me upload a 50 MB file).  But better than wasting both…

1

Is IntPtr(long) truncating?

The short answer is: No, not when it matters A colleague and I were discussing a particular scenario around IntPtr,PInvoke and 64 bit correctness.  Eventually our discussion lead us to the IntPtr constructor which takes a long.  To my surprise the code for the constructor is the following. public unsafe IntPtr(long value) { this.m_value =…

1

Properly handling a WinForms Timer event

The WinForms Timer class allows the user to perform a particular action at a set interval.  Timer objects fire a Tick event at the set time which users can easily respond to.  This is very useful if a developer wants to check for a particular condition say every 2 seconds ( for the remainder of…

4

Redefining Success

Spent about an hour debugging a bit of code today.  I was attempting to read data from a particular source and kept getting back failure codes.  After some debugging I discovered the data didn’t actually exist in the source I was reading from.  This put me back to investigating where I wrote the data out. …

1

Presenting at Net Developers Association Meeting Oct 27

I will be presenting at the Net Developers Associating meeting this upcoming Monday.  If you’re interested in hearing me ramble on in person please drop by.  Event Details: When: Oct 27 7:00PM Where: Microsoft Building 40: The Steptoe Room (Map) Who: Me Why: Blogging’s fun but it’s great to go out and talk to people…

1

When can you catch a StackOverflowException?

Answer: When you’re the one who threw it.  Starting with the CLR version 2.0, the policy for handling a StackOverflowException was changed.  User code can no longer handle the exception[1].  Instead the CLR will simply terminate the process.  This is not 100% true though.  User code can still handle StackOverflowExceptions which are artificially thrown.  That…

0

Program Files, I just want the 32 bit version

As part of my transition into using 64 bit windows I keep running into a problem with some scripts.  I have a whole set of Powershell scripts that are dedicated to ensuring certain programs are installed on all of my dev machines.  Or that certain customizations are needed.  A lot of these do file existence…

0

Custom Exceptions: When should you create them?

I think the best answer is: rarely.   It’s really hard to go straight to a justification here though.  I find that answering a different question will eventually shed led on when to create a new exception. "What are the benefits of creating a new/custom exception?" The answers I come up with or have heard before…

5

Community Interview

Recently I did a community interview with Microsoft MVP Alessandro Del Sole.  The Italian version can be read here.  And no, I don’t speak Italian.  The original transcript is below. 1. Nice to meet you Jared Parsons! Let’s begin by asking a simple question: where are you from? Born in Kentucky, raised in Tennessee, lived…

1

Powershell and 64 bit windows helper functions

Recently at work I started using Windows 2008 64 bit edition.  Mainly for hyper-v but powershell also comes as part of the deal.  I’m starting to work through the fun issues of getting some of my environment specific scripts to run in a 64 bit powershell process.  The following scripts are turning out to be…

0