<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>The Coding Monkey</title>
    <link>http://www.thecodingmonkey.net/</link>
    <description>I'm a Software Consultant in the Milwaukee area. Among various geeky pursuits, I'm also an amateur triathlete, and enjoy rock climbing. I also like to think I'm a political pundit.</description>
    <language>en-us</language>
    <copyright>Nick Schweitzer</copyright>
    <lastBuildDate>Sat, 06 Sep 2008 15:10:24 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.8.5223.2</generator>
    <managingEditor>nick@thecodingmonkey.net</managingEditor>
    <webMaster>nick@thecodingmonkey.net</webMaster>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=182dcf57-ca09-4cd4-862b-8a2a2d42e95e</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=182dcf57-ca09-4cd4-862b-8a2a2d42e95e</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=182dcf57-ca09-4cd4-862b-8a2a2d42e95e</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=182dcf57-ca09-4cd4-862b-8a2a2d42e95e</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>Codeapalooza Coverage</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=182dcf57-ca09-4cd4-862b-8a2a2d42e95e</guid>
      <link>http://www.thecodingmonkey.net/2008/09/06/CodeapaloozaCoverage.aspx</link>
      <pubDate>Sat, 06 Sep 2008 15:10:24 GMT</pubDate>
      <description>&lt;p&gt;
   I drove down to Wheaton, IL for the Chicago .NET User Group's &lt;a href="http://www.codeapalooza.com/"&gt;Codeapalooza&lt;/a&gt;.&amp;nbsp;
   They have a lot of sessions, and its impossible to see all them, here is the coverage
   of the ones I chose to go to.&amp;nbsp; I'll be updating this post after every session,
   so feel free to check back throughout the day.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;SQL Server 2008 for Developers by &lt;a href="http://clevelanddotnet.blogspot.com/"&gt;Sam
   Nasr&lt;/a&gt;:&lt;/strong&gt;&amp;nbsp; Best Quote - &lt;em&gt;"I drank the punch a long time ago, so I
   only really know Microsoft stuff."&lt;/em&gt;&amp;nbsp; Covered quite a lot from platform features,
   to T-SQL, data types and reporting services.
&lt;/p&gt;
&lt;p&gt;
   Talked about new data auditing features, but then mentioned the four common fields
   that everyone adds to a table (CreatedBy, CreatedDate, ModifiedBy, ModifiedDate) but
   didn't really talk about how the two work together, or if the new data auditing features
   is a standardization of that classic DBA paradigm.&amp;nbsp; Auto Synchronization of data
   with a SQL Server Compact Edition database.&amp;nbsp; Cool!
&lt;/p&gt;
&lt;p&gt;
   Definitely some cool new T-SQL features, like the ability to pass in an entire table
   into a stored procedure.&amp;nbsp; Would that really simplify writing bad code?&amp;nbsp;
   FileStream Object Storage looks cool as a good alternative to binary blobs, with better
   management than just storing a path as a string in a table.&amp;nbsp; Finally you can
   create and initialize a variable in one statement!&amp;nbsp; Plus some new operators like
   +=, and the ability to insert multiple rows in one statement.&amp;nbsp; Both of those
   are a long time coming.&amp;nbsp; Intellisense!!!&amp;nbsp; Thankfully the Intellisense improvements
   are with SQL Server Management Studio 2008, even if you're connecting to a 2005 Server.&amp;nbsp;
   Very nice.&amp;nbsp; There is of course more (like grouping sets), but some of that stuff
   is beyond me since SQL is not exactly my forte.
&lt;/p&gt;
&lt;p&gt;
   HierarchyID looks very much like an XML Data Document (especially with the methods),
   but it doesn't support moving to XML built in.&amp;nbsp; Very strange.&amp;nbsp; But for creating
   tree structures in your data, it looks very cool.&amp;nbsp; Nasr concentrated on using
   it for organizational charts, but tree structures are a very common solution to a
   lot of programming problems.&amp;nbsp; This simply creates first class support within
   T-SQL for a common database paradigm for a parent child relationship with an ParentID
   field.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;WPF Demystified by &lt;a href="http://davebost.com/blog"&gt;Dave Bost&lt;/a&gt;:&amp;nbsp; &lt;/strong&gt;Best
   Quote - &lt;em&gt;"Where are the designers?&amp;nbsp; It's hard to tell, I don't see a turtleneck
   or a beret."&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
   WPF in and of itself is a huge topic, so you're not going to cover it in an hour.&amp;nbsp;
   So this was treated more as a showcase of what WPF can do.&amp;nbsp; He interestingly
   focused on developer vs. designer, and how that is handled by WPF and new technologies
   (no more battleship gray).&amp;nbsp; Focused, once again, on the fact that .NET 3.0 runs
   off of the .NET 2.0 runtime (in other words... there were &lt;em&gt;additions&lt;/em&gt;... but
   not &lt;em&gt;changes&lt;/em&gt;).&amp;nbsp; Important note... the .NET 3.5 SP1 &lt;em&gt;requires&lt;/em&gt; .NET
   2.0 SP1 &lt;em&gt;runtime.&lt;/em&gt;&amp;nbsp; You cannot run 3.5 SP1 applications on the 2.0 standard
   runtime (without the service pack).
&lt;/p&gt;
&lt;p&gt;
   Unfortunately... this talk wasn't as in depth as I'd hoped.&amp;nbsp; It really was the
   same overview presentation I'd seen many times.&amp;nbsp; Here's XAML... Windows Forms
   isn't dead... etc.&amp;nbsp; There is Expression Design, Blend and Web (which &lt;em&gt;replaces
   Frontpage... Frontpage is Dead!&lt;/em&gt;).&amp;nbsp; There is also Expression Media.&amp;nbsp;
   Lots more tools in that family than I was aware of (with virtualization so they can
   run on Mac).&amp;nbsp; Best question:&amp;nbsp; &lt;em&gt;"Is this Standards Based, or Standards
   Compliant?"&lt;/em&gt;&amp;nbsp; Excellent spin!&amp;nbsp; I always ask about SVG because XAML looks
   so similar to SVG.&amp;nbsp; Not surprisingly, nobody at Microsoft seems to realize (or
   is willing to admit) that XAML was invented 10 years ago and was called SVG.
&lt;/p&gt;
&lt;p&gt;
   He shows some cool sample XBAP applications on the internet that demonstrate the power
   of XAML.&amp;nbsp; The coolest was the &lt;a href="http://ttpdownload.bl.uk/app_files/xbap/BrowserApp.xbap"&gt;British
   Library's "Turning the Pages"&lt;/a&gt;.&amp;nbsp; You can use it to virtually read their collection
   of precious old books which are normally under glass and unavailable to regular library
   visitors.&amp;nbsp; There is also &lt;a href="http://www.vertigo.com/familyshow.aspx"&gt;Vertigo's
   Family.Show&lt;/a&gt; which is a XAML application to visually represent a family tree.&amp;nbsp;
   And of course, don't forget &lt;a href="http://www.babysmash.com"&gt;Scott Hanselman's Baby
   Smash&lt;/a&gt; which is great for keeping your kids out of trouble when they start pounding
   on your keyboard.
