tags:

views:

343

answers:

18

If you had to choose one tool, other than Visual Studio, that helps you write better code, which would it be?

ReSharper, nDepend, nUnit, other?

+1  A: 

ReSharper helps me write neat code, but I would hate to have to live without ViEmu.

Brian Rasmussen
+1 for ViEmu. Very cool tool
eu-ge-ne
A: 

My conscience!

Cerebrus
A: 

Consider http://www.icsharpcode.net/OpenSource/SD/ as well...

Alex Martelli
A: 

A good RSS-reader. I think that no tool (in the traditional sense) has helped me improve my code quality nearly as much as Google Reader paired up with a some good RSS feeds.

Fredrik Mörk
A: 

FxCop. Hands down forces me to fix the things that really matter to the people who will use my code.

Reed Copsey
+12  A: 

One tool = ReSharper!

tanascius
Faster writing code but not having any unit tests? Hm. I would choose unit tests first.
Stefan Steinegger
I've learned tons just from using Resharper. It is also the only tool besides VS that I would not want to code without.
Hermann
An I would never dare to write any code without tests anymore.
Stefan Steinegger
Yes, of course - I use lots of other tools, too (including nunit). But most valuable is in my opinion ReSharper. It is not only about writing faster code, but all the cleanup and codestyle features, too. NUnit can be replaced by other tools - but ReSharper has a unique featureset.
tanascius
Really hard to name one tool, but that was also the intent with the question. You can also extend ReSharper with even more code analysis by installing http://www.codeplex.com/StyleCopForReSharper/.
Jimmy
+4  A: 

For a better, nicer, and more standard code, the answer will be FxCop.

Moayad Mardini
Or use Gendarme (open source FxCop alternative)
Nathan Koop
Love it! Microsoft Visual Studio 2005 and Visual Studio 2008 Team System Development Editions both include a "Code Analysis" feature based on FxCop.
DOK
+2  A: 

If you consider a book a tool, here you go. I've been reading a really good book from the guys that built the .NET framework. Not done, but it's a good read.

Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries, http://www.chapters.indigo.ca/books/Framework-Design-Guidelines-Conventions-Idioms-Krzysztof-Cwalina-Brad-Abrams/9780321545619-item.html?ref=Search+Books%3a+%2527Brad+Abrams%2527

nickyt
+1, A great recommendation!
Moayad Mardini
A: 

A good non software tool would be code review.

Klinger
+1  A: 

I'm going to say "a run-time profiler": because there are alternatives to the other suggestions (you can write unit tests without nUnit, refactor without ReSharper, follow coding convetions without FxCop), but when you need to improve the performance of some code there's nothing like having a 3rd-party run-time profiler.

ChrisW
+1  A: 

I'm glad that I don't have to choose from only one tool.

But if I had, I would say that unit tests are most important. What is not covered by other tools, could be proven by unit tests.

What does resharper or FxCop help if you don't have any unit tests?

Stefan Steinegger
+4  A: 

You can find 13 answers to a similar question here: An ASP.NET Developers Toolset

and 114 answers here to the question "Essential Programming Tools", many of which are useful for .Net developers

DOK
Thanks, I saw those but wasn't really after a long list of tools. I thought it would be interesting to see what everybody answered when they only could choose one tool. It's not just the tool that is important but also what practise that produces better code. Refactoring, unit testing and so on.
Jimmy
A: 

The best tool at your disposal is your brain.

Read other people's code & ideas (e.g. CodeProject, Stack Overflow). You'll learn far more from other people's mistakes and their flashes of brilliance than anything else. If you focus on your own code, you will continue to make (and not see) the same mistakes, and will improve much more slowly.

Then read your own code. If you can look at your code after 2 weeks and think that it's good, then you're not learning.

(If you need a software tool as an answer to this question, then: "the internet". Expose yourself to other people's ideas, as even the bad ones will teach you something)

Jason Williams
A: 

xUnit (with Moq) is definitely my favorite tool

eu-ge-ne
A: 

A brain...

AWC
+2  A: 

I use think that it was resharper, but my new can't live without tool is PEX. Really forces you to make sure that your methods are solid - if you haven't tried it, you'll be surprised at the number of potential "gotchas" it can help you find.

+1  A: 

I've tried Resharper trials twice and it's good, but I've gotten used to DevExpress' Refactor Pro! and CodeRush... great tools. And the DxCore allows you to write plugins for VS.NET a lot more easily for tasks that could also speed up development and or write better code.

nickyt