Textual programming in key stage 3
-
Upload
eaglestone -
Category
Education
-
view
2.025 -
download
2
Transcript of Textual programming in key stage 3
Textual Programming in Key Stage 3
Tim EaglestoneDorothy Stringer School, Brighton
Our scheme of work
7
8
9
What’s being used?
Python
SmallBasic
Java
JavaScript
Ruby
Why not others?
What language should you choose?
-What you know/are comfortable with-What support can you get?-Ease of use -Ease of installation
Python: IDLE
Small Basic
Java—Greenfoot
JavaScript
KidsRuby
A progression in codingSTAGE LEARNING TO CODE ACTIVITY
Preoperational(Many students get stuck here)
•Spotting keywords•Identifying numbers and data (variables)•Spotting syntax elements (such as block starts and ends)•Recognising constructs (sequences, loops, conditions)•Tracing (running through the code on paper step by step)•Explaining the code in English in the form of a trace (“first it does this, then it does that…”)
Concrete Operational
•Explaining the code in English in terms of its function (“This code sorts an array from smallest to largest”)•Using diagrammatic abstractions•Completing conservation exercises (e.g. “This method is not finished. Complete is so that it returns …”)•Completing reversing exercises (e.g. “Heres some code that does X, Y and Z. Write some code that does the reverse: -Z,-Y then -X.”)•Transitive inference (where a student might have to hold several possible program states in mind to answer a question, or generalise a system’s response by reading a fragment of code)
Adapted from Concrete and Other Neo-Piagetian Forms of Reasoning in the Novice Programmer, R. Lister, Uni. Sydney, 2011
Example
Example questionsA hierarchy of questions could go something like:
•What does the command on line 8 do?•What about those on lines 2 and 3?•What lines are any numbers on?•What’s different about the numbers on lines 6 and 7 compared with line 5?•What lines mark the end of a Ruby block?•What does the number in line 5 do?•What about those in lines 6 and 7?•Describe what happens in lines 5 to 10.•Draw on paper what you think this program does.•Can you explain in words what you think this program does.•Draw a flow chart that represents this code
Small Basic Example
Python Example
Software & Programming
(Lesson 1: An introduction using Ruby)
EXECUTABLE
Computer programs
Utility programs – e.g. virus scanners, backup
Apps – e.g. word processors and spreadsheets
software
{
Code
if(x==2){ print “foo”;}
com
pile
d
orin
terp
rete
d
loaded into RAM
CPUThe Central Processing Unit (CPU)
The CPU is the core of the computer. It ‘processes’ all the computer programs.
Fill in theblanks
Some Ruby Code
Look at this code What does it do?
What about this?
The code... The output...
Enter and run these programs Press the button before entering the second
one
Program 1 Program 2
In your books, go through each program line by line and try to explain what each line does.
Conservation exercise
Diagrammatic abstractions & starting to write their own code (transitive inference?)