mea culpa

Pointers: not just for xmas

File this under the category of “handy coding hints”…

With the disparity between CPU performance, the benefits of CPU-cache memory and system RAM, it’s not always best to retain large caches of relatively trivial generatable data – a histogram of the last 3-4 entries might be all you need especially if you can very cheaply keep them ordered so that if 1 in 3 calls produces the same result, that result will be handy.

On the other hand, a cache might be useful if you have a comparatively small result set but a lot of users of the same results. You could then give out pointers to the result sets so that when the data changes you only have to update the cache and everyone’s effective data changes immediately. That could be quite the saving.

Just keep in mind that you gave out pointers a few minutes later when you write code that periodically expires said data. And more important still, if a few minutes later you write some code that periodically clears out the cache and rebuilds it, don’t act all surprised when the data you were pointing to seems to keep going away…

Boy do I feel like an idiot :) At least my brain caught up with me before I ever tried to actually run the thing :)


You will have to look closely.

C:\PROGRA~1\Playnet\Playgate>more ftplog.txt
*** fceSetString(0,21,' 5')
*** fceSetString(0,21,'')
*** fceSetString(0,21,'/')
*** fceSetString(0,21,'wwiiol12901291a.exe')
*** fceConnect
FCE Win32 Version 2.1.3 Build 1
Description:  'WinSock 2.0'
LocalHost: 'KFS64'
Server: ''
ServerIP =
R: KFS64<102:294.131>

If I weren’t quite so busy at the moment, this would be an excellent time for a hearty post on the evils of data duplication.

If you go down to the woods today…

… be wary of bugs under rocks.

The last couple of days have been “interesting” (especially in terms of getting any sleep here). The complex and scary stuff in Battleground Europe’s 1.29 patch has worked as you’d expect it to. But as any coder ought to expect, the little things went awry.

If your BEGM broke…

Oops :) (I added some extra XML attributes to one of the files).

I’ve fixed it but you’ll need to kill your pre-existing “config.xml” which it appears you have to do manually.

Start > Run > “%USERPROFILE%\Local Settings\Application Data\BEGameMonitor\”

(including quotes)

Delete config.xml, restart BEGM.

When it only works in debug…

… check you didn’t put functionality inside an assert. Assert on parameters, results and status, please, thanks. :)