Organizing your programming

Hi all. I was wondering now that the Stronghold season is over how all of your organize your team’s programming. I’m putting together teaching tools for my team for c++ and I want to organize an official document for my team to follow when organizing their programs. My team has attempted GitHub, nobody really liked it on my team. I see the value in it, but it did mess up some things and I don’t see it as very reliable when not many know how to use it properly. Do any of you use a different way?

Right now my plan is basically to use Google Drive to store archives of different versions of a programming project so that we can backtrack if necessary and have the programmers of the team fill out forms for the lead programmer to read and approve of changed to the programming project being worked on.

I would love to hear your method though.

Using version control is the way to go. You don’t need to use GitHub specifically, but Git can be used offline or with some other server such as BitBucket. SVN is also an option.

Seriously, version control is what is used in the professional world. Git is one of the most widespread VCSs out there. Our team uses it. It’s very convenient to be able to go home and code with the most up to date version. It becomes even simpler to use if you have a UI for it (EGit for Eclipse). It’s worth spending a day or two to go over how it works.

That sounds really annoying and is exactly what something like git is designed to solve for you, good luck with that.

I agree that git is a bit annoying to deal with at first, but once you get over the hump it’s really quite delightful. What about the workflow did your team have trouble with (and did you use pull requests? they’re really the best thing about github).

Git is terrible; use git.

The learning curve may be steep, but there is not much that you really need to know to use git effectively. Once you start using git for a bit, it becomes really useful. We started using git to organize all of our programs while I was a student on our and we have since been able to move a manage a lot of different projects using git. Our website is updated using git; our branding files are all managed by git; our robots are all version controlled in git. Git may not be perfect, but it works really well in facilitating collaborative development.

This is a perfect summary of version control, right here.

The rest are worse than Git by a mile. SVN and other CVS is awful (we tried; it’s slow, poor support, no offline commits which will kill you at competitions). We have not tried Mercurial, but that is due to how (relatively) unsupported it is. To paraphrase Linus Torvalds (inventor of Git and Linux), everyone uses Git, even Microsoft. It is worth learning because of the preparation for the professional world that it provides.

I know this thread is a few days old, but…

NO. PLEASE DO NOT DO THIS.

This could work if there’s like two people working on the code, and if your code is super simple. But honestly, if anyone plans to work in the software development world, you’re going to need to learn how to use version control. Now is as good a time as any.

I agree with others - git and github are not the easiest thing to wrap your head around. If nobody really gets what’s going on, it can be even more frustrating. Trust me, I’ve been there. What you need to do is find someone who understands this stuff and get them to work with you until you understand it too. Even if this takes a few days or a few weeks, this is absolutely worth the time investment.

There are different ways to use git and github. The easiest is to have one repository on github for your projects, add your students as contributors, and let them each develop code in their own branches. (No forking.) Use a variation on the Git Flow software development model.

Use git.

https://try.github.io/

We’ll be doing some workshops in the fall for NC teams and one of them will be about using git.

You don’t organize programmers.
You object(ive) orient them :slight_smile:

100%. It’s a total pain both to teach new programmers, and for the programmers themselves. But it must be done.

Requirement: At least one person reachable by your team must be actually comfortable with git. That sounds like a good job for you!

relevant: xkcd: Git

From experience, I can tell you the most helpful thing you can do now is make sure your programmers are programming OUTSIDE of robotics. Team teaching tools are nice when you need to onboard somebody during the 6 weeks, but you’re going to end up reteaching the same material to the same people every year when they forget it all over summer.

It doesn’t matter what they’re programming. Games are a nice standby, python + pygame is well documented for newbies. But teaching basic programming only during robotics time is an endless battle.

Here’s a video that helps explain how git works, to make it easier to understand.

Git For Ages 4 And Up

FWIW: The speaker says right up front that the target audience is “one step beyond” people who have never used git before.

Not to mention the added confusion of writing robot code that is event-driven, sort of, by way of the Iterative or Command based patterns.

Our software students wanted to work together on a little video game, and some of them have also worked on our vision code and Android scouting app, and there will probably be other small projects to come. It’s good to get used to the idea that different projects can be very different from each other, but have similar underlying fundamentals.

Free section of ‘Mastering Git’ book:

BTW:
PacktPub gives away a free e-book a day.
Look for ‘Free Learning’ on their website.
I have several hundred from them.
You don’t get to pick the topics like that, and the quality may vary, but free as in you click the button and they are yours.

Yes, for people that haven’t used version control, it will be a little more complex. But if a team has every done a git commit, then they should be able to follow along. They might not know all the commands, but his explanation, I found, was very easy to understand.

I personally am not a fan of Git either. We have been using SVN for 8 years and it works great. We originally had a local respository, but last year we decided to store the repository online using SourceForge. This makes it easier for each programmer to access the updates individually.

