How to actually write a program?

Max M maxm at mxm.dk
Sat Sep 4 05:28:05 EDT 2004


Jp Calderone wrote:

> Nick Evans wrote:
> 
>> Now then.... where do I start.
>> Any ideas about this problem :-)
> 
>   Close the file.  Open test_mykewlprogram.py and begin writing unit tests.


I completely agree in the value of test driven development, but for 
someone writing a first program I completely disagree!

He will have to fight both programming in itself, and the test driven 
development process.

There is a big difference in learning to program, and in programming itself.

You should simply start coding! Solve problems as you go along. The most 
important thing is to allways be aware when something is repeated.

You should focus on the DRY principle.

Dont Repeat Yourself
====================

If you have written a similar piece of code 3 times, you should refactor 
it into a function.

You don't state if you know object oriented programming, but if you 
don't, you should read up in it while writing your program.

Then try to solve your problems with objects.

Also read some good books about programming. Stuff like "The Pragmatic 
Programmer" & "Code Complete"

On your next program you should then start writing unittest...

regards Max M



More information about the Python-list mailing list