Some thoughts about code quality

Shocking truth, but significant part of Open Horizon’s code wouldn’t pass my own code review. It’s probably ok for pet-project, because if I will rewrite code every time I want, the project would be in development forever. The reason code isn’t perfect from the start is quite simple.

First of all, I don’t know how the original game worked before some research so I write first implementation, then, when problems occurs, I research again with updated information, making new assumptions. This is a continuous process, but other code is already depends on what I wrote previously so every time such problems appears I can’t just rewrite it all.

On the game mechanics side, I often choose ugly solutions right before the release, because I want it to be done already so I cut corners and struggle with my own architecture. While I’m complaining about architecture, the other aspects of the code quality, like checking ranges and pointers, are mostly fine, because it’s critical to the stability and sanity. Any unnoticed null pointer reduces game’s value to zero.

Leave a Reply

Your email address will not be published. Required fields are marked *