4 ms·
I wonder what's the median life expectancy of a piece of code.
by mupuff1234 3y ago
I wonder what's the median life expectancy of a piece of code.
- biscuits1 3y agoTwo years, maybe.
- dboreham 3y agoHard to know. I know there's plenty of code that never gets into production. Otoh there's code I wrote in 1996 that's still in widespread use.
- amiga-workbench 3y agoThe worse it is, the longer it will linger.
- coffeefirst 3y agoAt least for my own code, I'm pretty sure its an inverse relationship to quality. The masterpiece I fretted over for endless hours is guaranteed to be obsolete within 1 year. The crappy hack with the comment that says "@TODO make not be garbage sorry" is cursed to live on for eternity.
- silasdavis 3y agoOnly the good die young
- kevlened 3y agohttps://xkcd.com/2730/ https://xkcd.com/2730/
- wvenable 3y agoIt varies pretty wildly but in my career a lot of code has lasted over 10 years and in some cases over 20. Also because code is sort infinitely copyable some code just keeps moving from product to product. Or some design moves from product to product. The longer you work in programming the more you have a set of tools that you can reach for over and over even if you're effectively writing it from scratch each time. I think good code is vital to the software development process. It doesn't have to start out good but it should end good. Because you're going to be back at this code over and over. A little bit of effort up front can save you a lot of time in the long term.