Click here to Skip to main content
15,894,180 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: Sharepoint? Pin
rnbergren24-Oct-16 5:46
rnbergren24-Oct-16 5:46 
AnswerRe: Sharepoint? Pin
Idaho Edokpayi24-Oct-16 6:58
Idaho Edokpayi24-Oct-16 6:58 
AnswerRe: Sharepoint? Pin
Snorri Kristjansson24-Oct-16 7:00
professionalSnorri Kristjansson24-Oct-16 7:00 
AnswerRe: Sharepoint? Pin
Gerry Schmitz24-Oct-16 7:23
mveGerry Schmitz24-Oct-16 7:23 
AnswerRe: Sharepoint? Pin
Дмитрий Блинков25-Oct-16 20:57
Дмитрий Блинков25-Oct-16 20:57 
QuestionUnit Testing/TDD Help Pin
TheOnlyRealTodd21-Oct-16 12:42
professionalTheOnlyRealTodd21-Oct-16 12:42 
AnswerRe: Unit Testing/TDD Help Pin
Eddy Vluggen21-Oct-16 13:02
professionalEddy Vluggen21-Oct-16 13:02 
AnswerRe: Unit Testing/TDD Help PinPopular
Marc Clifton21-Oct-16 14:31
mvaMarc Clifton21-Oct-16 14:31 
TheOnlyRealTodd wrote:
and I'm finding strange, inconsistent, and bizarre things happening in my thought processes and code in some ways as well. Is this pretty normal when you first try to learn TDD?


Yes. TDD is for the birds, but even they didn't first write tests to figure out if wings could support them, and then developed their wings.

In other words, TDD is ridiculous, because it requires that you write code to test something you haven't written yet.

The mindset for writing tests is orthogonal to writing the code you are going to test. When you do the latter, you're thinking about abstraction, decoupling, performance, optimal structures, and, here's the clincher, you're thinking about how to structure the code so it can be tested.

When you're writing the tests, you're thinking about edge cases, parameter validation, exceptions trapping, whether the business logic is correct, and here's the clincher, you're thinking about how to ensure that all code paths are actually exercised.

Now I ask you, how can you test that all code paths are actually tested when you haven't written the code?!?!?!

So of course TDD is a mind f***. It's a different process, and it's usually a BAD process. Of course there are cases where you can write the tests first, but certainly in my experience, anything other than a very isolated piece of business logic, it doesn't make sense. The main result of TDD ends up being that you've written a bunch of useless tests, and even worse, you've written code to meet the structure imposed by the test. That might work fine for play languages, but is usually a bad idea for professional languages. (I'll leave the reader to figure out what I mean by play vs. professional.)

So what should TDD be then, you might ask? Well, it should be a concept of what needs to be tested - is it algorithm correctness, is it performance, is it multithreaded support, is it worth testing? Then write the code with the idea in mind of what you are wanting to test, so that the code is testable, then write the tests.

We'll let the voters decide whether they agree or not. And if they don't, well, the voting is rigged!!! Smile | :)

(Oh, and great question BTW. I love a good opportunity to emote on the idiotic ideas this industry has created.)

Marc
Imperative to Functional Programming Succinctly

Contributors Wanted for Higher Order Programming Project!

Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny


modified 21-Oct-16 20:41pm.

GeneralRe: Unit Testing/TDD Help Pin
Mark_Wallace21-Oct-16 21:02
Mark_Wallace21-Oct-16 21:02 
GeneralRe: Unit Testing/TDD Help Pin
Marc Clifton22-Oct-16 3:49
mvaMarc Clifton22-Oct-16 3:49 
AnswerRe: Unit Testing/TDD Help Pin
Sander Rossel22-Oct-16 2:01
professionalSander Rossel22-Oct-16 2:01 
AnswerRe: Unit Testing/TDD Help Pin
AndrewDavie24-Oct-16 5:01
AndrewDavie24-Oct-16 5:01 
GeneralWas Checking Out Github: Then It Was gone - DDoS Pin
raddevus21-Oct-16 9:59
mvaraddevus21-Oct-16 9:59 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
Vincent Maverick Durano21-Oct-16 10:05
professionalVincent Maverick Durano21-Oct-16 10:05 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
Mark_Wallace21-Oct-16 10:16
Mark_Wallace21-Oct-16 10:16 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
Afzaal Ahmad Zeeshan21-Oct-16 10:21
professionalAfzaal Ahmad Zeeshan21-Oct-16 10:21 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
Mark_Wallace21-Oct-16 11:13
Mark_Wallace21-Oct-16 11:13 
JokeRe: Was Checking Out Github: Then It Was gone - DDoS Pin
Afzaal Ahmad Zeeshan21-Oct-16 11:14
professionalAfzaal Ahmad Zeeshan21-Oct-16 11:14 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
Mark_Wallace21-Oct-16 11:28
Mark_Wallace21-Oct-16 11:28 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
raddevus21-Oct-16 10:33
mvaraddevus21-Oct-16 10:33 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
Vincent Maverick Durano21-Oct-16 10:35
professionalVincent Maverick Durano21-Oct-16 10:35 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
Afzaal Ahmad Zeeshan21-Oct-16 10:20
professionalAfzaal Ahmad Zeeshan21-Oct-16 10:20 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
Ryan Peden21-Oct-16 10:27
professionalRyan Peden21-Oct-16 10:27 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
raddevus21-Oct-16 10:32
mvaraddevus21-Oct-16 10:32 
GeneralRe: Was Checking Out Github: Then It Was gone - DDoS Pin
Nish Nishant21-Oct-16 11:27
sitebuilderNish Nishant21-Oct-16 11:27 

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.