Welcome to MSDN Blogs Sign in | Join | Help

Donkblog

Adventures into the world of amateurgramming. I'll leave the programming to the professionals.

March 2008 - Posts

Test Post With Picture
      Just trying a test post with a picture, most people can ignore.  Though, for those of you wondering, this is a picture of the construction on MS campus. Read More...
Data Portability – I Guess It Wasn’t All Paperwork After All
Windows Live has teamed with Facebook, Bebo, Tagged, LinkedIn, and Hi5 to share contact information through some API.  This should make it easy to invite friends from one network to another without the networkings screen scrapping each other.  Read More...
.NET Is NOT Magic But It Is Darn Close - Integer Overflows
Integer overflows happen when an operation is performed on an numeric type that causes it to go over its max value or below its min value.  Integer oveflows can sometimes lead to security exploits when not taken care of properly.  .NET doesn't Read More...
GetType() or 'is' keyword?
Sometimes you might run into a case where you want to know the type of an object you are dealing with.  When someone first faces this situation they find two ways to solve this problem.  They can use GetType() or they can use the 'is' keyword.  Read More...
Not All Code Render Blocks Are Created Equal - Part 1
There are 2 types main types of render blocks .  On one hand there are <%= %> style render blocks that are the more general type and allow the coder to print out directly to the html.  And on the other hand there is the <%# %> style Read More...
Wow, That's Pretty and Easy - AutoUpgradeEnabled for Open File Dialog
When you use the OpenFileDialog to allow your users to select files there are actually different styles the window might look like.  When using .NET and running on Vista you can see there is quite a difference.  The picture on the left is a Read More...
Assembly Version - Odds and Ends
  What's the Assembly Version Good For? Using assembly version is a wonderful way for someone to help maintain and support their applications.  It is defined in the AssemblyInfo.cs file through an attribute.  You can manually update it Read More...
PathInfo - Url Rewriting for the Simple
Request.PathInfo gives you what is past the file name but before '?' which starts the query string.  So instead of doing www.foo.com/bar.aspx?var1=value you could do www.foo.com/bar.aspx/var1/value .  This helps a lot with SEO because search Read More...
Lazy Loading for the Lazy Coder
Lazy loading in properties is very common.  It is a relativity simple concept of only loading the data you once you actually need it, instead of front loading it all.  Though the problem with doing this all over the place is that you end up Read More...
Url Encoding, It's Not Just For Breakfast Anymore
I overheard two of my coworkers the other day talking about it and I actually ran into it myself the other day. What am I talking about? Its the common practice to use encode urls spaces as '-' when the standard says they should be '+'. For example: http://www.engadget.com/2006/07/21/zune-what-we-know-think-we-know-and-dont-yet-know/ Read More...
Singularity Is Now Shared Source!
Singularity the C# operating system with many new and cool ideas.  And it has finally gone shared source.  They threw the code up on on codeplex under the Microsoft Research License Agreement which is for academic non-commercial use.  I Read More...
The Dangers Of Exception Based Logic Part 2 - Filesystem Interaction
I have often time seen filesystem interaction code that heavily depends on exception handling.  Code out in the wild rarely exposes this problem in such a trivial way as my example code below, but just wanted to give another example.     Read More...
The Dangers Of Exception Based Logic Part 1 - Parsing Integers
Exception based logic is one of those things that actually makes me cringe when I see it.  Often times it is really easy to avoid like in the case below.  Believe it or not, exceptions in .NET aren't cheap and shouldn't be taken for granted. Read More...
Page view tracker