News for hackers. Stuff that matters.
Re:Is TDD Dead? (2014) by VHRanger on Wednesday August 26, 2020 @10:30AM (#24282800)
The lexer is a unit then.

The lexer has a clear boundary from the parser.

The issue that takes experience here is how to determine what's a unit. "The whole program" is obviously too big. "every public method or function" is obviously too small.

Just be pragmatic.

Re:Is TDD Dead? (2014) by AnimalMuppet on Wednesday August 26, 2020 @11:53AM (#24283613)
> "The whole program" is obviously too big.

Of course.

> "every public method or function" is obviously too small.

Why "obviously"? If it's public, someone outside the class can call it. That's an external behavior.

Re:Is TDD Dead? (2014) by VHRanger on Wednesday August 26, 2020 @12:50PM (#24284307)
If the class is only consumed in the context of one code unit (module, service, whatever) then the class itself is an implementation detail.
Re:Is TDD Dead? (2014) by ajna91 on Wednesday August 26, 2020 @12:53PM (#24284336)
"every" being the operative word.

The "feel" for good code that comes with experience is not reducible in practice to a set of black-and-white rules.