Hacker News new | ask | show | jobs
by sltEvas 2055 days ago
Actually, code isn't what does that. It's true that code is one of the things that keeps it "all". However, it's not the best place for documentation or even storage of that knowledge. Code changes.

Tests are what you need to invest in. When you test all of you business use cases in an abstract (perhaps even no-code) way, you are truly independent. You can rewrite the system very quickly, if you had a test-suite that allows for quick iteration (TDD style) and does not depend on implementation details.

Given just the code? Well good luck migrating to another cloud vendor. You will probably introduce one million bugs on the way.

1 comments

What are some techniques you use to test business use cases in a code independent way?
You'll want to test against stable API/ABI, and use positive and negative testcases. The problematic parts are mocking, simulation and how tests affect the codebase.
> You'll want to test against stable API/ABI

Good luck with that. lol.

- The only stable APIs I've seen, if an API exists, are production financial APIs, because money is involved.

- DynDNS has been knows to change input and output parameter types, breaking calls

- Even Twilio has changed a fundamental API path (!) in the past couple of years, breaking SMS API calls in 2019

- Facebook only supports API version N and N-1. Hope you're not on N-2 and there's a sudden version bump!

(I say production APIs, since even payment gateways often have flaky dev/qa gateways that you can't reliably do automated tests against. Past companies that I worked at had to test against prod gateways with their own personal credit cards.)

Otherwise, if you want an API, ensure you choose a product/partner that offers/supports one.