![]() |
Who to Choosing Between programming language?
Choosing Between programming language
Which reasons for choosing on programming language over the other? Choosing Between C++ and Java or LabVeiw.] My Question is which parameter I should concern for choosing the programming language such as : Friendly to use; simplest; etc.. |
Re: Who to Choosing Between programming language?
Quote:
I would recommend using whatever language your team members (students and mentors) have the most experience with. All three languages are equally capable and more powerful than necessary for FRC. If your experience is roughly equal in all languages then here are some of the benefits of each to consider. C++: C and its variations are the most common languages used in industry and academics today. Applications for C++ range from embedded software through high level applications programming. Learning C++ would likely give students an advantage if they pursue engineering at university. Java: Java is similar in complexity to C++. It has the advantage of being platform independent (meaning that code you write for one operating system should work on a Java VM for any operating system. Java is not as popular in industry as C/C++ but it is still used. In the US Java is the most popular language for High School students to learn because it is used on the Advanced Placement test for college credit. Learning to program in Java makes it a lot easier to learn to program in C++ later, most of the skills are transferable between the two languages. LabVIEW: LV is a much more application specific language. There are plenty of companies that use LV but there are even more that don't. LV is fast and powerful and National Instruments provides fantastic support. In my opinion LV is the fastest and easiest way to get a robot programmed, if those are the most important things to you I strongly recommend LV. In general I would say that you can pretty much flip a coin between Java and C++. I think the bigger decision is whether you want to use LabView or one of the traditional languages (Java/C++). I think LabView is the easiest to learn and get started with but I think that there is great value in teaching students one of the other languages. The skills learned using Java and C++ are easily transferred to other languages later. These same skills can be learned using LabView but because of LabView's graphical nature it is much easier to get away with poor coding practices. Over all there is no one right answer, as a team you need to weigh the pros and cons of each language and decide what is best for you. |
Re: Who to Choosing Between programming language?
What language does your programming mentor have the most experience with? That's the language you should use.
Rosie's programming mentor uses Labview every day in his job and teached programming at a local University at night. Hence our student programmers are VERY proficient with LabView. |
Re: Who to Choosing Between programming language?
Quote:
|
Re: Who to Choosing Between programming language?
Quote:
Secondly my team 75% is smart girls, I always telling them for me in Science there is no compromise like or dislike. There is advantage and disadvantage then you need to weigh the pros and cons. |
Re: Who to Choosing Between programming language?
I think JamesBrown nicely summarized the pros and cons of the languages. I will add an observation of my own: Any students interested in programming as a career will learn C++ and Java in college. But they might not learn LabView or another language and development environment like it, so there is some advantage to using LabView from that perspective.
|
Re: Who to Choosing Between programming language?
Quote:
I had no real experience with LabVIEW when it became an option. I chose to focus on it partly because of that. I didn't keep falling into the trap of wanting to do things myself because I could do it faster. Now that I do have plenty of LabVIEW experience, it's still a good language to use for our team, because I find it easier to explain a programming concept using dataflow and diagrams instead of procedures and text-based syntax. If we had a large number of active programming students and wanted to do some sort of distributed programming effort, I'd pick C++ without hesitation. So far as I can tell, LabVIEW doesn't yet have the kind of support for fine-grained version control that is the norm for text-based languages. |
Re: Who to Choosing Between programming language?
Mohamed,
While I very seldom disagree with Dana Henry, I have to side with Alan on the mentor experience issue. Most professional software engineers can change languages with ease. I have lost count on how many languages I have used (over 14) in my career. Also, most of us enjoy a challenge... James Brown did a very good job of explaining things. However, I would emphasize the support in Labview. Most importantly, the fantastic video tutorials that Ben Zimmer has provided on FRCMastery.com. If your team is mentor poor or, for some other reason, you need the students to learn on their own, Labview is my top recommendation. That being said, I will be pushing my team into Java this next year as it will better prepare them for AP testing and college. Disclaimer: My comments above concern the existing choices... I have tried to keep an open mind about things but I still feel that FIRST did not do us any favors in the migration to an overly complex system to control a simple embedded system like a FRC robot. JMHO, Mike |
Re: Who to Choosing Between programming language?
Quote:
As for which language is "best"... I can't answer that, I've used all 3 of these languages over the course of my college program. I can safely say that programming is akin to art. You have many different mediums but in the end you still wind up with a beautiful work. Learning a new language is just learning a new medium, they have their quirks and their own rules but the ability to visualize what you want is more important. TL;DR - Software Engineering != coding. |
Re: Who to Choosing Between programming language?
Mohamed .
first of all i hope you had a good holiday today (i'm an Israeli too as you can see) in this side of the FIRST world most of the teams use LV. so i think that this is the one you should use. think that while you have any problem in the season it woulds be easier to call one of the teams in Israel then to wait for an answer from a team in the US. |
Re: Who to Choosing Between programming language?
We are going to let our kids decide between C++ or Java. we are going to make Java as appealing as possible becuase we can have them learn it by building android apps over the summer. That way by the time the fall comes around writting jave for the robot will seam like a breeze.
But if they choose C++, anyone have any fun tasks that the kids could do that will teach them without them knowing it? |
Re: Who to Choosing Between programming language?
Quote:
|
Re: Who to Choosing Between programming language?
I don't have any simple, fun C++ tasks for kids to do on their own, but I have another for Java: Robocode. It is a great way to learn Java programming while you program virtual robots. It is free and cross-platform as well.
http://robocode.sourceforge.net/ Alan highlights another important thing to consider: version control. If you are going to have multiple programmers working on the code for the robot, version control is very nice to have. I will disagree a little with Alan, in that I actually find that in general the version control systems I have seen for Java are easier to learn than for C++, but there are many good options for both. In fact, the ones we have used will work for either language equally well. |
Re: Who to Choosing Between programming language?
I'm not a programmer, but I do consider myself very computer literate and I've done limited programming in LabView, Java, PBASIC, and Matlab. I must say, of them all, LabView was the most frustrating for me to use.
|
Re: Who to Choosing Between programming language?
I would like to echo the idea that LabView is fast. Our programmers can produce working teleop code in 20 or 30 minutes in a pinch. Maybe it is similar in C++? I wouldn't know, because our team switched away from that before I signed on.
|
Re: Who to Choosing Between programming language?
Quote:
as a programmer, its faster to me to take the phone and to call to someone here (how also speak my language) then to try describe it in English, and wait 6-7 hours to an answer (usually when i write here u all asleep in the US). |
Re: Who to Choosing Between programming language?
Quote:
|
Re: Who to Choosing Between programming language?
Quote:
|
Re: Who to Choosing Between programming language?
Quote:
|
Re: Who to Choosing Between programming language?
Quote:
i agree that there are people here all day long and its very useful when you need something, but still if i work here at 10 AM its 3 AM EST ... another thing to understand is that the build season here is very different then in the US. for example i can mention the shipping of parts , extra price to pay (shipping to this side of the world is expensive) adding Israeli VAT 16.5% +customs (changes depending on the exact part you order) and everything..... or converting every unit to a proper system of metric units .... or arguing about the translation of the rules. and sometimes to be honest the extra hour of writing in English and waiting for someone in CD the see it in the middle of the night in you're side of the world is avoidable by gust calling a different team in Israel. i think LV is a good choice because of the support he can get from other teams in the area, this is very important in a tough season like the one FIRST have in israel |
Re: Who to Choosing Between programming language?
The answer is Python!
|
Re: Who to Choosing Between programming language?
Our teacher teaches Java in the AP Computer Science because of the obvious reason. Last year, the programming mentors made the executive decision to use Java. I respect their decision. I am the only person there that knows C++ extensively (excluding mentors). All the recruits are from the AP class, so the most obvious answer was Java for us.
Some days, I really want to use C++, I have been using it for years and feel most comfortable with it. We did not do anything complex this year regarding the code. There was just too much friction between the programmers to get anything much done. |
Re: Who to Choosing Between programming language?
Depends on the background of your programmers / the size and experience of your department. You have to remember that most programmers are learning their first code through FIRST.
LabView - an interesting and simplistic programming language. However, I'm on the fence as to whether this is a good introduction to programming, because visual programming is significantly different from regular programming, and you can run out of physical space in your layout (*sigh). Java - probably one of the best ways to keep the new members learning. It has many practical applications with it's GUI component. C++ - I see C++ as the best tool for the job, but I'll leave it to the professionals to decide. Oh, and of course you could be fly like 294 or 709 and code in Python :D |
Re: Who to Choosing Between programming language?
Quote:
If you just think of it as "visual programming" you're missing a significant part of what makes it LabVIEW. The big difference isn't pictures instead of text; it's dataflow programming instead of procedural. Running out of physical space shouldn't be a problem unless you think it's a good idea to put all of your code in one enormous function. Again, it doesn't sound like you did any serious exploration of LabVIEW. For students without a lot of prior programming experience, I think LabVIEW has a lot of positive points. The only thing right now that makes me lean at all toward C++ is the time it takes to compile and deploy a program. |
Re: Who to Choosing Between programming language?
Just to offset the "if you're in Israel code in LV" argument. We're an Israeli team that programs in Java with about 5 very competent programmers. If you're interested in Java we'd gladly give you assistance any time and way you wish it.
As for choosing the language, most of our programmers came with a background in textual programming so we decided to either use C++ or Java. In the end we went with Java because that is taught at our CS class. I believe it is a great tool for the job, and can do anything the other two languages can. However I believe that all of these languages are a good choice. |
Re: Who to Choosing Between programming language?
Quote:
in a shrinking 5 week season (we do not work on Saturday's) this support is something very important. and we cant ignore it. this is way my answer is LV. Quote:
|
Re: Who to Choosing Between programming language?
Quote:
|
Re: Who to Choosing Between programming language?
Quote:
|
Re: Who to Choosing Between programming language?
LV, C++, Java. They all can run the robot. What I've experienced on our team that made a real difference was the Data Flow or Real Time mind set. Prior to our 2010 season, the robot code had a procedural and web type flavor. Then in 2010 we went for swerve drive and our code had allot of sensors and we closed the loop. We learned the hard way that the coding mindset that our students brought from the CS classes was causing allot of problems. The worst was at our first regional when our robot had a grand Mal seizure. (our team called it the happy dance). That's when it suddenly sank in what all the NI tutorials meant by data flow. By the end of the season our code had been re-written many times as our students embraced the Data Flow mindset. We continued to work on this in 2011. Teams that do not have a programming mentor that is familiar with real time embedded systems are at a disadvantage. No matter what language teams chose life will be nicer if they learn the real time - data flow mind set.
|
Re: Who to Choosing Between programming language?
Quote:
|
Re: Who to Choosing Between programming language?
The only "special program" I would especially recommend you have is netconsole. Python is interpreted, not compiled, so if a crash-worthy bug is made, it will be uploaded to the robot and might not be caught until it actually does crash on the robot, potentially mid match. By no means is this a deal breaker- a once-over of the code before upload will catch your spelling and syntax errors, which are the vast majority of crashes, and you need to make it a point to test every single line of code, but you do that anyway, right?. In the current version, crash information is reported over console, so if you want to know where to look for your bug, you need NetConsole. To be crash-tolerant, put your different subsystems in their own try-except blocks, so if one fails the rest of your robot is still workable.
Probably the biggest downside right now to Python is that it is new and documentation isn't complete. if you have problems at competition, you might be the only team there using it, so no one would be able to help. We're working on the documentation part, although it really requires little past the tutorial on how to install, and that was the first thing written. |
Re: Who to Choosing Between programming language?
Quote:
|
Re: Who to Choosing Between programming language?
Quote:
|
Re: Who to Choosing Between programming language?
Quote:
I too had a frustrating introduction to LabVIEW. My instructor was a wizard at dataflow programming, and showed me things so quickly that I never had a chance to understand the underlying nature of what was going on. Later, after I had gone through a well-done series of tutorials -- and after I had let go of much of what I thought a programming language "needed" to be -- everything was much easier to understand. |
Re: Who to Choosing Between programming language?
There are many phases of software development that are language independent as it applies to FIRST robots. The requirement definition of functions and interfaces applies to all languages. Also the top level design, algorithms and logic tasks apply to all languages. Neither SW coding nor language for most typical SW development projects are the biggest problem. The FIRST software code must interface in real time with the physical world of the FIRST robot with its various sensors and actuators. This is quite a challenge for the code which most SW developers usually don’t have to deal with. These physical items are not familiar to most FIRST participants especially the students. Understanding how these physical items respond is important to developing good code to control the robot.
What I like about LV is the ability to easily make front panels with lots of graphical items to display various parameters simultaneously so that everyone can observe what is happening in real-time. There is also the ability to monitor selected data flows in the code. This is a big deal when you are trying to characterize the sensors and actuators and when you are debugging and tuning the robot. With the wireless interface and the graphics it sure beats the old tethered and printf debugging of years past. There are lots NI tutorials and documentation to get up to speed. LV tech support on the phone is both responsive and expert. FRCMastery video tutorials are also an excellent source for learning FIRST LV code. |
Re: Who to Choosing Between programming language?
When building a robot for a personal project recently, I used labview to debug a lot of its problems. I spent a few days getting the serial connection to work, but after that I could look at the signals the robot was getting and what it was outputting on a graph and managed to figure it all out. I feel this is one of the real strengths of labview.
Another part of labview that I really liked was that I didn't need to put in anything to debug. By "probing" wires, you can see what its value is, and you can even see what function it is currently executing. That means that even if you don't think that you will need to look at a value, ever, you can still look at it without any recompiling, redownloading, or anything. However, labview is also very slow. Downloading it takes a long time, starting it takes a long time, and, worst of all, uploading code takes a long time. This means that, if there's a problem, you can't just throw something onto the robot, you have to wait about a minute for it to load. Another thing I don't like is that it is completely closed sourse, and, even worse, expensive. That means that after I get out of FRC, I pretty much won't be able to use it until I get a job. Also, you can only use computers with labview on it to write code, unlike in text-based languages. |
Re: Who to Choosing Between programming language?
I'm very interested in coding an FRC robot in Python and I'm glad to hear you guys had success with Python this year. I'd love to make Python an off season project for Shaker Robotics :)
|
| All times are GMT -5. The time now is 20:56. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi