KaiserScience

Home » Coding » Blockly

Blockly

Blockly is a client-side JavaScript library for creating visual block programming editors. It is a project of Google and is open-source under the Apache 2.0 License.

It runs in a web browser, and resembles Scratch.

Blockly uses blocks that link together to make writing code easier, and can generate JavaScript, Python, PHP or Dart code. It can also be customised to generate code in any computer language.

https://en.wikipedia.org/wiki/Blockly

blockly-coding

Why does Code.org use Blockly?

Katie Apone writes:

There are 2 primary categories of programming languages: text-based programming languages and visual programming languages. Languages like Javascript or Python are text-based but Code.org’s Intro course uses Blockly, which uses visual blocks that you drag and drop to write programs. It’s easier to learn programming using a visual language versus a text-based language because when you’re learning to program, you’re up against 2 things: learning the logic of how to write programs and also the syntax of writing programs.

In both visual and text-based programming, you’re learning the logic of writing programs like how to repeat instructions or how to make the computer decide between 2 instructions. Syntax is the set of rules of how to combine instructions so the computer can understand them. In visual programming languages, you have a menu of available instructions, which you can drag around and place next to other instructions and then you’re good to go. In text-based programming languages, you have to remember what the instructions are called, and be very precise in what you type like where to put a semi-colon or remembering to include an exclamation point.

By starting to learn with a visual programming language, you can focus on the logic without worrying about if you remembered to put a closed parenthesis or not. Then, once you’ve got the logic of programming down, you can choose to move on to a text-based programming language, which can be more powerful and efficient than visual languages if you’re experienced with text-based programming.

This learning progression is kind of like learning to crawl and getting good at that before you learn to walk. But by no means is learning to program with a visual language a cop out, it’s even how many major universities, like Harvard and Berkeley, teach coding in their Intro to Computer Science classes.

Why does Code.org use Blockly?

 

 

%d bloggers like this: