Worth remembering we write code to create human value. Somewhere, in some way, your elegant code actually ran and did a thing that led some number of humans to be enabled or understand or somehow be affected by it.
My GitHub has a few pieces of code that I'm really proud of. And some companies actually ask for code I'm proud of as part of the interview process, so I have that ready and it helps.
My graveyard of projects and dreams stretches out behind me and I feel saddened to know that these articles representing portions of my life never achieved what I had hoped for them.
However, I've come to view my work like a mandala or some representation of our mortality itself; our works and our lives are temporary.
We can make the most of the brief moment that we have – whether that be through work or through parenting or through base jumping – whatever that may be for each of us, or we can choose to do nothing with that moment, knowing that it's ephemeral and will be gone soon anyway.
I choose to try making each day's the best code I have ever written; I want it to be "beautiful" and maintainable in spite of knowing that it will be refactored, deleted or decommissioned at some point.
My goal was to get whatever I was working on not just "done", but "done-done". To a state where, if I walked away, it could live on in a working manner and be easily maintained by someone else. That meant having good test coverage, up-to-date documentation, instructions on how to get started with the repo, notes on dependencies, etc. Sometimes that someone else is future me, six months or six years later.
I experienced burnout early in my career, in the dot-com era, and it became especially acute when then the bubble burst. All those long hours (mostly) for naught.
The best times were at companies where everyone was all-in and we each had each-others back. Rare, but amazing when it happens. These were all at startups.
Work for non tech companies if you want it to last. Some industrial code is even older - my company has just removed some devices that requires a floppy disk to update
I was just thinking the other day that all of the code I've written for companies is now dead and gone. I wrote some really elegant, interesting stuff at a few companies and now it's only a memory in my head.
I should've gone into civil engineering.