&lt;/p&gt;
&lt;p&gt;
   So how do you start?&amp;nbsp; Learn XAML first, and then find out what parts of XAML
   work in WPF and in Silverlight.&amp;nbsp; The goal by Microsoft is to make Silverlight
   and WPF more similar.&amp;nbsp; Its not always possible because the browser environment
   restricts us in many ways.&amp;nbsp; Then he worked through one of MSDN's Virtual Labs, &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032376936&amp;amp;EventCategory=3&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;which
   you can do to also&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
   Of course, Expression Blend doesn't have built in integration with source code control.&amp;nbsp;
   Supposedly it's coming, but I consider that a must have if you want designers and
   developers to work together well.&amp;nbsp; I also don't like how the XAML designer in
   Visual Studio is so pared down.&amp;nbsp; It forces developers (who don't have a designer
   on staff) to buy two applications.&amp;nbsp; Doesn't Microsoft realize that developers
   are cheap?!
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;ADO.NET Entity Framework with Fakher Halim:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   This guy has his presentation almost way too prepared.&amp;nbsp; He might as well have
   been reading off of a teleprompter.&amp;nbsp; Maybe not good for this type of group.&amp;nbsp;
   Actually, we never really got to see much code at all.&amp;nbsp; He mostly explained why
   we should be using something like the Entity Framework.&amp;nbsp; For God's sake, this
   guy is drawing a keyboard and mouse on the white board!&amp;nbsp; I wish they had brought
   somebody in to actually talk about the Entity Framework.&amp;nbsp; This dude is a PhD,
   talking at such a high level that it's useless.&amp;nbsp; A wasted hour.&amp;nbsp; I feel
   sorry for this guy because he's got to watch people file out one by one.
&lt;/p&gt;
&lt;p&gt;
   As it turns out, this guy was also sitting in the front row of the WPF talk I mentioned
   earlier, and he kept on asking questions that were totally off topic and taking us
   away from what were were all there to talk about.&amp;nbsp; He kept complaining that forms
   weren't looking like forms any more, and that we were breaking the old fashioned user
   experience paradigm.&amp;nbsp; At some point, old dogs have to learn new tricks.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;ADO.NET Data Services with &lt;a href="http://www.writebetterbits.com./"&gt;Jim
   Fiorato&lt;/a&gt;:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   This is all new to .NET 3.5 SP1 (and used to be called Project Astoria).&amp;nbsp; It's
   a pattern to present data on the web in a way much simpler than SOAP.&amp;nbsp; The results
   of data calls in web services are definitely not human readable.&amp;nbsp; So web services
   are great, but they're not easy to consume unless you're in Visual Studio and possibly
   Java.&amp;nbsp; This fits really well with the new MVC and JSON technologies coming around.
&lt;/p&gt;
&lt;p&gt;
   Data Services can either return data in an ATOM format or in a JSON format for use
   in Javascript.&amp;nbsp; I'd never really seen JSON before, but he had an example of a
   data structure in JSON... and it's super readable.&amp;nbsp; This all fits very well with
   the newer paradigm of RESTful services coming around.&amp;nbsp; I'm going to the REST
   presentation later, so this will bookend very well with that.
&lt;/p&gt;
&lt;p&gt;
   This has not been a good afternoon for presentations.&amp;nbsp; This guy has a Mac Book,
   and for some reason couldn't get it to work with the projector.&amp;nbsp; So they had
   to bring in another laptop, and get Virtual PC installed... and well... the presentation
   isn't as good as it could have been.
&lt;/p&gt;
&lt;p&gt;
   Once he finally got everything up and running, he basically created an Entity Framework
   project and exposed it value a WCF service using ADO.NET Data Services.&amp;nbsp; Essentially
   all this does it allows you to translate a URL into a LINQ query seamlessly.&amp;nbsp;
   He spent half the time just typing URL's into a web browser and showing the results.&amp;nbsp;
   No code for parsing the URL, or any code written.&amp;nbsp; All that query string functionality
   comes built in out of the box.
