Skip to content

Comment on Freelancing, half a year in.parent

Comments

Do you retrofit tests to old code? If so how do you deal with spaghetti that at first glance appears almost untestable, insist on a refactor?

They usually want me to fix old code ... exploratory tests are really the only way to do that.

It helps that I write integration/functional tests almost exclusively (unit tests are imho useful only for algorithms, which is not what I'm usually working on).

I mean, I can either spend 20min writing a test, or 5min clicking around the app every time I change something ...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.