I'm doing some changes on an Oracle procedure that has 314 IF()'s (yes, 314!!!). I know that it could be replaced with some code OOO and applying some design pattern (like Strategy or factory).
All IFs are similar to this:
IF(blahblahblah) THEN
ELSEIF(blehblehbleh) THEN
ELSEIF(blihblihblih) THEN
ELSEIF(blohblohbloh) THEN
ELSEIF(bluhbluhbluh) THEN
....
-- And so on through 314 logical tests
The problem is the code is stable, is in production, the team is not aware of these techniques like design patterns, etc.
What more reasons I could enlist beyond performance and easy code reading/undesrtanding and maintenance?
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire