5 ms·
If the code works and I haven't written the same exact thing myself, the most negative comment I am willing to make is "complicated." At my advanced age, it tak
by larsberg 16y ago
If the code works and I haven't written the same exact thing myself, the most negative comment I am willing to make is "complicated." At my advanced age, it takes nothing short of a critical system requirement that a piece of code can't possibly meet to rewrite something that works.
The jwz-documented Netscape rewrite debacle is brought to mind by the original posting.
- jefffoster 16y agoCouldn't agree more! Most of the time I've heard people say "this code sucks" it seems to mean that it's formatted "wrongly" or that the person is too lazy to understand it, or it's not written by them!
- torial 16y agoOh, I don't know. When I've encountered code that I say sucks, it was for code that had single letters as variables in massive function, didn't believe in breaking logic into discrete functions (this was primarily in VB/ASP, so it wasn't for perf reasons ;-)), used copy and paste all the time for large amounts of code (and since they didn't use discrete functions, lost out on simple abstractions), etc...
- tkahnoski 16y agoThe Netscape example is an extreme case since it was an entire system rewrite (still a valuable example). The other extreme of leaving the code to rot is just as bad. "It works... for now." There are too many little changes that occur in either the larger system itself, the platform, or even the OS (and of course the customer) to just say "it works." This then leads to, "Well it should still work" as time goes on.
- kenjackson 16y agoIn my long history of development I've seen VERY few rewrites that were successful. I've seen probably tens that ended up wasting a lot of money and time and probably about two or three that proved to be worth it. I really think the problem is that most devs don't know how to read code. Sure there are some programs that have pathological problems in them, but those are relatively rare. It is often just design choices or programming patterns that a particular dev doesn't like or understand.
- tkahnoski 16y agoAgreed. Having a mostly functional system with an occasional bug is certainly better then a half implemented untested version. There does exist a point at which a rewrite is necessary and is indeed far less often than most would like to think.
- Goladus 16y agoI agree, although I will mention that there are times when I've evaluated open source software and libraries by reading the code and if it looks like crap I'm going to be wary of introducing it into any of my production systems. In situations where you're really hoping that the library or utility is going to solve your problems as advertised the bias actually goes the other way. The code has to have some measurable level of suck to get rejected.