Subject: Re: Good programming practice

I've not contributed a lot to the list recently because I've spent most of my time over the last six months reviewing OpenScript coding and dealing with the issues Ian (hi Ian!) raises about programming style.

The 541 hand crafted tutorial screens plus a couple of thousand data and question screens have been written by 17 different programmers over a space of three years. These programmers came from a variety of backgrounds ranging from first class honours degree in Computer Science plus professional programming experience through to an honours degree in economics with no prior programming experience. This mixture of skills and experience has produced quite a variety of programming approaches even though all the development took place within quite a restrictive set of guidelines.

It has been our experience that it does not matter too much whether your scripts appear up or down the heirarchy in terms of the number of faults introduced to the code or the time taken to fix them. The most important factor seems to be the "natural" aptitude of the programmer; good programmers make things work well under either scheme and bad programmers cock it up regardless! I agree with (I think it was Tim) when he says that this is very much an art.

However, this does not help much in terms of practical advice so here is a list of the most frequent errors/faults which turned up in our reviews (some of these have little to do with the inheritance issue but have a lot to do with reliability and maintainability):

  1. Missing "forward"

  2. Inappropriate positioning of "forward"

  3. Inappropriate use of "break to system"

  4. Leaving sysSuspend=false

  5. Missing "system" variable declarations

On the subject of widgets and system books, I have made use of both approaches and I see the pros and cons as follows:

A. Self contained: all scripting on widget

B. System book (or book script) level: little or no coding on widget

C. Hybrid: widgets take system books and resources with them when pasted

I reserve final judgement until I have looked at the reliability metrics of the two versions of our development tools: the in-house production, system book based version; and the public release QuickStart self contained widgets version.

Cheers
Simon

----------------------------------------------------------------------
Simon Price                                      Direct: 0117-928-8462
TLTP Economics Consortium                        Office: 0117-928-8478
Centre for Computing in Economics                Home  : 01643-862-320
University of Bristol                            Fax   : 0117-928-8577
8 Woodland Road
Bristol  BS8 1TN                      Email: Simon.Price@bristol.ac.uk United Kingdom
----------------------------------------------------------------------

Revised 18/8/95
brianp@u.washington.edu (Brian Parkhurst)
University of Washington
Box 357260
Seattle, WA 98195-7260
206/543-9175