Adding Static Code Analysis To Team System/TFS#

So I have this problem.

If someone declares:

Public iProductId as Integer

then I want to be notified.  But if someone declares:

Protected WithEvents txtUserName as Textbox

I don't want to be bothered.

Every control declaration we have throws an error in the static code analysis tools.

So after asking around, I guess it is not possible to cusomize the existing rules to exclude common prefixes such as lbl, txt, cmd etc.

So apparently the only option left is to disable those rules and create my own. 

So here are a few links that deal with creating custom links.

MSDN

Kevin Castle

FxCop Team

 

Categories:  |  | 
Monday, June 11, 2007 12:48:08 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Roger Waters: Dark Side Of The Moon Live#

So last nigth was the Dark Side of the Moon Live concert and it was really cool to see.

I started to really like Pink Floyd in college, which of course was after they had been broken up for years.

So even though Dark Side was one of my all time favorite CDs, I figured I woudl never have an opportunity to see it performed.

It was really cool to see this!

During the last 2 tracks, a rotating pirzm composed of lasers appeard above the crowd. 

Then for the last track, the fired a spotlight out of one side of it, and a colored laser spectrum out of the other.

In other words, they created a 3D rotating version of the logo seen above. 

It was amazing!  Now I have to decide if I want to go up to Wisconsin and see the show again in a month.

 

Categories:  | 
Sunday, June 10, 2007 12:47:46 PM (Central Standard Time, UTC-06:00) #    Comments [1]  | 

 

Team Foundation Server Power Tool and Forums#

MS has released a power tool for TFS, and here are the MS hosted forums:

Team Foundation Server - General
Discuss Team Foundation Server general concepts.

Team Foundation Server - Setup
Discuss Team Foundation Server setup and configuration.

Team Foundation Server - Administration
Discuss Team Foundation Server administration and operations.

Team Foundation Server - Version Control
Discuss Team Foundation Version Control, including branching, merging, and shelving.

Team Foundation Server - Work Item Tracking
Discuss Team Foundation Work Item Tracking, including work item customization and Office integration.

Team Foundation Server - Reporting
Discuss Team Foundation Reporting, which uses SQL Server 2005 Reporting services to report team project metrics.

Team Foundation Server - Build Automation
Discuss Team Foundation Server's build automation features.

Team Foundation Server - Process Templates
Discuss Team Foundation Server process template development and customization.

Categories:  | 
Friday, June 08, 2007 4:19:26 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Uploading files with Silverlight#

Brad Abrams has a post on a photo viewer app written for Silverlight that has fileupload ability.

I would be interested to see how that is done, and what the UI is like.

Categories:  | 
Thursday, June 07, 2007 9:10:04 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Running VSSConverter Against SQL Server 2005#

The VSSConverter tool which allows you to convert from VSS to TFS will attempt to utilize a local version of SQL Express.

This sucks, as I hate SQL Express.

After some searching/trials/errors, I found a way to get it to work against a SQL Server 2005 database.

Just add the SQL tag to your migration settings xml file like so:

<Source name="VSS">

      <VSSDatabase name="D:\Program Files\Microsoft Visual SourceSafe\VSSHttp"></VSSDatabase>

      <UserMap name="D:\VSS2TeamFoundation\Usermap.xml"></UserMap>

      <SQL Server="name_of_your_SQL_Server" />

</Source>

Categories:  |  | 
Thursday, June 07, 2007 1:26:49 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Speeding Up Visual Studio#

I would love to speed up VS, and maybe get it to stop crashing, but in the short term, maybe some of these items can help speed it up.

Categories:  | 
Thursday, June 07, 2007 6:55:41 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Microsoft P&P Software Factories#

I didn't notice that the Microsoft P&P team has released something they call "Software Factories" which are supposed to guide the developer in building different apps using best practices (at least that is what I think they do from the descriptions).

Specifically I am interested in the Web Client Software Factory:

... provides an integrated set of guidance that assists architects and developers in creating composite Web applications and page flow client applications.

These applications have one or more of the following characteristics:

  • They have complex page flows and workflows.
  • They are developed by multiple collaborating development teams.
  • They are composite applications that present information from multiple sources through an integrated user interface.
  • They support XCopy deployment of independently developed modules.
  • They support online business transaction processing Web sites.

 

and the Web Service Software Factory, which as they put it is:

... an integrated collection of tools, patterns, source code and prescriptive guidance. It is designed to help you quickly and consistently construct Web services that adhere to well known architecture and design patterns.

The package covers:

  • Designing ASMX and WCF messages and service interfaces.
  • Applying exception shielding and exception handling.
  • Designing business entities in the domain model.
  • Translating messages to and from business entities.
  • Designing, building, and invoking the data access layer.
  • Validating the conformance of service implementation, configuration, and security using code analysis.
  • Planning for the migration to WCF.
  • Applying security to WCF services.
  • Applying message validation.
  • Categories:  |  |  | 
    Tuesday, June 05, 2007 10:59:00 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    TechEd WebCasts / Virtual Labs#

    TechEd is going on right now.

    They have some webcasts, both on demand and live, as well as some virtual labs.

    Categories:  | 
    Monday, June 04, 2007 2:08:32 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    Garage Floor Tiles#

    I am thinking of getting some flooring for my garage. 

    These seem to be the places that sell them:

    http://www.racedeck.com

    http://www.swisstrax.com/

    http://www.locktile-usa.com/

    http://www.jnkproducts.com

    http://www.garagefloor.com/

     

    Categories:
    Sunday, June 03, 2007 3:09:39 PM (Central Standard Time, UTC-06:00) #    Comments [2]  | 

     

    Nice NUnitASP writeup.#

    Over at TheServerSide they had a nice writeup of an example of how to use NUnitASP to test the UI of some pages.

    I am not sure how valuable this would be to invest my time in, espically as it seems that there is now way to test repeaters or gridviews (there is a datagridtester however).

    I will have to look some more and see if ther eis a way to do this.

    Categories:  |  |  | 
    Sunday, June 03, 2007 2:48:28 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    Refactor! for ASP.NET#

    This looks really cool. 

    You can download it here for free.

    Included Refactorings

    Add Validator
    Create Overload
    Encapsulate Field
    Extract ContentPlaceHolder
    Extract ContentPlaceHolder (create master page)
    Extract Method
    Extract Property
    Extract Style (Class)
    Extract Style (id)
    Extract to User Control
    Flatten Conditional
    Inline Temp
    Introduce Constant
    Introduce Local
    Introduce Local (replace all)
    Move Declaration Near Reference
    Move Initialization to Declaration
    Move Style Attributes to CSS
    Move to Code-behind
    Rename
    Reorder Parameters
    Replace Temp with Query
    Reverse Conditional
    Safe Rename
    Simplify Expression
    Split Initialization from Declaration
    Split Temporary Variable
    Surround with Update Panel
     

    UPDATE:  It seems that installing this may have removed some of the features of the old Refactor! that I was frequently using (?).  I used to use the "Surround With-->Region" all the time.  Now that is gone.  I will have to investigate.

    Categories:  |  |  | 
    Friday, June 01, 2007 8:57:43 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    The "Microsoft Crossroads"?#

    Sam Gentile thinks that MS is at a crossroads in terms of web development.

    He thinks with all the cool, free, cutting edgs stuff out there, like Ruby on Rails, MS may soon lose out on all the "alpha geeks", who move on to newer and better things while MS stays locked in the past.

    I'm not ready to crown RoR the winner of anything yet.  True, MS is usually not on the cutting edge, but they usually do a pretty good job adopting good ideas.  There are only a handful of serious RoR sites out there.  If that number grows a ton, then it will mean something. 

    Martin Fowler has some similar concerns though, so maybe this will come to fruition.

    Categories:  |  | 
    Thursday, May 31, 2007 8:15:46 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    Software Development and TDD Anti-Patterns#

    This is awesome!

    Wikipedia has a whole list of programming anti-patterns, and James Carr lists some TDD anti-patterns.

    Some of these are pretty funny:

    Magic numbers: Including unexplained numbers in algorithms

    Superboolean logic: unnecessary comparison or abstraction of boolean arithmetic

    Boat anchor: Retaining a part of a system that no longer has any use

    Categories:  |  | 
    Tuesday, May 29, 2007 10:14:43 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    Unit testing data access #

    Roy Osherove blogs that he was mistaken when he suggesting using mocks for data access code.  With the improved Rollback attributes that he helped create, along with people like Justin Burtch who created a similar attribute for VSTS, they are now thinking that this is the way to go: rolling back database changes.

    Roy is no fan of VSTS testing, finding a few bugs and some questionable design decisions.  Those don't seem like deal breakers for me, but we will see.

    Categories:  |  |  |  | 
    Tuesday, May 29, 2007 8:48:11 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    BindingListView#

    The BindingList is very nice, but doens't support some things like sort and filter that a lot of people would like to have (see here for a short discussion on BindingList vs Datatable).

    This project, in sourceforge, called BindingListView is supposed to allow you to get a sorted or filtered "view" of a bindinglist.

    Might be worth checking out.

    Categories:  |  | 
    Tuesday, May 29, 2007 8:19:00 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    Upgrading from TFS Workgroup to Standard#

    Here is an article from MS on how to od the upgrade.

    Thankfully, it is a very easy process.

    Categories:  | 
    Tuesday, May 29, 2007 9:26:20 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    Asp.net Label vs Literal#

    It looks like I have fallen victim to an asp.net no-no.

    I have always used a label in my forms when I want to have some text that is updated by the code behind.  Turns out that I should probably be using literals.

    Even more, I didn't even realize that the label object allows you to specify a text element that will gain focus when the label is clicked.  Nice.

    Categories:  |  | 
    Monday, May 28, 2007 1:49:53 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    Polymorphic podcast#

    This site looks really interesting.  They seem to have loads of video content, interviews and examples.

    The one that got me looking at the site was their video on MVC/MVP pattern.

    http://polymorphicpodcast.com/shows/mv-patterns/

    I will be checking this out.

    Categories:  | 
    Monday, May 28, 2007 1:41:58 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    Rhino Mocks#

    Rhino Mocks seems to be one of the most preferred mock frameworks out there.

    Phil Haack, CodeBetter and Markitup have article showing how to test events on interfaces (x2) and objects in Rhino Mocks respectively.

    They even have some videos up showing some Rhino Mocks stuff.

    Haack also has a nice example of using MVP and Rhino Mocks to test some asp.net pages.

    Categories:  |  |  | 
    Monday, May 28, 2007 1:33:20 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

     

    Simulating HttpContext #
    Update: Phil Haack has updated his HttpContext Simulator with some new goodies.

    Here is an article by Haacked showing how one can create a test friendly httpcontext.

    I modified his example some and started using it in some tests; works very nice!

    Here is another implementation based on Haack's example that is supposed to also work with session.

    I almost NEVER use session if I can avoid it, but still this could come in handy.

    Categories:  | 
    Monday, May 28, 2007 1:23:03 PM (Central Standard Time, UTC-06:00) #    Comments [4]  | 

     

    All content © 2009, Christopher May, Inc
    Open Job Positions
    On this page