4 ms·
> I've come to the conclusion that code is temporary, and is meant to be discarded after a while Interesting, my gut feeling is the opposite. I think code is b
by rvense 6y ago
> I've come to the conclusion that code is temporary, and is meant to be discarded after a while
Interesting, my gut feeling is the opposite. I think code is being written today that will remain running for something approximating "forever". Stuff will work and people won't want to change it - or things will be so intermingled that they won't dare to.
- corytheboyd 6y agoOut of curiosity what is the context behind the code you think will have a long lifetime? As someone who works on “webcrap” as they say, I don’t think anything I contribute to will work for more than a few years.
- AnthonyMouse 6y agoThe code for a lot of the standard Unix utilities was written decades ago. They'll modify the code when there is a reason to, but often there isn't.
- rvense 6y agoIf a business lives for a long time, even its "webcrap" might live with it. Honestly I think the investments made into web technology right now are so massive and pervasive that I wouldn't be surprised if we still use something that looks a lot like the web stack in 50 years, simply because there'll never be a good moment to dump all that baggage when you're so deep in it. I don't think we can look to the past of computing to understand its future, I think we have reached in the past ten years or so a critical mass and penetration into the fabric of society that the rules are just different know than they were in the 90's. Unless the way we interact with our computing devices fundamentally changes (say, a shift from visual/touch to, idk, voice or brain waves or whatever), I have a hard time seeing how there'd ever be a big shift from the web stack to something else like, say, the shift from Win32 apps to web apps. Hell, even if there is, the web might just embrace it. My day job is web-based AR... The stack will evolve, sure, and maybe at the end there's nothing left and the clients won't know HTTP at all anymore... but I can just as easily see us just piling more stuff on, because I honestly think that, even with voice assistants and AI and whatever, most people are still going to produce and consume text and images from a device a lot like a phone for many years to come, simply because it's a system that works well for humans that have eyes and fingers and pockets. And if that's the case, then what's going to cause a seismic shift in platforms, when almost all software developers are web developers, and all devices run web applications? And if the stack doesn't change, why wouldn't some of the code stick around, if the business or organization that invested in it does? Some businesses now might replace twenty-year-old code just because, but at least part of that is because of how software stacks have changed and aged, and I think the sheer amount of "webcrap" that's being excreted by people like you and me is going to slow that rate of change right down, even if it doesn't feel like that in the middle of all the framework churn.
- ryl00 6y agoEngineering/science code, e.g. modelling real-world phenomena. Fortran code from the '70s is not that unusual to see, still in production...
- tluyben2 6y agoI always thought what I wrote would last only months maybe a year or so; then 5 years passes, then 10. Some things I built which contain a lot of the first Delphi code I ever wrote (I was a Pascal coder before that) are still running production 30 years on. And that was the client saying we would probably rewrite ‘in a couple of years’. Same goes for webcrap; I have some horrible php and jsp prototypes from the early 2000s which have been running production ever since.
- Icathian 6y agoI don't have the same length of perspective you do, but this has been my experience as well. I chat with buddies from old employers, and they still tease me about stuff I put into place 10 years ago that I would have bet good money wouldn't live 10 months.
- nh2 6y agoOpen source code tends to have a long lifetime. I've contributed almost 10k hours to 100s of projects in the last 10 years, and most of them are still alive and have only grown in adoption. (Also it would suck if all that time went into the bin a few years later!) From my experience, here's a ranking of how long code lives: * Proprietary "webcrap" and plumbing logic at companies. This dies the fastest (6-24 months). * JavaScript frameworks and tools, open source. "Dies like flies" -- many of them, short intense life, then everything dies down and the buzz moves to the next swarm. * Proprietary backend code. Lives 5 years, then gets rewritten or dies a long death. * Open source code in dynamic languages. 5-10 years, then mass extinction events end some lineages, such as "The Tertiary Era" (Python), "The Discovery of the Fundamental Theorem of Write-Only Code" (Perl), and "The Birth of the Script Kiddie" (PHP). * Open-source code in static languages (Haskell, C++, C). Usually around already 10 years before I started contributing, and showing no signs of getting old.
- 29athrowaway 6y agoRust might change these numbers a bit. C/C++ are very stable and backwards compatible, Rust tends to be more aggressive at the moment of changing things.
- kd5bjo 6y agoRust’s core team are pretty fanatic about backwards compatibilty, though. Best practices are still rapidly evolving but if you have code that compiles and works, it should continue to compile and work indefinitely.
- adrianN 6y agoCode that runs on embedded computers has a long lifetime.
- pydry 6y agoBoth can be true. IME 95% of code gets thrown away in pretty short order. 5% really lives on - often for decades.
- tluyben2 6y agoI am happy to have written code mostly in that 5% the past 30 years. So IME it is 5/95.
- zoom6628 6y agoAbsolutely. This is why still so much COBOL code around. A lot of it 'just works' so 'dont fix what isnt broken' comes into play. And a lot of it, and Fortran, is so intermingled across huge systems, that nobody has any certainty of the impact of touching it. My opinion is the technology used for the most successful and robust back-end systems will remain long after Im gone, while that which is purely for the HMI will continue to be as fluid as it is now, simply because behaviour evolves based on individual and institutional retained knowledge.
- netjiro 6y ago"just works" is a big factor. Another part is front end vs back end. I still get contacted occasionally on various back end and infrastructure stuff I built from 1995-2010, while I never hear from anyone about the user facing code. Front end has been replaced many times over, while the back end infrastructure just ticks away quietly...