Reply to post: Trust the user for good tests

Britain has no idea how close it came to ATMs flooding the streets with free money thanks to some crap code, 1970s style

Will Godfrey Silver badge
Facepalm

Trust the user for good tests

In the early 80s I wrote a pinball game for the BBC B. Unlike those on the market at the time, the ball in mine followed something like a parabolic curve, and you could get real control of the speed. This worked fine for me and a bunch of friends, until a new guy joined us. After familiarising himself with the game, he complained that sometimes the ball would go 'through' the flippers. We didn't believe him at first, until he was able to do it repeatedly. It turned out he had dramatically better reaction time than any of the rest of us, and (like in a real pinball machine) timed the flick so just the tip of the flipper hit the ball to get maximum velocity. The code was slow enough, and the look-aheads far enough apart that this came between two of them. The solution was one of the very first bits of 6502 assembler I did.

P.S. I was quite proud of making rebound speed dependent on where on the flipper it hit.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon