Best practices for small scientific computing projects

7 ビュー (過去 30 日間)
K E
K E 2011 年 11 月 28 日
If your group of a few engineers/scientists shares Matlab code and data across projects, what tools or approaches have been helpful for:
  • Sharing code and *.mat files
  • Documenting what a set of code does and what datafiles are used
  • Making code useful to someone besides the author. Organizing code/datafiles so others can easily find/use them, even in the absence of the author.
  • Making it easy for a user to find existing code even if the code name is not known
Here are some low-tech things I do presently...
  • Keep an Excel log of tasks with a link to the directory containing Matlab code. Each task is assigned a task number.
  • The task directory has a consistent name: c:\<myname>\matlab_programs\<general project category>\<my initials><task number><name of task>\ , useful for finding old work.
  • Add a header to every new mfile using InsertHeader.m from the file exchange, which I modified to add the author's name and program creation date to the header.
  • When processing raw data to obtain higher-level results, use a script to document which datasets were using. I keep datasets in folders named c:\<my name>\Projects\<general task category>\<type of dataset>\ , since datasets are reused for different tasks.
  • If the task results in a report with many tables/figures, they are generated by a script using wordreport.m from the file exchange. Easy to trace how the results were calculated and revise them. Appendix at end of report lists the full pathname of the mfiles used, which I copy to the the clipboard with
activeEditor = matlab.desktop.editor.getActive ;
mfileCurrent = activeEditor.Filename ;
clipboard('copy', mfileCurrent);
  • Include the full mfile name at the end of any email containing figures/results. If there's a follow up question, I can easily check my code.
  1 件のコメント
K E
K E 2012 年 1 月 26 日
Found a fantastic site on managing scientific projects (data and code), http://software-carpentry.org/4_0/data/mgmt/ .
This is exactly what I was looking for!

サインインしてコメントする。

採用された回答

the cyclist
the cyclist 2011 年 11 月 28 日
There are many methods, and many software tools, for doing version control in a multi-programmer environment. I do not have a huge breadth of experience, having only used a couple in the past. But I currently use, and like, GitHub: https://github.com/.
  1 件のコメント
K E
K E 2011 年 12 月 1 日
Thanks, sounds like version control would be a good New Year's resolution!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSearch Path についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by