The first goal of this week was quickly reached. Turns out my stream article was much closer to completion than I thought. It really just need a going over and the code adding in. It did mean I had to figure out syntax highlighting for Hugo.
Mentioning testing last week had me primed and ready to get them going. The obvious place to write some tests was in some of the geometry code I was writing. Geometry code is simple to write tests for as by nature it’s not stateful. My game engine library has a dependency on core:html and as I wanted to run the tests from the command line I split the geometry code out into its own library. From zero to having some tests running took about 30 minutes. Refactoring took most of the time. The ease of adding unit tests to a Dart project is pretty impressive. Mind you I have spend most of my previous time in Java, C++ or similar.
Incidently, I am not sure I like the way libraries work in Dart. The trouble is I can’t put my finger on what is it. Sometime it feel like I am doing slightly more work than I need to. Libraries don’t take up much time and using them it pretty clear. Perhaps I am searching for something to not like about Dart. Programmers tend to search for problems or things to fix.
Moving on I got much of the physics engine working and scratch the surface separating axis collision detection. Hand if you want to move the two objects apart. I say scratched as I handled it for a simple shape. Finally I started work on the next longer piece for this site. Originally I was thinking I would do a review of the past 10 weeks but at the moment it’s turning more into a what motivated me to do this experiment. I also planned out another couple or programming articles I might write. I haven’t committed to them yet.
This comming weeks has all the hallmarks of a distracted week when it comes to coding. We have visitors at the weekend and a couple of distactions mid week. This means I am going to commit to a couple of hours working on the next game and a couple of hours working on articles. I imagine I will get more done but don’t want to stress if I don’t.
The flu like cold I had a few weeks back has a long recovery curve. I have not had an illness like this for at least 5 years. Does anyone remember Swine flu, I was one of the lucky participants of that. While I can walk fine for an hour or two, I stuggle if I do any endurance training above that pace or if I try to do any explosive exercise. At least my brain seems to be back up to a reasonable level. So I started a bit of a get healthy time. The past two days I have cut out refined sugar from my diet and am aiming at helthy food more. Honestly I could do with losing a bit of weight but really this is about health and letting my body recover so I can do the sports I like to do. Yes I know it is a fools errand to do something like this just before Christmas.