Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   What does your team use to share code? (http://www.chiefdelphi.com/forums/showthread.php?t=131057)

frcteam2501 06-11-2014 16:57

What does your team use to share code?
 
Our team uses C++ and sinced we have grown from a programming team of 1 to a team of 5, we need to find a program that we can use to share our code with each other. Anyone have a suggestions on what to use?

feverittm 06-11-2014 17:00

Re: What does your team use to share code?
 
Use GitHub and fork/push/pull the code for development. They have a great set of tutorials to help learn the process and the give each FIRST team a free private repository.

Andrew Schreiber 06-11-2014 17:05

Re: What does your team use to share code?
 
Seconding github.

They'll give FRC teams more than one private repo if you ask. I know 79 has at least 5.

pastelpony 06-11-2014 17:12

Re: What does your team use to share code?
 
Github. Though we personally use flash drives.

RamZ 06-11-2014 17:13

Re: What does your team use to share code?
 
Quote:

Originally Posted by Andrew Schreiber (Post 1407677)
Seconding github.

They'll give FRC teams more than one private repo if you ask. I know 79 has at least 5.

Our GitHub Settings shows that we were given a free Bronze account, providing 10 free private repositories.

cgmv123 06-11-2014 17:30

Re: What does your team use to share code?
 
We currently use GitHub as well, but in the past we've simply done all of our robot programming on one laptop (with a second laptop serving as a backup). There are disadvantages to that, but it makes sure there's only one copy of the code.

Adamz_ 06-11-2014 17:54

Re: What does your team use to share code?
 
adding another one for github, but when its very simple code we just use pastebin

Sparkyshires 06-11-2014 18:03

Re: What does your team use to share code?
 
Another for github. A bit of a learning curve to get used to it, but the features are super powerful. Also hip and new :P it's what all the cool kids use.

phurley67 06-11-2014 18:18

Re: What does your team use to share code?
 
One last thing about git is that it allows for access to your complete history even without internet access, which can be very helpful at most competitions -- not that we ever have to edit our code at competition :-)

frcteam2501 08-11-2014 16:17

Re: What does your team use to share code?
 
Thanks for all the help!
On our team it seems like every programmer brings their own computer to work on so we will try using Github, the problem we've been having with flash drives is that you can't easily merge codes, does Github merge codes if 2 people are working at once? (anyone have a link to a tutorial on how to use it for FRC?)

codes02 09-11-2014 01:17

Re: What does your team use to share code?
 
Yes, git (the software one uses to publish changes to github and to manage changes made to software locally) is very good at handling merges. See http://git-scm.com/book/en/v2/Git-Br...ng-and-Merging

baumgartensam 10-11-2014 17:20

Re: What does your team use to share code?
 
Quote:

Originally Posted by frcteam2501 (Post 1407913)
Thanks for all the help!
On our team it seems like every programmer brings their own computer to work on so we will try using Github, the problem we've been having with flash drives is that you can't easily merge codes, does Github merge codes if 2 people are working at once? (anyone have a link to a tutorial on how to use it for FRC?)

