Keep track of your code

Dear all,
I am an amateur programer, writing my code in R or matlab.
I would like to find a program that will help me organize my files. For example I would like to have a file that stores data about my functions .Their purpose and what they do.
Could you please suggest me a good way to keep track of what I am doing?

Regards
Alex

Well, how do you know what you are doing if you need to keep track of what you do? Don’t you have an application/module roadmap (popularly called “Definition”) before you start making?
Anyways, for one, I suggest you to use some CVS, like SVN (you can have 2 free projects on xp-dev.com). Short description of method is OK to put in code as comment. If you have availability to use some framework, it’s easier to track what you put where.
Good old txt file is also OK to keep general track of what is done…

The standard thing to do is to write documentation in the comments above
each function. for example (in C, but appplies to all languages). That
way as you change the source, you are also motivated to update the
documentation, and the two don’t diverge.

For example:

Code:

/*

  • Does foo and bar.
  • @param arg
  • some argument that is needed. Must be between 0 and 100.
  • @return
  • Returns arg, but foo’ed.
    */
    float myfunc(int arg) {
    //do something
    }

If you want to do it really properly, look at
doxygen, which if the comments above are
properly formatted (something like above), allows extracting them into a
API reference. You can make HTML, PDF, dependency graphs, all kinds of
fancy stuff. This is what makes the development documentation for big
open source projects you usually see online.