Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Which programming language does your team use? (http://www.chiefdelphi.com/forums/showthread.php?t=114835)

BigJ 12-03-2013 00:43

Re: Which programming language does your team use?
 
1675 was:

C: 2005-2008
C++: 2009-2011
Java: 2012-present

I enjoy the fast set-up time for an FRC java environment, plus the kids use Java in AP.

JefferMC 12-03-2013 10:36

Re: Which programming language does your team use?
 
Java and C++ are similar enough to make transition both easy and problematic.

The worst issue I see for a Java programmer using C++ is knowing how/when to use pointers and pointer syntax, but my students coming from Java classes in high school do quite well with the C++ environment.

MamaSpoldi 12-03-2013 10:39

Re: Which programming language does your team use?
 
Team 230 uses C++ and we have for the last 5 years with the cRIO... we used C before that. We basically use C++ because it is syntactically very similar to Java which many of the students are exposed to in programming classes at school. But we go the extra step to C++ because it is somewhat better supported (especially in the earlier years of the cRIO) and our programming mentor (me :D) is more familiar with C++. This makes it more feasible for the mentor to help the students solve their issues instead of scratching their heads.

Quote:

Originally Posted by catacon (Post 1246936)
Lol C#. System.IO.FRC.Robot.Controls.NI.CRIO.Motors.Talon. Commands.Speed.CIM.SetPWM()

^ Really... is that really how the C# code would look??? LOL

apalrd 12-03-2013 10:43

Re: Which programming language does your team use?
 
For the benefit of LV discussion in the thread, our 2012 code directory had >200 files, mostly .vi, .ctl, and .bee

Our 2013 code is a bit slimmer at only ~170 files, with a similar mix. This includes BuzzLib, BeeScript, and a total rewrite of the WPIlib (although the new library is only ~14 files).

That's about a file per C function, struct, or enum, because that's exactly what it is. If we wrote code in C, each of the ~10 organizational folders would likely be a single code/header file pair (although each auton would get its own file).

We tend to use a lot of structures and enums, since we only pass data through VI connectors (no globals, no accessor/storage VIs).

Aside from FRC robot code, I prefer clean C code.

catacon 12-03-2013 12:48

Re: Which programming language does your team use?
 
Quote:

Originally Posted by MamaSpoldi (Post 1247085)
^ Really... is that really how the C# code would look??? LOL

Heh probably. C# has classes and subclasses for everything.

BigJ 12-03-2013 12:55

Re: Which programming language does your team use?
 
Quote:

Originally Posted by catacon (Post 1247148)
Heh probably. C# has classes and subclasses for everything.

And everything is capitalized, even method names :( Otherwise, C# and I are cool.

Robby Unruh 12-03-2013 13:11

Re: Which programming language does your team use?
 
Quote:

Originally Posted by BigJ (Post 1247151)
And everything is capitalized, even method names :( Otherwise, C# and I are cool.

Don't get me too excited for C#/.NET support. I'd force our programming team to switch right away. ;)

Code:

using edu.wpi.first.wpilibcsharp.SimpleRobot;

namespace edu.wpi.first.wpilibcsharp.templates
{
    public class CSharpRobot : SimpleRobot
    {
        // no guts no glory
    }
}

We use Java, and it looks like a majority of teams do too. Cool, we always thought we were a minority at competitions!

mlbernardoni 12-03-2013 15:51

Re: Which programming language does your team use?
 
Historically Team 2704 used Labview. Going into the 2012-13 season, the team decided that for the 2012-13 season, they would program the robot in Labview, but a few students would pilot C++.

At any given time, the team has limited FRC robots (usually 0 or 1) to train programmers. Earlier, the team had developed a Labview training program using Mindstorms NXT robots. It was decided to try this route with C++ also.

The team put together a training curriculum using: Mindstorms NXT robots. The training curriculum was hugely successful. All training on the NXT was directly applicable to FRC programming, and the 2012-13 robot was ultimately programmed with C++.

The robot is much more responsive with C++ (we did program with both C++ and Labview).

We have shared the curriculum on www.firstplusplus.com for those looking to learn C++ for FRC. (Note: this is the first iteration of the curriculum. It is still being developed.)

Please check out www.firstplusplus.com and provide feedback.

eddie12390 12-03-2013 15:59

Re: Which programming language does your team use?
 
Quote:

Originally Posted by Robby Unruh (Post 1247159)
We use Java, and it looks like a majority of teams do too. Cool, we always thought we were a minority at competitions!

I had been under the impression that less teams were using Java. (Just based on what I had seen at competitions.) It's hard to say either way though as either pool would be biased because not every team goes to the Pittsburgh Regional and not FRC programmer is a member of Chief Delphi.

Zuelu562 12-03-2013 16:03

Re: Which programming language does your team use?
 
Both of my teams over the years used C++; 562 used it because most of our senior programmers knew it. 3623 has used it because our mentors (myself included) are accustomed to C++.

roboracer 12-03-2013 22:46

Re: Which programming language does your team use?
 
We used to use NI Labview, since it is user-friendly and easy, but this year, we have transitioned to Java.

connor.worley 12-03-2013 22:57

Re: Which programming language does your team use?
 
Is LabVIEW source control possible?

kenavt 12-03-2013 23:44

Re: Which programming language does your team use?
 
Quote:

Originally Posted by connor.worley (Post 1247404)
Is LabVIEW source control possible?

Great question. We're planning to open source a GitHub repository later this season in LabVIEW (so you'll be able to see commit history and branches and such, from Week One of build season to our last official event) as an answer. Currently, if we do all of our merges manually, everything generally works... but this requires a lot of man-hours.

Joe Ross 12-03-2013 23:53

Re: Which programming language does your team use?
 
Quote:

Originally Posted by connor.worley (Post 1247404)
Is LabVIEW source control possible?

yes

apalrd 13-03-2013 09:42

Re: Which programming language does your team use?
 
Quote:

Originally Posted by mlbernardoni (Post 1247227)
The robot is much more responsive with C++ (we did program with both C++ and Labview).

Please clarify.

This makes no sense. A choice of programming language itself has no effect on the resulting operation of an equivalent program. If the program in each language was not equivalent, then that is your problem, not the language itself.


All times are GMT -5. The time now is 22:46.

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