How To: Get Your ASP.NET Questions Answered Fast

Ever run into one of those really tough technical problems at work?  The type of problem that persists through hours of googling.  The kind that remains unsolved even after downloading numerous CodeProject samples?  I think every developer has been there one time or another.  It comes with the territory, but there is a solution: Microsoft's MSDN Forum Website

The MSDN Forums are patrolled around the clock by some of the most talented technical people in the industry.  If anyone is going to be able to help you solve your problem, it is one of these people.  The trick is that you need to craft your question in such a manner that it is appealing to answer.  If want your question answered first you need to make it stand out.  What makes a post attractive to other developers?  CODE SAMPLES!  Shame on you if you answered that incorrectly. 

At some level, forum threads are similar to the typical defect ticket that sits in your defect tracking database.  The thread's author is describing some problem they are having with a piece of software.  The thread has a title, description and sometimes a stacktrace or other additional information.  Over time other developers append comments with what they think the problem might be.  Eventually someone identifies what the issue is and the thread is marked as answered.  Defects follow a similar path as they travel through the typical defect tracking system.  I believe some of the same principle's apply to formulating good forum posts that apply to logging a defect.  It boils down to three main points:

  1. Include A Concise Title and Description
  2. Include A Runnable Code Sample
  3. Include Steps to Reproduce the Problem

Include A Concise Title and Description

This is pretty self explanatory, the only thing I would like to mention here is to try to keep your title accurate.  The title is the first thing forum browsers will see and you don't want to scare them away by over generalizing the problem (i.e. 'UpdatePanel Doesn't Work') or inaccurately summarizing it.  Try to keep the title to a brief description of what you believe the issue is.  Include the names of the components that are involved as those are good keywords.   

Include a Runnable Code Sample

As a developer, the first thing I do when I am assigned a defect is to reproduce the problem on my local PC.  I need to see the bug in action before I can begin to solve the problem.  Not being able to reproduce the issue means that I am only able to guess about what the issue might be.  This is often what you see in forum postings - the entry contains a description of the problem and possibly a fragment of code.  Then the next thread entry is someone asking if you tried this or that and 'would you post the complete code sample?'.  Posting the code is good, but including a link to a location from where people can download a runnable sample is even better.  

If you don't have access to an ftp or website that you can use to upload your samples to, you can use Windows Live SkyDrive to host your files for free.  SkyDrive includes an option to allow files and folders to be shared publicly which is exactly what we need.  If you already have a Windows Live account it takes less than 5 minutes to setup SkyDrive.  Here is the SkyDrive URL to my public folder

http://cid-c6d297221472d313.skydrive.live.com/browse.aspx/Public

Next, you will need to create a sample project that reproduces the problem you are experiencing.  You should make a special effort to create the sample that contains the absolute minimum number of dependencies.  This is important, you want it to work for everyone.  Don't use Visual Studio, create the sample in Visual Web Developer instead.  Don't use a database for your datasource, use an xml file instead.  If you absolutely need to use a database, use one that everyone has access to; both Northwind and pubs are good examples.  Unless your problem is related to styling or look and feel, keep this to a minimum and concentrate on the functionality.  You want to make sure that your example is simple and portable as possible and that other people can download and run it with minimum effort.

I have an existing website that I use as my template.  I removed the dependency on a database by extracting the rows from the Northwind..Customers table into an xml file.  I have created a CustomersDataObject class that sits on top of this xml file and supports the the standard CRUD operations.  You can download this sample website here.  It completely bare-bones, but because it already includes a working DataSource it makes a great starting point.

 

Include Steps to Reproduce the Problem

Finally, you will need to include the steps that can be followed to create the problem.  Usually this works best if it takes the form of a bulleted list.  Make sure you start from the begriming and take the user through the exact sequence of steps that are required to reproduce the problem.  The repro steps provide the forum users with a map of how to find the bug.  The clearer you can make these, the better off you are.  Also, make sure to not leave out any steps.  Even if it may seem something is obvious to you, it might not be to everyone else.  Here is a quick example of good Repro Steps:

  1. Open the Default.aspx webpage in FireFox
  2. Enter 'ALFKI_ALFKI' into the textbox next to the 'Customer ID' label
  3. Click the 'Search' button
    1. ERROR: The GridView does not display the Header or Footer rows.  Even when no data is present is would still expect the GridView to display the Header and Footer rows

 

That's It. Enjoy!


TrackBack

TrackBack URL for this entry:
http://mattberseth.com/blog-mt/mt-tb.fcgi/56

Comments


Posted by: Timo on August 14, 2007 12:00 AM

I have completely ignored MSDN forums, but have to take another look. However Live SkyDrive is not yet available in my region (tried to register) so I have to find another place for online storage for now.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)