4 ms·
There's obviously a lot of stuff I don't know then. Like the benefits of copy pasted code, or 300 column lines, or implementing the logic in 20 places when it h
by lacampbell 10y ago
There's obviously a lot of stuff I don't know then. Like the benefits of copy pasted code, or 300 column lines, or implementing the logic in 20 places when it has existed in the standard library for a decade. If only the ancient sage I inherited this code base from had left notes to guide me on this path of wisdom.
- beat 10y agoSee, taking a reasonable generalization and interpreting it as an absolute statement is a classic case of "assuming they're stupid".
- lacampbell 10y agoI don't assume people are stupid. I assume they don't know or care how to write code well. Big difference ;)
- corecoder 10y agoI've been there a few times, and the worst thing is when every five or ten WTFs there's something that seems as ill thought as the previous couple similar blocks, except this time it actually makes sense, as it implements (awkwardly of course) some important corner case.
- khedoros1 10y agoCopy-pasted code: Data redundancy 300 column lines: Support for management buying everyone nice, new, giant monitors. Logic in 20 places: But what if we want subtle differences between each implementation? On a more serious note, a product that I've worked on was started in about 1998 in C++. We support something like 15 different platforms, and we've got our own implementations of things like vectors because we needed a least common denominator codebase; the standard libraries of a lot of platforms didn't provide what we needed, or provided implementations that were incompatible with other platforms. By the time everything we needed to support was modern enough (in about 2010), the system had a few million lines of code, and replacing things with library functions/classes would've been a nightmare. New development is saner, but the legacy stuff is entrenched.
- adrianN 10y agoLibreoffice managed to get rid of their legacy containers and moved to the STL, so maybe you can do it too https://people.gnome.org/~michael/data/2011-05-12-libre.odp https://people.gnome.org/~michael/data/2011-05-12-libre.odp
- khedoros1 10y agoDevelopment of that particular product moved to China and India last year, so I don't have a part in its development anymore, just build+release, because there are some legal benefits to releasing it from this country. On the plus side, there are only a few platforms that they still have to support gcc 3.x on, and all the ones that ran on 2.x are out of support (until a customer holds a few million dollars in management's face, as happened a few weeks ago with AIX 5.1).