Yes, that is one of git (and therefore Github's) most powerful features. Most code that is used for FRC (java or c++) will be automatically merged very nicely.

Github is also one of the largest hosted source control products used today. It's a good skill to have (ability to use git) as you will need to use it out in the professional world.

Pull requests are one feature Github has which enable teams to do code review (aka before code enters the main code base, another person has to look over it first). This is a really good practice to get into and Github makes it very easy to do. https://help.github.com/articles/using-pull-requests/

Lastly, Github gives FRC teams a free silver organization (https://github.com/pricing). You can request it at https://github.com/edu.

Jpatterson1710 10-11-2014 19:23

Re: What does your team use to share code?
 
We use dropbox. Any programmers, or anyone who might just use the code is invited to a shared dropbox folder. If you download the dropbox program is shows up like any other folder on your device, and you can save just like normal. Everyone will have access to the newest code immediately after its saved on whatever device last worked on it.

frcteam2501 11-11-2014 17:25

Re: What does your team use to share code?
 
What happens if you have 2 programmers working on code at the same time? Does dropbox try to merge your codes? or does it just take the newest one?

yash101 11-11-2014 18:37

Re: What does your team use to share code?
 
Git is probably a really good way to keep your code, even if you are programming yourself. I have a GitHub account and it has saved me a lot of work.

Just yesterday, I had a problem, where I was pushing a small change to my repo in the sky at GitHub. I tried to remove the build folder using the command:
PHP Code:

rm -*build 

I forgot "build" and all of a sudden, my command became:
PHP Code:

rm -

Too bad so sad for the work done. It's alright though. My change was quite small. Because of that, I just cloned the repo again and redid that change.
It took me about 15 minutes to fix my large mistake.
If I didn't use GitHub, I would have lost 2 weeks of work! :eek: ::ouch::

frcteam2501 11-11-2014 19:42

Re: What does your team use to share code?
 
Does anyone know of any examples on how to use Github for FRC C++?

yash101 11-11-2014 21:10

Re: What does your team use to share code?
 
My repositories are about 90% C/C++ ;).
Feel free to check out every inch of it ;)
https://github.com/yash101
To download a repository,
user@dev~/soft $ git clone <location of repository>

Jpatterson1710 13-11-2014 19:42

Re: What does your team use to share code?
 
Dropbox overwrites with the newest saved version. Thats why we just keep numbered versions (V1, V1.1, V2, V2.1).

baumgartensam 13-11-2014 23:20

Re: What does your team use to share code?
 
Quote:

Originally Posted by frcteam2501 (Post 1408253)
Does anyone know of any examples on how to use Github for FRC C++?

Here are some resources:
http://git-scm.com/book/en/v1/Getting-Started
https://guides.github.com/introduction/flow/
https://guides.github.com/activities/hello-world/
https://www.atlassian.com/git/tutorials/

Alan Anderson 13-11-2014 23:46

Re: What does your team use to share code?
 
Quote:

Originally Posted by Jpatterson1710 (Post 1408471)
Dropbox overwrites with the newest saved version.

Dropbox actually does give you the ability to restore previously saved versions of a file.* But it isn't really set up for the kind of version control that would be useful for most teams.

Quote:

Thats why we just keep numbered versions (V1, V1.1, V2, V2.1).
Our "numbered versions" are copies of the project folder with the time and date appended to the name of the folder.


* That came in handy once when I accidentally saved an empty copy of my son's senior design project. I think he still isn't aware that it happened.

Team118Joseph 19-11-2014 13:33

Re: What does your team use to share code?
 
During the season we use one of our facilities desktops as a SVN server. After the season ends we publish the code on our team's website.

FRC2501 30-01-2015 09:24

Re: What does your team use to share code?
 
Thanks for all the help!
I have been using GitHub for a few weeks and it has been working great! (They even gave our team bronze for free!)

Now comes the hardest part, convincing the Programming Captain that GitHub is better than flash drives, he refuses to use GitHub (maybe because he's a Senior and a Sophomore set it up and knows more than him?) and I need to convince him that GitHub is easier to use and better for organizing the 10+ programmers we now have.

notmattlythgoe 30-01-2015 09:25

Re: What does your team use to share code?
 
Quote:

Originally Posted by FRC2501 (Post 1436036)
Thanks for all the help!
I have been using GitHub for a few weeks and it has been working great! (They even gave our team bronze for free!)

Now comes the hardest part, convincing the Programming Captain that GitHub is better than flash drives

That's easy, take the flash drive, and hide it.

FRC2501 30-01-2015 09:31

Re: What does your team use to share code?
 
Quote:

Originally Posted by notmattlythgoe (Post 1436037)
That's easy, take the flash drive, and hide it.

I wish, he keeps 2 on his keychain

baumgartensam 30-01-2015 12:31

Re: What does your team use to share code?
 
Quote:

Originally Posted by FRC2501 (Post 1436038)
I wish, he keeps 2 on his keychain

Send him over to this thread :) Git is one of the primary version control technologies used in industry and it's good to get familiar with it, especially if you are going into a software engineering job. It allows you to see who changed what, have multiple people editing the same files at once, and rollback any major changes that create issues.