&lt;/p&gt;
&lt;p&gt;
   The idea of a query interceptor was pretty cool, in that you can now perform extra
   logic before the query takes place and then modify the query based on that logic.&amp;nbsp;
   For instance, you can modify a GET to only return data based on someone's permissions.&amp;nbsp;
   There was an excellent question on Transaction support.&amp;nbsp; For this model, there
   is no real support for Transactions.&amp;nbsp; At that point, you are best going to full
   blown Web Services.&amp;nbsp; This is great really only for fast read only data access.
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;Rest and JSON using WCF and ADO.NET Data Services with &lt;a href="http://eraserandcrowbar.com/"&gt;Larry
   Clarkin&lt;/a&gt;:&amp;nbsp; &lt;/strong&gt;Best Quote - &lt;em&gt;"You can explain any software concept
   using Star Trek.&amp;nbsp; After all, Capt. Kirk was the first blogger."&lt;/em&gt;&amp;nbsp; It's
   tied with &lt;em&gt;"The new Hello World is - Let's build a blog!"&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
   We had low expectations to begin with since he came into the room and said "Well,
   I haven't finished my presentation yet."&amp;nbsp; Way to represent Microsoft Larry!&amp;nbsp;
   And true to form, he actually started out by not talking about REST and JSON, but
   instead started talking about photography... specifically showing &lt;a href="http://livelabs.com/seadragon/"&gt;Sea
   Dragon&lt;/a&gt;.&amp;nbsp; Looked pretty cool.&amp;nbsp; Deep Zoom is actually part of this, and
   is built into Silverlight.&amp;nbsp; It is similar to &lt;a href="http://maps.google.com"&gt;Google
   Maps&lt;/a&gt; in that it delivers the different pieces of resolution in tiles, but it is
   much smoother.&amp;nbsp; It might actually use the new JPEG 2000 in order to do part of
   the render.&amp;nbsp; He also showed &lt;a href="http://photosynth.net/Default.aspx"&gt;Photosynth&lt;/a&gt; (which
   I hadn't heard about).&amp;nbsp; It allows you to splice together different angles of
   a location, and using the EXIF data out of the picture along with spatial recognition,
   it creates a 3D scene.&amp;nbsp; One note that Larry mentioned is that you shouldn't use
   cropped photos, because the focal length is not synced with the result of the crop,
   and that screws up the software.&amp;nbsp; Finally he showed &lt;a href="http://research.microsoft.com/autocollage/"&gt;AutoCollage&lt;/a&gt;,
   which loads a whole slew of photos and tries to auto create a collage based on what
   the software thinks is interesting.
&lt;/p&gt;
&lt;p&gt;
   So this ended up being a much more overview look at REST (&lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer"&gt;Representational
   State Transfer&lt;/a&gt;) and JSON (&lt;a href="http://en.wikipedia.org/wiki/JSON"&gt;Javascript
   Object Notation&lt;/a&gt;), and even some old school (at least in the .NET time frame) serialization.&amp;nbsp;
   Of course, I remember writing MFC serialization code in C++.&amp;nbsp; He started by showing
   what the XML Serializer will do for you out of the box... which has been available
   since .NET 1.0.&amp;nbsp; I do think he spent too much time talking about existing technologies,
   when the topic was supposed to be REST and JSON.&amp;nbsp; Though the attributes you can
   apply to the classes to control XML Serialization also apply to REST serialization
   since REST is still XML, though much simpler than SOAP.&amp;nbsp; Is REST better than
   SOAP?&amp;nbsp; REST is much simpler than SOAP, but SOAP has more features for transactions
   and such.
&lt;/p&gt;
&lt;p&gt;
   Why JSON?&amp;nbsp; Well for one, it avoids &lt;a href="http://www.codinghorror.com/blog/archives/001114.html"&gt;the
   angle bracket tax&lt;/a&gt;.&amp;nbsp; However, its also great for use with Javascript since
   all parsers know how to deal with JSON.&amp;nbsp; After all, it's called &lt;em&gt;Javascript&lt;/em&gt; Object
   Notation.&amp;nbsp; So there is no need to parse the data on the client side, so application
   development is faster and easier.&amp;nbsp; It's also faster to &lt;em&gt;run&lt;/em&gt; on the client
   running Javascript.&amp;nbsp; But don't use JSON for a thick client or for Server-Server
   communication.&amp;nbsp; For that, you ought to be using XML (through SOAP or REST).
&lt;/p&gt;
&lt;p&gt;
   Then he showed some code on how to deliver JSON through a WCF service.&amp;nbsp; Overall
   though, he gave a great overview presentation.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=182dcf57-ca09-4cd4-862b-8a2a2d42e95e" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=182dcf57-ca09-4cd4-862b-8a2a2d42e95e</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=5b112697-8de7-4d0f-9066-4b36b5288874</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=5b112697-8de7-4d0f-9066-4b36b5288874</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=5b112697-8de7-4d0f-9066-4b36b5288874</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=5b112697-8de7-4d0f-9066-4b36b5288874</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>How Much JavaScript is Too Much?</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=5b112697-8de7-4d0f-9066-4b36b5288874</guid>
      <link>http://www.thecodingmonkey.net/2008/07/09/HowMuchJavaScriptIsTooMuch.aspx</link>
      <pubDate>Wed, 09 Jul 2008 14:30:32 GMT</pubDate>
      <description>&lt;p&gt;
   One of the things I try to do on my blogs (especially &lt;a href="http://www.nickschweitzer.net"&gt;my
   other blog&lt;/a&gt;) is to get as much of the processing to be done server side, with as
   few outside dependencies as possible.&amp;#160; There are a few reasons for this.&amp;#160;
   One is that I can better control any problems that may occur because the source is
   more easily known.&amp;#160; Second, it allows for more server side caching.&amp;#160; Third
   is that it is a pendulum reaction to when I used to host on &lt;a href="http://www.blogger.com"&gt;Blogger&lt;/a&gt; and &lt;em&gt;everything&lt;/em&gt; I
   wanted extra had to be provided through a third party via JavaScript.&amp;#160; My old
   Blogger blogs got to be really slow as I tried to add more and more features.
&lt;/p&gt;
&lt;p&gt;
   I like to think that I keep a nice balance of server side and client side processing
   for all my sites.&amp;#160; One of the political blogs that I keep tabs on is &lt;a href="http://wigdersonlibrarypub.blogspot.com"&gt;Wigderson
   Library &amp;amp; Pub&lt;/a&gt;.&amp;#160; James is a big fan of advertising, and JavaScript.&amp;#160;
   Luckily I only read his site through his RSS feed... because if I actually had to
   go to his site to check his content, it would drive me nuts.&amp;#160; For fun, I decided
   to &amp;quot;battle&amp;quot; Jim using &lt;a href="http://www.webslug.info/"&gt;Webslug&lt;/a&gt;, which
   measures comparative load time performance between two sites.&amp;#160; Here are the results:
&lt;/p&gt;
&lt;p&gt;
   &lt;a href="http://www.thecodingmonkey.net/content/binary/HowMuchJavaScriptisTooMuch_84BF/NickVsWiggy.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="280" alt="NickVsWiggy" src="http://www.thecodingmonkey.net/content/binary/HowMuchJavaScriptisTooMuch_84BF/NickVsWiggy_thumb.jpg" width="946" border="0" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
   &amp;#160;
&lt;/p&gt;
&lt;p&gt;
   You're reading that right... 192 seconds, or over 3 minutes for the page to finish
   loading.&amp;#160; Now then... it's not as bad as it seems, since the positioning of the
   JavaScript allows the page to render the majority of its content before that.&amp;#160;
   But still... at what point do you declare that you have too much JavaScript?&amp;#160;
   And for folks like Jim, who still use third party applications like Blogger for all
   his content, what are the alternatives to speed load time?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=5b112697-8de7-4d0f-9066-4b36b5288874" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=5b112697-8de7-4d0f-9066-4b36b5288874</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=66c96bfb-2db4-4a34-b693-51360cfbb88f</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=66c96bfb-2db4-4a34-b693-51360cfbb88f</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=66c96bfb-2db4-4a34-b693-51360cfbb88f</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=66c96bfb-2db4-4a34-b693-51360cfbb88f</wfw:commentRss>
      <title>LINQ and Stored Procedures Not Always Magic</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=66c96bfb-2db4-4a34-b693-51360cfbb88f</guid>
      <link>http://www.thecodingmonkey.net/2008/06/09/LINQAndStoredProceduresNotAlwaysMagic.aspx</link>
      <pubDate>Mon, 09 Jun 2008 20:45:52 GMT</pubDate>
      <description>&lt;p&gt;
   I had an interesting experience while trying to import a stored procedure into a LINQ
   to SQL Classes Designer surface today.&amp;nbsp; Normally this is a pretty straightforward
   process.&amp;nbsp; First you open Server Explorer, then go to one of your connections,
   find the stored procedure, and then drag and drop it onto the designer surface.&amp;nbsp;
   Boom, it's suddenly available from your DataContext as a method.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
   That's exactly what I did today, except when I created a var for the stored procedure
   result set, and then added a foreach to loop through the rows in the result set...
   nothing showed in my Intellisense.&amp;nbsp; Huh?&amp;nbsp; A little hover magic and I saw
   that my generated method was returning an int.
&lt;/p&gt;
&lt;p&gt;
   After some investigation, I found that the designer has a hard time handling stored
   procedures that use temporary tables in them, as it throws off the procedure meta
   data.&amp;nbsp; As it turns out, there are two possible solutions.&amp;nbsp; First, you can
   use a table variable instead:
&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;DECLARE&lt;/span&gt; @tempTable &lt;span style="color: rgb(0,0,255)"&gt;TABLE&lt;/span&gt; &lt;span style="color: rgb(128,128,128)"&gt;(&lt;/span&gt; &lt;span style="color: rgb(128,128,128)"&gt;...&lt;/span&gt; &lt;span style="color: rgb(128,128,128)"&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
   &lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Your second option is to continue
   to use a temporary table, but hand modify your dbml file using an XML editor.&amp;nbsp;
   Simply right click on the file in Solution Explorer and choose Open With and then
   choose your favorite XML editor.&amp;nbsp; Mine is &lt;a href="http://www.flos-freeware.ch/notepad2.html"&gt;Notepad2&lt;/a&gt;.&amp;nbsp;
   Search through the file for your stored procedure, which for a procedure named "storedProcedureName"
   might look like this:
&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Function&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;dbo.storedProcedureName&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Method&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;storedProcedureName&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Parameter&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Parameter1&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Parameter&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Parameter1&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Type&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;System.Int32&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;DbType&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Int&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; /&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Return&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Type&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;System.Int32&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; /&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Function&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
   Then remove the &amp;lt;Return ... /&amp;gt; element and replace it with an &amp;lt;ElementType&amp;gt;
   node which may look like this:
&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Function&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;dbo.storedProcedureName&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Method&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;storedProcedureName&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Parameter&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Parameter1&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Parameter&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Parameter1&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Type&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;System.Int32&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;DbType&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Int&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; /&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;ElementType&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;storedProcedureNameResult&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Column&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Result1&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Type&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;System.Int32&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;DbType&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;int
NOT NULL&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;CanBeNull&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;false&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; /&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Column&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Result2&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Type&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;System.String&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;DbType&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;varchar(10)
NOT NULL&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;CanBeNull&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;false&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; /&amp;gt;
&amp;lt;!--&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; ... &lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;--&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;ElementType&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Function&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
This second method is the one that I used since my temporary table will hold thousands
of rows, which is too inefficient for a table variable.&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=66c96bfb-2db4-4a34-b693-51360cfbb88f" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=66c96bfb-2db4-4a34-b693-51360cfbb88f</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=411629c9-e680-454f-a4be-2fb15bde3cf0</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=411629c9-e680-454f-a4be-2fb15bde3cf0</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=411629c9-e680-454f-a4be-2fb15bde3cf0</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=411629c9-e680-454f-a4be-2fb15bde3cf0</wfw:commentRss>
      <title>This Looks Super Cool</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=411629c9-e680-454f-a4be-2fb15bde3cf0</guid>
      <link>http://www.thecodingmonkey.net/2008/04/11/ThisLooksSuperCool.aspx</link>
      <pubDate>Fri, 11 Apr 2008 14:10:48 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;a href="http://www.hanselman.com/blog/PuttingASPNETDynamicDataIntoContext.aspx"&gt;Scott
   Hanselman has a great overview post&lt;/a&gt; up on &lt;a href="http://code.msdn.microsoft.com/dynamicdata"&gt;ASP.NET
   Dynamic Data&lt;/a&gt;.&amp;nbsp; It's a new preview ASP.NET framework that works with .NET
   3.5 which allows you to mark up your business objects with meta data that will be
   used by your GUI code to control what type of control is used to view and validate
   your data.&amp;nbsp; This is huge if you have multiple screens that show the same data
   points in multiple ways, because it allows you to centralize this code into your business
   objects so that you can change your visualization in one location, and have it spread
   across all your pages.&amp;nbsp; &lt;em&gt;Wow!&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
   Now the only question I have is why doesn't something like this exist for WinForms
   or XAML?&amp;nbsp; Or does it already exist and I just don't know it?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=411629c9-e680-454f-a4be-2fb15bde3cf0" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=411629c9-e680-454f-a4be-2fb15bde3cf0</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=fe6dfe8a-1513-41a7-8a40-56bcc924e16d</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=fe6dfe8a-1513-41a7-8a40-56bcc924e16d</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=fe6dfe8a-1513-41a7-8a40-56bcc924e16d</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=fe6dfe8a-1513-41a7-8a40-56bcc924e16d</wfw:commentRss>
      <title>Real World</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=fe6dfe8a-1513-41a7-8a40-56bcc924e16d</guid>
      <link>http://www.thecodingmonkey.net/2007/05/12/RealWorld.aspx</link>
      <pubDate>Sat, 12 May 2007 15:56:41 GMT</pubDate>
      <description>&lt;p&gt;
   This is interesting.&amp;nbsp; I'm currently reading a Self-Paced Training Kit book for
   an exam towards my MCPD.&amp;nbsp; It's talking about different features in .NET 2.0 (which
   seems kind of boring since I really already know all of this).&amp;nbsp; However, what
   is good so far about this book are the occasional interludes of "Real World" information
   thrown in by the authors that break from the normal "Oo Ra Ra, Go Microsoft" information.&amp;nbsp;
   One of them is talking about Generics (a feature that I love) which shocked me:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
   I haven't been able to reproduce the performance benefits of generics; however, according
   to Microsoft, generics are faster than using casting.&amp;nbsp; In practice, casting proves
   to be several times faster than using a generic.&amp;nbsp; However, you probably won't
   notice performance differences in your applications.&amp;nbsp; (My tests over 100,000
   iterations took only a few seconds.)&amp;nbsp; So you should still use generics because
   they are type-safe.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
   Huh?!&amp;nbsp; Granted, the type safety aspect is a huge benefit.&amp;nbsp; However, I can't
   tell you how many times I've heard from Microsoft people about the huge performance
   benefits.
&lt;/p&gt;
&lt;p&gt;
   To be honest, I always suspected a problem in that respect, but I always thought it
   was me.&amp;nbsp; I had written a .NET 1.1 library a while ago that implemented different
   types of Binary Search Trees and a Skip List.&amp;nbsp; When .NET 2.0 came out, I decided
   to make a 2.0 version using Generics as an exercise to learn the new feature.&amp;nbsp;
   When I did some timing comparisons, I found that it was either a little slower, or
   largely the same depending on the test.&amp;nbsp; I always figured it was something in
   my implementation, or my timing code.&amp;nbsp; Maybe it wasn't me after all.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=fe6dfe8a-1513-41a7-8a40-56bcc924e16d" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=fe6dfe8a-1513-41a7-8a40-56bcc924e16d</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=96402f8a-8238-46dd-8ef5-a7e6c1b4829e</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=96402f8a-8238-46dd-8ef5-a7e6c1b4829e</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=96402f8a-8238-46dd-8ef5-a7e6c1b4829e</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=96402f8a-8238-46dd-8ef5-a7e6c1b4829e</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>Fun With Reflection... Reference vs Value Types</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=96402f8a-8238-46dd-8ef5-a7e6c1b4829e</guid>
      <link>http://www.thecodingmonkey.net/2007/05/08/FunWithReflectionReferenceVsValueTypes.aspx</link>
      <pubDate>Tue, 08 May 2007 02:20:00 GMT</pubDate>
      <description>&lt;p&gt;
   So here is an interesting little quirk I found regarding Reflection in .NET.&amp;nbsp;
   I was writing a serialization library that was capable of reading and writing to&amp;nbsp;a
   CSV file format, and also to a fixed width file format.&amp;nbsp; The project I was working
   on had various CSV and Fixed Width formats to deal with, so we wanted a nice and generic
   library to read and write with.&amp;nbsp; Moreover, the code I was replacing basically
   just parsed everything into a string, and then there would be tons of logic that simply
   indexed into a string using a constant to represent the position in the row.&amp;nbsp;
   We wanted each record in the file to be read into a&amp;nbsp;strongly typed structure.
&lt;/p&gt;
&lt;p&gt;
   I decided to make use of Reflection so that you could create a data structure that
   looked like this:
&lt;/p&gt;
&lt;pre class="code"&gt;[&lt;span style="color: rgb(0,128,128)"&gt;TextSerializable&lt;/span&gt;] &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; &lt;span style="color: rgb(0,128,128)"&gt;Person &lt;/span&gt;{
[&lt;span style="color: rgb(0,128,128)"&gt;TextField&lt;/span&gt;(0)] &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt; Name;
[&lt;span style="color: rgb(0,128,128)"&gt;TextField&lt;/span&gt;(1)] &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; Age;
[&lt;span style="color: rgb(0,128,128)"&gt;TextField&lt;/span&gt;(2)] &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,128,128)"&gt;DateTime&lt;/span&gt; DateOfBirth;
}&lt;/pre&gt;
&lt;p&gt;
   And then easily read it in by doing this:
