見出し画像

Minecraft: Education Editionでのプログラミングを大人の人に興味を持ってもらう#4(New Professional Development pathway to engage Adult Learners for "Minecraft Education Edition MakeCode Programming" #4)

注意点

※2022/10/26にv1.18.42がリリースされたが、残念ながら以下で指摘しているフィードバックは反映されておらず、再度フィードバックを行った。次のバグフィックスリリースまではPDFで公開している資料に記載した回避方法を利用するしか無さそうだ。

2022/10/24時点で、本記事で取り上げている機能は最新版の教育版マインクラフトv1.18.32へのバージョンアップ時に発生したバグのために試すことができないことに注意が必要だ。このバグについてはフィードバック済みで次のリリースで修正される見込みだ。

なお、現在解説中の内容をまとめた資料が『教育版マインクラフトでオリジナル MakeCode ブロックをつくろう – 授業・校務活用素材ポータル』で入手可能となっているのでアクセスしてみて欲しい。多少手間はかかるものの、現時点でのバグの回避方法にも言及している。

JavaScriptコードを直接書かせない理由

Why we don't let you write JavaScript code directly?

プログラミング未経験者にとっていきなり英語の(プログラミング言語の予約語などの)コードを打つことはスペルミスによる文法エラーなどの修正を行うことがとても多くなることが予想される(慣れていないのだから当然である)。
For inexperienced programmers, suddenly typing code in English (e.g., reserved words in programming languages) is expected to result in a very large number of grammatical errors due to misspellings and other corrections (which is natural since they are not used to it).

確かにプログラミングをする上ではそのようなデバッグ経験を積み上げることも必要であるが、それよりもまずはプログラミングを通じてどんなことが実現可能であるのかについてイメージを持って欲しいのである。
While it is certainly necessary to accumulate such debugging experience in programming, we would rather that people have an idea of what is feasible through programming.

特に大人の場合はある程度先の見通しを立てることが経験上可能であるため、細かい部分にエネルギーを割くのではなく、最小限度の労力で全体を見渡す経験をすることが次のステップに進むためのベースになると考えられる。
Especially for adults, it is possible to foresee the future to some extent from experience, so rather than devoting energy to the details, experience to see the whole picture with a minimum of effort is considered to be the base for moving on to the next step.

この記事を通じて解説している内容は自分だけのオリジナルブロックを作るという目的を実現するために、その対象となる動作の内容さえもブロックプログラミングで行ってからJavaScriptコードへの自動変換というプロセスを経ている。
In order to realize the goal of creating one's own original block, even the content of the target behavior is done in block programming and then automatically converted to JavaScript code, a process that is explained throughout this article.

これは、見慣れていないためにミスを誘発する可能性の高いテキストベースのJavaScriptコードを手打ちする労力の削減とMakeCodeブロックの裏側のJavaScriptコードを対比させる機会を作り、裏側のしくみを「見る」「慣れる」ことに焦点を絞っている。
This focuses on "seeing" and "getting used to" the mechanism behind the blocks by reducing the effort of manually typing text-based JavaScript code, which is likely to induce mistakes due to unfamiliarity, and by creating an opportunity to contrast the JavaScript code behind the MakeCode blocks.

これにより、指導者となる大人がプログラミングを本格的に学ぶ前の障壁を低くすることが可能になるのではないかと考えている。

We believe that this will enable adults who are instructors to lower the barrier before learning programming in earnest.


さて、今回はカスタムブロックの名前を変えてみよう。
Now, let's rename the custom block.

命令ブロックの名前を変更する

Rename the instruction block

カスタムブロックをここまで作ってきて皆さんが薄々感じているのは、ロケット花火連射を実現する命令ブロックの名前が「foo」とはこれいかに、である。
After making the custom block so far, you are all feeling thinly that the name of the instruction block that realizes continuous rocket fire is "foo".

謎の命令ブロックfoo

早速、この名前を変更する方法を確認してみよう。
Let's check out how to change this name as soon as possible.

なお、今回はブロックの言語変更を前提とした国際化対応は考えないで日本語ベタ打ちとする。
In this case, we will not consider internationalization support based on the assumption that the language of the block will be changed, but will use solid Japanese.

