Skip to content. | Skip to navigation

Personal tools
Document Actions

General programming standards

  • Object oriented programming: everybody will use good programming object-oriented practices. For an indication of what ‘good practices’ means, please consult the very good document Coding standards and guidelines
  • Everybody will structure the code of models in terms of:
    • Initialisation function: to be invoked once at the beginning of the program run;  will contain constructors, initialisations, parameter settings, etc.
    • Step function: to be invoked at every step of the simulations
  • Graphic/Shell mode: Each program should be organised in such a way that a parameter allows running it either with or without graphical output/interface (useful if speed is required). In general, the core and the graphical components of the program should be completely separated.
  • Doxygen comments: Code will be commented using the standard ‘Doxygen’.
  • Comments will at least furnish this information on the code:
    • Overall goals and functioning of the model
    • Functionality implemented by the step function
    • Functionality implemented by the program’s main components (classes, methods)
    • Meaning of variables, global or inside classes
  • Output data files collecting data during the simulations should as much as possible conform to this standard:
    • First line: indication of data of following lines, with no space caracters, for example:
      time_step    neuron_1    reward        prediction    no_action
    • Each following line: data relative to a specific time-step of the simulation: as many as indicated in the first line, possible numbers, for example:
      1                0.5643        1               0.7              1
    • Each element at each line is separated by a tab; each line finishes with an ‘end-line’ character