Misconceptions about Scratch and other Block-based Languages (Part 2)

 
2019-03-17 14.44.28.jpg
 

Welcome back! In the previous instalment of this series, we addressed the differences between graphical programming languages like Scratch and text-based languages like Python. Click here to visit that article.

This time, we’re going to take a look at another common misconception about Scratch in particular, and block-based coding in general.

“Scratch is too easy, it’s meant for kids.”

Short Answer :

If arduous code = good code, professional coders would all be coding in machine code.

01101101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01100011 01101111 01100100

 
meme.jpg
 

Long (and more serious) answer:


Scratch (and most block-based languages) makes coding and learning coding a lot easier. They are designed to be accessible. 

Yes, Scratch is easy and it’s great for learning


In text-based coding, if you put a “;” in place of a “:”, your program will not even run.


In Python, many novices make the mistake of using spaces in some parts of their code and tabs in others. The code looks exactly identical - but it will not work.

Scratch won’t even let you make those mistakes. Block-based programming enables beginner programmers to focus their mental energy on the design and logic of their programs, not the semantics.

 
sort.png
 

Example of Sorting Algorithm in Scratch

Sometimes when a young student thinks that they are “bad at coding”, they are actually just “bad at typing” - and Scratch is meant to spare them those frustrations.

No, Scratch is not too easy. We can do amazing things with it 

Scratch is not necessarily easy. If you do easy things with it, it is. If you do difficult things with it, it’s not. 

It can do a lot more than it first appears. I think it is easiest to show you some examples of what you can do with Scratch.

Example 1 : Creating 3D terrain using a recursive fractal process.

unnamed+%281%29.jpg

Example 2: Constructs an algorithm that generates Prime numbers. 

The easiest way to calculate prime numbers will be to divide the number you are testing, by each number between 2 and itself. 

This takes a lot of operations and is understandably quite slow. At Code Ninja, we challenge advanced students to explore various ways to refine the algorithm. 

  • How can we speed it up? 

  • Can we divide the numbers by previous primes? 

  • Or is it faster to find the square root of the number first? 

  • Can we tackle the task in a new way by identifying the multiples of Primes we have already identified?

Sieve_of_Eratosthenes_animation.gif

Example 3: Design computer simulation that simulates an abstract model of a particular system. 

In this example, students at Code Ninja attempt to understand how social distancing and quarantine affects the spread of COVID-19, by simulating the spread of a fake disease through a population.

Example 4 : Explore 3D techniques like raycasting

Raycasting is a rendering technique to create a 3D perspective in a 2D Sprite. This technique was used back in the days when computers were slower and couldn’t handle real 3D. Some of the well-known games that use raycasting are Wolfenstein 3D and Doom.

3d gif.gif

Here is a similar 3D walkway created by our students using Scratch.

So yes, Scratch is great for beginners - but intermediate and advanced learners can benefit and explore a lot by using it too. 

Scratch is a great way to break down problems into smaller pieces and experimenting with different algorithms or methods to solve different problems.

Even if you write code for a living, it’s worth taking a look at it - you might find it surprisingly interesting.

But can the skills you learn in Scratch be applied to other languages too? In the next instalment of this series, we’ll examine this question in more detail.

Subscript to our Facebook and email list for regular updates on our articles, free projects and holiday classes!

 
Ming De

Ming De

Nathanael

Nathanael

 

This article is written by our instructors - Ming De and Nathanael.
Contact us at instructor@codeninja.sg or at +65 6401 7171 to find out more about Code Ninja’s classes and curriculum