|
|
|
![]() |
|
|||||||
|
||||||||
| 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 | |||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
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. |
|
#17
|
|||
|
|||
|
Re: Java VS C++ || The Final Decision
Quote:
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 . |
|
#18
|
||||
|
||||
|
Re: Java VS C++ || The Final Decision
Quote:
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.... ) |
|
#19
|
|||
|
|||
|
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
|
|||
|
|||
|
Re: Java VS C++ || The Final Decision
Quote:
|
|
#21
|
|||
|
|||
|
Re: Java VS C++ || The Final Decision
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
|
|||
|
|||
|
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. |
|
#23
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: Java VS C++ || The Final Decision
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. |
|
#25
|
|||
|
|||
|
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
|
||||
|
||||
|
Re: Java VS C++ || The Final Decision
Its GCC, it really is that simple
|
|
#27
|
|||
|
|||
|
Re: Java VS C++ || The Final Decision
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
|
||||
|
||||
|
Re: Java VS C++ || The Final Decision
<3
Your homegrown method works <3 |
|
#29
|
||||
|
||||
|
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
|
|||
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |