¿El código antiguo es malo?
The idea that new code is better than old is patently absurd. Old code has been used. It has been tested. Lots of bugs have been found, and they’ve been fixed. There’s nothing wrong with it. It doesn’t acquire bugs just by sitting around on your hard drive. Au contraire, baby! Is software supposed to be like an old Dodge Dart, that rusts just sitting in the garage? Is software like a teddy bear that’s kind of gross if it’s not made out of all new material?
Traducción:
La idea de que el nuevo código es mejor que el viejo es absurda. El código antiguo se ha utilizado. Se ha probado. Se han encontrado montones de errores, que han sido corregidos. No hay nada malo en ello. No adquiere errores con sólo sentarse en torno a su disco duro. Au contraire, baby! ¿Acaso se supone que el software es como un viejo Dodge Dart, que se oxida sentado en el garaje? ¿Es el software como un oso de peluche que es bastante asqueroso si no está hecho con material nuevo?
Joel Spolsky, Things You Should Never Do, Part I
Esta idea está muy extendida, quizás por las compañías de software para generar constantes beneficios. Y si se piensa bien, de por sí el código antiguo no tiene que ser siempre malo.
Un par de lecturas adicionales que desarrollan esta idea:
- Why You Should (Almost) Never Rewrite Code – A Graphical Guide
- Why You Should (Almost) Never Rewrite Your Software
Deja un comentario