&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(0,128,128)"&gt;TextReader&lt;/span&gt; reader = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(0,128,128)"&gt;StreamReader&lt;/span&gt;( &lt;span style="color: rgb(128,0,0)"&gt;"TestFile.csv"&lt;/span&gt; ); &lt;span style="color: rgb(0,128,128)"&gt;CSVSerializer&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0,128,128)"&gt;Person&lt;/span&gt;&amp;gt;
ser = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(0,128,128)"&gt;CSVSerializer&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0,128,128)"&gt;Person&lt;/span&gt;&amp;gt;(); &lt;span style="color: rgb(0,128,128)"&gt;Person&lt;/span&gt; p
= ser.Deserialize( reader.ReadLine() );&lt;/pre&gt;
&lt;p&gt;
   Sounds pretty easy right?&amp;nbsp; But what if you want your target data type to be a &lt;span style="color: rgb(0,0,255)"&gt;struct &lt;/span&gt;instead
   of a &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt;?&amp;nbsp; Should be pretty easy right?&amp;nbsp;
   As it turns out, there is a little known quirk in how you use reflection to set Property
   and Field values that makes a big difference due to boxing.
&lt;/p&gt;
&lt;p&gt;
   The serialization class that I wrote uses reflection to find all the Fields and Properties
   that have been marked with the TextField attribute.&amp;nbsp; Then during the deserialization
   process, it uses the PropertyInfo.SetValue (or FieldInfo.SetValue) method to set the
   value on the newly created target type.
