Go to Post You do need help. Don't reject offers of assistance from veterans. There are more things you don't know than you think there are. - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
View Poll Results: Does your team use Java or C++ for programming your robot?
Java 35 51.47%
C++ 33 48.53%
Voters: 68. You may not vote on this poll

Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 02-06-2010, 01:52
Kitmor's Avatar
Kitmor Kitmor is offline
Registered User
AKA: Kit Morton
FRC #0847 (PHRED)
Team Role: Leadership
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Philomath
Posts: 24
Kitmor will become famous soon enoughKitmor will become famous soon enough
Re: Java VS C++ || The Final Decision

I believe that both C++ and Java are equally capable languages for the type of robot programming that we are doing in FRC. So what it comes down to is a matter of personal preference.

I personally have a dislike for all interpreted languages, it just seems like a clumsy to me. I have spent about the same amount of time working with C++ as I have with Java, and I personally find Java a more frustrating language to program in. I understand that part of the goal of Java was to force an object oriented design of the programmer, and while I like this concept, I dislike how restrictive it makes the Java language.

I have had teachers that raved about Java, saying it's the best thing since sliced bread, and while I respect my teachers.... I have to respectively disagree. Java is possibly a good learning tool, but for making clean, efficient programs, it's just not the thing for the job.
-Kit

P.S.
I would also have to disagree about the strong point of Java being it's GUI abilities. If you take and C++ compiler and add on a nice graphics library like QT, Java is no match. The language is just all around clumsy.
__________________
"Stand back we don't know what it is going to do"

  #17   Spotlight this post!  
Unread 02-06-2010, 01:55
timothyb89 timothyb89 is offline
code monkey
FRC #1977 (Loveland High Robotics)
Team Role: Alumni
 
Join Date: Oct 2008
Rookie Year: 2009
Location: Loveland, Colorado
Posts: 45
timothyb89 will become famous soon enough
Re: Java VS C++ || The Final Decision

Quote:
Originally Posted by Robototes2412 View Post
I would be overjoyed to use C++ for robot programming,
IF THEY TOOK THE TIME TO MAKE IT COMPILABLE FROM LINUX, FOR THE LOVE OF CHRIST ITS GCC

edit:

Wow, i was angry.

could someone please <code> a makeFile from the C++ stuff? I think I can get C++ working on linux if i have a makefile.
Unfortunately it's not quite that simple. As it's being cross-compiled you'd need a version of GCC for the correct architecture (PPC) and then package that in a format the cRIO can understand. Not to mention uploading that to the device...

I'm fairly certain the uploading bit is just an FTP server, but most of the process for deploying that code is hidden away. I have a feeling they aren't doing anything too fishy behind the scenes, it's just that the documentation for what they're doing doesn't seem to exist. Otherwise it really wouldn't be that hard to do.

Right now, though, the easiest way to do FRC dev on Linux or any of the *NIX OSes is to use the Java environment. No complaints from me though, NetBeans is a dream to use .
__________________
FRC-DB: A detailed, web-based scouting database for FRC teams with lots of interesting statistics.
  #18   Spotlight this post!  
Unread 02-06-2010, 07:59
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: Java VS C++ || The Final Decision

Quote:
Originally Posted by Kitmor View Post
I believe that both C++ and Java are equally capable languages for the type of robot programming that we are doing in FRC. So what it comes down to is a matter of personal preference.

I personally have a dislike for all interpreted languages, it just seems like a clumsy to me. I have spent about the same amount of time working with C++ as I have with Java, and I personally find Java a more frustrating language to program in. I understand that part of the goal of Java was to force an object oriented design of the programmer, and while I like this concept, I dislike how restrictive it makes the Java language.

I have had teachers that raved about Java, saying it's the best thing since sliced bread, and while I respect my teachers.... I have to respectively disagree. Java is possibly a good learning tool, but for making clean, efficient programs, it's just not the thing for the job.
-Kit

P.S.
I would also have to disagree about the strong point of Java being it's GUI abilities. If you take and C++ compiler and add on a nice graphics library like QT, Java is no match. The language is just all around clumsy.
I have found that its "restiveness" is actually one of its strengths, especially with regards to FIRST. C and C++ take longer to debug, and as has been discussed in other threads, the biggest restriction to programmers is the time they get with the robot, so being able to debug quickly is critical.

