Which version control system is trivial to set up and use for toy projects?

I teach the third required introductory course at CS. In one of my homework assignments, students are asked to speed up the code they wrote for the previous assignment. A factor of ten accelerations is commonplace; 100 or 1000 factors are not unheard of. (To speed up 1000 times, you had to make rookie mistakes with malloc ().)

Programs are improved with a sequence of small changes. I ask students to record and describe each change and corresponding improvement.

While you improve the program, it can also be broken. Would it be nice to back off?

You can see where I am going: my students will benefit from version control. But there are some caveats:

  • Our computing environment is locked. Everything that depends on the central repository is suspicious.
  • Our students are incredibly overloaded. Not just classes, but jobs, sports, music, you name it. To use the new tool, it must be incredibly lightweight and have obvious advantages.
  • Our students most of all work in pairs. Bit problems between accounts are problematic. Can this problem also be solved with distributed version control?
  • Complexity is the enemy. I know that creating a CVS repository is too difficult. I still have problems because I only do this once a year. I was told that SVN is even more complicated.

Here are my comments on existing systems:

  • I believe that central version control (CVS or SVN) is excluded due to the fact that our students do not have the administrative rights necessary to create a repository that they can share with one other student. (We are stuck with Unix file permissions.) Also, configuring on CVS or SVN is too complicated.
  • darcs is easy to set up, but it’s not obvious how you share things. darcs send (sending patches via email) seems promising, but it’s not clear how to configure it.
  • The introductory documentation for git is not for beginners. Like installing CVS, I have problems with.

I am asking for suggestions about which source control to use for beginner students. I suspect that we can find resources to place thin veneers on top of the existing system and simplify existing documentation. We probably don't have the resources to write new documentation.

So, what is really easy to set up , commit , roll back and share changes with a partner , but don't you need to easily integrate or work on a scale?

A key limitation is that programming pairs must be able to exchange with each other and only with each other , and pairs change every week . Our infrastructure is Linux, Solaris, and Windows with the netapp filter. I doubt that the IT staff wants to create a Unix group for each pair of students. Is there an easier solution that I skipped?

(Thanks for the accepted answer, which outperforms the rest due to its excellent link to Git Magic , as well as useful comments.)

+66
version-control darcs
Nov 28 '08 at 18:52
source share
18 answers

I would say something like Git might fit the bill:

  • As it is a distributed system, you do not need to have a central repository, repositories exist with the source directory
  • Easily create patch files that can be mailed and applied.
  • Although it might seem that Git is difficult to use, the basic ideas of compiling, merging, adding and deleting files are not so difficult.

Look at this Git Magic site or even this GitReady tooltip site

+83
Nov 28 '08 at 19:11
source share

Second choice Mercurial

Benefits

  • Great documentation.
  • A graphic representation command for displaying a branch.
  • Cross platform.
  • Comes with a graphical interface for all platforms (TortoiseHG or thg).
  • Built-in web server for viewing the project.
  • Can support your project on your finger.
    • Work can be saved, even if you remember only one member of a pair of their laptop. Not that this ever happened.

disadvantages

  • You must install Python if it does not already exist.
    • Easy to do, but this is another step.
  • Understanding the difference between push / pull vs update / commit.
    • (This applies to all distributed VCS).
  • The difference between heads and tips.
  • Some commands are not available immediately; they must be explicitly included.
    • (This is usually considered beneficial to the community because it simplifies the process; some others disagree.)
+47
Nov 28 '08 at 20:40
source share

Subversion is easy to install on windows, linux and mac os x. I do not know what program they are programmed into, but the subquery plugin for Eclipse is quite easy to install and hides some difficulties with the repository.

And the complexity of the repository? It is so simple if you have a trunk, tags and branches in each project. And they may not have much time, but they need to get time to learn SVN (or the like) because it is a skill that looks good on their resume.

+16
Nov 28 '08 at 18:57
source share

I suggest looking at Fossil - it is one executable file without any dependencies to run, it controls all traffic through HTTP, saves all its repository data in a single file, which can be called anything, and includes a controlled version of the wiki, error tracking and web server out of the box. Oh, and it's completely distributed.

+14
Oct 20 '09 at 10:09
source share

I would recommend Mercurial (also called "hg"). It is an open source distributed VCS and does not need a central repository. Using it day by day is easy. The official website has enough documentation. For example, check out QuickStart .

The decisive moment for me was the excellent GUI for Windows - TortoiseHg . It seems to be also supported on Linux (not tried it myself). And of course, for most versions of Linux there are command line distributions.