&lt;/p&gt;
&lt;p&gt;
   Here is the trick.&amp;nbsp; You have to know whether the target type if a &lt;span style="color: rgb(0,0,255)"&gt;class &lt;/span&gt;or
   a &lt;span style="color: rgb(0,0,255)"&gt;struct&lt;/span&gt;.&amp;nbsp; If it's a class, then you
   can pass in an object reference.&amp;nbsp; If it's a class, then you have to store the
   variable in a ValueType variable.&amp;nbsp; Otherwise the structure will be boxed, and
   during the boxing/unboxing process, the value will be lost!
&lt;/p&gt;
&lt;p&gt;
   It's weird... you call the exact same SetValue method... there is not even a special
   overload that takes a ValueType vs Object type.&amp;nbsp; However, it makes all the difference
   in the world.&amp;nbsp; Here is part of the code from the Deserialize method.&amp;nbsp; TargetType
   is the generic type that gets passed in during the declaration (in the above example
   it was Person).&amp;nbsp; I stored the Type variable in _type.
&lt;/p&gt;
&lt;pre class="code"&gt;TargetType returnObj = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; TargetType(); &lt;span style="color: rgb(0,128,128)"&gt;ValueType&lt;/span&gt; returnStruct
= &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;; &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (
_type.IsValueType ) { &lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt; tempObj = returnObj;
returnStruct = (&lt;span style="color: rgb(0,128,128)"&gt;ValueType&lt;/span&gt;)tempObj; }&lt;/pre&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// Parsing code here&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; ( _type.IsValueType
) AssignToStruct( returnStruct, fieldObj, attr.Member ); &lt;span style="color: rgb(0,0,255)"&gt;else &lt;/span&gt; AssignToClass(
returnObj, fieldObj, attr.Member );&lt;/pre&gt;
&lt;p&gt;
   And here is AssignToClass and AssignToStruct:
&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; AssignToClass( &lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt; obj, &lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt; val, &lt;span style="color: rgb(0,128,128)"&gt;MemberInfo&lt;/span&gt; member
) { &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; ( member &lt;span style="color: rgb(0,0,255)"&gt;is&lt;/span&gt; &lt;span style="color: rgb(0,128,128)"&gt;PropertyInfo&lt;/span&gt; )
( (&lt;span style="color: rgb(0,128,128)"&gt;PropertyInfo&lt;/span&gt;)member ).SetValue( obj,
val, &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt; ); &lt;span style="color: rgb(0,0,255)"&gt;else&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (
member &lt;span style="color: rgb(0,0,255)"&gt;is&lt;/span&gt; &lt;span style="color: rgb(0,128,128)"&gt;FieldInfo&lt;/span&gt; )
( (&lt;span style="color: rgb(0,128,128)"&gt;FieldInfo&lt;/span&gt;)member ).SetValue( obj, val
); &lt;span style="color: rgb(0,0,255)"&gt;else &lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;throw&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(0,128,128)"&gt;TextSerializationException&lt;/span&gt;( &lt;span style="color: rgb(128,0,0)"&gt;"Invalid
MemberInfo type encountered"&lt;/span&gt; ); } &lt;span style="color: rgb(0,0,255)"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; AssignToStruct( &lt;span style="color: rgb(0,128,128)"&gt;ValueType&lt;/span&gt; obj, &lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt; val, &lt;span style="color: rgb(0,128,128)"&gt;MemberInfo&lt;/span&gt; member
) { &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; ( member &lt;span style="color: rgb(0,0,255)"&gt;is&lt;/span&gt; &lt;span style="color: rgb(0,128,128)"&gt;PropertyInfo&lt;/span&gt; )
( (&lt;span style="color: rgb(0,128,128)"&gt;PropertyInfo&lt;/span&gt;)member ).SetValue( obj,
val, &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt; ); &lt;span style="color: rgb(0,0,255)"&gt;else&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (
member &lt;span style="color: rgb(0,0,255)"&gt;is&lt;/span&gt; &lt;span style="color: rgb(0,128,128)"&gt;FieldInfo&lt;/span&gt; )
( (&lt;span style="color: rgb(0,128,128)"&gt;FieldInfo&lt;/span&gt;)member ).SetValue( obj, val
); &lt;span style="color: rgb(0,0,255)"&gt;else &lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;throw&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(0,128,128)"&gt;TextSerializationException&lt;/span&gt;( &lt;span style="color: rgb(128,0,0)"&gt;"Invalid
MemberInfo type encountered"&lt;/span&gt; ); }&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt; 
&lt;p&gt;
   Notice how they are identical, except for the type being passed in?&amp;nbsp; It's absolutely
   crazy making to have this copy and paste code, but it's necessary.&amp;nbsp; The other
   crazy making part is that FieldInfo and PropertyInfo don't have a common base which
   has SetValue in it.&amp;nbsp; For whatever reason, all languages in .NET treat Properties
   and Fields as identical syntactically, but they are completely different reflected.&amp;nbsp;
   More copy and paste madness.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=96402f8a-8238-46dd-8ef5-a7e6c1b4829e" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=96402f8a-8238-46dd-8ef5-a7e6c1b4829e</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=06423e60-de3a-4ef7-8988-d14a9f1cc66c</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=06423e60-de3a-4ef7-8988-d14a9f1cc66c</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=06423e60-de3a-4ef7-8988-d14a9f1cc66c</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=06423e60-de3a-4ef7-8988-d14a9f1cc66c</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>Never Stop Learning</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=06423e60-de3a-4ef7-8988-d14a9f1cc66c</guid>
      <link>http://www.thecodingmonkey.net/2007/05/01/NeverStopLearning.aspx</link>
      <pubDate>Tue, 01 May 2007 17:18:20 GMT</pubDate>
      <description>&lt;p&gt;
   One of the things they told us at &lt;a href="http://www.msoe.edu"&gt;Engineering School&lt;/a&gt; was&amp;nbsp;that
   they weren't just teaching us "stuff", they were teaching us "how to learn".&amp;nbsp;
   You can never stop learning.&amp;nbsp; New technologies, languages, frameworks, methodologies
   are always coming around.&amp;nbsp; Either you keep up, or you fall behind.
&lt;/p&gt;
&lt;p&gt;
   I like to think that I've done&amp;nbsp;a good job at keeping up.&amp;nbsp; My resume is filled
   with a vast array of TLA's that have shown that not only do I give lip service to
   learning, but that I've done it, and applied to projects.&amp;nbsp; I've worked&amp;nbsp;on&amp;nbsp;C++
   with MFC, then COM and ATL, and now .NET.&amp;nbsp; Now it looks as if &lt;a href="http://www.hanselman.com/blog/PuttingMixSilverlightTheCoreCLRAndTheDLRIntoContext.aspx"&gt;something
   big is coming around the corner&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
   Time to start learning again.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=06423e60-de3a-4ef7-8988-d14a9f1cc66c" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=06423e60-de3a-4ef7-8988-d14a9f1cc66c</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=29cbecb8-b19b-41fc-b01f-c194574214ed</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=29cbecb8-b19b-41fc-b01f-c194574214ed</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=29cbecb8-b19b-41fc-b01f-c194574214ed</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=29cbecb8-b19b-41fc-b01f-c194574214ed</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>More Things Visual Basic Left Out</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=29cbecb8-b19b-41fc-b01f-c194574214ed</guid>
      <link>http://www.thecodingmonkey.net/2007/04/13/MoreThingsVisualBasicLeftOut.aspx</link>
      <pubDate>Fri, 13 Apr 2007 02:32:51 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;a href="http://www.thecodingmonkey.net/2007/04/03/NullableTypesNotQuiteThere.aspx"&gt;I
   mentioned last week about how Nullable Types weren't really in Visual Basic&lt;/a&gt;.&amp;nbsp;
   You know what's also not there?&amp;nbsp; &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/00/C20/default.aspx"&gt;Iterators.
   No Yield statement&lt;/a&gt;.&amp;nbsp; Since I often times have to switch between C# and Visual
   Basic, I find these differences to be quite frustrating at times.&amp;nbsp; I really wish
   Microsoft would do a better job of maintaining parity of features between the various
   .NET languages they support.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=29cbecb8-b19b-41fc-b01f-c194574214ed" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=29cbecb8-b19b-41fc-b01f-c194574214ed</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=3f5e66c6-c928-4767-ba71-bfb88a32e3f2</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=3f5e66c6-c928-4767-ba71-bfb88a32e3f2</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=3f5e66c6-c928-4767-ba71-bfb88a32e3f2</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=3f5e66c6-c928-4767-ba71-bfb88a32e3f2</wfw:commentRss>
      <title>Nullable Types Not Quite There</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=3f5e66c6-c928-4767-ba71-bfb88a32e3f2</guid>
      <link>http://www.thecodingmonkey.net/2007/04/03/NullableTypesNotQuiteThere.aspx</link>
      <pubDate>Tue, 03 Apr 2007 01:59:10 GMT</pubDate>
      <description>&lt;p&gt;
   Lately I've finally been working with Visual Studio 2005 and .NET 2.0.&amp;nbsp; Previous
   to this, I'd been working with 2003 and 1.1 almost entirely, and only read about (though
   extensively) and played with 2.0.&amp;nbsp; Since I only play with C#, I got used to all
   the new features it added, and wrongly assumed that Visual Basic .NET brought the
   same features to the table.
