Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Who to Choosing Between programming language? (http://www.chiefdelphi.com/forums/showthread.php?t=95131)

yara92 10-05-2011 08:18

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..

JamesBrown 10-05-2011 08:43

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by yara92 (Post 1060604)
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..

Mohamed,

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.

Rosiebotboss 10-05-2011 08:52

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.

Jared Russell 10-05-2011 09:18

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by Rosiebotboss (Post 1060613)
What language does your programming mentor have the most experience with? That's the language you should use.

This.

yara92 10-05-2011 09:57

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by Rosiebotboss (Post 1060613)
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.

The equation is more complicate than what does the mentor know, I am locking for FRC as it is the First step for the kids for the future and continuo their academic studies.
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.

mathking 10-05-2011 10:19

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.

Alan Anderson 10-05-2011 10:56

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by Rosiebotboss (Post 1060613)
What language does your programming mentor have the most experience with? That's the language you should use.

I don't think it's that simple.

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.

Mike Betts 10-05-2011 12:19

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

Andrew Schreiber 10-05-2011 12:49

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by yara92 (Post 1060622)
The equation is more complicate than what does the mentor know, I am locking for FRC as it is the First step for the kids for the future and continuo their academic studies.
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.

I have to disagree with Alan, if you have a software mentor who feels comfortable teaching certain languages you should probably go with those languages. If that mentor feels comfortable learning with the students or learning a new language then that opens up a new possibility.

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.

reuven 10-05-2011 12:57

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.

staplemonx 10-05-2011 13:00

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?

Ether 10-05-2011 13:20

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by reuven (Post 1060656)
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.

The world is flat. During the build season there is very little waiting to get a detailed expert answer on CD.



mathking 10-05-2011 13:23

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.

sanddrag 10-05-2011 15:09

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.

Nemo 10-05-2011 15:22

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.

reuven 10-05-2011 15:24

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by Ether (Post 1060662)
The world is flat. During the build season there is very little waiting to get a detailed expert answer on CD.



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).

Ether 10-05-2011 15:49

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by reuven (Post 1060677)
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).

If language is the primary barrier I would agree, although your English does seem adequate for the task, and folks here at CD are generally very patient and helpful when dealing with non-native English. But the time zone argument doesn't stand up to close scrutiny, given the wide range of hours that CDers monitor the forums and the fact that the US covers 3 time zones.



Mark McLeod 10-05-2011 16:19

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by Ether (Post 1060683)
...the US covers 3 time zones.

...or 6, plus spanning an extra one in there, but who's counting.

Ether 10-05-2011 17:16

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by Mark McLeod (Post 1060687)
...or 6, plus spanning an extra one in there, but who's counting.

Yeah, I worded that rather poorly. My intent was to convey that there's a 3-hour difference between Boston and San Francisco.



reuven 10-05-2011 17:31

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by Ether (Post 1060683)
If language is the primary barrier I would agree, although your English does seem adequate for the task, and folks here at CD are generally very patient and helpful when dealing with non-native English. But the time zone argument doesn't stand up to close scrutiny, given the wide range of hours that CDers monitor the forums and the fact that the US covers 3 time zones.


Thank you for what you wrote about my English :-)
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

remulasce 10-05-2011 17:59

Re: Who to Choosing Between programming language?
 
The answer is Python!

davidthefat 10-05-2011 19:22

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.

ahollenbach 10-05-2011 21:43

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.
  • If you have a large programming department (at least 2-3 veteran upperclassmen) and a few minions, you're probably alright picking the one you think is best for the job (which is, IMO, C++). Based on sheer experience, you should be able to create some quality working code as well as teach a bit.
  • If it is just one mentor, and little experience among the kids, going with what the mentor knows best is wisest.
  • If you have little to no experienced kids, and no programming mentors, ask the AP Computer Science teacher, and program in Java. It's wisest though, to find a permanent programming mentor.
My thoughts:
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

Alan Anderson 11-05-2011 00:01

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by ahollenbach (Post 1060750)
My thoughts:
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).

Simplistic? It doesn't sound like you looked very far beneath the surface. LabVIEW for FRC is extremely feature-rich, and it isn't even all of what is available.

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.

SavtaKenneth 11-05-2011 00:14

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.

reuven 11-05-2011 01:57

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by SavtaKenneth (Post 1060782)
Just to offset the "if you're in Israel code in LV" argument. .

i disagree, although personally i have used C++ for many years (before my FIRST years, when i did have a life) in FIRST Israel LV is the best choice, this is because all the support you get for it here, for an example the seminar that FIRST had here in Hanukkah the language that they thought there was LV, not C++ or JAVA.
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:

Originally Posted by SavtaKenneth (Post 1060782)
However I believe that all of these languages are a good choice

i agree, this is way i speak about the support for the language .

kenavt 11-05-2011 14:21

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by ahollenbach (Post 1060750)
Oh, and of course you could be fly like 294 or 709 and code in Python :D

While this a little bit of a side detail... do 294 and 709 actually code in Python? How do they make that work?

JamesBrown 11-05-2011 14:29

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by kenavt (Post 1060873)
While this a little bit of a side detail... do 294 and 709 actually code in Python? How do they make that work?

http://www.chiefdelphi.com/forums/sh...ad.php?t=92382

Gdeaver 11-05-2011 23:04

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.

CastleBravo 11-05-2011 23:17

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by kenavt (Post 1060873)
While this a little bit of a side detail... do 294 and 709 actually code in Python? How do they make that work?

Yes, we code in Python. Our robot was running Python at both regionals we attented and champs. After using Python all of build season, I strongly recommend it to other teams. It is far easier to learn and use than the other languages. It is also doesn't require a compiler or any special programs to write, only a basic text editor, which is very helpful if you don't have your usual programming computer at a competition (if you lose the charger, etc.). It is also very quick to change code last minute before a match. While queueing for a match at a regional we had to change the code. Thanks to Python, all we had to do to send it to the robot was to save the file and copy/paste it from a folder on the laptop to the robot and reboot the robot. If we used C++ and had had to wait for windriver to start up, make the change, and then compile/deploy the code, it wouldn't have made it to the robot for the match. It was very fast and easy for me to learn (far faster and easier than C++), and I've heard the same from other teams who have also used Python, which is very helpful if programming isn't one of your teams strengths and you need to teach students quickly. Overall, Python is a great language to program your robot.

remulasce 12-05-2011 03:53

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.

mathking 12-05-2011 08:48

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by Alan Anderson (Post 1060778)
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.

This is exactly the key distinction. As a CS teacher I would like to say "thanks Alan" for bringing this up. It is one of the things I like the most about using LabVIEW.

OSU_Springer 12-05-2011 08:49

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by sanddrag (Post 1060674)
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.

I would agree that Labview can be frustrating. However, NI has gone through significant pains to make it very easy to use for FIRST. I would recommend Labview because it is the easiest (in my opinion) to teach to students, as well as for them to troubleshoot. I am going out on a limb thinking that there are probably more visual learners out there than any other. Labview is ideal for this group.

Alan Anderson 12-05-2011 09:22

Re: Who to Choosing Between programming language?
 
Quote:

Originally Posted by sanddrag (Post 1060674)
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.

LabVIEW is the only one in your list that isn't a "traditional" procedural language. It makes sense that you'd find it the hardest to work with based on limited exposure.

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.

jonboy 12-05-2011 10:14

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.

WizenedEE 13-05-2011 02:34

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.

Chris is me 13-05-2011 05:26

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