Thursday, February 22, 2018

FreeRails: Understanding the code

I begin to understand the code. That took quite some time staring at the screen and doing some refactoring. To quantify, roughly two hours per night for three nights a week for two months. Indeed, that long.

With a better documentation the start might have been faster, but I guess that ultimately there is just almost always a huge cost upfront when learning about a new code base. It just takes time.

To give an analogy: In the beginning the code was just like a bunch of single trees to me. Now it's like group of trees interacting and a vague notion of the whole forest, aka the complete picture.

There is hope of getting the complete picture rather sooner than later and there is hope that once you have the complete picture you can do anything you want to do with it including any simplification or continuation of the development as well as documenting the complete picture so that others have it a bit easier.

One thing I consider is branching from the code and, for the first time, really cut some functionality of the original code (the world difference update moves). The disadvantage would be that functionality would get lost and the advantage that quite some code would not be necessary anymore, so I would need to understand less and also I don't like the idea of moves which basically update the whole world. Once you have them you basically don't need any other moves anymore.  Of course the missing functionality would have to be included again at a later time. Hmm, it's a difficult decision. I will postpone it a bit to give me more time thinking about it.

1 comment:

  1. Open source game development can be a thankless task. Keep at it. Also drop by the FreeGameDev forum and announce this project. I found it by sheer chance!

    I will try to build it soon and have a poke around too.

    ReplyDelete