That was week 104
Sunday, October 14, 2012 at 18:05
martian77 in DPhil, weekly

Getting this one in just before week 105 starts. 

A lot more code written this week. The tasks are really getting there. There are a few more to add, but the system itself is now mostly in place. So I've moved on to sorting out the weather. 

I've got a bit of an issue with where and how I keep the hard-coded data that might eventually change. So the crop details, for example, or the weather and the effect it has in each season on each crop. Or the seasons themselves, and which tasks get done when. The approach I've taken for the tasks and seasons and I'd like to take for the weather is to have an abstract class defining the list and the item (e.g. a SeasonList and a Season). I then override these classes with the game-specific versions (e.g. CoreEarlyRainsSeason and CoreSeasonList). These are hard-coded with the right details, but wouldn't take much work to change out to use different seasons (or tasks). 

With the crops (and all the game assets) I did that earlier on in the process, and stored the details in the database. In some ways this is neater, because they use the same hibernate code structure as everything else. In other ways this is harder to change if the game assets were to change in other extensions to the game. I'm not going to have time to go back and alter this now, so it stands. But it's causing me some thought now, as the weather spans the two different types of code I have in place. 

I know that sometimes getting something in place is the most important thing, and code structure can always be altered. I still spend what feels like too much time agonising over it though! 

Other than that we had a lab meeting on Tuesday, with Judith reprising a talk she gave at AWARE in Edinburgh. Katy successfully defended her thesis in her viva, so we had to have a little champange on Wednesday. Edgar brought in a cheese fondue on Tuesday for us all to share, and Jim has had a really bad cold that is quite similar to the one I had (which makes me feel a little guilty). 

I did more exercise, but didn't feel too bad for it. So fingers crossed from here on it should just get easier. Let's hope!

Article originally appeared on Life on Mars (http://www.martiandaze.net/).
See website for complete article licensing information.