Just a short note regarding recent changes in Konstruisto. I committed the last two weeks to finishing roads, I wanted to finish algorithm implementation before Easter break.
It all took way more time than I anticipated, I needed two algorithm iterations to cover all the cases I had to. The work has been slowing down because of my poor design idea. I made some choices that ultimately resulted in bugs. And there would be more if I decided to continue. Also, I’m lacking unit testing and I can’t work without it anymore.
I decided to throw it all out and try roads again. That means I probably won’t finish a playable version in May and implement the initial list of features by the end of June.
What I think I did wrong?
No clear idea. I just started writing a quite complicated thing. I was OK for starters, but I should have to try to structurize it later.
Crappy code. I just wanted to write a feature in time (I feel the deadlines over my neck all the time). I didn’t think over consequences of some decisions, some of them even weren’t decisions, but got into code without me noticing potential problems. How could I store a pointer to object inside a mutable vector?
No testing. Previously, all the features were quite simple and I could check if everything is fine quickly. Now, I have too many cases to track them all. Without a set of tests, I was never sure if I didn’t spoil something else.
What will happen?
I pushed the current state to GitHub. Also, I created branch
new-roads and will take on this once again. But this time:
- I will write a proper design doc to know how roads interact and how to leave room for possible changes in future (e.g. roads of different width).
- I will setup some unit testing. Google Test looks nice.
- I will write the implementation.
This means I no longer aim to finish the project by the end of May/June. Nothing changes regarding the posts, I will update you regularly.