This site requires JavaScript, please enable it in your browser!
Greenfoot back
botman

botman

ECU, Perth, WA

botman's scenarios

play RPG Sim

botman's collections

This user has no collections

Recent Comments | Show All

botman

2009/6/3

Really nice. :) Othello was one of the first computer games I played.
botman

2009/6/3

Hmm, fair enough. My main motivation for using 'this' is I mostly work with PHP, which has a huge library of global functions. So I'm used to having to identify class methods when calling them. Next update, I'll work on removing 'this' from the method calls. I will keep them for variables though as I find a lot of value in being able to skim code and separate class properties from local variables. As for the class variable placement, yeah, that was something I was experimenting with. You've got the "Principle of Proximity": keep related actions together (see Code Complete, 2ed, pg 351). That works a charm within routines, but I was trying to extend it to the class level: if a class variable is only used by one or two methods, group them all together. I'm not sure it works though, so again, next update I'll try moving all the class variables to one place. Cheers.