Block vs text, the 2022 edition

In another thread @somewhereoutinspace, a four year veteran of the program wrote in another thread about creating programming tutorials. I had suggested linking up with VEX and this was the response.

And in 2020 was this thread Text vs Blocks

So for the 92 % of the people NOT going to Worlds, I’ll open the 2022 edition of this can of worms.

But some history:

In the way before times (PIC controllers) your choice was to use the MPLabs, some upstart tool called RobotC orEasyC. As a hard core embedded micro-controller coder, I used MPLabs. As time when on, RobotC became the tool of choice as the rough edges dropped and the features abounded. EasyC had a block language, but with some syntax sugar that RobotC had I could teach Middle School beginning programmers what to do in one 60 min session.

Because I could teach the RobotC text format, there was no reason to do EasyC graphical. I became adept and grabbing EasyC code, flipping some RobotC syntax at it and have teams drive with RobotC in less than a match cycle time.

So I was hard core text. Fan for life of RobotC! @jpearman and @tfriez and I have exchanged emails forever about RobotC

And time passed. This language called Scratch came out and younger programmers flocked to it. But back in 2012 Modkit hit the stage and in 2013 Bob and Paul from VEX got a port to the VIQ environment. And for elementary school programmers / roboteers it was pretty amazing. The combination of Modkit and an iPad launched a lot of programming.

In 2015 when I was pushing the local libraries to do VEXIQ, I started them out on Modkit. Scratch programmers jumped right in, they were at home with the blocks. More talented programmers we taught RobotC. And then with V5, RobotC became an orphan. It was replaced with a product that had a very short life and doesn’t exist today. But it pushed me to the Robotmesh product that I use and I love.

RobotMesh Studio (RMS) is a great graphical environment. It is far forward thinking of the VEX product. It produces clean Python and in the graphical format allows me to “return” values back. This really helps in teaching structured programming in a drag and drop language (the VEX product doesn’t do this) I also love the feature that RMS stores programs in their cloud and can be shared across all the team members. This initial feature was a big deal with teams.

I think PROS is great. You know how to program, you know C++ and are willing to learn the VEX API, have at it. You are a middle school team, your programming skills are being able to make microwave popcorn, maybe PROS isn’t for you. I now teach everyone that can’t program to use the block version and in their next season after blocks, take their old program, move it to Python and we go from there.

And while I’m not known for making outrageous statements (@Sylvie just fell out of their chair), your PROS program can be done in RMS. If you have some clean code it can be done in RMS. (I’ve seen some team code that they can’t really explain how it works, just that it “does”. That’s not moving anywhere but a bitbucket. You get done with Worlds, send me your code and I’ll send you back a block version. (You may get mocked for bad programming)

But back to the hero of this story, @somewhereoutinspace. They have a valid point, VEX hasn’t been the best at code. But I have hope with James and Tim that things will improve. I am super sad that VEX management has blocked RMS from running on the VEXIQ version two systems. I have a short term system in place with getting V1 brains. But I’ll need to also move.

But I think that there is a place for graphical languages for roboteers. And once @somewhereoutinspace gets their tutorial series in place, it will be easier for roboteers to move from one to the other.

But that’s not why we are here today. We are here for you to discuss where you think things are going. Blocks? Python? C++? Pros? Just going to wait for V7 with the neural implant?

13 Likes

The very same people that figured out how to run PROS on a V5 brain, provided the SDK to the PROS team that allows PROS to run and helped the PROS team debug many issues.

9 Likes

Not gonna lie, when I saw the ping email on my Fitbit I thought you had started a callout post. LOL.

Just a few points I’d like to clarify:

  1. I’m not actually a four year veteran of VEX - not sure where you got that idea? I’ve only done it for two years, non-consecutively. Granted I’ve put MASSIVE amounts of time (after school for 4+ hours 4 days a week) this year, so if you’re being liberal it adds up to 3-ish years of experience.
  2. By “viable option,” I mean “viable for high-level play.” Blocks is fine if you want to slam out some drive code or something equally simple - there’s a reason Scratch is used to teach programming fundamentals.

And @jpearman, I fully understand that PROS is/was dependent on official help to function, and I don’t doubt the competency of the people responsible for maintaining the Brain’s firmware. AFAIK I’ve never had a brain firmware issue.

But you can’t deny that lots of other stuff is rough around the edges in hardware, software and communication - enough to warrant my overall dim view. VEXCode is buggy and annoying to use no matter how you slice it. The Brain’s ESD problems have been an absolute nightmare for years straight, yet VEX just denies denies denies and does nothing to fix it.

And teams stay on blockcode for far too long because little if anything is done to demystify or incentivize using a real language like C++ or even Python. Yeah, the learning center has some info buried behind several menus - but it’s all super basic. I mean, seriously, entire pages on different numerical variable types but nothing on structs or even basic PID? (Edit: and TASKS. NOTHING AT ALL on TASKS. Asynchrony is IMO crucial to advanced auton, yet people are just expected to stumble across it in the API?) That’s the sort of actually useful stuff I want to teach.

2 Likes

Was there ever a reason given as to why IQ2 and the GPS sensor were blocked from RMS? They obviously don’t have to give a reason, it’s their stuff and they can do whatever they want with it, but I don’t understand why they would actively prevent more options for coding.

5 Likes

It’s not as far as I know. I don’t remember if RobotMesh ever contacted me for SDK details, but GPS is supported by PROS and MathWorks so there’s no reason why RobotMesh can’t support it.

9 Likes

C++ and pros. Otherwise, vexcode shiuld be open source. I dislike not having an insight to everything. Plus blocks are super limited, and aren’t real programming imo.

2 Likes

I consider blocks entry level. It gets teams started and helps bridge the gap for those who can’t visualize code. This makes it easier on the mentors and coaches, and younger students do great with scratch. They can establish an autonomous routine, drive control, minimal functionality, and they can compete. I am totally fine with 70% staying in the shallow end of the pool.

Blocks also reveals the barrier to c++. No support for six-wheel drivetrains, is difficult to program a PID, and you can’t realize the true advantages of code - classes, structs, inheritance, version control, etc.

Those that want to swim in the deep end will have the curiosity and drive to learn the more advanced concepts. As a mentor, I will gladly spend more time with those that have the desire to peer into the matrix.

10 Likes