&lt;/p&gt;
&lt;p&gt;
   As I should know by now... that was a poor assumption.&amp;nbsp; I found this out today
   when I was trying to use Nullable types to deal with database access.&amp;nbsp; I've been
   working with VB most recently, so I created an empty playground project to play with
   the features and see how they worked.&amp;nbsp; Then I realized I had no idea how to declare
   a Nullable type in Visual Basic.&amp;nbsp; I'd only done it in C#.&amp;nbsp; That's no problem...
   a minute later I had written this sample code:
&lt;/p&gt;
&lt;pre class=code&gt;&lt;span style="COLOR: rgb(0,0,255)"&gt;Dim&lt;/span&gt; n &lt;span style="COLOR: rgb(0,0,255)"&gt;As&lt;/span&gt; Nullable(&lt;span style="COLOR: rgb(0,0,255)"&gt;Of&lt;/span&gt; &lt;span style="COLOR: rgb(0,0,255)"&gt;Integer&lt;/span&gt;) &lt;span style="COLOR: rgb(0,0,255)"&gt;Dim&lt;/span&gt; m &lt;span style="COLOR: rgb(0,0,255)"&gt;As&lt;/span&gt; Nullable(&lt;span style="COLOR: rgb(0,0,255)"&gt;Of&lt;/span&gt; &lt;span style="COLOR: rgb(0,0,255)"&gt;Integer&lt;/span&gt;)
n = 7 m = 3 Console.WriteLine(n + m)&lt;/pre&gt;
&lt;p&gt;
   Hmmm... Nullable(&lt;span style="COLOR: rgb(0,0,255)"&gt;Of&lt;/span&gt; &lt;span style="COLOR: rgb(0,0,255)"&gt;Integer&lt;/span&gt;)
   isn't nearly as nice looking as &lt;span style="COLOR: rgb(0,0,255)"&gt;int&lt;/span&gt;?, but
   VB syntax has always been more bulky to me than C#?&amp;nbsp; Hold on a second!&amp;nbsp;
   Why doesn't that last line compile?&amp;nbsp; Doesn't VB.NET have the same type coercion
   features of C# for nullable types?&amp;nbsp; That would be a definite &lt;em&gt;no&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
   For the record, here is the identical code in C#:
&lt;/p&gt;
&lt;pre class=code&gt;&lt;span style="COLOR: rgb(0,0,255)"&gt;int&lt;/span&gt;? n = 7; &lt;span style="COLOR: rgb(0,0,255)"&gt;int&lt;/span&gt;?
m = 3; &lt;span style="COLOR: rgb(0,128,128)"&gt;Console&lt;/span&gt;.WriteLine( n + m );&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt; 
&lt;p&gt;
   Now then... doesn't that look nice?&amp;nbsp; And it compiles and works like you'd expect
   it to also.&amp;nbsp; Is that so much to ask?&amp;nbsp; So the reality is that Visual Basic
   only supports Nullable types because it happens to be implemented using Generics in
   the CLR, so Visual Basic didn't do any extra work to support them... bare bones.&amp;nbsp;
   But that's all you get.&amp;nbsp; Just bare bones support without any of the extra niceties
   that you'd expect to find.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=3f5e66c6-c928-4767-ba71-bfb88a32e3f2" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=3f5e66c6-c928-4767-ba71-bfb88a32e3f2</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=f116fed3-3c7c-460e-988f-1538e4fa1413</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=f116fed3-3c7c-460e-988f-1538e4fa1413</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=f116fed3-3c7c-460e-988f-1538e4fa1413</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f116fed3-3c7c-460e-988f-1538e4fa1413</wfw:commentRss>
      <title>If You're Lucky It Will Blow Up</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=f116fed3-3c7c-460e-988f-1538e4fa1413</guid>
      <link>http://www.thecodingmonkey.net/2007/03/28/IfYoureLuckyItWillBlowUp.aspx</link>
      <pubDate>Wed, 28 Mar 2007 01:49:30 GMT</pubDate>
      <description>&lt;p&gt;
   In my tenure as a software engineer, I've seen a lot of poorly written code, especially
   in my C++ days.&amp;nbsp; Pointer magic that had no business being compiled, and error
   handling that was slim to non-existent.&amp;nbsp; Even in the world of .NET, it's still
   possibly to write dangerous code:
&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;try &lt;/span&gt;{ &lt;span style="color: rgb(0,128,0)"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;//
Call a method may throw an exception &lt;/span&gt;} &lt;span style="color: rgb(0,0,255)"&gt;catch&lt;/span&gt; ( &lt;span style="color: rgb(0,128,128)"&gt;Exception&lt;/span&gt; ex
) { &lt;span style="color: rgb(0,128,0)"&gt;// Eat the exception &lt;/span&gt; System.Diagnostics.&lt;span style="color: rgb(0,128,128)"&gt;Debug&lt;/span&gt;.WriteLine(
ex.Message ); } &lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt; 
&lt;p&gt;
   How many times have you seen code like that?&amp;nbsp; Hell, sometimes I don't even see
   the Debug.WriteLine.&amp;nbsp; Sometimes they just eat the exception.&amp;nbsp; Exceptions
   aren't a bad thing.&amp;nbsp; In fact, having an exception occur is a good thing.&amp;nbsp;
   I still remember something my advisor said during a class talking about pointers at &lt;a href="http://www.msoe.edu"&gt;MSOE&lt;/a&gt;...
   "If you're &lt;em&gt;lucky&lt;/em&gt;, it will blow up."
&lt;/p&gt;
&lt;p&gt;
   The worst errors that can occur are the ones that don't have outward signs.&amp;nbsp;
   Perhaps you did some bad pointer arithmetic, but instead of throwing an exception
   because you illegally accessed memory, it simply reads that memory and a counter equals
   50 instead of 5.&amp;nbsp; Your program could appear to function perfectly, but will provide
   incorrect results.&amp;nbsp; Worse yet, when an symptom does finally appear... the symptom
   will so far away from the cause, that you may never find it.
&lt;/p&gt;
&lt;p&gt;
   Eating exceptions is about the closest you can come in .NET without trying really
   hard.&amp;nbsp; People are so afraid of seeing a box with that red X, that they eat them
   left and right without realizing that having an immediately failure that is easy to
   identify and fix is preferable to a bug that is impossible to track down.