As the programming mentor, I am the only one who can commit new code. This allows me to review all the code before it is shared. This also allows me to keep track of the progress being made and if someone needs additional help or support… or is going off on a tangent.

At competitions where we have no internet access I make a backup copy on a flash drive each time our lead programmer loads new code onto the robot. This is my role at competitions… just like during build season, I am the source code control system integrator. This backup provides a trail of what has changed between each download if something unexpected is affected. This is very helpful when something suddenly works differently on the robot… it helps the programmers be able to validate with certainty what changed and what did not change in the software. Each backup sub-directory is labeled with what was changed and when, eg. CMP-1b-MoreAutoAngle would be the code from Championship, day 1, version b (or 2nd change of the day), and change was adding more rotation driving to autonomous mode. This reminds me at a glance the types of changes that were made and when. After competition, the final version is committed to SVN and marked as a revision.

If you have questions or would like help setting something like this up, please feel free to pm me.

Github has support for SVN clients: Support for Subversion clients - GitHub Enterprise Server 3.11 Docs

Use git.

Yeah, disconnected operations as you describe sounds really annoying and is exactly why we don’t use SVN. Here’s our workflow at competitions:

  • I create a bare git repo on a flash drive (cd /path/to/drive; git init --bare NAME)
  • We set up remotes on each students computer to push to the flash drive (git remote add usb /path/to/drive/NAME)
  • They do their normal development stuff, commits, branches, stash, etc
  • When one of them wants to push code, they plug in the flash drive and do “git push usb BRANCH”
  • When someone wants to pull from the flash drive, they do “git pull usb BRANCH”
  • At the end of the day, I bring the flash drive home and push the commits up to git – it’s great, keeps history, no folders to keep track of – and if someone screws something up, a ‘git reset --hard HASH’ allows us to go back to a known working state

Sure, git has a learning curve. But its advantages are numerous – particularly in a disconnected environment.

The advantage of our operations at competition (the “disconnected” operations as you describe them) is that I can view the files on any computer… and we have an automatic backup if something should happen to our programming laptop. This gives us the ability to quickly recreate our environment and software on another system if it becomes necessary. And I don’t need specialized tools to access the files. Sorry, I’m old-fashioned and I don’t really trust the cloud as my sole backup.

Not to have a VCS war here but… :yikes:

When checked out at rest on a computer, all the files are there just like SVN and can be seen without special tools. I can copy directories too if I wanted to, but don’t need to. :slight_smile:

… and we have an automatic backup if something should happen to our programming laptop.

We do one better – since git’s local repo is a complete copy of the repository + history, each repo on each student’s computer has complete history, and the flash drive does too. And development at the competition is almost exactly how we do development at home – just pushing to a flash drive instead of to github.

Also, I can use git diff to figure out exactly what changes were made.

This gives us the ability to quickly recreate our environment and software on another system if it becomes necessary. And I don’t need specialized tools to access the files.

Well, if you had a completely raw system with no development tools on it, you would need to install Eclipse+compile tools or LabView. So from that perspective, it’s just an extra piece of software you need to have installed. So we’re still even. :slight_smile:

To answer the original OP’s question: At the end of the day, one needs to have a process that works for your team so you can do development at home and at the competition. For teams using text-based languages and more than one team member – there are a lot of different ways to do it – but use a version control system of some kind, and don’t try to roll your own. There are a lot of opinions on which one is best – but there’s a good reason why distributed VCS such as git and mercurial have been hugely popular since their introduction.

Wow this thread has exploded in the last few hours. Yes, I’m going back to GitHub. We already having an organizational account that we created back in December/January and we used GitHub along with the Windows desktop client up until mid-March, which is when we switched from LabView to C++. I cleaned up the GitHub account yesterday and since I’m about to teach some programming to members of my team, I’m going to have each of them who have not already create a personal GitHub account and add to the organization.

So basically we will be using Git/GitHub rather than the stupid idea I had in the beginning.

Also I went into the organization setting and downgraded everybody’s permissions so that they must make pull requests and I must approve them. (Good idea MamaSpoldi)

BrianAtlanta, I’ll make sure to distribute that video to everyone.

remulasce, definitely a relevant XKCD. We had to do that a few times. Will include that in tutorials for teaching Git/GitHub.

My plan is to teach programming (C/C++) which I still putting together material for. When teaching I think I’m going to require the entire group I’m teaching (about ten people) to all use GitHub for a final group project, and they vote on a single person to be the master of the repository (accepting reviewing pull requests.) This way I’m teaching programming and they have to use GitHub if they want me to review their work. Any suggestions beyond this or to add to this idea?

I’m currently writing up a document on what GitHub is and how to use it. If anybody would like to help me with it, PM me and I’ll give your Google account access.

One last question. I’m currently using the Windows GUI client to work with repositories on GitHub, is there any opposition to that?