Click here to Skip to main content
15,888,143 members
Home / Discussions / C#
   

C#

 
GeneralRe: Stack Trace incorrect in release mode Pin
Martin Jarvis12-Apr-10 23:51
Martin Jarvis12-Apr-10 23:51 
AnswerRe: Stack Trace incorrect in release mode Pin
Paulo Zemek13-Apr-10 9:01
mvaPaulo Zemek13-Apr-10 9:01 
QuestionFile Convert Pin
mjawadkhatri12-Apr-10 20:19
mjawadkhatri12-Apr-10 20:19 
AnswerRe: File Convert Pin
Dave Kreskowiak13-Apr-10 2:07
mveDave Kreskowiak13-Apr-10 2:07 
QuestionIs not Test Driven Development an Oxymoron or just for Algorithms ? Pin
Nadia Monalisa12-Apr-10 19:59
Nadia Monalisa12-Apr-10 19:59 
AnswerRe: Is not Test Driven Development an Oxymoron or just for Algorithms ? Pin
Martin Jarvis12-Apr-10 21:04
Martin Jarvis12-Apr-10 21:04 
GeneralRe: Is not Test Driven Development an Oxymoron or just for Algorithms ? Pin
Nadia Monalisa12-Apr-10 21:12
Nadia Monalisa12-Apr-10 21:12 
AnswerRe: Is not Test Driven Development an Oxymoron or just for Algorithms ? PinPopular
Pete O'Hanlon13-Apr-10 1:37
mvePete O'Hanlon13-Apr-10 1:37 
This really isn't the forum to post this question because it's more about your architecture and development process rather than C# itself. However, having said that, I'll attempt to answer some of your points.

The reason that you tend not to test private methods is because there should be no way to reach those methods other than through a public method; if somebody uses reflection to get to a method you intended to hide then really, it's their own lookout if things don't work the way they expect. The key point here, is that you test the public methods in such a way that you cover the private methods. If a private method cannot be reached, then you have code that cannot be executed - this is why code coverage is an important guideline in TDD.

TDD is not a be all/end all. If you write layered applications, TDD tends to be a reasonable fit; it's not perfect because you can fall into the trap of writing code to pass tests rather than writing code to satisfy a problem. As your development progresses, you find that you drop code that you wrote to simulate database access in favour of real database access (for instance). Where TDD really helps, is in asking you to think in terms of SOLID development - you can develop monolithic methods, but TDD tends to discourage this, and the idea that you can instantly tell if your code still runs when you change it. This, really helps once a project has gone live, as people move off the development into other areas - any changes can be instantly tested.

The important thing to remember is that TDD is not a magic bullet. Use it/don't use it. The important thing to rememember is that it's a tool available to you, and you should ignore it if it doesn't fit the problem.

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



GeneralRe: Is not Test Driven Development an Oxymoron or just for Algorithms ? Pin
Nadia Monalisa13-Apr-10 1:47
Nadia Monalisa13-Apr-10 1:47 
GeneralRe: Is not Test Driven Development an Oxymoron or just for Algorithms ? Pin
Pete O'Hanlon13-Apr-10 1:53
mvePete O'Hanlon13-Apr-10 1:53 
Questionhosting control in grid cell Pin
Member 59031012-Apr-10 19:31
Member 59031012-Apr-10 19:31 
AnswerRe: hosting control in grid cell Pin
Abhinav S12-Apr-10 19:50
Abhinav S12-Apr-10 19:50 
Questiondraw / rectangle / bounds Pin
xilefxilef12-Apr-10 12:32
xilefxilef12-Apr-10 12:32 
AnswerRe: draw / rectangle / bounds Pin
Luc Pattyn12-Apr-10 12:43
sitebuilderLuc Pattyn12-Apr-10 12:43 
GeneralRe: draw / rectangle / bounds Pin
AspDotNetDev12-Apr-10 13:48
protectorAspDotNetDev12-Apr-10 13:48 
AnswerRe: draw / rectangle / bounds Pin
DaveyM6912-Apr-10 14:51
professionalDaveyM6912-Apr-10 14:51 
Question3rd party pre-built user security for c# application Pin
jaydelg12-Apr-10 11:56
jaydelg12-Apr-10 11:56 
AnswerRe: 3rd party pre-built user security for c# application Pin
Eddy Vluggen12-Apr-10 13:18
professionalEddy Vluggen12-Apr-10 13:18 
GeneralRe: 3rd party pre-built user security for c# application Pin
jaydelg12-Apr-10 15:46
jaydelg12-Apr-10 15:46 
QuestionRemoving leading zeros from negative string Pin
mprice21412-Apr-10 10:00
mprice21412-Apr-10 10:00 
AnswerRe: Removing leading zeros from negative string Pin
Dave Kreskowiak12-Apr-10 10:01
mveDave Kreskowiak12-Apr-10 10:01 
GeneralRe: Removing leading zeros from negative string Pin
mprice21412-Apr-10 10:38
mprice21412-Apr-10 10:38 
GeneralRe: Removing leading zeros from negative string Pin
AspDotNetDev12-Apr-10 11:51
protectorAspDotNetDev12-Apr-10 11:51 
GeneralRe: Removing leading zeros from negative string Pin
Ravi Bhavnani12-Apr-10 19:14
professionalRavi Bhavnani12-Apr-10 19:14 
AnswerRe: Removing leading zeros from negative string Pin
Luc Pattyn12-Apr-10 10:09
sitebuilderLuc Pattyn12-Apr-10 10:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.