How to actually write a program?

Alexander Hoffmann alexander.hoffmann at netgenius.de
Tue Sep 7 01:39:17 CEST 2004


Hello,

On Tuesday 07 September 2004 01:02, Peter Hansen wrote:
> Neil Benn wrote:
> > Nick Evans wrote:
> >> I have been on and off learning to code ...
> >
> >          It's good that you are thinking of this rather than just trying
> > to manically write some code to see what happens.  As a general point,
> > there is a system that you can use to help you model out your program
> > (taught to most computer science students).  This system is called UML
yes, I know ;-)
> > (Unified Modeling Language) - I would advise getting a good book about
> > UML and reading through that.
>
> Ahhh!!  Run!  Run, Neil, run!  UML!

Please, stay calm ! I recommend you not to run because because UML is nothing 
you should fear, but also forget about the UML book FOR THE MOMENT !

Please reflect on your goals. Why do you want to write programs, what are they 
meant to be used for in the end ? If you want to write very small programs to 
be used like shell scripts on your private Linux box, then never spend your 
time with UML, extreme programming, unit tests and all that stuff. 
If you plan to write rich featured applications or even deamon processes then 
first lean the basic ideas of how to write code. There are lots of tutorials 
and books around that help you gain success very quickly. Write some little 
apps and watch them doing their job.
When you're done, then take care of how to write bigger programs. Now you 
should learn how to design an application, in what parts or modules it should 
be implemented and how these modules shall communicate / work together. This 
is what you should utilize PARTS of UML for. I strongly recommend you to look 
at static structure diagrams, use cases and time line diagrams. The other 
parts of UML are only useful in theory, they take much more time to be 
created than they will ever save.
Once you are familiar with basic Python programming and with application 
design (e.g. UML), then the last step I recommend to become a *nearly* (who 
really claims to be completely) perfect developer is to understand the 
importance of testing. When you are implementing a real big application you 
are lost without it. I am using unit tests and they help me very much. With 
these you can test first very small parts of your application and then later 
combine the test to cover more and more of the whole program. Indeed there is 
no need to argue for unit testing (when writing really big applications): try 
it and you will appreciate it !

Regards,
Alex

> > It's is complementary to the XP (Extreme
> > Programming) stuff that people are talking about.
>
> Ahhh!!! Run away some more!  UML and XP are nearly anti-thetical.
> Don't even consider going there.  (Well, consider it, but please
> don't waste any money buying a UML book as you do.  Find a few
> web sites, then ... run away!  It's cheaper that way.)
>
> In my opinion, if you try to get a beginning programmer to work using
> UML when he isn't even sure how to start writing code in an empty
> file, you will not have a beginning programmer for long.  And I
> don't mean because you've just got him over that initial hump...
>
> In another opinion of mine, if you try to get a more advanced
> programmer to work using UML, you also deserve whatever you get...
>
> -rabidly-anti-UML-ically y'rs,
>   Peter



More information about the Python-list mailing list