The Blocks Endemic

I use text. This is because I learned on text, and have no reason to switch. No blocks language ive seen has string manipulation, modules, scopes, or object oriented programming. I use all of these features daily, and could not live without them. Along with this, industry uses text. I see no advantage to using blocks if you want to pursue programming as a career. Tools like PROS use text, and are great for programming the v5 as it has less restrictions than vexcode.

2 Likes

You can do many more things on text than you can with blocks

Like what?

It is easier to work with text once you know how, but what exactly can you not do with graphical that you can do with text in your experience? As you indicated, there are ā€œmanyā€ more things you can do…???

The post before yours did give a few examples, and I agree with them. But for 95% of teams there is no more they can do with text and they can probably get more done in blocks with the time they have.

They will probally respond with, That can be done easily with blocks.

  • Objects
  • Multi-file programming
  • Pointers
  • Multithreading
  • Easy multi-dimensional arrays
  • Inheritance
  • String manipulation
  • Memory manipulation
  • Strict typing
  • Version control systems
  • Custom IDEs
  • Real-world programming environments
  • Better resources available (stackoverflow, etc. are focused on text languages)
  • Standardized languages (blocks implementations vary significantly from one vendor to another)

These are things that students who are hoping to do programming as a career should be somewhat familiar with by the end of high school. Limiting students to blocks indefinitely is limiting to the development of their programming knowledge and does not sufficiently prepare them for college classes.

9 Likes

can you make functions in blocks? That could be another pro which is actually extremely helpful.

2 Likes

Yes, however according to the article @tfriez posted you are limited to only passing numbers (I’m assuming that means doubles?) and booleans, and it is not possible to return data, making recursion very difficult or impossible in VexCode blocks.

RMS on the on the other hand seems to support any data type (including 2D arrays - cool) as a parameter, and also supports return values, which makes RMS functions significantly more useful than those found in VexCode.

5 Likes

Threads and tasks are important enough in robotics that we support them in RMS Blockly. Dragging a second start block onto the canvas will start another thread of execution, and wait for will spawn a thread that repeatedly tests a conditional until it returns true.

VEXcode V5 Blocks also lets you drag multiple when started blocks on to the canvas, but I don’t know if that does the expected thing.

You can manipulate strings in RMS Blockly, but it’s pretty painful, and you’ll generally want to avoid doing it.

To be clear, under the hood they are Python lists of lists. They implement most array operations, but no matrix math.

4 Likes

Wow, let’s dial this back. We are talking about a VEX VRC or VEXIQ robot, not sure why some of these are on here. Lets take strings. You are not doing document display, you are writing things to a five line screen.

Version control system? GIT does binary things, have at it.

Inheritance? I’m spending my kids money :slight_smile:

These are all things that are part of a CS / Programming degree. We are programming robots, not building a multi-lingual banking system.

1 Like

No, I am writing to a 3 line 15 character controller LCD on extremely limited bandwidth. For example, last year I wrote this code:

std::string prepareStringForLCD(std::string input){
	if(input.size() <= 15){
		input.insert(input.end(), 15-input.size(), ' ');
	}
	else{
		input.erase(input.begin() + 15, input.end());
	}
	std::string output = input;
	return output;
}

This is impossible in VexCode (has literally no way to manipulate strings that I can see; @tfriez please correct me if I am wrong). In RMS this seems possible, though it would be significantly less elegant.

No, it really doesn’t. It treats binaries as giant black boxes that are committed as wholes. It is impossible to tell exactly what changes were made, and forget merging different commits. Even VexCode Blocks’ (I’m not sure what format RMS uses) program files are pretty much incompatible with version control, as the entire program is stuffed into a one line XML file. A diff looks like this:


That’s not exactly useful.

This year my team has experimented with inheritance as we were adding functionality to existing classes. We will probably have this implemented for our worlds code.

As I said in my post that you quoted:

I’m not expecting that every programmer should be using every one of these, but by the end of high school if a student is planning on doing programming as a career, they should be experimenting with most of these concepts.

Blocks are great if all a student plans to do is program a vexIQ or VRC robot for the rest of their life. But last I checked the whole point of this competition was to teach students skills and concepts that they can take with them into college and beyond, where they are programming more important and complicated things than a 15 second VRC autonomous.

Blocks are an excellent way to introduce a beginner to programming, but are not capable of adequately preparing a student for college programming classes. Text languages serve this purpose much more effectively. I know this from my own experience. I worked with blocks for several years before I joined VRC; I knew the basics of programming. I started with RobotC and eventually moved to PROS C, then PROS C++. During this time my programming knowledge grew exponentially, and today I am a Software Engineering freshman in college. If I had not been allowed to use a text-based programming language, I would not have 75% of the knowledge that I have now, and would be significantly struggling through programming classes as I worked to catch up to all the other students who had worked with real-world programming languages before.

