6 ms·
1) Use unit tests. 2) It isn't that ugly! If you know what the code is supposed to do (which should be clear from documentation or just the purpose of the prog
by emilv 15y ago
1) Use unit tests.
2) It isn't that ugly! If you know what the code is supposed to do (which should be clear from documentation or just the purpose of the program) and it fails in some cases, take that failing case and go through the if-else statements manually.
If this is machine-generated code the real program is the one outputting this script. The big machine-generated statements are just data from that program. That program may be much better structured.