| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

View
 

codingGuidelines

Page history last edited by David Groppe 6 years, 11 months ago

Please follow the below coding conventions when editing or adding to EpiSurg:

 

General Code Edits

  • When you make any significant changes to the code, make sure everything still works by running the relevant test scripts in EpiSurg/iELVis/TEST_SCRIPTS/. In particular run, allWikiTestScripts.m and allExtraTestSCripts.m. The former contains all the example code posted on the wiki. The latter contains test code that is not on the wiki.
  • When you add new iELVis features/functions add test scripts for them.
  • Use camelCase when naming functions, variables, and function parameters

 

 

MATLAB Code Edits

  • Try to make everything you add compatible with Windows, OS X, and Linux. When you provide paths to files or directories, use MATLAB's fullfile.m function.
  • Use saveas.m instead of savefig.m to keep compatibility with pre-2013b versions of MATLAB.

 

 

Wiki Edits

  • When you change the code in the wiki examples update the relevant test*.m file in the TEST_SCRIPTS folder. There is one for each page of the wiki that runs through all the code on each wiki page to make sure that it works. This way we can ensure that at least all the examples work. The script allWikiTestScripts.m lists all of them.
  • Italicize lines of code on the wiki. Put >> before MATLAB code and $ before Bash command line code.

Comments (0)

You don't have permission to comment on this page.