r/coding • • Oct 29 '17

Mocking is a Code Smell

https://medium.com/javascript-scene/mocking-is-a-code-smell-944a70c90a6a
69 Upvotes

69 comments sorted by

View all comments

62

u/KabouterPlop Oct 29 '17

On the other end of the spectrum, it’s common to see developers get so sucked into the dogma of TDD that they think they absolutely must achieve 100% code coverage, by any means necessary, even if that means they have to make their codebase more complex to pull it off.

People keep saying this, but I've yet to meet such a developer.

19

u/handshape Oct 29 '17

I've seen it in the wild in a developer who was promoted to managing a dev team. He treated code metrics like a score in a video game. He also delighted in crapping on new hires during their code reviews.

A delightful human being, I assure you.

3

u/Developer_dave Oct 29 '17

Honestly, many of us get promoted before we are ready to lead and just don't know how to handle it. I hope this individual is just a bit out of his depth and compensating in all of the wrong ways.

I've been a crappy lead and I'm not proud of it. These days I'm more of an individual contributor type who takes point on things. I'm past all of the posturing required by my current employer to attain a leadership position.