How to actually write a program?

Peter Hansen peter at engcorp.com
Fri Sep 3 17:51:49 EDT 2004


Nick Evans wrote:
> Hello there,
> I have been on and off learning to code (with python being the second
> language I have worked on after a bit of BASIC). What I really want to know
> is, if you are going to actually write a program or a project of some sort,
> how do you actually start.
> 
> Picture this, you know what you want the program to do (its features), you
> have a possably rough idea of how the program will work. You have opened an
> empty text file and saved it as 'mykewlprogram.py' and now your sitting in
> front of an empty text file... Now then.... where do I start.
> 
> Any ideas about this problem :-)

Sure, first you write a test.  Then you run it and make sure it fails
(because of course no other code exists yet).  Then you write just
enough code to pass the test.  Run the test again, and get it to
pass.  Clean things up and go back to the start...

http://diveintopython.org/unit_testing/

http://c2.com/cgi/wiki?TestDrivenDevelopment

http://www.amazon.com/exec/obidos/tg/detail/-/0321146530/104-0524681-1524713?v=glance

http://www.objectmentor.com/writeUps/TestDrivenDevelopment

http://www.agiledata.org/essays/tdd.html

http://groups.yahoo.com/group/testdrivendevelopment/

http://www.testdriven.com/

etc...

-Peter



More information about the Python-list mailing list