I sistemi legacy sono scomodi ma spesso preziosi, gestiscono il business. La decisione di refactoring, sostituzione o dismissione deve essere guidata dal costo e dal valore, non dal disgusto per il codice vecchio. "È vecchio e brutto" non è un motivo; "ci sta costando" lo è.
Perché è importante
REFACTOR (improve in place) when:
- Core logic is sound; it's holding business value
- Problems are localized; you can improve incrementally
REPLACE (rewrite/migrate) when:
- It blocks important work and can't be incrementally fixed
- Maintenance cost > rebuild cost over a sensible horizon
- It's a growing security or reliability liability
RETIRE (remove entirely) when:
- Its value no longer justifies any maintenance cost
- Usage has dwindled; a simpler path exists
