Both Tableau and Alteryx provide a great visual user interface and provide complex outcomes with simple drag and drop actions, meaning that people from all backgrounds can try their skills at Data Analysis. However, they still occasionally require typed commands. This may be a simple filter, string manipulations or wrestling with badly formatted date fields. I believe it is very helpful to have some understanding of coding, as it teaches us to think how a computer thinks.
I’d like to think there is two main challenges with learning to code;
The first (Syntax) being a set of rules that govern a language, in coding syntax governs how we write code, what words and characters we need, what arguments are required (and so on). There is syntax associated with every language, for example, the English language has a very complex syntax.
“The dog chased the cat” and “Cat chased dog the the” are two phrases with the same set of words. One does not make sense as it does not satisfy the syntax of the English language.
The second challenge (Logic) is not specific to a coding language, but it is very important. Logic is all about how we break processes into it’s ‘building blocks’. Knowing a complex algorithm’s basic components helps the computer take the right action, based on the right observation.
I believe that understanding how a computer thinks and responds is a skill that takes time and practice to develop. Initially building on this skill is quite difficult when the language you are writing in is so wrapped up in a complicated set of syntax.
Throughout Uni, I ran after school and holiday workshops teaching kids how to create basic computer games and animations using a program called Scratch. I actually found the more I taught these classes, the better I was understanding the computer work I was doing in University.
Scratch is a free online coding platform that has been designed in a way that allows beginners visually build code out of combinations of blocks. Here are some examples of blocks in Scratch;
Here you can see the dark blue blocks control motion by changing an objects’ x and y coordinates, the light blue blocks act as ‘sensors’ that detect a key on the keyboard being pressed. The if statements come in the form of a ‘C’ shape, it has a diamond shaped gap on the top side, and a little indent on its inner roof. These features of the ‘if statement’ control how other blocks fit into the if statement. Here is a code I made out of these blocks that control a characters’ motion with the Up, Down, Left and Right keys.
And here’s what it does;
The shapes of each block govern how it can be used relative to other blocks, making it very easy to understand any syntax related limitations. This frees you up to experiment and try different combinations on commands to see what works and what doesn’t. You can see that it reads a little bit better than something like this;
if ‘Up Arrow’ then [y position] + 10
elseif ‘Down Arrow’ then [y position] – 10
elseif ‘Left Arrow’ then [x position] – 10
elseif ‘Right Arrow’ then [x position] + 10
I believe Scratch is a perfect place to start learning how to communicate to computers, or a place to revisit to test out complicated logical statements.
I have also built a few more demonstration projects in Scratch you can visit;
Click here to see how I program a character to be blocked by walls.
Or here to see a script that introduces the concept of gravity into a game.