Loren on the Art of MATLAB

Turn ideas into MATLAB

Coding Best Practices – A Good Read 7

Posted by Loren Shure,

Coding Best Practices - A Good Read

I have written blogs before on coding best practices in MATLAB and they have always generated a lot of great feedback. I recently came across a language-neutral list of best practices for scientific computing, written by Greg Wilson of Software Carpentry.

If you don't want to start by reading the whole article, I strongly encourage you to read Greg's summary. He breaks the practices into eight categories. I have to say, I think they are very well stated, starting with "Write programs for people, not computers.".

I have to say, I think Greg hit the nail on the head.

Do You Violate these Best Practices?

The most frequent violations I see include not using a debugger and, a lot of code is trying to optimize it before being sure it is truly correct. Which practice is your Achilles' heel? Let me know here.

Get the MATLAB code

Published with MATLAB® R2013b

156 views (last 30 days)  | |


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.