&lt;/p&gt;
&lt;p&gt;
   Exceptions happen for a reason... and that reason should be taken seriously.&amp;nbsp;
   If you can write code to handle that exception in a catch block, then by all means
   do it.&amp;nbsp; But if your "exception handling" code simply boils down to logging it
   and continuing... do yourself a favor and rethrow that exception (or don't catch it
   at all) and put your program out of its' misery.&amp;nbsp; You'll thank me in the long
   run.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=f116fed3-3c7c-460e-988f-1538e4fa1413" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=f116fed3-3c7c-460e-988f-1538e4fa1413</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=2e83c7e6-ce40-4da7-82c3-c2c4bc4b287d</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=2e83c7e6-ce40-4da7-82c3-c2c4bc4b287d</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=2e83c7e6-ce40-4da7-82c3-c2c4bc4b287d</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=2e83c7e6-ce40-4da7-82c3-c2c4bc4b287d</wfw:commentRss>
      <title>Brrr... It's Cold In Here</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=2e83c7e6-ce40-4da7-82c3-c2c4bc4b287d</guid>
      <link>http://www.thecodingmonkey.net/2006/12/07/BrrrItsColdInHere.aspx</link>
      <pubDate>Thu, 07 Dec 2006 16:39:26 GMT</pubDate>
      <description>&lt;p&gt;
   Our code froze!&amp;nbsp; A lot of companies include some sort of code freeze process
   in their development process, but few truly honor the meaning, and instead simply
   use it as just another artificial milestone that they can celebrate.&amp;nbsp; But what
   exactly is &lt;em&gt;Code Freeze&lt;/em&gt;, and why is it useful?&amp;nbsp; At a very basic level,
   code freeze simply means that no more changes are allowed to be introduced into source
   control.&amp;nbsp; Generally this also means that all defects have either been fixed,
   or they have been reviewed and its been decided to either not fix them, or delay fixing
   until another release.&amp;nbsp; Usually the first build after code freeze is declared
   a &lt;em&gt;Release Candidate&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
   The one important part of the code freeze process, which many companies fail to implement
   is the shelf period.&amp;nbsp; If you freeze code, and then immediately release your software
   the next day, then code freeze is pretty meaningless.&amp;nbsp; I personally recommend
   at least a&amp;nbsp;one week shelf period after a release candidate (depending on the
   size and complexity of the application).&amp;nbsp; During this period of time, your developers
   and testers should continue testing and using the application.&amp;nbsp; Because nothing
   new is introduced into the code, this provides a period where everyone can feel confident
   that things are going well, and extra regression testing and user acceptance testing
   is performed.
&lt;/p&gt;
&lt;p&gt;
   Code freeze also signals an important change in the development process.&amp;nbsp; Before
   code freeze, defects are fixed at will by people, and changes can be introduced rapidly.&amp;nbsp;
   During code freeze, extra scrutiny is placed on any defects that are submitted, and
   generally only high priority defects are considered for fixing after a review process
   which includes the development lead, test lead, and project managers.&amp;nbsp; Defects
   that include changes to functionality should be flat out rejected, and only defects
   to already included functionality should be considered.&amp;nbsp; Also, any code changes
   that are made during the freeze must be associated with one of these defects, and
   must be reviewed by another developer on the team before it is to be included in another
   release candidate build.&amp;nbsp; Any changes made to the code that aren't related to
   the defect should be rejected by the reviewer.&amp;nbsp; I don't know how many times I've
   seen people try to sneak in changes during code freeze, just because they wanted to
   "clean up the code".&amp;nbsp; Now is not the time for those types of changes.&amp;nbsp; The
   reviewer should also verify that the change is safe, and that it actually fixes the
   defect.&amp;nbsp; The idea is not to introduce a new bug when trying to fix this one.
&lt;/p&gt;
&lt;p&gt;
   If multiple release candidates are created, it is up to project management whether
   the code freeze time will be extended.&amp;nbsp; This is generally done after examining
   the nature of the defect, and the also the size of the change, and how much code was
   effected.&amp;nbsp; If something as small as a spelling mistake is found, then code freeze
   would not be impacted.&amp;nbsp; However, if a generic library method is changed that
   is used by various parts of the application, then you'd want to extend the freeze
   to regression test the affected areas.
&lt;/p&gt;
&lt;p&gt;
   Remember, code freeze isn't just another meaningless milestone.&amp;nbsp; It should include
   process change, and should help to introduce confidence and stability to the software
   development process just prior to deployment.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=2e83c7e6-ce40-4da7-82c3-c2c4bc4b287d" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=2e83c7e6-ce40-4da7-82c3-c2c4bc4b287d</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=27e64578-3eea-476d-b533-3c16e74e24c9</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=27e64578-3eea-476d-b533-3c16e74e24c9</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=27e64578-3eea-476d-b533-3c16e74e24c9</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=27e64578-3eea-476d-b533-3c16e74e24c9</wfw:commentRss>
      <title>Use This Site!</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=27e64578-3eea-476d-b533-3c16e74e24c9</guid>
      <link>http://www.thecodingmonkey.net/2006/11/09/UseThisSite.aspx</link>
      <pubDate>Thu, 09 Nov 2006 15:46:24 GMT</pubDate>
      <description>&lt;p&gt;
   One of the most insanely useful blogs that I'm reading right now is &lt;a href="http://www.ajaxian.com/"&gt;Ajaxian&lt;/a&gt;.&amp;nbsp;
   I'm not even doing a ton of web or AJAX development right now, but the amount of insanely
   useful libraries and websites that this guy blogs about makes this site worth its
   weight in gold!&amp;nbsp; First add the Ajaxian feed to your aggregator, then read through
   all the archives.&amp;nbsp; I promise you won't regret it.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=27e64578-3eea-476d-b533-3c16e74e24c9" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=27e64578-3eea-476d-b533-3c16e74e24c9</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=8dad7575-1fbc-48a4-8022-0ef5b4fce229</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=8dad7575-1fbc-48a4-8022-0ef5b4fce229</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=8dad7575-1fbc-48a4-8022-0ef5b4fce229</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=8dad7575-1fbc-48a4-8022-0ef5b4fce229</wfw:commentRss>
      <title>Unknown Error</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=8dad7575-1fbc-48a4-8022-0ef5b4fce229</guid>
      <link>http://www.thecodingmonkey.net/2006/10/02/UnknownError.aspx</link>
      <pubDate>Mon, 02 Oct 2006 17:55:46 GMT</pubDate>
      <description>&lt;p&gt;
   I wonder how many companies exist out there where &lt;a href="http://realdebatewisconsin.blogspot.com/2006/09/error-error-error_30.html"&gt;this
   has happened to them&lt;/a&gt;:
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.thecodingmonkey.net/content/binary/UnknownError.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   Of course the reality is that the guy wasn't all that smart... he just thought out
   of the box so much, that he was unable to write intelligible or logical code, and
   didn't know enough English to write proper comments.&amp;nbsp; And when I say he didn't
   know enough English, I'm not saying he was an H1B from another country... there are
   plenty of locally grown computer geeks that have a problem mastering their own language
   as well.
