• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "tolerance". Back to normal view
    1. Thoughts on lifetimes, limits and tolerances

      The following is an observation that may be obvious to some, but which I didn't fully realize the extent of until recently. Everything has a lifetime. If you grok this, you are able to reason...

      The following is an observation that may be obvious to some, but which I didn't fully realize the extent of until recently.

      Everything has a lifetime. If you grok this, you are able to reason about everything a lot more efficiently. At work, in life, everywhere. I initially started thinking about this in the realm of software engineering, but this is a universally-applicable observation.

      In code, it's useful to think about operational lifetimes: How long will each operation take? How long should it take? When should it time out? We often call these "TTL" or "time to live". If you request some data from https://example.com/data.json, and it does not answer within the designated TTL (of your choice), you proceed to a failsafe.

      Not employing TTLs is often the root cause of issues in fault-sensitive designs. Connections piling up, stuck UIs on spotty connections, etc.

      Then there is the concept of "data lifetime". That is often controlled not by time but by size, for example how many items can be present in a bucket, or how large overall the bucket can be, or both. You may have seen this in your various trash folders on desktop, email clients etc: "Delete items after x days", "Limit bin size to 1 GiB".
      Once again, not putting a lifetime in place is the root cause of many issues such as memory leaks, UIs becoming less and less responsive over time, unusable software that doesn't test for edge cases ("what do you mean you have 1200 tabs open in Chrome?"), and so on.

      Setting the lifetime on something is a type of contract. By determining an "edge", you are now able to test "edge cases". By saying "You can have up to 1 million items in this folder", you're also saying you have (or at least should have) tested the edge cases of 1 million items, and what happens when you hit the limit.

      You see this in the physical world as well, you may recognize the concept as a tolerance, or a limit. "This elevator has been certified for up to 10 people, or 1000kg". It doesn't mean it won't work beyond that, but there is a contract of undefined behaviour when you exceed the limits.

      What happens when you don't have limits?
      Well, this article from the other day is an excellent example. The autobahn famously doesn't have speed limits. What did they expect?

      What happens when you don't have lifetimes? Well, remember how Google is shutting down free legacy GSuite? They promised "free for life" accounts and had to back down after realizing the accumulated maintenance burden incurred by not putting a real lifetime on that promise.
      Or the slightly famous $250,000 Unlimited Flight Pass.

      I'll give you the example that changed the way I see the world: My first company's CEO told me the (unverified) story of how, in 2015, when Verizon was doing due diligence on AOL before acquiring it, the value of AOL was significantly reduced because of its "free minutes trial CDs" with no expiry date on them. Because of the lack of an expiry date on them, all those trial CDs would have to be honored, and thus were "debt". You couldn't wait them out. The acquisition price was thus much lower.

      I apply this principle religiously in life, and try to understand the lifetime of everything I deal with. Especially things I purchase. You do it as well, maybe not consciously, but when you buy a phone and think "I want a phone that will last me at least 3 years", "at least 5 years", etc. You are giving the phone a lifetime, which allows you to divide its cost by the number of years you will keep it and think "by having a phone, I have to support a recurring cost of x dollars per year".

      The recently-discussed article "Everything must be paid for twice (HN discussion)" touches upon the subject, though not as elegantly as I'd like it to. Indeed, thinking about lifetimes should force you to think about the "end of life" scenario, which touches upon questions of recycling for example. Efficient systems will handle end-of-life scenarios by reusing/recycling as much as possible, which allows for cost reduction. The reason you don't have to constantly purchase new hard drives is because you're allowed to delete things you no longer need, reusing existing space. But the hard drive itself has a lifetime, which is determined both by its usage (it won't last forever) as well as how useful it is (as storage becomes cheaper, storage requirements increase, following Braess's paradox, which means that 1GB hard drive that was once "more than you could ever need" is now utterly useless.

      I invite you to think about these concepts everywhere, and see how relevant they are. Are you upset your latest appliance already broke down? Thinking of purchasing extended warranty on the next one? Wondering what you should buy in bulk? Are subscriptions better or worse than versioned software licenses? How long do you want to keep those photos around? Why did the restaurant across the street change ownership three times in the last two years? Do you think the Simpsons have had too many seasons? When are you gonna take down that christmas tree?

      14 votes