Tuesday, October 30, 2018

Scratch for engineers

I am often spending time at home playing in Scratch with my daughter. We can do so many wonderful things there. One of our favourites is to create a fairytale. We take princes, princesses, dragons and unicorns and make them interact. It is very nice to see dialogues, spells and fights based on the little visual language. It's truly addictive.

But what are in fact doing is programming an actor system. Actually Scratch is a very crude but effective actor system. It is not meant for doing production stuff as Akka but it can be used for showcasing some concepts and do quick, dirty and funny prototypes.

So instead of resorting to some heavy frameworks and dry prototypes why not make a funny prototype in Scratch? A scenario turned into in a fairytale? We could model some of the services as knights, some of the threats as dragons. Wouldn't it be funny to have a database princess? Or a unicorn dispatch service? 

The mental image of a fairytale might be more evocative on the long term and give some human touch to some abstract concepts. The prototypes get some story, they are no longer abstract proofs that a solution exists somewhere in the vast solution space.



Given that I am a dragon. When I receive "attack_dragon": Then I think "hmmm..." for 2 seconds. And I loose one head

One can read the above script in Gerkin terms.Does it make sense? Which one is more acceptable? Which one is easier to remember?

I am really thinking that Scratch can help learning in a funny way about actors, messages and programming.
And yeah, do some impressive presentations. Computer Science is full of these analogies, think about the "Dragon Book" or Valgrind. So, yes, I do not think that I am out of the line.