I seek to adopt a coding standard for MATLAB, but I am not sure if I picked the right one.
To my best knowledge there is not that much available on topic of programming guidelines for MATLAB, other than this document. The document is well written and has good feedbacks. Standard was published in 2002 (on matlab central) by Richard Johnson but has not being updated since. Is there a more up to date version of it or similar document? (I really failed to google up something else).
Background motivation assumes
- Coding standards are important
- Although MATLAB has not change much since 2002, other languages and their approaches have. One could really benefit from those practices.
- The fact is a lot of people are writing new code using MATLAB or Octave. Although, one would argue the language is virtually dead (blah blah). I would rather not go there (let's mark it as an offtopic).
Why the codestyle is not good enough for me
I'd like to summarize here a few things. If you take time to read the document you might find that it
- tries to be too hungarian (it's cryptic and I really hate this in most cases)
- it has too many shortcuts (more less similar to the previous point)
- it is not supported by Mathworks (but it actually might be a good thing, since all the good stuff in MATLAB came from the user community IMO)
- there is no automated quality control tools respecting such coding style (here I mean not something like mlint as in *lint family, but more like pep8.py for python)
I guess the reason why such a tool has not been developed is actually the absence of a widely accepted coding standard.
I would really appreciate any of your criticism on the standard or information about a better one.
Do you have any experience on working with this standard? Which parts of it did not work for you? If you never used a formal coding standard but do have a valuable practice that does not fit into it - please provide an example.