Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programming experiments

I frequently code numerous experiments to test various algorithms, libraries, or hardware. All code, dependencies, and output of these experiments need to be annotated and saved, so that I can return to them later. Are there good common approaches to this problem? What do you do with your experiments after running them?

like image 522
Don Reba Avatar asked Aug 24 '09 13:08

Don Reba


People also ask

What are coding projects?

Coding projects are simple applications built by junior developers or beginners. These apps usually have a single functionality, like a to-do list app or a random number generator. These projects are easy to conceptualize and build end-to-end as a single developer that's at the beginning of their career.


5 Answers

At a prior job we had a project in SVN called Area51 where people would write test code. The rules were

  1. create a package namespace
  2. start via a public static void main
  3. add comments via javadocs
  4. leave the project in a compilable state
  5. the project can never be a dependancy of other code

On a three person team this worked out ok. We could put "what if" code there to share and it was easy to run it via ide or command line

like image 61
sal Avatar answered Nov 02 '22 06:11

sal


When I do these, they are usually project specific, so they go in a subdirectory of the project (usually named "Investigations" in my case). This gets checked into the version control system with everything else.

Results (where appropriate) go into the same subdirectory of "Investigations" as the code used to produce the results.

like image 24
DrAl Avatar answered Nov 02 '22 05:11

DrAl


http://subversion.tigris.org/

like image 40
Galwegian Avatar answered Nov 02 '22 07:11

Galwegian


I just have a folder which I call OneOffCode

This is a folder of just code I have written either learning a new technology trying to prove a concept etc. . . This is non production code.

I usually back it up to a jump drive and move it with me from Job to job, or computer to computer.

like image 45
David Basarab Avatar answered Nov 02 '22 06:11

David Basarab


I'm usually switching between C# and C++. So, I have a Test console application for C# and C++ in a "Sandbox" location, under source control. The console applications are both setup the same way where there is a Main which calls the test that I'm trying at that time. When I'm done I keep the old methods and comments and just clear out the Main when the next test comes about.

I don't know if it is the best, but after it is setup then it is pretty quick to get in, get the answers, get out and have it all saved for the next time.

like image 32
Loren C Fortner Avatar answered Nov 02 '22 06:11

Loren C Fortner