5 ms·
> “While the website went down and we were losing money we chased down a number of loose ends until finally finding the root cause.” And that's why you have a
by pintxo 6y ago
> “While the website went down and we were losing money we chased down a number of loose ends until finally finding the root cause.”
And that's why you have a staging environment. Or you debug in production, whatever you prefer.
- eitland 6y agoEverybody has a testing environment. Some people are lucky enough enough to have a totally separate environment to run production in. https://mobile.twitter.com/stahnma/status/634849376343429120 https://mobile.twitter.com/stahnma/status/634849376343429120
- atoav 6y agoI'd go further and say this is why you write tests. Creating tests that cover a lot (or all) possible inputs is sometimes not that hard and really pays off if you manage to catch a very common error like the Norway thing. Even better if you catch something that would have been a nightmare to fix in production. I say this because two days ago I wrote a test that used all country codes as input. It took 15 minutes to write that test. During the whole testing session I found at least 5 mistakes of which 3 would have been quite dramatic.
- simion314 6y ago>I say this because two days ago I wrote a test that used all country codes as input. It took 15 minutes to write that test. During the whole testing session I found at least 5 mistakes of which 3 would have been quite dramatic. And how many minutes to test all city/state/region/street/person names ? It can also happen that you test s will become outdated, like when url standard changed and more characters codes were allowed.
- atoav 6y agoFor something like URLs I'd use the hypothesis Python module and rely on their implementation of URLs (and if that changes the test will fail for newly formated URLs), for everything "custom" I would extract problematic test cases and include them as examples. Testing doesn't take too long on my machine (maybe 10 seconds), but even if it would, it would be totally acceptable as I run it pre commit only.
- groundCode 6y agoBugs make it to production no matter how careful you are. What matters is how you deal with incidents as an organisation, not that you should never release a bug.
- mrighele 6y agoOr you just return to the previos (and working) version of the website while you fix the issue. At least if you a good old monolith; if you have 10s of microservices it may be more complicated