💾 Archived View for freeshell.de › gemlog › 2021-12-28.gmi captured on 2024-08-31 at 11:50:59. Gemini links have been rewritten to link to archived content
View Raw
More Information
⬅️ Previous capture (2022-03-01)
-=-=-=-=-=-=-
Block languages 🤖
I like playing with visual block languages. Instead of typing code, you snap together coloured blocks. They are aimed at children as an introduction to programming, but adults can play too.
Wikipedia has these as a subset of visual programming languages
I first tried Scratch, but I stopped when it became web-only. I'm currently using Pocket Code on my phone.
Scratch
(Can't find a decent link for Pocket Code, so just look in your phone's app store)
Good bits
There are some great things about programming like this.
- You have to do much less learning because all the language elements are visible.
- You can't write something syntactically incorrect.
- You get very quick feedback - tweak the blocks and press play.
- There's built in support for sprites, which are provided or you cae draw them yourself.
- The ones I've tried have a very liberal attitude to reusing others' work - copyright not considered useful.
Bad bits
I've been making a game on my phone. It's a simple ball rolling, item collecting, obstacle avoiding thing. And I've done enough to bump up against the limitations of this programming style.
- There's no version control and only limited undo. So when you break something, you usually can't go back to the last working version. You just have to plough forwards.
- You can't write tests, or run in debug, or write to a log. So debugging is hard.
- You can't write write functions. There's no inheritance. So there's cases where you just have to duplicate code. For pseudo-functions, you can broadcast a message, then wait for the completion of a handler script that does whatever and writes to a global. Yuk.
- Code is attached to visible objects, so navigating between related bits of code is a pain. And you can't grep the code.
- The only release process is to publish on web site where it may be lost among thousands of others, or it may be quickly joined by endless clones of variable quality.
Positive conclusion
On the whole, the good stuff outweighs the bad, at least for toy fun projects. I recommend giving it a go. And I haven't tried Snap! and Blockly. Maybe those are wonderful?!
Snap!
Blockly
back to gemlog