I spent a few hours today hacking the Java solitaire thingee, I'm close to a landmark. Which would be a human playable GUI the can store my games to disk.
Some of its internals are a wee bit iffy, the look/GUI is awful and I really do need to revisit the unit tests. Still I'm pleased on the whole.
Mostly what I'm pleased about, is that, for once, I did something well—I'd planned an Observer pattern, but plans and fulfillment are often strangers to one another. But when I plumbed the thing together today it worked [almost] seamlessly. What was particularly pleasing was that I could insert Objects [almost everywhere] and it still, just, worked. I'd meant this to happen, but such outcomes do not always occur in my experience.
I'm tempted to crash-on. That would be a wrong thing. In a couple of places my Objects didn't perform in the way that I'd expected them to, despite the tests that I'd written. As Phil W says, the first step is to, "write a failing test". I don't have much trouble writing failing tests, but I know what he really means—if you can write the test you can write the code; and you should write the test before you write the code.
Anyway tomorrow I write the I/O. I think that I'm going to go for string [UTF-8] and XML. And possibly HTML. I won't be serializing any Objects any-time soon methinks.
Comments
New comment
Hey Neil
It all sounds fascinating and optimistic, though I must admit it doesn't mean an iota to me!
Good luck with your project anyway. Hope you're keeping ok.
Sue
New comment
Hi Suz
Not sure that it means much to me ethier.
But there's a smile on my face and I hope that there's one on yours.
neo