Introducing Smoulby, "Glittering Ruby Programming for Elementary School Students"

at first

Thank you very much for seeing it. My name is Atelier Miki and I am a programming instructor in Nagoya. I usually teach HTML/CSS, Ruby on Rails, and C language (Arduino) for beginners (elementary and junior high school students to adults) who want to learn programming. Today is the release of Ruby 3.0, so I wanted to write something related to it, but since the technical explanations are written by my predecessors, I will change the point a little here and for children This is an introduction to programming.

Glittering Ruby Programming (Amazon) for Elementary School Students

Text programming and visual programming languages

The elements that make up programming are sequential, iterative, and conditional. For example, the following code.

puts "Hello World!"

3.times do
  puts "Congratulations! Ruby 3.0!"
end

n = gets.to_i
if n.even?
  puts "Is an even number"
else
  puts "Is odd"
end

Thanks to Ruby, which can be written easily without "magic" If you can read English even if you don't understand programming, it's almost self-evident.

However, when I become an elementary school student, I cannot read English. Also, keyboard input is difficult. I teach C language (Arduino) for children, but most of them can't type and what about copying? It starts with teaching you how to use the basic keyboard for coding.

That's where the GUI-based programming language, called the visual programming language, came into play. By assembling blocks, it is possible to code three things: sequential, iteration, and condition. The famous place is Scratch.

1280px-Scratch_screenshoot_ja.jpg (Image quoted from Wikipedia)

Programming education in elementary school

It seems that the purpose is to cultivate programming thinking and learn that information technology is active in society. Programming thinking seems to be "the ability to arrange blocks appropriately to satisfy the intention", The point is that you should understand the algorithm and be able to construct code that consists of sequential, iterative, and conditional. And since computers are used in various fields around us, such as home appliances and cars, it seems that we should be able to write programs (= instructions to computers) that run them.

(Ministry of Education, Culture, Sports, Science and Technology: Guide for Elementary School Programming Education (3rd Edition)

What is SmalRuby Smoulby?

This is a programming language developed by Mr. Koji Takao, who lives in Shimane Prefecture (Chairman of NPO Ruby Programming Boy Scouts).

Visual programming with blocks and The feature is that you can do both Ruby coding by text.

https://smalruby.jp/smalruby3-gui/ You can experience it by opening it in your browser.

スクリーンショット 0002-12-24 23.36.48.jpg

Since it is browser-based, it can be used on iPad as well as Mac, When coding text-based, it's nice to have a wireless keyboard. (The screen of the iPhone was really small and difficult)

From today you are a programmer! Programming experience

Make a game where a cat chases a mouse. Assemble the blocks by dragging and dropping. When you press the green flag, the cat moves towards the mouse and says "caught".

スクリーンショット 0002-12-24 22.29.14.jpg

You can write the same program text-based.

スクリーンショット 0002-12-24 22.30.35.jpg

When coding the same program Visual programming for the first time As learning progresses, more serious text-based Ruby programming I think it's really wonderful that it is designed so that it can be connected.

By the way, both are linked, so I found it very difficult to operate the blocks, I typed text-based from the keyboard.

You can also upload and download the code, so It is easy to distribute as a teaching material, and I think it is very good.

Draw a regular polygon

The sum of the angles of a triangle is 180 degrees.

A quadrangle can be divided into two triangles, The sum of the internal angles of the quadrangle is 180 x 2 = 360 degrees. Therefore, the size of one corner of a right angle (= square) is 360 ÷ 4 = 90 degrees.

Generally, an N-sided polygon can be divided into triangles (N-2). The sum of the internal angles of an N-sided polygon is 180 x (N-2) degrees. Therefore, the size of one corner of a regular N-sided polygon is 180 x (N-2) ÷ N degrees.

Based on this, the code to draw a regular N-sided polygon is as follows. (Here, a regular pentagon is drawn with N = 5)

スクリーンショット 0002-12-24 22.49.31.jpg スクリーンショット 0002-12-24 22.49.45.jpg

You can also draw the following beautiful geometric patterns by rotating a regular octagon by 45 degrees. スクリーンショット 0002-12-24 23.03.26.jpg

スクリーンショット 0002-12-24 23.03.53.jpg

At the end

It was a brief introduction, but I think it is the best text for your child's introduction to programming. (Notes on teaching are also introduced at the end of the book as an appendix for teachers)

In the text, there are others Making music, riddle games, shooting games, Introducing simple electronic work using Micro Bit.

Why don't you enjoy programming with your children this winter vacation? I hope it helps you.

reference

Glittering Ruby Programming (Amazon) for Elementary School Students NPO Ruby Programming Boy Scouts

Recommended Posts

Introducing Smoulby, "Glittering Ruby Programming for Elementary School Students"
VS Code plugin recommended for programming school students
Introduction to Programming for College Students: Introduction
Introduction to Programming for College Students: Variables
[Out of 100 points] I thought about a coding test for programming school graduates [Ruby]