in reply to
This is just to thank everyone who contributed to this thread, from which I have learnt a lot. Thanks, danke, grazie, merci, gracias. And also to draw attention to Ovid's excellent node which covers a lot of similar ground in a systematic way. And also to link this thread which was another source of helpful advice on planning. Thanks again.
Update: camelman's thread on Style & subroutine organization is also pretty instructive.
Another update: here are a couple more threads that cover similar ground to camelman's. This one deals with tensions between different over-arching principals of programming, and this one talks about when to break code into subroutines - tilly's contribution being, to nobody's surprise, a bit of hightlight.
§ George Sherston