[Oberon] Input.Timer in Native Oberon
Chris Burrows
chris at cfbsoftware.com
Sat Jan 30 22:34:08 CET 2016
> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> peter at easthope.ca
> Sent: Sunday, 31 January 2016 2:13 AM
> To: oberon at lists.inf.ethz.ch
> Subject: [Oberon] Re (2): Input.Timer in Native Oberon
>
> From: Chris Burrows <chris at cfbsoftware.com>, Fri, 29 Jan 2016
> 08:04:10 +1030
> > ... values 100 and 12 have a certain significance in this context?
>
> Sorry but 100 and 12 are magic numbers. 2% docked from grade for
> each.
>
OK :(
>
> > PixelCount = 1024 * 768; (* Better than PixelCount = 786432; *)
>
> You might be astonished at the number of students in a first year
> class who don't recognize "1024 * 768".
No - it doesn't surprise me. However it would surprise me if those same
students knew what a 'pixel' is. They might have some idea of what a
'megapixel' is perhaps because they have a few of those in their phones. ;-)
>
> Absolutely! I gave names to the magic numbers.
Much better! Also:
1. Replace 'KP' with 'KeyPad' (or at least 'Key') and there is no need for
the comment.
2. Use camel-caps consistently. E.g. what is a 'pollinter-val'? Should be
KeyPollInterval
2% docked from grade for each.
>
> Incidentally, Timer is not an enlightening name for the procedure.
> Too general. It does more than time. KPpointer? KPcontroller?
> Many names could say more than "Timer".
>
Agreed. CursorKeyTimer, KeyPadTimer or at least KeyTimer for those who don't
like long names.
Regards,
Chris
More information about the Oberon
mailing list