Click here to Skip to main content
15,899,937 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.

 
GeneralRe: Curiosity Pin
CPallini10-Jun-14 4:53
mveCPallini10-Jun-14 4:53 
GeneralRe: Curiosity Pin
chriselst9-Jun-14 22:49
professionalchriselst9-Jun-14 22:49 
GeneralRe: Curiosity Pin
Tim Carmichael10-Jun-14 2:22
Tim Carmichael10-Jun-14 2:22 
GeneralRe: Curiosity Pin
Karen Mitchelle10-Jun-14 15:20
professionalKaren Mitchelle10-Jun-14 15:20 
GeneralRe: Curiosity Pin
hairy_hats10-Jun-14 3:55
hairy_hats10-Jun-14 3:55 
GeneralRe: Curiosity Pin
harold aptroot11-Jun-14 20:33
harold aptroot11-Jun-14 20:33 
QuestionTDD vs. just being careful Pin
Mat Fergusson9-Jun-14 11:42
Mat Fergusson9-Jun-14 11:42 
AnswerRe: TDD vs. just being careful Pin
Marc Clifton9-Jun-14 12:25
mvaMarc Clifton9-Jun-14 12:25 
Mat Fergusson wrote:
What is so wrong with actually thinking hard about what it is you are being asked to do, working out the best way to achieve it and then carefully implementing it properly?


Because it flies in the face of that horrible phrase I hear once in a while "breadth vs. depth". I was turned down from a job opportunity because I was seen as a "depth" person rather than a go-go-go we need as much surface area covered as possible. In fact, as soon as they said "we approach development in a breadth before depth manner" I knew I was doomed.

Thinking hard? What's that? Oh, you mean it's something you do to avoid code like this (I kid you not, as discovered when we were looking through the code baseSmile | :)

LogFieldChange(oldField, newField)
...
def LogFieldChange(newField, oldField)
...


And you know what? They knew about that piece of code, they even had a ticket tracking it, and it was at least 6 months old! But no, that would require "depth" to fix.

Even worse, they had a serious bug manifest because of it in the production version, and instead of fixing the root cause, they simply fixed the caller to reverse the parameters, so that it was now out of sync with the function declaration. Oooh, that just gets me.

Ironically, when actually working with TDD, I find that it often takes hard thinking to get the code formed in a way that makes it suitable for TDD, and sometimes requires a certain amount of "hoopage." It also no replacement for integration testing, and the project I was interviewing for had a huge suite of unit tests, TDD tests, and Javascript tests, which became an unwieldy burden to deal with when making even small-ish changes. Yuck.

I still prefer the age old approaches for good code: small functions, no side-effects if possible, simple unentangled classes, and some good mechanisms for hooking things together, hopefully with some kind of automated logging built in. In other words, I try to program like a functional programmer (pun intended) even if I'm coding in an imperative language.

And yes, TDD and Unit Testing can be (and very often is) employed as a crutch for doing it right (deep thinking required!) the first time.

As I've blogged about[^], we have a really screwed up culture for software development.

Marc
Latest Article - APOD Scraper

GeneralRe: TDD vs. just being careful Pin
_Maxxx_9-Jun-14 14:29
professional_Maxxx_9-Jun-14 14:29 
GeneralRe: TDD vs. just being careful Pin
Marc Clifton10-Jun-14 2:53
mvaMarc Clifton10-Jun-14 2:53 
GeneralRe: TDD vs. just being careful Pin
Super Lloyd9-Jun-14 17:49
Super Lloyd9-Jun-14 17:49 
GeneralRe: TDD vs. just being careful Pin
Marc Clifton10-Jun-14 2:56
mvaMarc Clifton10-Jun-14 2:56 
GeneralRe: TDD vs. just being careful Pin
PIEBALDconsult9-Jun-14 14:24
mvePIEBALDconsult9-Jun-14 14:24 
AnswerRe: TDD vs. just being careful Pin
_Maxxx_9-Jun-14 14:27
professional_Maxxx_9-Jun-14 14:27 
GeneralRe: TDD vs. just being careful Pin
Dan Neely10-Jun-14 2:54
Dan Neely10-Jun-14 2:54 
GeneralRe: TDD vs. just being careful Pin
Mat Fergusson10-Jun-14 11:05
Mat Fergusson10-Jun-14 11:05 
GeneralRe: TDD vs. just being careful Pin
Dan Neely10-Jun-14 11:11
Dan Neely10-Jun-14 11:11 
GeneralRe: TDD vs. just being careful Pin
Mat Fergusson10-Jun-14 11:12
Mat Fergusson10-Jun-14 11:12 
AnswerRe: TDD vs. just being careful Pin
Super Lloyd9-Jun-14 16:41
Super Lloyd9-Jun-14 16:41 
AnswerRe: TDD vs. just being careful Pin
BobJanova10-Jun-14 0:15
BobJanova10-Jun-14 0:15 
AnswerRe: TDD vs. just being careful Pin
Andy Brummer10-Jun-14 0:36
sitebuilderAndy Brummer10-Jun-14 0:36 
NewsGreat moment for AI! Pin
ridoy9-Jun-14 10:04
professionalridoy9-Jun-14 10:04 
GeneralRe: Great moment for AI! Pin
Kenneth Haugland9-Jun-14 10:14
mvaKenneth Haugland9-Jun-14 10:14 
GeneralRe: Great moment for AI! Pin
PIEBALDconsult9-Jun-14 10:14
mvePIEBALDconsult9-Jun-14 10:14 
GeneralRe: Great moment for AI! PinPopular
Pete O'Hanlon9-Jun-14 10:17
mvePete O'Hanlon9-Jun-14 10:17 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   478 votes