![]() |
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. |
Re: Organizing your programming
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. |
Re: Organizing your programming
Quote:
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). |
Re: Organizing your programming
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. |
Re: Organizing your programming
Quote:
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. |
Re: Organizing your programming
I know this thread is a few days old, but...
Quote:
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. |
Re: Organizing your programming
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. |
Re: Organizing your programming
You don't organize programmers.
You object(ive) orient them :) |
Re: Organizing your programming
Quote:
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.com/1597/ 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. |
Re: Organizing your programming
Here's a video that helps explain how git works, to make it easier to understand.
Git For Ages 4 And Up |
Re: Organizing your programming
Quote:
|
Re: Organizing your programming
Quote:
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. |
Re: Organizing your programming
Free section of 'Mastering Git' book:
http://cdn.oreillystatic.com/oreilly...754_Sample.pdf 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. |
Re: Organizing your programming
Quote:
|
Re: Organizing your programming
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. |
Re: Organizing your programming
Quote:
Use git. |
Re: Organizing your programming
Quote:
Sure, git has a learning curve. But its advantages are numerous -- particularly in a disconnected environment. |
Re: Organizing your programming
Quote:
|
Re: Organizing your programming
Not to have a VCS war here but... :yikes:
Quote:
Quote:
Also, I can use git diff to figure out exactly what changes were made. Quote:
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. |
Re: Organizing your programming
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? |
Re: Organizing your programming
Quote:
TL;DR: With SVN, you rely more on the cloud than when using git. With SVN, to do any operation you *must* have a server involved (eg, the cloud -- even if it's your own personal cloud!). Otherwise if you have no connection to the server, you cannot use any of the normal SVN tools -- they all require a connection to the server. svn log? need a server. svn commit? need a server. svn update? need a server. And if the server isn't available, then you have to go back to the old way of copying files around by hand until the server is available. With git, I can do all of the normal operations without a server ever getting involved, ever. commit, push, pull, diff, whatever. No cloud required. 100% local. |
Re: Organizing your programming
Quote:
Quote:
Quote:
Quote:
|
Re: Organizing your programming
Quote:
We use Git and Gerrit. Gerrit lets us integrate code reviews into the development process and control the quality of code that goes on the robot. Learn how to do code reviews with github and pull requests, and make that part of your development process. Software is really hard, and the more eyes, the better. |
Re: Organizing your programming
Quote:
|
Re: Organizing your programming
Quote:
|
Re: Organizing your programming
Im the one programmer on our entire team, and I just use github desktop on my macbook air, works perfectly. I also don't make mistakes so that helps to :cool:
https://github.com/FRC-5752/FRC-5752-2016 |
Re: Organizing your programming
Quote:
We use gitflow for our branching strategy. Master is competition. One thing I'm trying to get drive team to buy off on is that they control master. So using the git flow we create a release branch and deploy to a bot for acceptance testing by drive team. If they give thumbs up, it's merged into master. Nothing goes into to master with out drives approval. |
Re: Organizing your programming
My team uses LabVIEW, and we use tortoiseSVN for version controlling. Is there is an advantage to using git for a LabVIEW team?
|
Re: Organizing your programming
Quote:
|
Re: Organizing your programming
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Anyways, I realize that this came off as kind of an attack, and I didn't mean it as one. I'm just considering potential drawbacks of this workflow. I do like that everything gets summed up into one version for each competition. I guess what it comes down to is whether it works, and it sounds like it does for you. Personally, I will promote git and GitHub for as long as they are the status quo of the professional programming world. I think it's important to learn those skills if you want to succeed in the workforce, and learning new skills that are applicable to the real world is what FIRST is all about. Our GitHub is at GitHub.com/Team236/ and in my signature. At the same time, I recognize that it is difficult to teach git and learning it requires a level of dedication that is not commonly found on an average robotics team. After all, our team has pretty much one programmer. I'm curious, what don't you like about git? By the way, thanks for your help at Waterbury. Thanks in part to your help that day, 236 went 11/11 successful autos at CMP. I'm working on motion profiling and vision for the offseason, and maybe we'll something new next year to show off. Hope to see you at CT state champs! |
Re: Organizing your programming
Quote:
Also because of our development methodology there is somewhat less interaction between the coding being done by individual programmers than for some other teams. In general, no 2 students are working on the same source files. Each programmer works on a class that is related to their own robot mechanism. The exceptions to this are related to button assignments (and their implementation in the main code loop) and the autonomous mode coding which are generally handled by the lead programmer. Although the autonomous code generally resides in the main robot class it is isolated in separate function which is simple to merge with other changes if needed. Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
Re: Organizing your programming
Quote:
https://cloud.google.com/actual-cloud/ |
Re: Organizing your programming
Quote:
Yes, the bottom line is that students need to get used to the idea that they don't work in isolation - that there is version control, team collaboration, and the concept of risk management (don't deploy new code until it has been tested!) (One of my proudest moments this year was actually when our most "enthusiastic" programming student said "I think we should just leave it for now. It works, and the drive team is doing well with what we've got. We can fix [the remaining issues] in between now and our next competition." YES!) Git is a good system but it is not the only system and it is not the best system. There is some thinly-veiled "git is best" attitude in this thread. Prior to git, I've used ClearCase/ClearQuest, a stupidly obtuse one called Continuus, and CVS. I do like gitflow and I'm getting used to Github, but I'm told that coming from a ClearCase mindset is actually making it harder for me to wrap my head around git concepts. So I totally understand if students are confused. The YouTube link posted earlier is a great presentation. |
Re: Organizing your programming
Quote:
Quote:
Quote:
Never too old to learn new tricks... but old enough to be skeptical that new tricks are always better than the old ones. ;) Thanks! |
Re: Organizing your programming
Well, as others have said, version control is your answer. Although the team didn't like git as a tool this year, git will solve the problem you have proposed. In fact, saving copies of your code at crucial points, as you have suggested, is pretty much what git is doing under the hood.
Using the tool properly requires team discipline to follow a workflow. When everyone does their own thing, it's pretty much guaranteed to fall apart. Here is one workflow suggestion that has worked well for us: One student or mentor is the lead ("architect"). Other students are developers. The lead creates the initial project in the repo. This should be on a special branch (call it "master", maybe). By process, you must guarantee that the latest work on master represents the latest version of working software for the robot. After this, developers are assigned specific tasks to work on. Each task should be done by creating a brand new branch at the latest commit on master. ALL of the work for the task should ONLY be done on that task's branch, nowhere else. If another task is started, start a new branch. In this way, once a task is completed, there is a 1-to-1 relationship between "this task was completed on this branch". Once a task is completed, the developer should review the changes made with the architect, and possibly other developers. Look for bugs. Try the software out on a robot, if possible. Once the architect and developer are satisfied the code is as correct as it can be, the architect should merge the latest on that development branch back to master. If multiple tasks are being merged, the developers and the architect may have to work together to resolve merge conflicts (where two developers made different changes to the same line of code). Note by carefully ordering tasks and merges, you can avoid most merge conflicts. Finally, after content has been merged to master and tested on a robot, you may put down a tag to establish a milestone in software production. Use some simple numbering system (ex: v1, v3, v46, etc.) to indicate the progression through time. These are helpful in understanding which points in time functionality was added/removed and tested. The most important part here is properly using branches. Minimize changes made directly on master - none if possible. All tasks should be done on their own branch. No re-using branches for multiple tasks. No putting tags wherever you want - tags indicate a set of proven functionality. Not to say you couldn't ever deviate from this workflow, but having the standard up front is crucial to the success of a version control system |
Re: Organizing your programming
Not going to get into the version control system argument here, other than to use Git.
Now, a couple of other things - GitKraken is my GUI client of choice when I use a GUI client, but the git command line program is fantastic and actually extremely easy to use. Eclipse also has built in support for Git through E-Git, though it's not great it's helpful if you already have eclipse and don't want to install anything extra. Another hosting alternative is GitLab, which besides providing servers also provides a community edition, which lets you install GitLab and self-host it on any machine/VPS. We used it last year and it was incredibly powerful. |
Re: Organizing your programming
For anyone starting out in version control, Git is the predominant option in industry today which is easily shown through this Google Trends search. There is no need to get into a VCS war when clear data is available.
For those new to Git, try the following tutorials: I generally use the command line, but when I need an IDE I use SourceTree: it's fully-featured, stable, and free. |
Re: Organizing your programming
Quote:
|
| All times are GMT -5. The time now is 06:45. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi