I think that's a great idea. Off the top of my head, I came up with a small list of best practices that I try to use on my projects, including some of my favorite agile development practices. Here's what I came up with:
Programming
- Using XML comments to document your code
- Using a tool like Sandcastle to turn XML comments into HTML help (update: Sandcastle tutorial)
- Refactoring mercilessly
- Passing interfaces instead directly referencing concrete objects
- Paying attention to encapsulation (like exposing IEnumerable<T> instead of specific collections like List<T> or arrays)
- Object oriented analysis and design
- Always using a "using" statement with IDisposable
- Using a profiler like dotTrace to manage memory footprint or performance
Improving Code Quality
- Using static code analysis tools like FXCop
- Hold code reviews often (here are some code review best practices)
- Using unit test frameworks like MSTest and NUnit
- Doing test-driven development
- Using integration test frameworks like FitNesse
- Automating your build with tools like TFS build automation or Ant
- Doing continuous integration with tools like Team Foundation Build or CruiseControl.NET
Running Projects
- Using a version control system like TFS version control or Subversion
- Using an issue tracking system like TFS's work item tracking or JIRA
- Using user stories to keep track of your users' needs
- Use a task board to track your project's progress
- Publishing your assemblies to a dependency manager like Ivy
Another interesting take on best practices is to look at the opposite. Have a look at this previous forum post on C# worst practices and nasty bugs.
What do you guys think? Do you do any of these? What other practices can you think of? Do you have questions about any of these in particular that you want to open up to the forum?












