With all the stresses and demands of development that seem to send many of us to the exits early, how is it that some stick around? What's the secret to longevity in this career?
One thing I've noticed over the years is that there is at least one thing that seems to be common to every good, veteran programmer I know. They all follow the same deliberate and dare-I-say selfish rule to how they approach their time: Always do Extra. Now before you call "bullshit", let me explain what I mean...
Assume there's a reasonable amount of work you need to do to fulfill the base expectations for your job (i.e. your Normal Work) and then there's a little time left over. (I know some may argue this "left-over time" thing, but just go with me). In this remainder time you have a choice: you can do More, Extra, or Nothing (i.e. surf the interwebs). And it's with this decision that every reasonably happy, veteran developer I know distinguishes themselves. They all choose Extra.

But aren't More and Extra the same thing? No! They sound similar, but they're actually very different. Here's a simple example:
Say for this sprint you're assigned two form screens that take user input and then persist it to the database. Pretty straight-forward. This is your Normal Work - the default expectation of what you need to get done to be in good standing on your project.
Doing More would be completing those two screens and then taking on a third screen that's just like it. Yes, this would help move the project along faster and make your manager happy, and that's great, but in the long-run, More doesn't give you much.
Extra is different than More. Extra is finishing those two screens, but then researching a new library for form validation that might reduce the boilerplate code. Or it's learning ways to protect against common security vulnerabilities from data entry. These little off-ramps from the main highway of Normal Work could be dead-ends and not have any practical value to the project. But they might also be important contributions. And that's the thing with Extra. While the tangible value to the project is uncertain (it could be nothing this time or it could be something), the value to you is real.
Extra gives back in a couple ways. The first is philosophical. Extra is about having free will. It's about not being just a drone who monotonously does exactly what their told, but someone who asserts a little control and shapes their our own contributions and experiences in a way that's interesting or meaningful.
More practically though, Extra is also good for our careers. Our employability has everything to do with the diversity and depth of our experiences, and so Extra is what helps us broaden ourselves beyond just what's useful on our narrow project. Whereas grinding it out to finish that third screen wouldn't add any new skill or insight to our toolset, a little bit of exploration from Extra could.
Now there are of course caveats. Over the years I've seen developers get carried away with Extra. Extra is all they want to do. They spend their days researching new validation frameworks or security vulnerabilities, and then can't get their Normal Work done, those two basic screens. And sure this might be more fun for them, but it sucks for the rest of us because we have to pick up their slack if we want to deliver the project on time. So there are rules to Extra.
The first rule is this: Extra must be balanced against Normal Work. Real stuff still needs to get done. This is how we get paid. Shirking our Normal Work in favor of Extra might be more interesting, but it makes us shitty teammates at best, and unethical at worst. Note: there are a few "lucky" among us who find their way into roles where Extra is their Normal Work, and we call these people Architects. ;)
The second rule of Extra is that it must be aligned with your Normal Work. If what's on your plate is two form screens, Extra can't be learning about evolutionary algorithms or building a mobile app for your side hustle. It's got to be something that could help the project. It's never something we need to hide, but instead it's something we're eager to share with our teams - ala "hey, I did some research on X, and maybe this is something that could be valuable for us to try".
In the end, I hope it's clear that I'm not arguing that we neglect our Normal Work. This is what is expected of us, but the choice is what we do beyond this: Nothing, More, or Extra. In my experience, those who have had longevity in this field always choose Extra. I'd love to hear your thoughts.