43
jchw
8y

HOW TO KILL A DEVELOPER

Coworker: Hey, is http://website down for you?

Me: yeah. What's up?

Coworker: Ah, that explains why my tests are failing.

Me, internally fuming: It would be good test practice to not depend directly on external services.

Coworker: I know, but this is easier.

This makes my blood boil. I'm not a huge fan of mocking and stubbing everything, but when it's actually very easy to mock something and you're too lazy, that makes me fucking angry.

Remember kids: doing it right takes longer than doing it wrong. But doing it wrong will eventually take significantly more of your time. Just wait until your shitty assumptions fail and you don't have any recourse.

Comments
  • 4
    Just to be clear, I am not saying mock everything always. But probably mock your damn HTTP requests.
  • 5
    No, mock all the things!
  • 5
    Mocking everything is the best! I mock my entire life... 😁
  • 2
    Well, for unit tests mock out everything, yeah... But for integration tests, and e2e tests please don't do it...
  • 1
    It's the difference between a junior and senior, simplicity over quality.
  • 2
    Mock all the idiots.
    Always.
Add Comment