Of course, from this side of the fence, it seems easy, maybe for busy students the concept, benefits and daily work will not be so easy to get used to. But in the end, instant commits, the ability to return to any revision and create a new branch from there automatically, and intelligent diff / merge is simply irreplaceable.

Hope this helps!

+11
Nov 28 '08 at 20:13
source share

For real ease of use for your students, you can install an SVN server with autoload enabled, sharing webdav. That way, they can simply mount their directory using WebDAV and automatically run each time they click on save. Accessing the story is easy with TortoiseSVN, Eclipse / Visual Studio plugins, or some web access solutions like ViewVC. For your access restriction restrictions, you can use subversion's built-in authentication (see here ) - which uses a simple configuration file for fine-grained access control.

The configuration has become much simpler (and now there is better documentation - see the SVN book ), but you can get a little if you need several separate repositories with access restrictions and a web interface.

Autocommit is more suitable for "my office worker / boss", who has no idea what is going on inside the computer, version control is required for text documents. Students taking a programming course may also need to learn how to use decent SCM anyway.

Git and Mercurial would be nice because of their distributed nature, which facilitates data exchange, but both tools do not have GUIs that are really convenient to use (TortoiseHg looks promising and gitk looks like a very good browser in the repository, but your students don't care I would have to wrap my heads with command line tools to make full use of the tools). Also, the concept of distributed SCM is a little harder to understand.

On the pro side, you can use shared hosting solutions like GitHub and no need to worry about setting up a server. It also facilitates the exchange of solutions, but violates your requirements "only with each other." But I think you will not be able to stop them from exchanging code in any case, in my experience with the course that I found, looking at the code and checking that it is unique - the only way to prevent copying.

You can also use PlasticSCM , which has really nice interfaces for a lot of IDEs and (at least site requirements) free licenses for educational institutions.

+8
Nov 28 '08 at 19:31
source share

I see no reason to work with setting up a version control system. View terms of use, for example. google code and dive.

CS college student, and I used it last year, and it works great, and the only prerequisite is an internet connection :-)

+7
Nov 28 '08 at 19:20
source share

Bazaar , Mercurial , and Git sound suitable for your case is trivial for creating repositories, and all students need to share read access to each other's repositories in the file system.

+7
Nov 29 '08 at 3:51
source share

Darcs is a great DVCS, especially for small projects like CS classes. I would like to be introduced to Dark or Git in college, and I also recommend that you introduce him to your students.

I use git daily. This is a very reliable DVCS, but maybe a bit of a bust for small projects.

Make a choice, any of these version control systems is really good.

+7
Mar 16 '10 at 0:08
source share

I had a very good experience with Bazaar . Like Git / Mercurial, it spreads. It is serverless - you do not need a daemon installed on the server hosting the repository, even if you use it remotely (i.e., it can work as a shared FTP / SFTP resource).

Distributed VCS is the most flexible. You can check out the branch from the more traditional "central" repository and get all the benefits of being able to develop your small development separately from the central server, etc., and then maybe change your changes.

There are import tools for other VCS like Subversion, although I have not tried them.

+5
Feb 24 '09 at 16:04
source share

darcs send trivial to configure - when you start darcs send <remote repo> it looks in the _darcs/prefs/email remote repo to decide where to send the message. If there is nothing there, then it asks the user.

The patch recipient simply saves the file and runs darcs apply <patch file> in the appropriate repo.

This way, each student can simply have their own repositories with their own email address in _darcs/prefs/email and share patches by email.

+5
Jan 07 '10 at 9:52
source share

Regarding permissions, an external service will not take time from your university’s IT staff.

For example, Bitbucket (using Mercurial) now allows unlimited private repositories in which up to 5 users can participate. I assume that each new weekly pair of students is working on a new project together, which means that they can simply initialize the repository, add another user and leave.

If they don’t work on a new project every week, permissions must be removed and added, and I would recommend that they have several repositories (one per account) in Bitbucket so that each student continues to access. (That would be a good idea anyway, but for weekly projects it might just be easier to just have one student account, repo, and another with permission.)

Regarding VCS, I find Mercurial is best suited for your platforms. TortoiseHg is especially good for new users if they are not familiar (and you don’t have time to learn them) command line interfaces.

Depending on your situation, the advantage of DVCS is that a copy of it on a university server (if any) is a complete repo. It may be convenient for you or TA to gain access, which should be easier to configure and will last the whole semester, rather than weekly.

+4
04 Oct 2018-10-10T00:
source share

Setting up the subversion repository is trivial; I often put one for small projects (for example, developing code for answering Stack Overflow!), And I doubt that anyone who could learn the SCM system at all would have problems with this.

 $ svnadmin create /home/cjs/repo $ mkdir my-project $ cd my-project $ vi hello.c [...hack hack hack...] $ svn import -m 'Initial project import.' file:///home/cjs/repo Adding hello.c Committed revision 1. 

However, separation is certainly a problem. If students always work together when they work at the same time, they can use a USB drive, as they can just unplug it and transfer it back and forth when they need to come, and anyone who is going to program alone can just hang on. . This is not entirely convenient.

Another option, since they all work on a common Unix system, is to create a directory with the execution bit, but not with the reading set for the rest of the group (or all users), and using the s3cr3t name for the repo under what only two students know. Transferring this secret name to the professor would allow him to explore student repositories at any time. ("So you sent the task on time, but the email system lost it? Let me just look at the time of this commit ..."). The script can help fix this.

In fact, the more I think about it, the more I like it. In some ways, it is simpler than a git solution, because the student does not need to deal with patches (or forget about it), and the student will be forced to merge before he completes, and not somehow the things are in the repository ( with the subsequent possibility of deferment for an indefinite time).

+3
May 20 '09 at 1:23 a.m.
source share

UPDATE: Six years later, I would never use subversion for anything again. Git is the way to go. So, although I still think that SVN is a bit “simpler,” it's just not worth learning anymore.

I used CVS, SVN, Bazaar, and Git (in that order of introduction), and I have to tell students that SVN is the way to go. In fact, when I was a TA manager, we implemented SVN as a replacement for the old "submit script", which was tar and an email script. Labstaff sets up the Apache SVN-DAV based repository and uses the authz file. TA and the instructor can control permissions for catalogs and group projects for each student at a very small scale, leaving students a very easy way to fix them for the first time. See my tutorial (credentials torn from the latest TP .. hmm ..)

Regarding the use of subversion without the intervention of system administrators, I also did this in setting up a group project, where none of my group members had ever used subversion before, and most of them did very little confusion (all but one). I also wrote a tutorial on creating such a secure shared repository with basic SSH access here .

I definitely disagree that Git is the best VCS for beginners who have gone blank, just mention any VCS system, not to mention Mac-Daddy-by-Linus - the king of VCS itself, git. It is simply not true that Git is no more complex than svn, and the lack of mature n00b tools is enough to not use it in this scenario. I was just starting to use Git for a new project that I am developing at Netbeans, and have already encountered serious limitations of Netbeans integration. For one semester, you are not going to use any functions that svn does not provide, so Git is redundant.

+3
Nov 18 '09 at 5:33
source share

Subversion on Windows can be as simple as setting up TortoiseSVN. There is a bit of a learning curve to use it (especially if you have never used a version control before), but you can help it by giving it half the lesson and providing some PowerPoint slides to load them.

As for centralization - I heard about websites that offer free hosting of SVN projects. A quick Google search showed this page , but there are, of course, more.

+2
Nov 28 '08 at 19:04
source share

If you are looking for something that you really really need to configure, then why don’t you go for free SVN hosting, you don’t need to configure anything!

Unfortunately, the two seniors, who each pointed to Assembla, Unfuddle, refused to support their free hosting (or, if you want you to close them), but you can still use Origo , this gives you both open and closed hosting.

The advantage of this is that you can own all projects and follow them all, as well as easily manage people who have access, and you do not need to worry about the right to create repositories.

If you are following this route and want to eliminate the complexity, you should use the svn GUI application to make learning almost trivial (since I doubt many merges will happen). I would recommend tortoisesvn that slides right into the context menu of Windows Explorer.

+2
Nov 28 '08 at 19:36
source share

I would say that it’s best to try to work with your IT department to set up a system / method for your students to easily create new SVN / CVS repositories.

You could probably get the IT department to give you the privileges you need to create repositories for your students, even if they don’t give preference to the students themselves. You could probably pretty easily write a few scripts for mass creating repositories from student lists at the beginning of the semester.

+1
Nov 28 '08 at 19:01
source share

RCS for Linux.

I did not find anything easier than RCS for Widows, but not all RCS ports work well, so you should try them, which makes it difficult. For developers, it’s just not easy. The Windows port from http://www.cs.purdue.edu/homes/trinkle/RCS/ is pretty good.

+1
Nov 28 '13 at 14:23
source share



All Articles