The BBC Micro:bit Which Language? |
Written by Sue Gee & Mike James | ||||
Monday, 16 May 2016 | ||||
Page 3 of 3
Repeating the Mistakes of HistoryWhen we look back on the golden days of the BBC Micro we tend to forget that the software that we had to work with was generally terrible. We were only a few steps away from Basic at the level of GoSub 1000 or whatever. BBC Basic was a step in the right direction, but it was far from suitable for what we had to learn. The beginning programmers of the 80s learned programming using languages that lacked functions or subroutines, often lacked local variables and certainly showed no signs of object oriented programming. Slowly but surely hardware has improved amazingly. The micro:bit is more powerful than the BBC Micro but its software - not so much.
You might have thought that for a project that would like to style itself "BBC Micro 2", the software would have been a top priority. However, it seems that we have the same set of problems in that the languages that are available just aren't up to the job of teaching. Yes you can use any one of them but only if you are prepared to put up with a degree of friction that is just unnecessary. The lack of debugging and demonstration facilities is inexplicable. Given that they all have simulators of one kind or another, why is there no online debugger? A single-step feature should be easy to implement. Of the languages themselves the only two that qualify as having at least some of the facilities that you need to progress beyond "hello world" are Touch Develop and MicroPython. These two have the fundamental facilities needed, but they are not developed to the point where an innocent beginner isn't going to fall over and not know what to do next. Getting AmbitiousAs C/C++ is the language underlying each of the four languages we have discussed, one solution to overcoming the limitations discussed here is to move to C/C++ - something that is possible as the micro:bit is an Mbed device. There is an online compiler that works in much the same way as the other language environments. You type in your code, compile, download the result and copy it to the micro:bit. If you restrict your attention to C and not full C++ then the language is simple enough for beginners and they can grow up with it as they learn about bit manipulation, the full C for loop and so on. This is also a complete programming system in the sense that if you can't do it in C you probably can't do it. The big problem is that at the moment the Mbed web site targets IoT developers and the environment isn't particularly friendly. Add to this the fact that the micro:bit is supported in a very scrappy sort of way - try starting a project for example, it takes time to find out how to. While C does seem like a possible teaching language for the micro:bit it doesn't seem sensible in the classroom environment - remember that in the first instance the micro:bit is being handed out to 11-12 year olds with the idea of giving them a device that they can make do some simple things such as name badges - but once it is made commercially available C would seem the ideal language for it. Given its size and capabilities the micro:bit is a handy IoT device and in this role C is a more practical language to use as it keeps you close to the logic you are implementing in code. Look out for further articles on using sensors with the micro:bit in C. Related ArticlesCommando Jump Game For The Micro:bit In Python Commando Jump Game For The Micro:bit In JavaScript Micro:bit Commando Jump In The Microsoft Block Editor Commando Jump Game For The Micro:bit In Touch Develop The BBC Micro:bit Is An Mbed Device In C/C++ Getting Started With C/C++ On The Micro:bit Offline C/C++ Development With The Micro:bit BBC Micro:Bit Finally Ships to 1 Million For Free BBC micro:bit Your Next Computer? BBC Giving Away 1 Million Microcomputers Microsoft Open Sources TouchDevelop
Comments
or email your comment to: comments@i-programmer.info
|
||||
Last Updated ( Monday, 16 May 2016 ) |