News for hackers. Stuff that matters.
Re:TDD did not live up to expectations by buckbova on Thursday June 29, 2017 @12:10PM (#14664392)
Seems a little arrogant to say most developers don't know how to refactor or do it poorly. Maybe it's true. I really can't say one way or the other because what I see is most devs believe they don't have time to refactor.
Re:TDD did not live up to expectations by ericgunnerson on Thursday June 29, 2017 @08:17PM (#14667839)
Original author here...

Let me ask you - and by "you", I mean everybody reading this - a question.

If you had poor design or refactoring skills, how would you know?

Let's just say you've finished working on some code that involved writing new code. How do you know whether it's well-designed?

Well, you start by using your own sense of what is good design. But all of us can only see the things that we already know about, which us thinking that the code has decent design is only a sign that it is up to our level of understanding. This is a fundamental part of how knowledge works.

Code review can give some additional design feedback, but 1) code reviewers generally don't have time to give in-depth design feedback and 2) "you should redesign this" is generally not well received (see previous point about everybody thinking they are good designers), and I both have to work with my teammates and their comments factor into the kind of review I get. So, code review is not a good way to improve design change, even assuming that you have people on your team who have useful design advice to pass on and you are in the kind of environment that lets you be thoughtful about design.

If you are in a team with decent designers and your team pairs, then you are in luck; you have a good chance to expand your design skills. Leverage this at every opportunity.

Finally, it is possible to spend time (almost always your free time) learning more about design, doing katas, going to code retreats, etc. This also works.

And I'm sorry if this sounds arrogant; I've tried to find other ways of saying it.

Re:TDD did not live up to expectations by spdionis on Thursday June 29, 2017 @12:36PM (#14664620)
If most devs don't have time to refactor, then most devs have not had much experience doing refactoring, thus most devs are bad at refactoring.

Sounds reasonable.

Re:TDD did not live up to expectations by mparr4 on Thursday June 29, 2017 @12:36PM (#14664618)
> most devs believe they don't have time to refactor

tough to do something well if you don't spend time doing it

Re:TDD did not live up to expectations by Ace17 on Friday June 30, 2017 @12:44AM (#14668683)
> most devs believe they don't have time to refactor

Try asking them:

"if you had the time to do it 'well', what would you have done differently?"

(By the way, the same works for testing: "if you had the time to write all the tests you want, how would you test this code?")

You might be surprised.

Re:TDD did not live up to expectations by sqeaky on Thursday June 29, 2017 @12:29PM (#14664550)
Is the difference between inability and ability but not doing so great?