News for hackers. Stuff that matters.
Re:TDD did not live up to expectations by thaumasiotes on Thursday June 29, 2017 @12:36PM (#14664623)
> They do a LOT of transcription instead of copy and paste

Transcription makes you think about what you're typing in and avoids the whole class of errors that arise from copy-and-paste. Transcribing code rather than pasting it is not a red flag.

Re:TDD did not live up to expectations by hinkley on Thursday June 29, 2017 @12:50PM (#14664741)
Transcription can lead to the same conditional in two blocks of similar code instead of the two intended. It can lead to fencepost errors due to changing or inverting an inequality. And in some languages it can lead to code that looks up data that doesn't exist (misspell a property name outside the happy path).

The big problem is that you're chewing up short term memory slots that used to hold the next thing you planned to do. For me I generally use only a couple slots for a single refactor because it's all muscle memory.

Additionally, it just takes a hell of a long time, which means you go from virtually no chance of interruption to a measurable one.

When I was young I had an exceptional short term memory and could pull off some crazy big refactor without introducing errors. But now it's normal at best, and also I rely far less on those sorts of feats, in part because I put a higher value on commit history readability.

Re:TDD did not live up to expectations by thaumasiotes on Thursday June 29, 2017 @10:57PM (#14668370)
> Transcription can lead to the same conditional in two blocks of similar code instead of the two intended. It can lead to fencepost errors due to changing or inverting an inequality. And in some languages it can lead to code that looks up data that doesn't exist (misspell a property name outside the happy path).

Funnily enough, all of those are also problems with copy-and-paste. But they're much more likely to occur through copy-and-paste, because it's easy to do that without reviewing the code.

Re:TDD did not live up to expectations by hinkley on Friday June 30, 2017 @01:35AM (#14668818)
You're saying you should do extract method or rename variable by typing the code out again long form instead of cut and paste or using the IDE?