[Tutor] Valid Username Program

dn PyTutor at DancesWithMice.info
Fri Oct 9 21:40:34 EDT 2020


On 10/10/2020 06:44, Dennis Lee Bieber wrote:
> On Fri, 9 Oct 2020 12:17:38 +1300, dn via Tutor <tutor at python.org>
> declaimed the following:
> 
> 
>> In 'the ?good, old, days' you would have been asked to draw a flowchart
>> of the decision(s). Such a 'picture' quickly illustrates @Richard's
>> point - neatly covered by
> 
> 	And even not quite the "good, old, days" one would have used
> Nassi-Schneiderman (aka Chapin) charts. N-S charts being more structured
> than flowcharts, and hence fit better with the "structured programming"
> phase of the science.
> 
> https://en.wikipedia.org/wiki/Nassi%E2%80%93Shneiderman_diagram


I'm a flowchart-native and that may be the reason that I never 'took' to 
N-S charts. Per @Alan's observation, I've never seen them used in-anger 
either, but once did have a Tutor who liked them and I agreed to let him 
teach accordingly.

The 'problem' with training courses and 'toy examples' is that there is 
seldom an obvious *need* for diagramming. Thus, trainees inevitably 
prefer to go straight-to-code. Accordingly, the power and virtue of 
diagramming is often 'lost'!

When developing with flowcharts, there is a discipline of avoiding 
'writing code', in order to concentrate on the logic. Whereas with N-S 
the tools were very much (as you say) to do with the program[me]'s 
structure and how it would implement the logic - but where did the logic 
[design] come-from? Almost a feeling of, write the code first, and then 
do the diagram[me]s; so that the Tutor doesn't criticise... (perhaps?)

In the case of the OP's problem, where there were three outcomes and 
thus two?three decision-points; my feeling is that if you put an N-S 
diagram side-by-side with a flowchart, the latter would be both easier 
to express, and to read.

The other consideration (which was offered to the OP as a 
possible-solution), is that when something is charted 
(pictured/diagrammed), we will often realise some advantage to 
re-arranging the logical sequence. This is a lot easier with a flowchart 
- albeit my opinion and maybe others feel otherwise...

Nevertheless, will agree in the sense that 
https://en.wikipedia.org/wiki/A_picture_is_worth_a_thousand_words  - 
many problems that 'Apprentices' bring, could be easily solved by using 
a 'visualisation tool'!
-- 
Regards =dn


More information about the Tutor mailing list