ITBO-Programming-part-1: Unterschied zwischen den Versionen

Aus ZUM-Unterrichten
KKeine Bearbeitungszusammenfassung
Markierung: 2017-Quelltext-Bearbeitung
Keine Bearbeitungszusammenfassung
Markierung: 2017-Quelltext-Bearbeitung
 
(34 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 5: Zeile 5:
   
   


=='''Guidance for students (Open Document Format ODF)'''== {{Box|Download|[[Datei:ProgrammierenTeil1StudentEditionV4.odt|mini]]|Download }}
=='''Guidance for students'''== {{Box|Download|[[Datei:ProgrammingPart1StudentEditionV5.odt|mini]]|Download }}
 
 
=='''Handout for teachers'''== {{Box|Download|[[Datei:ProgrammingPart1TeacherEditionV1.odt|mini]]|Download }}


=='''Handout for teachers'''== {{Box|Download|[[Datei:ProgrammierenTeil1TeacherEditionV4.odt|mini]]|Download }}


{{Box|Objectives|* The students will get to know the Scratch programming environment and how to use it in order to create and manage their own programming projects.
{{Box|Objectives|* The students will get to know the Scratch programming environment and how to use it in order to create and manage their own programming projects.


They will learn the basic elements of the Scratch programming language and use them to "write" their first simple programs.
* They will learn the basic elements of the Scratch programming language and use them to "write" their first simple programs.


The students will reflect on their experiences with programming.
* The students will reflect on their experiences with programming.
 
They will also learn (without too many theoretical considerations) basic concepts of "professional" programming (object and event orientation, process communication).|Kurzinfo }}


* They will also learn (without too many theoretical considerations) basic concepts of "professional" programming (object and event orientation, process communication).|Kurzinfo }}<br />
==='''Introduction'''===
==='''Introduction'''===


:The previous knowledge of the students at a ‹Specialised Upper Secondary School› regarding the programming course will be very different and will continue to change in the course of the coming years. Depending on the situation in the class, the teacher has to either guide or accompany more.
:The prior knowledge of the students at a ‹Specialised Upper Secondary School› regarding the programming course will be very different and will continue to change in the course of the coming years. Depending on the situation in the class, the teacher has to either guide or accompany more.


:In any case, it is good to form teams of two in order to promote discussion and reflection. If the heterogeneity in a class is very high, perhaps the students with experience in programming can take over the guidance of teams; perhaps the tasks of unit 1 can be formulated more openly for the students with corresponding previous knowledge (e.g. instead of the given match puzzle, a self-designed memory or puzzle).
:In any case, it is recommended to form teams of two in order to promote discussion and reflection. If the heterogeneity in a class is very high, perhaps the students with experience in programming can take over the guidance of teams; perhaps the tasks of unit 1 can be formulated more openly for the students with corresponding previous knowledge (e.g. instead of the given match puzzle, a self-designed memory or puzzle).
   
   


Zeile 33: Zeile 34:
   
   


==='''Scratch kennenlernen und ein erstes Programm selber machen'''===  
==='''Getting to know Scratch and creating a first program yourself'''===


===='''Das Beispielprogramm: ein Zündholzrätsel'''====  
===='''The sample program:  a matchstick puzzle'''====  


[[Datei:Zündholzrätsel (Bildschirmaufnahme).png|zentriert|mini|600x600px]]
<br />
[[Datei:MatchStickPuzzle.png|mini|center]]
 
:The first program is based on the idea that a certain problem can be solved by using a program on the computer to represent a selected part of reality (forming a model). In the case of our first program, these are matches that can be laid out on a surface, moved and rotated.
 
:The explanations in the instructions for part 1 of the "programming" course should help the students to make such a program with Scratch themselves, step by step. The teacher observes and helps if necessary.
 
===='''The components of the Scratch programming environment'''====


:Dem ersten Programm liegt die Idee zu Grunde, dass ein bestimmtes Problem gelöst werden kann, indem mit einem Programm auf dem Computer ein ausgewählter Teil der Wirklichkeit abgebildet wird (ein Modell gebildet wird). Im Fall unseres ersten Programms sind das Zündhölzer, die auf einer Fläche ausgelegt, verschoben und gedreht werden können.
:'''Stage''': The students should first get to know the stage and its design possibilities.


:Die Erläuterungen in der Anleitung zum Teil 1 des Moduls «Programmieren» sollen den SuS helfen, ein solches Programm mit Scratch Schritt für Schritt selber zu machen. Die Lehrperson beobachtet und hilft wenn nötig.
:'''Objects (characters)''': In Scratch, the characters (sprites) play roles on the stage. The characters have properties (e.g. size, position) and scripts describe their (re)actions on events such as clicking the start flag.


===='''Die Komponenten der Programmierumgebung Scratch'''====
:From a theoretical point of view, this concept corresponds to object- and event-oriented programming. The characters are the objects; the objects are described by their properties (constants, variables) and (re)actions (methods). However, the students should get to know the characters as objects without too many theoretical considerations.


:Bühne: Die Sus sollen zunächst die Bühne und deren Gestaltungsmöglichkeiten kennenlernen.
:Objects can be duplicated in the programming environment, this simplifies the creation of multiple similar objects.


:Objekte (Figuren): In Scratch spielen die Figuren (Sprites) auf der Bühne Rollen. Die Figuren haben Eigenschaften (z.B. Grösse, Position), und Skripts beschreiben ihre (Re-) Aktionen (auf Ereignisse wie z.B. das Anklicken der Startflagge).
:Objects can also be created dynamically while the program is running. The command in question is called "Create Clone of ...". However, we do not use the dynamic creation (cloning) of objects in the programming course.


:Aus theoretischer Sicht entspricht dieses Konzept der objekt- und ereignisorientierten Programmierung. Die Figuren sind die Objekte; die Objekte werden durch ihre Eigenschaften (Konstanten, Variablen) und (Re-) Aktionen (Methoden) charakterisiert. Die SuS sollen die Figuren aber ohne theoretischen Ballast als Objekte kennen lernen.
:→ The students must be provided with the image file [https://openclipart.org/detail/314823/match-kibrit match kibrit.svg] as a "costume" for the objects of the matchstick puzzle (e.g. on a common storage for the whole course).


:Objekte können in der Programmierumgebung dupliziert werden, dies vereinfacht das Erzeugen von mehreren gleichartigen Objekten.
:'''Save, describe and publish the program''': Those students who created an account can save and edit their programs as projects. This includes a description of the program for users, which is especially necessary when the program is published.


:Objekte können auch während des Programmablaufs dynamisch erzeugt werden. Der betreffende Befehl heisst «erzeuge Klon von ...». Im Modul Programmieren verwenden wir das dynamische Erzeugen (Klonen) von Objekten aber nicht.
:The program description should also show that programming is not only communication with the computer, but also communication with people (who use or further develop the program).


:→ Den SuS muss die Bilddatei [https://openclipart.org/detail/314823/match-kibrit Zündholz.svg]  als «Kostüm» für die Objekte des Zündholzrätsels zur Verfügung gestellt werden (z.B. auf einer gemeinsamen Ablage für das gesamte Modul).
{{Box|Reflection|* The matchstick puzzle is now ready. You can share it with others or use it yourself to solve it.


:Das Programm speichern, beschreiben und veröffentlichen: Diejenigen SuS, die ein Konto angelegt haben, können ihre Programme als Projekte speichern und bearbeiten. Dazu gehört eine Beschreibung des Programms für Nutzer:innen, die vor allem nötig ist, wenn das Programm veröffentlicht wird.
* The focus is on the objects (in this case the matches) with their properties (appearance, size, position, location). This programming concept is called ''object orientation''. However, the objects do not (yet) act in our program.


:Die Programmbeschreibung soll auch aufzeigen, dass Programmieren nicht nur Kommunikation mit dem Computer, sondern auch Kommunikation mit Menschen (die das Programm nutzen oder weiterentwickeln) darstellt.
* In the editing mode ("See Inside"), however, you can move and rotate the objects on the stage. The necessary commands to the computer have been realised by the Scratch programmers.|Hervorhebung1 }}


{{Box|Reflexion|* Das Zündholzrätsel ist nun bereits fertig. Sie können es anderen Personen zugänglich machen oder selbst nutzen, um das Zündholzrätsel zu lösen.


Im Mittelpunkt stehen die Objekte (in diesem Fall die Zündhölzer) mit ihren Eigenschaften (Aussehen, Grösse, Position, Lage). Dieses Programmier-Konzept heisst Objektorientierung. Allerdings agieren die Objekte in unserem Programm (noch) nicht.
====='''Objects and actions'''=====


Im Bearbeitungsmodus («Schau hinein») können Sie die Objekte auf der Bühne aber verschieben und drehen. Die dazu nötigen Befehle an den Computer haben die Programmierer:innen von Scratch realisiert.|Hervorhebung1 }}
:Up to this point, the students have only assigned properties to the objects, but not yet scripts (actions).


====='''Objekte und Aktionen'''=====
:The formulation of scripts is introduced with the initialisation necessary for the set-up of the matchstick puzzle and a text output.


:Bis zu diesem Zeitpunkt haben die SuS den Objekten erst Eigenschaften zugewiesen, aber noch keine Skripte (Aktionen).
:The students now have to "write" their own scripts. This probably corresponds to what the students imagine by "programming". However, it is important that the students realise that the previous activities (creating objects, duplicating, positioning, etc.) and the considerations made about them are also part of programming!


:Die Formulierung von Skripten wird anhand der für die Startaufstellung des Zündholzrätsels nötigen Initialisierung und einer Textausgabe eingeführt.
:To position the matches correctly, the students need to know the coordinate system of the Scratch stage. Figure 11 in the instructions introduces this coordinate system.


:Die SuS müssen nun eigene Skripte «schreiben». Das entspricht wahrscheinlich dem, was sich die SuS unter «Programmieren» vorstellen. Es ist aber wichtig, dass sich die Schülerinnen und Schüler bewusst werden, dass auch die bisherigen Tätigkeiten (Objekte erzeugen, duplizieren, positionieren, usw.) und die dazu angestellten Überlegungen zum Programmieren gehören!
:The text output explaining the matchstick puzzle is used to introduce the concept of Scratch extension blocks. The students need the "Text to Speech" block.


:Um die Zündhölzer korrekt zu positionieren, müssen die SuS das Koordinatensystems der Bühne von Scratch kennen. Abbildung 11 in der Anleitung stellt dieses Koordinatensystem vor.
====='''Process communication'''=====


:Die Textausgabe zur Erläuterung des Zündholzrätsels dient dazu, das Konzept der Erweiterungsblöcke von Scratch einzuführen. Die SuS benötigen den Block «Text zu Sprache».
:With the next step, the students learn about the mechanism of message exchange between objects. Here, message exchange primarily allows the synchronisation of scripts (process communication).


====='''Prozesskommunikation'''=====
:This shows that objects in Scratch can comprise several scripts (→ object-oriented programming, several methods). As a rule, a script is only executed when a certain event occurs, here e.g. clicking on the start flag or an object or receiving a message (→ event-oriented programming). It is also evident that several scripts can be executed "simultaneously".


:Im nächsten Schritt lernen die SuS den Mechanismus des Nachrichtenaustauschs zwischen Objekten kennen. Der Nachrichtenaustausch ermöglicht hier vor allem die Synchronisation von Skripten (Prozesskommunikation).
{{Box|Reflection|* A program comprises objects (in the example program these are the matches and the character chosen for the text output).  


:Damit wird ersichtlich, dass Objekte in Scratch mehrere Skripte umfassen können (→ objektorientierte Programmierung, mehrere Methoden). Ein Skript wird in der Regel erst ausgeführt, wenn ein bestimmtes Ereignis eintritt, hier z.B. das Anklicken der Startflagge oder eines Objekts bzw. der Empfang einer Nachricht (→ ereignisorientierte Programmierung). Ausserdem wird ersichtlich, dass auch mehrere Skripte «gleichzeitig» ausgeführt werden können.
* The objects are characterised by their properties (e.g. appearance, size, position, location) and the actions (scripts) assigned to them. This programming concept is called object orientation.


{{Box|Reflexion|* Die Objekte sind durch ihre Eigenschaften (z.B. Aussehen, Grösse, Position, Lage) und die ihnen zugeordneten Aktionen (Skripte) charakterisiert . Dieses Programmier-Konzept heisst Objektorientierung.
* The initially independent objects can interact. The most common interaction is synchronisation (an object performs one of its actions when another object has completed a certain action). In Scratch, synchronisation takes place via exchanged messages (process communication).|Hervorhebung1 }}


Die zunächst unabhängigen Objekte können interagieren. Die häufigste Interaktion ist die Synchronisation (ein Objekt führt eine seiner Aktionen aus, wenn ein anderes Objekt eine bestimmte Aktion abgeschlossen hat). In Scratch erfolgt die Synchronisation über ausgetauschte Nachrichten (Prozesskommunikation).|Hervorhebung1 }}
<br />


====='''Remix'''=====
====='''Remix'''=====


:Für den Remix eines eigenen Programmes fehlt auf der betreffenden Projektseite die Schaltfläche «Remixen». Das Vorgehen ist deshalb etwas anders als beim Remix eines «fremden» Programms. Das Youtube-Video «Scratch Tutorial: How to Remix your OWN Projects» ( https://youtu.be/dLY_MnAMe6o ) zeigt, wie es geht.
:For the remix of one′s own program, the button "Remix" is missing on the respective project page. The procedure is therefore somewhat different from remixing a "foreign" program. The Youtube video «Scratch Tutorial: How to Remix your OWN Projects» (https://youtu.be/dLY_MnAMe6o) shows how to do it.
 
:It might be worth a try to let the students take over the program of another student (of another group).


:Es ist vielleicht einen Versuch wert, die SuS das Programm einer anderen Schülerin oder eines anderen Schülers (einer anderen Gruppe) übernehmen zu lassen.
<br />
====='''Editing and execution mode'''=====


====='''Bearbeitungs- und Ausführungsmodus'''=====
:The matchstick puzzles programmed by the students are only partially executable programs!


:Die von den SuS programmierten Zündholzrätsel sind nur teilweise ausführbare Programme!
:The students always programmed in edit mode. They could therefore move and rotate the matchsticks on the stage as they wished (because this is a function of the Scratch programming environment).


:Die SuS haben immer im ''Bearbeitungsmodus'' programmiert. Sie konnten deshalb die Zundhölzer auf der Bühne beliebig verschieben und drehen (weil das eine Funktion der Scratch-Programmierumgebung ist).
:If such a project is to be published and used by another person, the script that enables its moving with the mouse is missing for each match!


:Wenn ein solches Projekt veröffentlicht und von einer anderen Person genutzt werden soll, fehlt bei jedem Zündholz das Skript, das dessen Verschieben mit der Maus ermöglicht!
:In the context of the programming course this is not a disadvantage. But if the students want to publish their programs, they absolutely have to insert the missing scripts. The instructions describe this ″problem″ and its solution.


:Im Rahmen des Moduls Programmieren ist das kein Nachteil. Aber wenn die SuS ihre Programme veröffentlichen wollen, müssen sie die fehlenden Skripte unbedingt einfügen. In der Anleitung ist dieses ″Problem″ und dessen Lösung beschrieben.


{{Box|Reflexion|* Die starke und rasche Verbreitung von Computerprogrammen hängt auch damit zusammen, dass neue Programme auf bestehenden aufbauen können. Davon profitiert vor allem auch Open Source Software.
{{Box|Reflection|* The strong and rapid spread of computer programs is in part due to the fact that new programs can build on existing ones. Open source software, in particular, benefits from this.


Welche Vorteile hat Open Source Software aus Ihrer Sicht gegenüber nicht quelloffenen Programmen (z.B. LibreOffice gegenüber Microsoft Word)? Welche Nachteile sehen Sie?
* According to you, what are the advantages of open source software compared to non-open source programs (e.g. the text processing program ''LibreOffice Writer'' compared to ''Microsoft Office Word'')? What disadvantages do you see?


Könnten Sie sich vorstellen, an einem Open Source Projekt mitzuwirken (z.B. als Übersetzer/in, Programmierer/in)?|Hervorhebung1 }}
* Could you imagine participating in an open source project (e.g. as a translator or a programmer?)|Hervorhebung1}}


{{Box|Musterlösungen|* Zündholzrätsel Variante 1: https://scratch.mit.edu/projects/671648993  
{{Box|Musterlösungen|* Zündholzrätsel Variante 1: https://scratch.mit.edu/projects/671648993  
Zeile 120: Zeile 125:


Zündholzrätsel Variante 3: https://scratch.mit.edu/projects/671651532|Lösung }}
Zündholzrätsel Variante 3: https://scratch.mit.edu/projects/671651532|Lösung }}
----


Authors: Bruno Wenk, Dieter Burkhard
Authors: Bruno Wenk, Dieter Burkhard


Translations: Patricia Berchtel
Translation: Patricia Berchtel




=='''Discussion (on ZUMpad)'''== https://zumpad.zum.de/p/ITBOProgramming-unit1


 
__INDEXIEREN__
 
[[Kategorie:Informatik]]
INDEXIEREN
[[Kategorie:Programmieren]]
[[Kategorie:Informatik]]  
[[Kategorie:Scratch]]
[[Kategorie:Programmieren]]  
[[Kategorie:Remix]]
{{DEFAULTSORT:Programming for prospective educators (using Scratch)}}
{{DEFAULTSORT:Programming for prospective educators (using Scratch)}}
-->
[[Kategorie:Scratch]]
[[Kategorie:Objektorientierte Programmierung]]
[[Kategorie:Remix]]

Aktuelle Version vom 29. Januar 2024, 15:39 Uhr


| ⇠ back to main page | unit 1 | unit 2 → | unit 3 → | unit 4 → |


==Guidance for students==


==Handout for teachers==


Objectives
  • The students will get to know the Scratch programming environment and how to use it in order to create and manage their own programming projects.
  • They will learn the basic elements of the Scratch programming language and use them to "write" their first simple programs.
  • The students will reflect on their experiences with programming.
  • They will also learn (without too many theoretical considerations) basic concepts of "professional" programming (object and event orientation, process communication).


Introduction

The prior knowledge of the students at a ‹Specialised Upper Secondary School› regarding the programming course will be very different and will continue to change in the course of the coming years. Depending on the situation in the class, the teacher has to either guide or accompany more.
In any case, it is recommended to form teams of two in order to promote discussion and reflection. If the heterogeneity in a class is very high, perhaps the students with experience in programming can take over the guidance of teams; perhaps the tasks of unit 1 can be formulated more openly for the students with corresponding previous knowledge (e.g. instead of the given match puzzle, a self-designed memory or puzzle).


Setting up the personal programming environment

The students should create an account on scratch.mit.edu ("Join Scratch"). To confirm the creation of the account, they need a valid e-mail address. Students who are not yet of full age should ideally use an e-mail address without a real name or other information that could be used to identify them. Students who have reached the age of majority and especially prospective teachers are freer to choose their e-mail address. In any case, they should create a teacher account so that they have all the possibilities later (e.g. to share the programs).
It may happen that individual students refuse to create an account for personal reasons. Even without creating an account, they can complete the programming course. They have to save their Scratch projects locally on their computers and load them again from there. In this case, Scratch does not save automatically while they are working!
The students may also install Scratch on their personal devices if required (with the exception of mobile Apple devices, i.e. iPhone and iPad).


Getting to know Scratch and creating a first program yourself

The sample program:  a matchstick puzzle


MatchStickPuzzle.png
The first program is based on the idea that a certain problem can be solved by using a program on the computer to represent a selected part of reality (forming a model). In the case of our first program, these are matches that can be laid out on a surface, moved and rotated.
The explanations in the instructions for part 1 of the "programming" course should help the students to make such a program with Scratch themselves, step by step. The teacher observes and helps if necessary.

The components of the Scratch programming environment

Stage: The students should first get to know the stage and its design possibilities.
Objects (characters): In Scratch, the characters (sprites) play roles on the stage. The characters have properties (e.g. size, position) and scripts describe their (re)actions on events such as clicking the start flag.
From a theoretical point of view, this concept corresponds to object- and event-oriented programming. The characters are the objects; the objects are described by their properties (constants, variables) and (re)actions (methods). However, the students should get to know the characters as objects without too many theoretical considerations.
Objects can be duplicated in the programming environment, this simplifies the creation of multiple similar objects.
Objects can also be created dynamically while the program is running. The command in question is called "Create Clone of ...". However, we do not use the dynamic creation (cloning) of objects in the programming course.
→ The students must be provided with the image file match kibrit.svg as a "costume" for the objects of the matchstick puzzle (e.g. on a common storage for the whole course).
Save, describe and publish the program: Those students who created an account can save and edit their programs as projects. This includes a description of the program for users, which is especially necessary when the program is published.
The program description should also show that programming is not only communication with the computer, but also communication with people (who use or further develop the program).

Reflection
  • The matchstick puzzle is now ready. You can share it with others or use it yourself to solve it.
  • The focus is on the objects (in this case the matches) with their properties (appearance, size, position, location). This programming concept is called object orientation. However, the objects do not (yet) act in our program.
  • In the editing mode ("See Inside"), however, you can move and rotate the objects on the stage. The necessary commands to the computer have been realised by the Scratch programmers.


Objects and actions
Up to this point, the students have only assigned properties to the objects, but not yet scripts (actions).
The formulation of scripts is introduced with the initialisation necessary for the set-up of the matchstick puzzle and a text output.
The students now have to "write" their own scripts. This probably corresponds to what the students imagine by "programming". However, it is important that the students realise that the previous activities (creating objects, duplicating, positioning, etc.) and the considerations made about them are also part of programming!
To position the matches correctly, the students need to know the coordinate system of the Scratch stage. Figure 11 in the instructions introduces this coordinate system.
The text output explaining the matchstick puzzle is used to introduce the concept of Scratch extension blocks. The students need the "Text to Speech" block.
Process communication
With the next step, the students learn about the mechanism of message exchange between objects. Here, message exchange primarily allows the synchronisation of scripts (process communication).
This shows that objects in Scratch can comprise several scripts (→ object-oriented programming, several methods). As a rule, a script is only executed when a certain event occurs, here e.g. clicking on the start flag or an object or receiving a message (→ event-oriented programming). It is also evident that several scripts can be executed "simultaneously".

Reflection
  • A program comprises objects (in the example program these are the matches and the character chosen for the text output).
  • The objects are characterised by their properties (e.g. appearance, size, position, location) and the actions (scripts) assigned to them. This programming concept is called object orientation.
  • The initially independent objects can interact. The most common interaction is synchronisation (an object performs one of its actions when another object has completed a certain action). In Scratch, synchronisation takes place via exchanged messages (process communication).


Remix
For the remix of one′s own program, the button "Remix" is missing on the respective project page. The procedure is therefore somewhat different from remixing a "foreign" program. The Youtube video «Scratch Tutorial: How to Remix your OWN Projects» (https://youtu.be/dLY_MnAMe6o) shows how to do it.
It might be worth a try to let the students take over the program of another student (of another group).


Editing and execution mode
The matchstick puzzles programmed by the students are only partially executable programs!
The students always programmed in edit mode. They could therefore move and rotate the matchsticks on the stage as they wished (because this is a function of the Scratch programming environment).
If such a project is to be published and used by another person, the script that enables its moving with the mouse is missing for each match!
In the context of the programming course this is not a disadvantage. But if the students want to publish their programs, they absolutely have to insert the missing scripts. The instructions describe this ″problem″ and its solution.


Reflection
  • The strong and rapid spread of computer programs is in part due to the fact that new programs can build on existing ones. Open source software, in particular, benefits from this.
  • According to you, what are the advantages of open source software compared to non-open source programs (e.g. the text processing program LibreOffice Writer compared to Microsoft Office Word)? What disadvantages do you see?
  • Could you imagine participating in an open source project (e.g. as a translator or a programmer?)

Musterlösungen

Zündholzrätsel Variante 2: https://scratch.mit.edu/projects/671650074

Zündholzrätsel Variante 3: https://scratch.mit.edu/projects/671651532

Authors: Bruno Wenk, Dieter Burkhard

Translation: Patricia Berchtel