I work in an academic research laboratory. Many of the PIs and RAs within the lab write a fair amount of Matlab code. I am trying to come up with a good way to make sharing our code with each other easier.
For example, say I write a function that I think someone else may find useful someday. It would be nice to stick that code in a centralized place for others to find. I envision that over time, this place becomes a database of many useful functions and scripts. Basically, it would become similar to an in-house MATLAB toolbox.
It would be great if this database were searchable, easy to navigate, and low maintenance such that as students/researchers come and go, the database remains useful for new people.
I've thought of a few ways to implement this. 1) Shared folder on a network drive. 2) Dropbox 3) Wiki/Website 4) Webtool such as Blackboard or Sakai.
Has anyone set up something similar to this within their respective organizations? If so, I would love to get your opinion on the best way to move forward. Any insights or thoughts about this topic are welcome.
No products are associated with this question.
We all use a shared network drive that is added to the path on everyone's MATLAB. Every function in the shared drive has a common prefix so that we know that the function is a shared one and also so that none of the shared functions inadvertently masks a local user's function. This system works pretty well.
I agree it's not a trivial problem.
We use an svn repository, others in our collaboration use git. IMHO the differences are not worth the bandwidth used to argue about it.
And we use more than one flavor of Wiki to describe the code. Those differences are even less worthy of bandwidth.
I wish there was something similar to Javadoc that would go through a directory tree and produce html of all the documentation.
Matlab's Publish function is pretty cool but I haven't figured out how to do it on "everything".
We use a version controlled repository, stored on a central server.
Of course a network folder containing the M-files is very useful due to its simplicity. Matlab's LOOKFOR, HELP and DOC command helps to keep the overview in a way Matlab users are familiar with already.
It will be far more complicated to maintain the code: What happens if somebody developed a function under Matlab 6.5, leaves the company and some of the functions are not supported by modern Matlab versions anymore? You cannot remove the function, because you do not know who is using it. You cannot update the function in general, because replacing outdated commands by new ones cannot be guaranteed to have the exactly same behavior.
Therefore you need a standardized and really exhaustive documentation for each function. To get a rough overview to the occurring problems, download 20 arbitrary submissions from the FEX and try to run them. Then select 20 files from the 50 contributors with the highest ratings. Even in the later case you will fail.
Standard solutions to handle (not solve) such problems:
Play games and win prizes!Learn more