Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

.net - Should I Use TDD?

I'm the only developer in my (very small) company and I'm about to start on a medium sized ASP.NET web application for said company.

I'm trying to figure out if I should learn Test Driven Development (TDD) and implement it in this application.

I need to start developing our new application shortly and I'm worried about testing. I've programmed for many years but have never done any unit testing.

I've read numerous online resources regarding TDD but I'm unsure whether I'll have a 'good enough' grasp on it to make it effective in the application.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It depends on where your priorities lie. If you're interested in furthering yourself as a developer, TDD is definitely worth looking into if only for the experience. It'll help you rethink the way you code and probably make you a better developer because of it.

But that could easily be outweighed by how much TDD hampers your ability to get your product out in a timely manner. You mentioned that you're the only developer working at this company and that means that the pressure is on you to get your project done. TDD is certainly a great practice, but sometimes real life constraints and practicality must come first.

So in short, if you can spare the time then yes, use TDD. It's actually not that much overhead and you can always skip the testing in a pinch. But if you're really strapped for time and don't think you'll be able to incorporate it without putting your product and job at risk, nobody would fault you for skipping it. The purists will disagree, but it's not a black and white world and sometimes compromises must be made to get things done.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...