ぶっちゃけた話、ブロック名の変更は以下の図の部分に必要な記述を書き加えるだけで実現できる。
To put it bluntly, changing the block name can be accomplished simply by adding the necessary description to the part shown in the figure below.

ブロック名の変更箇所

具体的な記載方法は以下の通りである。
The specific description is as follows

具体的なブロック名の記載方法

ん?でも待て。%n %s %eってのが付いてるぞ。何だこれは?って話になると思う。
Hmm? But wait. It's got %n %s %e. What is this? I think you will say, "What is this?

察しの良い方はこれらが関数に渡される引数部分と対応していることに気付くだろう。すると、今回渡したい引数は数値だけなんだけど・・・と思うのは自然な流れだろう。
The astute reader will notice that these correspond to the argument parts that are passed to the function. Then it is natural to think, "The only argument I want to pass this time is a number...".

//% block="ロケット花火連射 %n"

でいいやってなるはずだが、これだけだと実はエラーになってしまうのだ。
This should be good enough, but this alone is actually an error.

実はここの記述はfoo関数の引数の数と密接に関係しているためだ。最終的には以下のようにすることでエラーが出ることなくブロックをシンプルにすることができる。
In fact, the reason is that the description here is closely related to the number of arguments of the foo function. In the end, the block can be simplified without any errors by doing the following.

引数の数を減らして数値型のみに

これで目的とするロケット花火連射命令ブロックが完成する。
This completes the desired rocket fireworks sequential firing instruction block.

大人向け研修会での知見について

Findings from the workshop for adults

前回に引き続き、アンケート結果の他の質問項目についても紹介しておこう。
Continuing from the previous issue, let us introduce some of the other questions in the survey results.

質問項目:やってみて感じたこと

MakeCodeのJavaScriptやPythonモードの経験についてだが、こちらも質問1と同様の結果となった。
Regarding the experience with MakeCode's JavaScript and Python modes, the results here were similar to question 1.

そして、質問3では今回のMakeCodeオリジナルブロックをつくる方法を体験してみてどう感じたかを回答してもらった。
もう少し学習が必要という回答が2件あるものの「難しかった」という回答は無かった。推測ではあるが、コードを直接書く方法で実施していたならこの結果が変化する可能性は十分に考えられる。
In question 3, we asked the respondents how they felt after experiencing this method of creating MakeCode original blocks.
Although there were two responses indicating that a little more learning was needed, there were no responses indicating that it was difficult.
Although this is speculation, it is quite possible that the results would have been different if the method had been implemented by writing the code directly.

ほとんどのケースではコードをいきなり打ち込むことでその修正にエネルギーを注ぐことになり、それが難しいと感じさせる要因になると考えられるからだ(大人の場合)。
In most cases, the reason is that by striking the code out of the blue, you have to put energy into correcting it, and that is what makes it seem difficult (in the case of adults).
実際にはもっと深掘りした調査が必要にはなるが、オリジナルブロックをつくることへの抵抗感は以下の結果を見る限りは最小限に抑制することができたのではないかと考えている。
Although a more in-depth survey would actually be necessary, we believe that the resistance to creating original blocks has been minimally suppressed as shown in the following results.

質問項目:もっと詳しくやってみたいか

自由記述の感想については
For free-text feedback, please see the

質問項目:感想

このような感想が書かれていたことで、負荷の少なめな試行錯誤を乗り越えて結果を得られたことが達成感につながっているのではないかと考えている。
We believe that these written impressions may have contributed to a sense of accomplishment in overcoming the less burdensome trial-and-error process to obtain the results.

あまり簡単すぎると達成感は得られないが、難しすぎると次のステップに進みづらくなる。このあたりの難易度設定が大人対象でも子どもたち対象であっても大切なポイントになるだろう。
If it is too easy, it will not give a sense of accomplishment, but if it is too difficult, it will be difficult to move on to the next step. Setting the level of difficulty is an important point for both adults and children.

なお、本研修会はTeams上で実施したものである。
Note that this training session was conducted on Teams.

オンライン研修中の様子

授業・校務活用素材ポータルで資料配布中

教育版マインクラフトでオリジナル MakeCode ブロックをつくろう – 授業・校務活用素材ポータル』で入手可能となっているのでアクセスしてみて欲しい。現時点でのバグの回避方法にも言及している。


この記事が気に入ったらサポートをしてみませんか?