Jon’s PhD Journal

March 17, 2007

A sort-of weekly review …

Filed under: Coding — JDE @ 12:58 pm

Right, quite quiet on the blogging front this week, so a quick shake down of the week’s action:

  • Monday: there’s a blog posting for this
  •  Tuesday: bit more reading — didn’t write it up though
  • Wednesday: swearing at computer as attempted to get everything sorted for Thursday’s trip to Reading: videos, print-outs, etc
  • Thursday: trip to Reading
  • Friday: Installed SAS … which took *ages*
    • will now factor in teaching myself SAS as well!

Now one of the pertinent things Will said to me on Thursday that’s really stuck and resonated is about ensuring that as I now have a simulation capable of creating data, is that I need to be able to map the code to the data it produces. I’m going to do a bit of investigation to see what is the best thing to do in this space: how to store the source code and data it produces, on a date basis, with some details of the parameters that have been changed/modified. Needless to say, this is very much a housekeeping activity, but an essential one.

Today I’m trying to change the while loop in the simulation’s FlockBEhaviour class at about line 85 to a for loop, so I can tell the simulation to run for a certain number of iterations, and then stop. However, I’ve mixed up a counter variable with the var. that the system uses to iterate over the boids – dang! So the plan is to:

  • get the number of boids in the simulation
  • at the end of the for loop, check to see if the var. counting the boids has exceeded the number of boids in the simulation: if it has, reset it to 0, if else i++.
  • iterate around the loop as planned

… And from looking at the code to date, and the esoteric comments around it, dear me do I need a source code control system! The ability to check out code, make changes, re-commit it and be able to diff. files is a huge, massive requirement now!!

Wandered off and have downloaded Subversino (SVN) and TortoiseSVN to manage the above — hope it works!! More details no doubt later …

Blog at WordPress.com.