Home page Features Examples User documentation Contribute Contributors & acknowledgments

Programming rules

As the author is not a perfect programmer, you can tell him and discuss about wrong choices he made writing this code.

Nevertheless he tried to do his best and thinks some common conventions should be respected in order to improve Mathmaker. Here we go !

To keep the installation simple enough, all components should be written in the same language (i.e. python), although this may be discussed (the gui could be written using another language if there's a good reason to do that).

It is necessary to write object-oriented code as well as the programm already is.

The source code has to be commented well enough, please use the comments writing rules that have been used so far. The doc is realized thanks to Doxygen, you can use any feature of this software.

The author tried to respect the python writing conventions and made some personnal choices, please respect them. He also may have *forgotten* to use any of these writing rules : tell him which one(s) !

Some personnal choices are :

  • The names of the variables have been chosen quite often very long which is not practical but which is important to make an understandable source code where some algorithms are complex. Please choose appropriate names as well.
  • Use a comment looking like #___ at the end of a long test expression in an if statement. This makes the code easier to read.
  • Write everything in english

Please also use the programming structures that are already there (for instance, use the Parser object to add a new option, respect the Sheet/Exercise/Question structure, use gettext to write any new message to the user etc.).

Don't duplicate code (please avoid copy/paste or if you do so or find any code duplication (nobody's perfect), tell at least a word about it in the to-do list).

Please add as many new checkpoints in autotest as needed and never send a new version that's not running autotest perfectly.

SourceForge.net Logo