Announcement

Collapse
No announcement yet.

Is anyone using text-based programming language?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is anyone using text-based programming language?

    My state allows Python, Java, etc. this year in addition to EV3-G. We've been working with Python for a few weeks, and we're thinking about going back to EV3 for a few reasons. One of which is that no one else seems to be trying it. Just wondering if anyone else has been trying these options.

  • #2
    I've used the python interface a bit for my own nefarious purposes, so I could probably field questions, but even if my team were allowed the text based languages, I think it would exclude some of my visual learners from coding. We end up with only two or three specialized coders, but I try to have the whole team at least understand what's going on.
    Coach, FLL Team 3146 Peace By Piece 2013 - 2016; Team 29410 The Dragon Bots 2016-2018
    Judge, FTC 2014-2015; Field Technical Advisor, FTC 2016-2018; Robot Inspector, FRC 2018

    Comment


    • #3
      My thought was that the 3 more talented coders could write the libraries, and the others could just USE the library. We have done the same with myblocks; those who understand most deeply can write them, and anyone can use them. We are using ev3dev2 with VSCode, etc. and it's working fairly well

      Two big concerns:
      1. we have is that nearly every time we boot, we get errors when initializing the sensors. We have to unplug and replug to get them recognized by the brick (on both bricks).
      2. When launch a program, either from VScode through the connected interface, or from the file browser on the brick, it takes about 15 seconds to start the program. We could probably mitigate this risk by implementing a master program, but if we ever cancel out of the master program we're in big trouble as we wait for it to restart.



      Comment


      • #4
        Just curious, which state are you in? Why your state allow something other than what the rules clearly says "only..."? And if you guys get to the final finals, would that still be allowed? Would you have to re-write everything?

        Comment


        • #5
          Originally posted by OllyLi View Post
          Just curious, which state are you in? Why your state allow something other than what the rules clearly says "only..."? And if you guys get to the final finals, would that still be allowed? Would you have to re-write everything?
          Yeah, I don't know how it works, but it came from our Illinois partner. Sounded interesting at the time, but we eventually decided it wasn't working well enough for us. We've always advanced to the state competition, but never past it, so that wasn't on our radar. I just wanted a new challenge for the older kids, so they'd learn something new.

          Comment


          • #6
            Originally posted by OllyLi View Post
            Just curious, which state are you in? Why your state allow something other than what the rules clearly says "only..."? And if you guys get to the final finals, would that still be allowed? Would you have to re-write everything?
            The open programming pilot was something that only certain regions are doing this season (maybe 15-20 regions). I believe it was partners/regions opting in. I have been told that teams that program in another language (in those regions) will not have to reprogram if they make it to World Festival.

            https://docs.google.com/spreadsheets...it?usp=sharing
            Mentor: Not the Droids You Are Looking For - retired (World Festival Champion's 2018)
            Judge: Western PA, World Festival, Razorback Open, Mountain State
            Head Referee: Western PA Championships

            Comment


            • #7
              Way back when the NXT was introduced Minnesota tried out FLL for high school kids. It used a similar table, but allowed multiple controllers and unlimited motors and sensors. It also allowed using any language to program the brick. Program judging was challenging. It is easy to present programs written in a graphical language (if they are well written), but even elegant programs written in text based languages just look like a bunch of words. I remember a C++ program that used many clever ideas but there was no way to tell from looking at the code. All text based code is indecipherable when you only have a few minutes to decipher it. If you are using a text based language and your region actually looks at your programs it is more important than ever to prepare a presentation that uses graphics to convey information about design.

              Comment


              • #8
                Originally posted by Dean Hystad View Post
                Way back when the NXT was introduced Minnesota tried out FLL for high school kids. It used a similar table, but allowed multiple controllers and unlimited motors and sensors. It also allowed using any language to program the brick. Program judging was challenging. It is easy to present programs written in a graphical language (if they are well written), but even elegant programs written in text based languages just look like a bunch of words. I remember a C++ program that used many clever ideas but there was no way to tell from looking at the code. All text based code is indecipherable when you only have a few minutes to decipher it. If you are using a text based language and your region actually looks at your programs it is more important than ever to prepare a presentation that uses graphics to convey information about design.
                Very good point, Dean.

                My team is going to maybe put some snippets of their python code in the printouts along with the EV3 code. Show the judges the development process, and how we tried it out and went back to EV3-G.

                Comment


                • #9
                  Originally posted by korey99 View Post
                  2. When launch a program, either from VScode through the connected interface, or from the file browser on the brick, it takes about 15 seconds to start the program. We could probably mitigate this risk by implementing a master program, but if we ever cancel out of the master program we're in big trouble as we wait for it to restart.
                  Interesting. My impression was that leJos had the 15sec startup time but that ev3dev didn't. Seems like I was wrong.

                  The open programming pilot was something that only certain regions are doing this season (maybe 15-20 regions). I believe it was partners/regions opting in. I have been told that teams that program in another language (in those regions) will not have to reprogram if they make it to World Festival.
                  Yes, that is correct. If you participate in the Open Software pilot, you can go all the way up to World Festival with the software your team wrote.

                  Alan Green



                  Comment


                  • #10
                    Originally posted by alanggreen View Post
                    Yes, that is correct. If you participate in the Open Software pilot, you can go all the way up to World Festival with the software your team wrote.
                    Do they look at code at the World Festival? I've spoken with many Minnesota teams that attended and they report the robot judging at the world festival is minimal and any kind of program judging is non-existent. My girls experienced the same thing at the US Open. They got an exemplary design evaluation but didn't remember ever talking to a design or programming judge.

                    Comment


                    • #11
                      Originally posted by Dean Hystad View Post

                      Do they look at code at the World Festival? I've spoken with many Minnesota teams that attended and they report the robot judging at the world festival is minimal and any kind of program judging is non-existent. My girls experienced the same thing at the US Open. They got an exemplary design evaluation but didn't remember ever talking to a design or programming judge.
                      Most certainly, yes. They do look at code at World Festival. Not only have they looked my team's code, but when I judge at World Festival I look at code. I would say that my team experienced the most intensive robot design judging at World Festival compared to anywhere else. This past year, my team had two judges in the room: one judge was very focused on code and the other was very focused on strategy/design.
                      Mentor: Not the Droids You Are Looking For - retired (World Festival Champion's 2018)
                      Judge: Western PA, World Festival, Razorback Open, Mountain State
                      Head Referee: Western PA Championships

                      Comment


                      • #12
                        Originally posted by korey99 View Post
                        2. When launch a program, either from VScode through the connected interface, or from the file browser on the brick, it takes about 15 seconds to start the program. We could probably mitigate this risk by implementing a master program, but if we ever cancel out of the master program we're in big trouble as we wait for it to restart.
                        I know it is still early but I am starting to look around to see if I should let my kids study Python for next season. And I encountered the same issue when I tried ev3dev. python3 starts so slow on ev3dev image. But fortunately there is alternative in the same ev3dev image. You can use MicroPython instead of Python. It starts way faster, so far it seems usable to me. Right now it supports all sensors and motors using the same interface of ev3dev2, but not supporting Display/Buttons/Sound yet.

                        Comment


                        • #13
                          You asked at the right moment.
                          LEGO announcement today
                          https://education.lego.com/en-us/sup...python-for-ev3

                          Comment


                          • #14
                            I am reading the help file for the Python support and one thing I noticed is that there doesn't seem to be any easy way to replicate parallel rails. Sure, Python definitely supports threads, which could replicate parallel rails, but they may be pretty advanced for the average middle-school student. I was hoping for a simplistic ev3-centric implementation
                            Norfolk, Virginia, USA
                            FLL Coach and Regional Tournament Head judge since 2014

                            Comment


                            • #15
                              Originally posted by SkipMorrow View Post
                              I am reading the help file for the Python support and one thing I noticed is that there doesn't seem to be any easy way to replicate parallel rails. Sure, Python definitely supports threads, which could replicate parallel rails, but they may be pretty advanced for the average middle-school student. I was hoping for a simplistic ev3-centric implementation
                              I'm having a hard time thinking of a way to make Python threads simpler, at least the kind of threads you would use in FLL:

                              def thingsToDoInParallel()
                              # Place code you want to execute in parallel here


                              _thread.start_new_thread(thingsToDoInParallel, ())

                              Things get a bit more complicated if you need to wait for a thread to finish, but those occasions are fairly rare and not too difficult to overcome.

                              I think the hardest thing for teams used to graphical programming making a switch to Python is how immediate the EV3 programming is compared to any text based language. In EV3 you add one block and you have a program that does something. In Python you need to import a bunch of modules and then you can write your first instruction. To import the modules you need to know which modules you are going to use, which involves some research. Then you need to have knowledge about the programming language syntax. Python is far better than some other languages/environments where you might need a couple of files of boilerplate before doing anything interesting, but it is still a big change.

                              When you get to the point where you are writing a function (my block), including one more module and calling the function in a different way to make it run in parallel is a small step.
                              Last edited by Dean Hystad; 04-16-2019, 01:20 PM.

                              Comment

                              Working...
                              X