| |
| ▲ | coldtea 3 days ago | parent | next [-] | | >I think there are a lot of developers working in repos where it's almost guaranteed that their code will _not_ still be there in 10 years, or 5 years, or even 1 year. And in almost all of those cases, they'd be wrong. | | |
| ▲ | nostrademons 2 days ago | parent [-] | | I think I calculated the half-life of my code written at my first stint of Google (15 years ago) as 1 year. Within 1 year, half of the code I'd written was deprecated, deleted, or replaced, and it continued to decay exponentially like that throughout my 6-year tenure there. Interestingly, I still have some code in the codebase, which I guess makes sense because I submitted about 680K LOC (note: not all hand-authored, there was a lot of output from automated tools in that) and 2^15 is 32768, so I'd expect to have about 20 lines left, which is actually surprisingly close to accurate (I didn't precisely count, but a quick glance at what I recognized suggested about 200 non-deprecated lines remain in prod). It is not at all the code that I thought would still be there 15 years later, or that I was most proud of. The most durable change appears to be renaming some attributes in a custom templating language that is now deeply embedded in the Search stack, as well as some C++ code that handles how various search options are selected and persisted between queries. I think this both proves and disproves the original point. Most of your code is temporary. You have no idea which parts of your code is temporary. It's probably not the parts that you wish were temporary, which will almost certainly be made permanent. | | |
| ▲ | TheCoelacanth 2 days ago | parent [-] | | Good code is easy to replace and bad code is hard to replace, so bad code is disproportionately long-lived. |
|
| |
| ▲ | benoau 3 days ago | parent | prev | next [-] | | In my experience the code will, but by year 5 nobody is left who worked on it from inception, and by year 10 nobody knows anybody who did, and during that time it reaches a stage where nobody will ever feel any sense of ownership or care about the code in its entirety again. | | |
| ▲ | contextfree 3 days ago | parent [-] | | I come into work and work on a 20 year old codebase every day, working on slowly modernizing it while preserving the good parts. In my experience, and I've been experimenting with both a lot, LLM-based tools are far worse at this than they are at starting new greenfield projects. | | |
| ▲ | ryandrake 3 days ago | parent | next [-] | | This conversation shows how diverse the field is! When it comes to professional development, I've almost never worked on a codebase less than 10 years old, and it was always [either silently or overtly] understood that the software we are writing is a project that's going to effectively live forever. Or at least until the company is no longer recognizable from what it is today. It just seems wild and unbelievable to me, to go to work at a company and know that your code is going to be compiled, sent off to customers, and then nobody is ever going to touch it again. Where the product is so throwaway that you're going to work on it for about a year and then start another greenfield codebase. Yet there are companies that operate that way! | |
| ▲ | aplomb1026 2 days ago | parent | prev [-] | | [dead] |
|
| |
| ▲ | steveBK123 3 days ago | parent | prev [-] | | It's important to know which type of repo/project you are in and hire/code accordingly. I've seen mismatch in each direction.. | | |
| ▲ | AlotOfReading 3 days ago | parent | next [-] | | How can you possibly know which type of repo you're in ahead of time? My experience is that "temporary" code frequently becomes permanent and I've also been on the other side of those decisions 40 years later. | |
| ▲ | skydhash 3 days ago | parent | prev [-] | | Unless you’re producing demos for sales presentation (internally or externally), it’s always worth it to produce something good. Bad code will quickly slow you down and it will be a never ending parade of bug tickets. | | |
| ▲ | steveBK123 3 days ago | parent [-] | | indeed, being on-call cleanses many developers of slopulist habits | | |
| ▲ | abelitoo 2 days ago | parent | next [-] | | That depends on how quick the feedback loop is for your decisions. If it takes weeks or months to find the impact of your changes, or worse, if you're insulated somehow from those changes, you may not be pushed toward improving the quality of your code. | | |
| ▲ | jimbokun 2 days ago | parent [-] | | A company where it takes weeks and months to deploy a code change is not a company with a long term success horizon. | | |
| ▲ | pixl97 2 days ago | parent [-] | | Lolololol, sorry, I can't help but laugh a bit because some of the most entrenched companies are also the slowest moving. |
|
| |
| ▲ | gjadi 2 days ago | parent | prev [-] | | It depends on their sleep habit, work-life requirements and compensation when they need to be on-call. When you get a fatter check because your code break, the incentives are not in favor of good code. |
|
|
|
|