Also, on a completely separate but relevant note:

You may not want to use what I'm about to say if you've never used git before, but Atlasssian will provide Jira (a bug tracker) to FRC teams for free. It integrates with Github so you can link commits to specific bug. Just thought I would let some other people know if they didn't already. We use Jira constantly for managing our bugs and what everyone on our programming team is doing. I also use Jira at work and I have nothing but good things to say about it (other than a few more complicated features being ... well ... to complicated).

Spoam 30-01-2015 13:18

Re: What does your team use to share code?
 
Quote:

Originally Posted by FRC2501 (Post 1436036)
Thanks for all the help!
I have been using GitHub for a few weeks and it has been working great! (They even gave our team bronze for free!)

Now comes the hardest part, convincing the Programming Captain that GitHub is better than flash drives, he refuses to use GitHub (maybe because he's a Senior and a Sophomore set it up and knows more than him?) and I need to convince him that GitHub is easier to use and better for organizing the 10+ programmers we now have.

If he doesn't learn to use git now, he'll definitely need to learn to use it in the future. I interned for a multi-billion dollar software company, and even they have a GitHub repository (along with their own git server). If he wants to be serious about programming version control is a must. Good luck!

MamaSpoldi 30-01-2015 16:04

Re: What does your team use to share code?
 
We use SVN. I personally prefer it to Git because I find the operations are simpler and more explicit... and like Git it is a full version control with merging code and marking revisions. In previous years we stored the repository on our team laptop and networked all the programmers' laptops with it using a router. This gave us full access to the history at competition on our team laptop if needed and in addition we make a back up to a flash drive of every version of code that is downloaded to the robot during the competition. This has been a saving grace a couple of times when someone in the pit moved the programming laptop and thought they didn't touch anything.

However, since this year's communications strategy lends itself to using Wifi, we have moved our repository to the cloud on SourceForge which works well with SVN. This will provide further flexibility for student programmers to grab updates at home and still fulfills our other needs. We will still be using the flashdrive backup occasionally during build season and most definitely everytime we deploy code at competition. There is nothing worse than not being sure what source code was used to generate the executable that is currently sitting on the robot. :D

mail929 30-01-2015 21:13

Re: What does your team use to share code?
 
We use BitBucket for hosting all our code, but when we open source it we put it on GitHub. And of course we use git with each.

Jalerre 30-01-2015 22:20

Re: What does your team use to share code?
 
This season we have been testing Nitrous with Github integration. It allows us to edit code simultaneously in Nitrous' IDE similar to Google Docs (this function is still experimental and can be buggy but overall has been working pretty well). We save it in a box in Nitrous and when we're ready we push it to Github using Nitrous's console.

tcjinaz 30-01-2015 22:38

Re: What does your team use to share code?
 
Quote:

Originally Posted by FRC2501 (Post 1436038)
I wish, he keeps 2 on his keychain

We keep the stick in a special drawer in the tool box. The team knows that there will be great trouble if anything happens to it.

Plus a copy goes on my drive immediately.

If the development laptops could get to the internet we would take a shot at GitHub, but the school district's IT department is kind of tightly wound.

Tim

xXhunter47Xx 30-01-2015 22:41

Re: What does your team use to share code?
 
Quote:

Originally Posted by tcjinaz (Post 1436401)
We keep the stick in a special drawer in the tool box. The team knows that there will be great trouble if anything happens to it.

Plus a copy goes on my drive immediately.

If the development laptops could get to the internet we would take a shot at GitHub, but the school district's IT department is kind of tightly wound.

Tim

Interesting on the IT department. We are able to use Github (both in AP CompSci and in Robotics, with personal and school computers) with no issue.
I strongly suggest you talk to the Site Tech or someone with administrative properties, Github is a very useful resource especially when you have more than 3 code monkeys.

StevenB 31-01-2015 02:07

Re: What does your team use to share code?
 
I just want to make an observation about what happened on this thread. The OP asked a question about "sharing code", and the first TEN replies unanimously recommended a specific version control system and supporting website - GitHub. Unanimous, that is, except for one dissenter who acknowledged that git is the right and noble path, but confessed to using flash drives in actuality. This agreement is just one testament to the power and importance of using source control, and to the quality of Git and GitHub.

If you need more proof that Git is the way to go, consider these:
  • Giant projects, like the Linux kernel source and the Android source releases are managed with git. In fact, Linus Torvalds invented git for the specific purpose of managing the kernel source.
  • Perforce - whose version control system is pretty decent - is now advertising perforce/git integration and git management tools on their home page.
  • I worked for a well-known company who uses Perforce heavily (in fact, they're featured on the perforce home page). And they use git all over the place, too.
  • This Google trends graph shows that there's a pretty clear winner.

FRC2501 31-01-2015 11:22

Re: What does your team use to share code?
 
Quote:

Originally Posted by tcjinaz (Post 1436401)
We keep the stick in a special drawer in the tool box. The team knows that there will be great trouble if anything happens to it.

Plus a copy goes on my drive immediately.

If the development laptops could get to the internet we would take a shot at GitHub, but the school district's IT department is kind of tightly wound.

Tim

I found a way to bypass my school's ssh block

Ether 31-01-2015 11:35

Re: What does your team use to share code?
 
Quote:

Originally Posted by FRC2501 (Post 1436517)
I found a way to bypass my school's ssh block

A word to the wise: Don't do anything that might violate the spirit of your school's intent and get you into trouble.



xXhunter47Xx 31-01-2015 13:05

Re: What does your team use to share code?
 
Quote:

Originally Posted by FRC2501 (Post 1436517)
I found a way to bypass my school's ssh block

Quote:

Originally Posted by Ether (Post 1436522)
A word to the wise: Don't do anything that might violate the spirit of your school's intent and get you into trouble.



That's a dangerous path to follow, as Ether said. If you get into trouble, you may get computer privileges taken away for everyone, and it might even trace back to robotics and get that shut down.

plnyyanks 31-01-2015 13:20

Re: What does your team use to share code?
 
Quote:

Originally Posted by FRC2501 (Post 1436517)
I found a way to bypass my school's ssh block

You can always set your remotes to the HTTPS url instead of the SSH one and not be bypassing anything

FRC2501 04-02-2015 09:28

Re: What does your team use to share code?
 
Quote:

Originally Posted by FRC2501 (Post 1436517)
I found a way to bypass my school's ssh block

By bypass I mean that I found that my school only blocks port 22, so following this guide (https://help.github.com/articles/usi...he-https-port/) I used port 443

Addison4300 04-02-2015 13:59

Re: What does your team use to share code?
 
Our school set up every student with a Google account with unlimited Google Drive space. We put the programs into a zip file and upload and share it through google drive.

MamaSpoldi 04-02-2015 14:13

Re: What does your team use to share code?
 
Quote:

Originally Posted by Addison4300 (Post 1438250)
Our school set up every student with a Google account with unlimited Google Drive space. We put the programs into a zip file and upload and share it through google drive.

Don't underestimate the power of using a source code control/management system for sharing your code as opposed to just an online dump. The added functionality of merging portions of the code being worked on by multiple students will save huge amounts of time in tracking down and fixing bugs as well as lost productivity due to code being overwritten by someone else inadvertently.

I understand completely the desire to use online space free of charge. We were able to set that up using SourceForge and use an SVN interface to provide the SCM functionality... all free of charge. I would be happy to post info here if anyone would like details.

Mineboy2300 08-02-2015 15:22

Re: What does your team use to share code?
 
We just use a flash drive that we lock up every night. it is kind of old fashioned but it keeps all of our code safe and gives us easy access to all of our code going back several years and we have daily backups of code to go back to if a file is corrupted.


All times are GMT -5. The time now is 09:52.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi