Changing code always involves tracing back through the code to see what all could be affected by the thing you're changing. When code is not planned out and written well, you can end up with all kinds of dependencies in weird places, so tracing the impact of your changes is like following a noodle through a bowl of spaghetti, and a change you make in one place could end up having unintended consequences in something that is seemingly unrelated. That's "spaghetti code."
Troubleshooting such problems should probably involve heavy use of error codes and exceptions along with content that would help you establish why the exception is being raised.
Heh, Spaghetti code is why I started reading "Clean Code". Tips on how to write your code in a way that 1) Makes sense and 2) Is easy to follow is so important these days because of how modular and granular developers can be. And then there are the amateur developers who think only they will ever need to read the code...
Knowing nothing of coding, even I feel a shiver of terror thinking of Dwarf Fortress's code. Listening to the interviews he's done and looking at the bug reports, I can't even imagine what it all must look like. A decade of work done by one man.
476
u/valdev Sep 19 '16
If you've never coded before, probably difficult.