Software apps and online services
Opinion and Story
This is a short story about how MakeCode converted my views on Blocks as a useful programming tool.
Drag and Drop (Blocks) programming has always been a disinterest to me. Why would you want to waste time in a GUI when 'real programming' can get the job done just as fast in less mouse movements? I just never understood it.
The real reason, as I have discovered through using MakeCode, is I had just never tried it.
Over the past year now, I have been working with the Robotics Masters team on adding functionality to our custom Raspberry Pi HAT - the Robo HAT MM1. Throughout this time, I have discovered and been enlightened on many things. CircuitPython being one of them, along with understanding how many popular programming IDEs (like Arduino) works behind the scenes. This has taken me places I never would have thought of. Recently, we started working on adding the Robo HAT MM1 to MakeCode - Microsoft's free, open source platform for creating engaging computer science learning experiences that support a progression path into real-world programming. An IDE that supports code blocks (like below) that hold the logic of code in a graphical block which can be dragged around the screen and connected with other blocks.
This is not a unique idea. There are other popular programs that that use this style of programming as well as a starting point for people to learn programming logic. Scratch,Grok Learning and Code Combat comes to mind. Two educational tools used as an introduction to programming for young students.
I personally have not taken a liking to either of these tools' drag and drop functionality. It was very frustrating and did not make sense to write logic in the block format for the problems they present. In some cases, it took much longer to solve a problem when using the blocks than writing the code by hand.
I have spent a lot of time writing hardware code in CircuitPython lately. It has all the benefits of being Python plus the addition of the hardware libraries to back it. Having a community that supports the documentation helps immensely as well.
One of the draw backs though, is that it can get very complicated when you start writing big programs or using functions that are not well implemented. As with any other programming language.
The Blocks focused design principles help to visualise the logic of the program. This is something typed code can sometimes be difficult to show.
Take this example of flashing an LED - a trivial task.
You can clearly see the logic of the program visually on the right side with the 'loop' over the whole program. You could make this even more 'complicated' by putting in a 'start up' block and set the LED to LOW before you run the loop.
The ability to visual code is great for everyone, particularly students who may find the typed code harder to understand at first. I know that education in particular is looking at MakeCode and MicroBits as core tools for teaching programming.Future Developments
I, personally, will be looking deeper into MakeCode now to see what it's full potential is. I am currently aware of some very strong USB support for making devices that interact with computers. There is a project that I want to work on around this and MakeCode.
Watch this space.