Why Start with C++?

I see these kinds of comment on the forum nearly every day:

I would be interested in hearing why a rookie team with limited programming experience would start with C++? It is the least user-friendly of all the VEX coding options, and any advantage it has over the graphical languages or Python for robot programming are very slim. I’m pretty sure I could code a world-championship robot using Blockly.

So, sound off, why use C++ when you are just starting out?

5 Likes

Probably because VCS’s only real language is C++, which is a real tragedy.

This will never happen, but Vex should just endorse RMS. This would give way more people the knowledge of the availability of RMS python and would provide a much more friendly learning path.

2 Likes

First off, why would you want to do that to yourself?
Second off, is this a challenge?

I agree with you on people starting with C++ though. I think the ability to use Javascript/Python is a big advantage you have over competitors, along with chromebook support(that VCS promised, but never delivered). RobotMesh is a great way for new people to get into programming, and has a pretty high ceiling.

3 Likes

What? You’re telling me there are easier ways to code than VEX C++!!?? Actually, I am not joking; I would have assumed that the coding environment Vex chose would have been the most learnable. I stepped into coaching VEX from First Lego League, but I know nothing about coding with any language, just a mom and someone interested in promoting STEM activities. The only kid on the team with prior VEX experience (my kid) was previously mostly the driver and helped the builder, but did not learn programming. When we started this summer, there was a local programming workshop which went over Vex Coding Studio and VEX C++, but it has been hard for us, because we can’t find any training resource specifically for VEX C++. CMU put out videos about making the transition from Robot C, but we didn’t know Robot C either, and in many ways that just added to our confusion, having to learn Robot C things and then unlearn it again immediately! Teams who have someone to coach and teach programming are at a very high advantage over teams like mine. I have been very frustrated and fatigued by VEX and won’t be coaching it again in the future, because of this hurdle in learning the programming. Back to FLL for me!

I started out programming a TI 84+ SE calculator in high school, concurrent with joining robotics (i was not our team’s programmer, surprisingly). TI Basic was my introduction to programming. Menu based, linear command structure, very simple. I built up until i was pushing the capabilities of the language and platform, then i moved up.

I then went on to Python, Java, C, C++, PLC Ladder Logic, and XML in college.

Since then, i have expanded on PLC Ladder Logic and XML, and added in Batch and VBA which i have learned while working. (Additionally, the menu based Teach Pendant Programming languages of Motoman and Fanuc)

Now i am looking into PHP and Javascript, trying to get a foothold in web app development for some of my projects.

There is a huge amount of programming that becomes very intuitive and instinctual once you learn two or three languages, and most of my language changes have been out of necessity more than anything. Class requirements, company security policy, technical limitations, etc.

I am not a teacher, and i can’t claim to know the best way to START programming, but I think there is value to starting with a large, well established, well documents, widely supported, and super flexible language like C++, to push off that need to jump languages for a little bit longer.

We get a variety of students who get pushed into the roll of programmer. Some want to program anything and everything. There is a lot of value to them learning text based coding from the start, Some will not program a microwave clock once they leave robotics. For them, graphical or VEX specific programming may be fine.

We want all of our students to use the same language, so it was just a matter of which language to use. I personally wanted an object oriented language, since that is the style of programming which i am most experienced with.

Up till this year, all of our robots have been programmed in RobotC, and beginning this year, we have transitioned to PROS C++. Our hope is that this will be our internal standard going forward for all of our teams. We just had our only programmer graduate at the end of last year, and are starting over with all freshmen, which made it an ideal time for a switch.

1 Like

Cause I can’t use RobotC any longer? C++ isn’t my first choice. Not a fan of python with the white space nonsense for indentations.

RobotC was that sweet spot of being able to do C, simplistic API and easy to teach. I’ve got a slew of 4th graders that can do it on the IQ side.

It’s not like I’m a code newbie, I’ve been programming since my Cobol / Fortran days in HS / College.

The situation @CCVH described is exactly the one I am worried about. Promoting VCS over RMS is directly damaging to vex’s goal of trying to get students involved in STEM. Why would I learn to program if I lose my work when the save button is broken? Learning a new skill is already frustrating enough; if the tools used in that skill are completely broken, a new person is more likely to just quit rather than forge on ahead.

@CCVH I would encourage you to check out Robot Mesh Studio and their Hour of Code: https://help.vexcodingstudio.com/#pro/namespacevex/classvex_1_1vision/

Robot Mesh Studio (RMS) supports a variety of languages, including blockly (drag and drop graphical), python (text-based, but has a simple syntax and is a go-to language for new programmers), JavaScript (text based, helpful for those who have some web development experience), and C++ (text based, complicated, but also the most powerful).
I encourage you to give VRC another chance; as a student in my 5th and final year of the competition I can say it is quite rewarding and I have gained many skills and friends that I can take with me after I graduate.

2 Likes

I’m not really sure why this would make one choose C++ of all things over python. RMS Python has most of this traits that you liked about RobotC, such as having a “simplistic API” and being “easy to teach”. I’m by no means the best programmer, but I was able to get a room of students, ranging from 6th grade all the way up to juniors in high school, to understand RMS python and program a robot to make its way through a maze within a few hours. There’s no way I could have done that with something as complicated as C++.

2 Likes

Personally I started with C++ as it was the only option I was exposed to. It was the default language that was associated with vex and our mentor didn’t know any better.

This certainly is not the case with VCS. The way VEX thought people would use it was that they would progress through IQ and use block programming, then transition into actual coding when they transitioned into EDR (IMO that is). Their block system is modeled (the text) after C++'s syntax from what I can tell, which could be a motive to use C++ for the full language. (Don’t get me started on VCS as a whole though xD). Also, ROBOTC which is made by Robomatter, a VEX partner, used C (it’s in the name), which could have possibly caused VEX to use a simaler language. Not founded on anything really, just throwing out ideas.

In today’s world, Python is the all-around great language, it can basically do everything competently. (e.g. data management, deep learning, web apps, games, etc. I’m also not saying it is the only programming language, just that it can do most things reasonably well. There are other more specialized languages which can do different tasks better.) I’m not sure personally, and we will probably never fully know the reasoning behind VEX using C++ instead of more popular languages like python.

Although it’s a more “low-level” language, I’m glad I chose Blockly. Since I’ve used Scratch in the past, Blockly was very easy to get the hang of. The main thing I like about graphical coding styles like that is that there’s nothing to learn; all the commands are already there, and you don’t have to look them up in an API.
I plan to use C++ next year because I dislike the indentation stuff in Python and I think I’ll be able to code much faster with a “real” language. Also, once you get too many autonomous programs in Blockly, it gets really slow and takes forever to drag one block.

Basically Blockly is the best choice for someone new to coding, but Python or C++ can be good if the team’s had experience with those.