[Oberon] Use of resources.

Frans-Pieter Vonck fp at vonck.nl
Wed Dec 16 11:42:27 CET 2015


Yes, one page per module seems ridiculous, and one page per procedure 
seems fair.

What strikes me is that my students show me piles of listings of code 
that reminds me of the windings green lineprinter paper I walked around 
with in the eighties. Pascal on the VAX. The programming projects of my 
students are self chosen, extracurricular activities and the need for 
structured programming emerges naturally in their learning path. By the 
way, I'm happily surprised they still feel a need to actually print 
their code on paper.

So the idea is the let them discover a sort of 'rule of thumbs' for the 
intellectually manageability of programs. (Wirth - On the composition of 
Well-structured programs). And then show them the wise steps to refine 
their code.

Also, as I scrolled through the Project Oberon book I found that the 
definition listings of the modules were around one book page.
Tomorrow I will make a hard copy of the Oberon book and to get a feeling 
of the intellectually manageability of Project Oberon.

Greets,
Frans-Pieter

Chris Burrows schreef op 2015-12-15 22:40:
> 'One page per procedure' possibly but definitely not 'one page per 
> module'.
> I don't recall seeing a quote but I have always used a *rule of thumb* 
> that
> if you can't see all of a procedure at once then you should *consider*
> refactoring it. Hence what might have been 'a page' in the past might 
> now be
> 'a screenful'. This is deliberately vague e.g. if I regularly use one 
> of my
> widescreen monitors in portrait orientation with a relatively small 
> font I
> can see a lot more than otherwise might be posible.
> 
> However, you should be very careful when communicating guidelines of 
> this
> sort to inexperienced programmers to make sure they they don't 
> interpret
> them as commandments set in stone. Otherwise they might arbitrarily 
> break up
> large procedures into smaller illogical chunks just because they have 
> been
> given a rule to follow. You should give some examples of horror cases 
> that
> obviously need splitting up and other examples of procedures that are 
> large
> for a good reason (e.g. a case statement with many cases),
> 
> Regards,
> Chris Burrows
> http://www.cfbsoftware.com
> 
> 
>> -----Original Message-----
>> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
>> Frans-Pieter Vonck
>> Sent: Wednesday, 16 December 2015 7:09 AM
>> To: oberon at lists.inf.ethz.ch
>> Subject: Re: [Oberon] Use of resources.
>> 
>> Hello Paul, Peter and all other oberonneurs,
>> 
>> one of my former highschool students is writing a Python programmes
>> that have very long listings. Despite the structured nature of Python
>> his programmes become to complex to explain to me.
>> Now I think I remember a quote from Niklaus Wirth where he states
>> that every module that is longer than one page should be rewritten in
>> separate modules.
>> Did anyone remember this quote? And, do you think this adagium is
>> only valid for the Main Module or is it also applicable for, say math
>> library modules?
>> 
>> Greets,
>> Frans-Pieter
>> 
> 
> 
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related 
> systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list