&lt;/p&gt;
&lt;p&gt;
   Prior to interviewing at a company a long time ago I was given a test by a staffing
   firm in order to test my knowledge of C++, which at the time was my language of choice.&amp;nbsp;
   It was a timed test, and by the end of it I had a massive headache.&amp;nbsp; Each question
   was filled with code written so poorly, with so many uses of pointer indirection,
   and non-standard pointer dereferencing, that I almost screamed.&amp;nbsp; At the end of
   the test they gave me an opportunity to provide feedback, and I said something along
   the lines of:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
   To be honest, I hope I failed this test.&amp;nbsp; I would never want to work with anyone
   who passed this test, because that means that they write code like this often enough
   to be able to answer your questions correctly.&amp;nbsp; People who write code like this
   are not good programmers.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p dir=ltr&gt;
   It goes without saying that the staffing company didn't offer me a position, though
   I &lt;em&gt;barely&lt;/em&gt; passed the test.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=8dad7575-1fbc-48a4-8022-0ef5b4fce229" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=8dad7575-1fbc-48a4-8022-0ef5b4fce229</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=0d2e5d4d-b07a-4212-805d-a630f272f7f6</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=0d2e5d4d-b07a-4212-805d-a630f272f7f6</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=0d2e5d4d-b07a-4212-805d-a630f272f7f6</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=0d2e5d4d-b07a-4212-805d-a630f272f7f6</wfw:commentRss>
      <title>I Didn't Write That Code</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=0d2e5d4d-b07a-4212-805d-a630f272f7f6</guid>
      <link>http://www.thecodingmonkey.net/2006/08/01/IDidntWriteThatCode.aspx</link>
      <pubDate>Tue, 01 Aug 2006 15:40:17 GMT</pubDate>
      <description>&lt;p&gt;
   I review a lot of code during the week... it's one of the more interesting parts of
   my job.&amp;nbsp; It's amazing how certain patterns just sink into you brain after you
   review enough code.&amp;nbsp; Recently a coworker was in my cube asking about what a particular
   section of code was supposed to do.&amp;nbsp; We were looking at my monitor when the following
   conversation took place:
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;Coworker:&lt;/strong&gt;&amp;nbsp; What does this do?&lt;br&gt;
   &lt;strong&gt;Me:&lt;/strong&gt; Well you wrote it, why don't you tell me.&lt;br&gt;
   &lt;strong&gt;Coworker:&lt;/strong&gt;&amp;nbsp; I didn't write that code.&lt;br&gt;
   &lt;strong&gt;Me:&lt;/strong&gt;&amp;nbsp; Yeah, you did.&lt;br&gt;
   &lt;strong&gt;Coworker:&lt;/strong&gt;&amp;nbsp; I never change anything in that project.&amp;nbsp; You're
   the only one who works in there.&lt;br&gt;
   &lt;strong&gt;Me:&lt;/strong&gt;&amp;nbsp; Trust me.&amp;nbsp; I didn't write that code.&amp;nbsp; I would
   never write an If statement like that, and that's not how I write comments.&amp;nbsp;
   That looks like one of your If statements to me.&lt;br&gt;
   &lt;strong&gt;Coworker:&lt;/strong&gt;&amp;nbsp; What?&lt;br&gt;
   &lt;strong&gt;Me:&lt;/strong&gt;&amp;nbsp; Here, let's take a look at the Source Safe history log.
&lt;/p&gt;
&lt;p&gt;
   Sure enough... after just a few minutes in Source Safe, it was revealed that he added
   the code in question.&amp;nbsp; It's funny how easy it really is to pick out one person's
   code versus someone else's.&amp;nbsp; I can differentiate code written by pretty much
   everyone on my team just by looking at&amp;nbsp;a few lines.&amp;nbsp; People have different
   commenting styles, and different spacing conventions that they like to use.&amp;nbsp;
   People leave fingerprints in their code that they don't even realize.
&lt;/p&gt;
&lt;p&gt;
   So then we sat around for a few minutes and I showed him his fingerprints.&amp;nbsp; I
   showed him how his If statements were subtly different from mine, and how he comments
   differently.&amp;nbsp; I didn't do this to correct any flaws... because there weren't
   any.&amp;nbsp; It was simply a matter of coding style.&amp;nbsp; It is important to at least
   be able to recognize your own code though.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=0d2e5d4d-b07a-4212-805d-a630f272f7f6" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=0d2e5d4d-b07a-4212-805d-a630f272f7f6</comments>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.thecodingmonkey.net/Trackback.aspx?guid=d917e827-a616-4d56-b355-a11b9a2c593c</trackback:ping>
      <pingback:server>http://www.thecodingmonkey.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.thecodingmonkey.net/PermaLink.aspx?guid=d917e827-a616-4d56-b355-a11b9a2c593c</pingback:target>
      <dc:creator>nick@thecodingmonkey.net (Nick)</dc:creator>
      <wfw:comment>http://www.thecodingmonkey.net/CommentView.aspx?guid=d917e827-a616-4d56-b355-a11b9a2c593c</wfw:comment>
      <wfw:commentRss>http://www.thecodingmonkey.net/SyndicationService.asmx/GetEntryCommentsRss?guid=d917e827-a616-4d56-b355-a11b9a2c593c</wfw:commentRss>
      <title>Project Management Tip of the Day</title>
      <guid>http://www.thecodingmonkey.net/PermaLink.aspx?guid=d917e827-a616-4d56-b355-a11b9a2c593c</guid>
      <link>http://www.thecodingmonkey.net/2006/07/31/ProjectManagementTipOfTheDay.aspx</link>
      <pubDate>Mon, 31 Jul 2006 15:01:23 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;em&gt;Make your TODO's TODONE!&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
   I'm not actually a project manager, but I do share in some of those responsibilities
   on my current project, in so far as I'm considered the lead developer and architect.&amp;nbsp;
   One of things that I've learned over the years, and I try to push for&amp;nbsp;before
   every major release to production, is to have all the developers on the team go through&amp;nbsp;their
   code and&amp;nbsp;clean up TODO's.&amp;nbsp; Today was a perfect example why.
&lt;/p&gt;
&lt;p&gt;
   Right now we're working on a 2.0 release, which involves a lot of rewrite since the
   1.x branch.&amp;nbsp; However, we still have to support the 1.x branch which is in productions
   until we release 2.0.&amp;nbsp; Friday we got a call for a production problem, and we
   were able to narrow down the problem this morning.&amp;nbsp; When I found the offending
   code, there was a TODO which described the fix that needed to be made.&amp;nbsp; The defect
   was actually rather obscure, and I'm surprised it came up... but nonetheless... someone
   at some point in time anticipated this happening, and stuck a TODO in there which
   perfectly described what needed to be done to fix the defect.
&lt;/p&gt;
&lt;p&gt;
   Had that TODO been turned into a TODONE... this problem would never have occurred.&amp;nbsp;
   At some point in time prior to a release, you should always go through your code and
   try to get to a 0 TODO count.&amp;nbsp; Granted, this rarely happens in real life, but
   you should at least evaluate every TODO in your code to see if its really still an
   issue.&amp;nbsp; TODO's that are in code too long should also be noted in defect logs
   as well, so that they begin to elevate the chain of importance, and can be evaluated
   with other code changes that have to be made.
&lt;/p&gt;
&lt;p&gt;
   Finally, all TODO's should have initials next to them.&amp;nbsp; A one line TODO can often
   times be very vague, and so its helpful to be able to go back to the original offender
   and get more context from them as to why they put in the TODO.&amp;nbsp; Sadly, this particular
   TODO was nameless, although it was fairly descriptive.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.thecodingmonkey.net/aggbug.ashx?id=d917e827-a616-4d56-b355-a11b9a2c593c" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;a href="http://twitter.com/NickSchweitzer"&gt;Follow Me on Twitter&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;copy; Copyright 2010 Nick Schweitzer. This feed is for personal non-commercial use only. All other uses are strictly prohibited without express permission from the author. </description>
      <comments>http://www.thecodingmonkey.net/CommentView.aspx?guid=d917e827-a616-4d56-b355-a11b9a2c593c</comments>
      <category>Coding</category>
    </item>
  </channel>
</rss>