Do you recommend to use block coding or Text coding for VEX IQ competition?

Hi, guys,

Saw block coding and text coding on VEXCodeIQ software. Just wondering which one is better. I think text coding is easier to be customized.

Can anyone share your experience and suggestions?

1 Like

Please search the forum for recent similar questions before posting.

8 Likes

My advice - unless the students feel totally overwhelmed, go right to text based programming. And even if they are overwhelmed, try to work with them to get comfortable with text.

4 Likes

I have used block coding for 2 years and recently started writing some text code and what I have found is that if your code is stuff like “if button pressed spin 360 degrees” or just setting up your drivetrain, you can do It faster and easier in blocks. But if you are doing anything with any sensors or more complex stuff with more than just motors, it is worth your time to learn and use text coding. This is my opinion but what works “better” is up to you to find out.

2 Likes

You will find that block coding can do more than any team will ever need… so from a capability standpoint, it’s solid.

Block is easier for the non-programmers to learn from, and if not planning to learn to program, at least they see something that’s reasonably understandable.

Block is making inroads in stuff other than vex. I did some MS Azure logic apps and they were block-based to a reasonable degree.

We’ve managed to do PID in blocks as well as code a bot that plays ‘simon’ and dispenses m&m candy.

1 Like

Here is a programmer’s opinion. This is my experience in the 4 years I have been heading programming subteams. What I say is not fact, just what I have gathered from my experience.

That comment is a little misleading. Blocks can do more than any team will ever need. However, most things I am doing now in VIQRC would be painful in blocks. The VS Code extension has saved me so much time, and I understand that this is about vex code and not the vs code extension, they both work pretty interchangeably in my eyes.
.
.
Here is a list of pros that (for me) was the reason why I switched to text (Python specifically)

Any kind of Math with parenthesis is easier to read and write.

You do not have to worry about nesting the blocks in a way that does what you want them to, and you can just type in the equation you solved beforehand. I find sqrt, absolute value, and powers to be much simpler in text, as it is sometimes hard to find what drop-down menu. The same case can be made for any trig function. As I never remember that it is under abs.

More version control friendly.

It is easier to commit and push to GitHub, (Gitlabs, or any version software (sidenote GitHub hosts gits, it is not a separate version manager.)) If you are going to use git with blocks, you would have to download the file, and then upload it to GitHub. this does not create a GUI on GitHub, and it means it is painful to track edits to your code.

There are more but I don’t have enough time to write down all of them. If anyone really cares feel free to ping me.

I see blocks as a stepping ground for text, and if you are doing anything remotely complex, I would recommend using text.
.
However
.
If you are a beginner programmer, by all means, start on blocks, and work your way to text. As @coachdoug80516 mentions:
.

At the end of the day, in vexiq, there is no “best” for all situations, like previously mentioned, blocks excels at simple when pressed spin motor 15 degrees. When you get into more complex programs, calculating velocity, making decisions based on that. Or if you start creating complex state machines, text starts to be better as you can better optimize speed in text. It is all your decision. You may be able to get better support on the forms and google by using text.

Good luck on your programming journey!
-Blaziumm

P.S - Feel free to ping me if you have any questions in either blocks or text, my favorite part of VIQRC is helping!

8 Likes

Thanks for the nice reply.

However, if you step back and look at the overall team, and the goals of 1) creating effective teams 2) retaining team members over time 3) preserving a codebase that can be rolled forward year to year.

If you’ve got an awesome text programmer that ages out, moves, etc… then it can be real problem to find someone to fill that position and understand/manage/edit the code.

So, especially in iq, I’d stay w/ blocks 100%.

As far as version control goes… we are using the filename itself:

2 digit year - initials of team members - bot hardware version - code version

2023
John, Sarah, Tommy
A (first bot build, ri3d)
01 (initial code build)

23JSTA01

Technically, after 99 code revisions, you have to build a new bot!

1 Like

Definitely, I do apologize as there is some tone issues in there and I just wanted to say that it is 100% user preference, I just found that in my experience I had a different opinion. Thank you the same.

I do 100% understand this point! I hate to see that people have had this experience. From what I have done and seen, I hate to point out a “problem,” but personally I have always liked to have two programmers, when we go to organize teams we look for one, someone who shows interest in programming. They are willing to learn, and they carry the mathematical basis for the grounds of what they will be programming. I will then pair them up with someone that is “proven” in programming, someone that can teach the ways to a beginner. In my experience, as long as someone has a logical basis. blocks and text are pretty interchangeable. Especially in the environment of vex code, as it has most of the documentation that you are going to need right in the IDE.

The whole basis of programming in VIQRC for me and my team is to enable and teach our programmers the low-level basis of text, and the logical thinking behind it. So that they are able to transfer into any text programming langue required of them. We do this so that when they go into high school, they already have a basis of text programming, so web development classes, general programming classes, and other robotics programs that have worse block coding. Yes, as much as I hate it, currently 100% of our VIQRC students get funneled into non-VRC programs. (Vex / RECF HMU if you have a better then grant offer :slight_smile: )

Takeaway from my robotics experience, push to text now. As it is more forgiving, enables them to code text on high school robotics because they are not able to code in blocks, and always train a backup.

I was not 100% Clear on what I was meaning, and that’s my bad! What I was going on about is the fact that I can see line by line what I have changed from version to version. I can pull up GitHub, and see that originally my line 22 said

left.spinfor((10-72(a), Foward, degrees)

I can then pull up split view, and GitHub will highlight line 22, and show that originally it was what was above, and now it is.

left.spinfor((10+72(a), Foward, degrees)

Slightly different, but I now know that on June 22, at 2 AM, I changed that negative to a positive, if something unexpected breaks, I can now see my commit logs, why did I change this? Did I say why in my commit description? Or can the reason I changed this sign be attributed to the fact that it was 2 in the morning and I was on my 4th Mountain Dew. (I promise this story has no basis in fact)

If I was using Blocks, I would have to go through every code and open it, and see if that line of code has changed. for a 20-line program, this is fine, but what happens when I get 200, 500, or 1000, it starts to take up more time. Now however I do not have my handy commit descriptions, I could write in a text document, but would 2 AM me remember to do that? I am going to be honest and say probably not. Github forces me to make a commit description or I cannot commit, and risk not saving my work.

As said before, it is 100% personal preference, and the situation I am in definitely affects how I teach and program in VIQRC.

Thanks!
-Blaziumm

5 Likes

That is for V5, not for VEX IQ. Thanks.

1 Like