Java is certainly a pig of a language, but I also like using it for backends to an GUI. I use Flex (which is also a pig) but ports nicely now with Java since flash builder 4 and blazeds. I really like OO, especially from an architecture standpoint and flex brings OO development to web and desktop dev. So even though it is a pig, it is easier to debug and I find it easier to build with.

Then again from my experiences, people who love c and c++ hate flex.

(lets not get started on steve jobs.... )
__________________
"Never let your schooling interfere with your education" -Mark Twain
  #19   Spotlight this post!  
Unread 02-06-2010, 08:23
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Java VS C++ || The Final Decision

I don't really want to get involved in these food-fights about languages, but since LV came up, let me just clarify that the CPU usage of the dashboard is not something that you can blame on LV. Blame me instead. I made a mistake and the LV UI was dealing with overlapping controls the best way it could, doing offscreen drawing and extra redraws. That is what used the excess CPU.

Greg McKaskle
  #20   Spotlight this post!  
Unread 02-06-2010, 09:37
LavaEagle LavaEagle is offline
Registered User
FRC #2660
 
Join Date: Oct 2009
Location: WA
Posts: 22
LavaEagle is an unknown quantity at this point
Re: Java VS C++ || The Final Decision

Quote:
Originally Posted by Robototes2412 View Post
I would be overjoyed to use C++ for robot programming,
IF THEY TOOK THE TIME TO MAKE IT COMPILABLE FROM LINUX, FOR THE LOVE OF CHRIST ITS GCC

edit:

Wow, i was angry.

could someone please <code> a makeFile from the C++ stuff? I think I can get C++ working on linux if i have a makefile.
Netbeans works on Ubuntu and you can probably find the plugin for FRC for it.
  #21   Spotlight this post!  
Unread 02-06-2010, 11:06
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Java VS C++ || The Final Decision

Quote:
Originally Posted by Robototes2412 View Post
IF THEY TOOK THE TIME TO MAKE IT COMPILABLE FROM LINUX
Calm down. PM me when you get a chance and I'll help you get set up. 971 has been using Linux to program the cRIO for the last 2 years. We used Linux to program the IFI system as well. It's not a documented or well supported way to go, but it does work.
  #22   Spotlight this post!  
Unread 02-06-2010, 11:38
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,425
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: Java VS C++ || The Final Decision

My team used Java this year.

As a mentor, I did everything in my power to convince them to use labview, but in the end the students run the team. I think they realized how quickly a source can become convoluted and unreadable when its hacked together at the last second, which is why the mentors tried to advocate labview (less time typing/debugging, more time testing).


Having coded in Java for about 5 years, I know the things that bug me the most about it (no native support for serial communication? no unsigned data type?). In that time though, I've programmed a wide variety of things, enough to understand the importance of interpreted languages (programming an xlet for one cable box, and it'll run on any, or any bluray player. Same with smart phones; runs even though the underlying architecture is completely different).

I don't think that Java is the ideal solution for the cRio, although as far as I'm concerned its just syntax.
__________________

Be Healthy. Never Stop Learning. Say It Like It Is. Own It. Like our values? Flexware Innovation is hiring!. We're looking for Senior Automation, Software, and System Engineers. Check us out!
  #23   Spotlight this post!  
Unread 02-06-2010, 13:29
Andrew Schreiber Andrew Schreiber is offline
Joining the 900 Meme Team
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,080
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Java VS C++ || The Final Decision

397 used C++ since our mentor background is primarily in embedded systems and we felt most comfortable teaching C++.

2337 used Labview (I cannot recall the reason)

A word on Java. One of Java's selling points has always been the write once run anywhere capability. This comes at a cost to the overall speed of the language. FIRST teams do not need the benefit of an interpreted language because we are writing for 1 operating system on 1 processor. Because of this I do not feel Java is the most effective tool for the job at hand. However, if you/your mentors know Java well but none of the other languages it is an effective tool.

A quick word on that "power" of the languages. None of these languages are any more or less powerful than the others. Now, some of them may be simpler. Some of them may be faster. But given any problem that one of these languages could solve the others should be able to solve it too. The solution may not be as easy or as quick but it is a valid solution.
__________________




.
  #24   Spotlight this post!  
Unread 02-06-2010, 15:22
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Re: Java VS C++ || The Final Decision

