Everyone&#x27;s different.  Check out this guy:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Elliott_Carter" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Elliott_Carter</a><p>He died at 103, still working (composing).  Not many composers get stuff they wrote in their 60s and 70&#x27;s described as their &quot;middle period&quot;.<p>Pierre Boulez just died at 90, still working (until very recently).<p>If you&#x27;re from a privileged background (and let&#x27;s be honest; most developers are) there&#x27;s no reason why you can&#x27;t pause at 40 or 50 and decide what to do next with no fear of burnout or senility.  Some people just get bored of programming, or decide that it&#x27;s just more fun playing with their kids or whatever.  You can always pick up a laptop and start a new project in a new language.  You&#x27;ll never be able to play with your favourite daughter as a five year old again.