I’m delighted you did that, Ron, because I’ve been wondering how an Agile programmer like yourself would approach our kind of projects. And providing all that detail really gives a feel for the whole process.
I was surprised that you didn’t include more obvious tests to start with, to avoid programming dead ends, but I’m guessing that while you might do this in a bigger project, even then, your initial tests would still only be a fraction of the ultimate test suite. So I can see how you keep developing the test suite as you go.
I’m wondering how you would run tests in a visual program like Codea, where, for example, my key test is whether I see a dungeon wall when the program loads, and whether I can move about correctly. When you’re working in 3D, I’m not sure how to run automated tests, other than on sub systems which return numeric or string values. It’s difficult to tell Codea to run something and check that the picture looks correct!
I did something today which feels quite a lot like your refactoring. I had coded my player character as part of the general code initially (because you never see him, and basically he is just the camera), and that was working, but felt messy. So I took all that code into a class, which took a couple of hours to straighten out. I was thinking I should have done it that way to start with, but your approach seems to suggest that it is OK to start coding simply, as I did, and add more structure as you need it, even if it means reworking. I need to think about that.
(Incidentally, when it comes to swapping information from my PC to the iPad, I keep Notepad open with a file saved to a Dropbox folder, which I also have open in my iPad’s Dropbox app, which I simply then refresh). It is a nuisance not having a direct link between them.
Thanks for a great post. I hope you do more.