3 ms·
From the comments: > I’d love to see some metrics on the average life expectancy of a line of code for different programmers. I know that some of my best code
by RyanMcGreal 17y ago
From the comments:
> I’d love to see some metrics on the average life expectancy of a line of code for different programmers. I know that some of my best code was written and has sat there with minimal changes ever since.
Now that's an interesting idea.
- pyre 17y agoNot necessarily. There's plenty of horrible, horrible code that doesn't get changed because it currently works, and it would be too much of a hassle to try and de-tangle it. There's also really awesome code that gets replaced because the requirements have changed and it needs to do something completely different.
- patio11 17y agoI throw out about 50% of all code written for A/B tests within, typically, a week or two. If it weren't for all the business value added by it, I guess I would suck as a programmer.
- Periodic 17y agoIn fact, the particularly horrible code might not be replaced for a long time precisely because it is hard to understand but it works and changing it could cause problems elsewhere. There are plenty of enterprise systems like this.
- ShabbyDoo 17y agoI wrote a crappy Python script one afternoon about eight years ago to address a client requirement discovered very close to implementation time. I think it's still running in a production environment -- at least I was told so as of a couple years ago. Was it great code? Nope. It split one file into four based on a particular column's value in a CSV.
- alnayyir 17y agoBuddy of mine just got done writing a CSV parser at work. Don't really know why though, I remember there being CSV parsers for C#/.NET out there.