Monday, August 08, 2011In preparation for our 2 million project mark celebration and as part of my research on remixing, I have been analyzing the use and reuse of components in the Scratch Online Community. For example, I have looked into which images and programming blocks are more commonly used. Now I wanted to go one step further. I wanted to know what are the most common programming constructs or scripts created by the young Scratch programmers. So here it is, a word cloud-like representation of the 100 most common scripts.
|Click for larger version|
By far, the most common scripts involve some kind of looks manipulation such as hiding/showing a sprite and switching its costumes. This is probably because controlling what is displayed on the screen is useful and necessary for most types of projects, from games to animations. Also, these scripts often come in pairs: for every "hide" I would expect a "show".
|1st place, 9.16%|
Below you will see a list of the most common scripts that have something to do with looks, as well as their position in the ranking and percentage of the total, both based on their frequency.
|2nd place, 4.84%|
|4th place, 3.28%|
|6th place, 1.36%|
|8th place, 0.95%|
|9th place, 0.73%|
|11th place, 0.63%|
|14th place, 0.53%|
|15th place, 0.47%|
|17th place, 0.42%|
|18th place, 0.40%|
As you can see from the small percentages, the frequency distribution of scripts appears to be a long tail distribution. This is to be expected given the large number of combinations that are possible. One might expect a similar distribution if we were to look for the most popular phrases in the English language (probably an even longer and flatter tail).
Interacting via the Keyboard
|16th place, 0.46%|
While slideshows are interactive, we can see even more complex interactivity in the 16th most popular script. This script is often used in games to let a player control a character using the keyboard. The most common arguments used are "right arrow ➡, direction 90° and a move 10 steps" (16.21%) followed by the equivalent "left arrow ⬅ and direction -90°" (16.81%).
asked about script #27. Here is what I found.
Despite not being obviously interactive, the 27th most common script represents a form of interactivity because one of its arguments is a variable changed by pressing the arrow keys. As we can see in this this project (the very first one to use this script), these blocks are typically used to control the horizontal position of background elements on on a scrolling background game.
Signs of Experimentation
You will notice that some of the scripts in the script cloud are single hat blocks. I was debating whether to include them or not. Technically, I considered them to be scripts even if they don't have any other blocks underneath. I decided to include them because it is quite telling how often people drag a hat block and leave it unused. Compared to other languages, Scratch is quite forgiving and lets people do this without any big repercussions. I would like to think these unused hat blocks represent moments of tinkering and experimentation, something that we value a lot in Scratch.
|10th place, 0.68%|
|Equivalent scripts. |
Arguments are ignored
This analysis was possible thanks to the work of former MIT student Rita Chen and members of the Scratch community including MyRedNeptune and the active Scratch Wiki editors Jonathanpb, Scimonster and BWOG. Thanks gals and guys!