Quote:
Originally Posted by Andrew Schreiber View Post
2337 used Labview (I cannot recall the reason)
I cannot remember exactly, but our head mentor always insisted on LabVIEW for the fact that it's legible to everyone thanks to the GUI and that it's easy to pick up and understand (as well as easy debugging, as efoote868 said). I've only barely messed around with C++ and LabVIEW as the extent of my programming knowledge, so I'm happy with that decision.

Two kids on the team have suggested using C++ or Java next year, but they were the only two kids on the team who understood it at that time, and were overruled by the head mentor.

Endorsements? The HOT Team uses it. That's good enough for me.
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
  #25   Spotlight this post!  
Unread 03-06-2010, 16:48
mjcoss mjcoss is offline
Registered User
FRC #0303
 
Join Date: Jan 2009
Location: Bridgewater,NJ
Posts: 70
mjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the rough
Re: Java VS C++ || The Final Decision

I have the team program the robot is all three languages. We then use the software that a) has the lead programmer at the event, and b) works the best. Each language has it's place. I personally believe that Java is not appropriate for embedded systems. Labview is great for debugging, and we use Labview as a diagnostic tool. Labview is easy for many people to grasp, and they can get up and running quickly. Java is what is taught in a lot of high schools in the AP classes. So at the end of the day, you use what the students, and mentor feel comfortable with.

One major issue is that each language provisions the CRIO slightly differently, which leads to different behavior on the part of sensors, and even something as simple as communication with the driver station.

And as far as using Linux to program the bot, it is doable, but it's not simply setting up a makefile. You need to use the VxWorks compiler, and create a kernel module. Not sure that it's worth the work.
  #26   Spotlight this post!  
Unread 03-06-2010, 18:27
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: Java VS C++ || The Final Decision

Quote:
Originally Posted by mjcoss View Post
And as far as using Linux to program the bot, it is doable, but it's not simply setting up a makefile. You need to use the VxWorks compiler, and create a kernel module. Not sure that it's worth the work.
Its GCC, it really is that simple
  #27   Spotlight this post!  
Unread 03-06-2010, 20:45
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Java VS C++ || The Final Decision

Quote:
Originally Posted by mjcoss View Post
And as far as using Linux to program the bot, it is doable, but it's not simply setting up a makefile. You need to use the VxWorks compiler, and create a kernel module. Not sure that it's worth the work.
It is just as simple as setting up a Makefile. I've been doing it for the last 2 years. 971's code for 2009 and 2010 has been developed under Linux, compiled under Linux, and downloaded from Linux, using Makefiles. I can check out our repository from any linux machine (provided it has some basic tools), type make, and it'll do everything that it needs to do to build the code. I'll repeat my offer from up above. If anyone wants a little help getting started developing using Linux, send me a PM, or start a thread.
  #28   Spotlight this post!  
Unread 03-06-2010, 22:16
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: Java VS C++ || The Final Decision

<3

Your homegrown method works

<3
  #29   Spotlight this post!  
Unread 03-06-2010, 22:45
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: Java VS C++ || The Final Decision

To get back on the topic, I think that Java is good for prototyping the robot code so you can go in later with cpp and have the robot kick butt, like Dr. Tran!
  #30   Spotlight this post!  
Unread 04-06-2010, 12:45
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: Java VS C++ || The Final Decision

Java is great for cell phones, not sure why we have it at all for the cRIO.
LabView is terrific for controlling bench instruments to take measurements, and for programmers that can't program or type.

Let's assume that C++ is the core language. Java is so similar to C++ that I guess it's fairly easy to offer it as an option, but then again, as it's so similar, there's no compelling reason for it. LabView is off in it's own world of pretty pictures and it's good to have a radically different viewpoint from text based C++ and the dreadful Eclipse IDE. Presumably WindRiver is to blame for that choice of IDE and FIRST are stuck with it. Did anyone make a jEdit based IDE for the cRIO C++ environment? Like I said, Java can be useful.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dean Kamen wrestles with decision: should he quit the Segway? Leon Machado IV FIRST In the News... 4 13-01-2009 16:07
Worst Decision of the Week! JJMax7 General Forum 44 08-03-2006 00:49
The decision of indecision on FIRST's part. cdawzrd General Forum 14 18-01-2005 21:41
pic: The First Big Decision CD47-Bot Extra Discussion 3 10-05-2004 17:57
pic: The final...final match CD47-Bot Extra Discussion 4 17-04-2003 16:24


All times are GMT -5. The time now is 03:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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