Yet @sankeydd would have me believe that I should have used blocks because I could have gotten more done faster with them, and it would have been the only way for me to be motivated enough to do the programming myself. I strongly disagree with this sentiment, as it severely limits the students who want to grow beyond the capabilities of blocks; it is these students who are the most likely to actually pursue programming as a career. Enforcing the use of blocks denies students the chance to experience real programming languages and environments, and to develop their talents and skills in those areas.

Thanks for letting me know! I’ll pass this on to the teams that I know that use Blockly.

5 Likes

I’ve been pretty clear, learn RMS block to get programming down, then text to learn syntax.

Lots of teams do well with blocks.

For the last decade, I taught RobotC. It’s flexibility on the syntax made it easy. Then came the disaster that is/was VCS with C++. Then came VEX code with more C++ hijinks. Happy to do blocks and the. Python. Python has its own issues with the white space means stuff.

Not sure what bright spark thought C++ was good for a 5th grader. But I’m happy that RMS stepped in. While I understand VEX wanting to keep things proprietary, the RMS blocks is much better.

Love James, love Tim, but they are playing catchup baseball. When I get asked, what do you want to see, I just cut / paste current RMS features. Would love to see RobotC back with relaxed syntax, help system second to none and one of the best debugging tools and not be C++

Edited to add, none of this is open source, think of the cool features that could be added

2 Likes

I’m not positive vex wanted every brand new vrc middle school kid and viq kid to download and use Vexcode text. That is why there are many more options to use and learn from. VexCode text is honestly not that bad and for any student that wants to dip there toes in the waters of c++. The extensive docs (which can be hard to read at times PROS docs are way better) coupled with the relatively easy to understand auto-complete and the even easier graphical configuration window make learning very easy. While I do miss some of RobotC’s features, like that debugger window, VexCode is really not that bad. It really all boils down to, can you do what you want to do, and is it relatively easy and or efficient. I believe that for the majority of students, vex code or any other text-based coding program can satisfy both of these conditions. While blocks can do a lot of things, it very well might bottleneck a student when they attempt to do something more complicated than a simple controller and autonomous. I would love to see 5225a’s odometry done in blocks.

Edit: I am in no way trashing blocks and I think block-based coding is a great way to move into text-based.

1 Like

I think generally the point I’d want to make is that students can learn fundamental programming concepts using Blocks, then make the switch over to Text once you understand the fundamentals. This is no different than teaching students basic math before introducing more complex concepts like algebra or calculus - if a student doesn’t understand how a loop works or how to effectively use a variable, throwing the syntax of text based programming isn’t going to motivate that student any further. The new tools were currently developing are to help facilitate that difficult transition from Blocks to Text.

@Foster - As for VEXcode playing ā€œcatch upā€, you’re right… the entire VEX team spent 2+ years supporting a 3rd party toolset and not able to control its own destiny. We then realized our goals were not being met and then made the decision to bring the development in-house. The first preview of VEXcode V5 Text was released just about a year ago (3/19/19) as a response to show the community that we knew the prior tools didn’t meet our expectations and we wanted to do better moving forward.

And within that same time frame, we’ve had 10+ software releases / updates across 6 different operating systems, 20+ STEM Labs produced, 350+ articles in a new knowledge base, and 2 professional development educator certification programs - all at no cost, and all with the goal of making VEX Robotics and programming for students and educators more accessible and approachable. And over the coming months, we’re going to continue developing more of these resources with the goals of facilitating new users into the ecosystem and supporting existing users by advancing and growing their knowledge of engineering, computer science, and other STEM disciplines.

So as we continue to debate the merits of advanced CS concepts in Block-Based languages, keep in mind two things:

  1. Everyone has to start from somewhere so the easier we can make the onboarding into the ecosystem (that we’re so passionate about) the better it’ll benefit everyone from having a wider range of participants.

  2. Just because you could add a feature into a software package doesn’t mean you should - VEXcode Blocks was never designed to be the ceiling, it was meant to be a lower floor. Adding a lot of the features listed above would make the software more difficult for a new user to get started with using the tools.

12 Likes

Robotics and coding is a good stepping stone to building a multilingual banking system.

And if I’d never learned to write text-based code, I wouldn’t have made many of my projects, and despite how much nobody wants NotVCS, NotNotVCS, and NotNotNotVCS, they were all fun projects.

Another thing that has yet to be mentioned that I dont believe can be done in blocks is function templates. These are extemely useful for very advanced code. For example, if you decide to reinvent the okapilib units api.

5 Likes

I will admit, coming from the over-promised and severely underdelivered VCS, the work you guys have done with VexCode and all the support has been phenomenal.

5 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.