[Tutor] Flow charts

Mitya Sirenef msirenef at lightbird.net
Thu Jan 10 04:04:32 CET 2013


On Wed 09 Jan 2013 09:26:15 PM EST, Ed Owens wrote:
> I'm working my way through Chun's book "Core Python Applications
> Programming" and can't get one of the examples to actually work.  In
> trying to analyze the problem (good learning approach) I had troubles
> understanding the interactions between the two classes of objects.  As
> an old FORTRAN programmer, I picked up my pencil to flowchart the
> code, then realized I didn't know how to flowchart an OOP.
>
> Google led me to UML (Unified Modeling Language) and OMG (apparently
> Oh My God!!!).  Looks more complicated than the code I'm trying to
> understand.
>
> It there a technique that people use to figure out how do design OOP
> models, objects, and the information flow?
>
> Thanks for helping a newby.
> Ed
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>


Here's what I do sometimes:

1. write down the steps that need to be done
2. write pseudo-code for the steps
3. revise
4. make one single class with many methods. If you are familiar with
  programming with just functions, this is the same but instead of
  functions you have methods.
5. note which methods should logically be split up into separate
  classes & refactor


Once you do this with a few programs, you'll be able to start
with several classes right away, without the need for intermediary
'main' class.

I haven't used diagrams to design in a long time so I won't comment
on that.

HTH, - m




--
Lark's Tongue Guide to Python: http://lightbird.net/larks/


More information about the Tutor mailing list