strategies for teaching programming · cas south east conference ... send "egyptian is...

57
Strategies for teaching programming Sue Sentance King’s College London @suesentance [email protected] CAS South East Conference 6 th July 2017

Upload: others

Post on 02-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Strategies for teaching programmingSue Sentance

King’s College London

@suesentance

[email protected]

CAS South East Conference

6th July 2017

Page 2: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

As you come in…

Can you spot the errors in this Python 3 program:

Page 3: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

What I hope to cover today…

Why programming can be difficult

What research tells us (briefly)

What teachers tell us

Pair programming

Peer instruction activity

Code tracing activity

Use-modify-create

Predict-explain-modify-create

Page 4: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Why programming can be difficult

Students may not have an accurate mental model of the process/computer

Is the computer doing some kind of magic? The trial and error / fingers crossed approach

Syntax errors knock confidence

Programs don’t work more often than they do work

Multiple skills/understanding of concepts/mechanisms compressed into one line of code

Difficulty with thinking algorithmically

Working at different levels of abstraction

Threshold concepts and misconceptions

?

As teachers can we relate to any of these?

Page 5: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Why programming can be difficult

Students may not have an accurate mental model of the process/computer

Is the computer doing some kind of magic? The trial and error / fingers crossed approach

Syntax errors knock confidence

Programs don’t work more often than they do work

Multiple skills/understanding of concepts/mechanisms compressed into one line of code

Difficulty with thinking algorithmically

Working at different levels of abstraction

Threshold concepts and misconceptions

?Conceptual difficulties

Page 6: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Why programming can be difficult

Students may not have an accurate mental model of the process/computer

Is the computer doing some kind of magic? The trial and error / fingers crossed approach

Syntax errors knock confidence

Programs don’t work more often than they do work

Multiple skills/understanding of concepts/mechanisms compressed into one line of code

Difficulty with thinking algorithmically

Working at different levels of abstraction

Threshold concepts and misconceptions

?The process of programming

Page 7: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Block-based and frame-based tools offer support

Scratch

Patch

Stride

Stride

Page 8: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

But what about a blank Idle window?

(or equivalent in your favourite text-based language?)

Ever not been sure

where to start?

Page 9: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

What research tells us about learning programming

1. Read before you write – there is clear evidence that tracing and explaining code helps (Lister, numerous

papers)

2. Levels of abstraction - problem at higher-level; syntax at lower-level (Perrenet & Kassenbrod, 2006)

3. Threshold concepts in programming cause difficulties for students (Sanders & McCartney, 2016)

4. Misconceptions abound (research from 1980s to current day – Juha Sorva)

5. Pair programming and peer instruction help – these suggest that dialogue and discussion at a logical

level help students (Porter et al, 2012)

6. Growth mindset – popular approach, with some research evidence in Computing (Cutts, 2010)

Page 10: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Pair programming – supporting learning of programming

Pair programming started off in industry.

Now there is good evidence that pair programming

works in university settings, for example in introductory

programming classes

Good for girls

Another article by Linda Werner et al suggests

it supports engagement by girls/women

Use in school

Now starting to see evidence from research in

school (e.g. Werner, L., & Denning, J. (2009).

Pair programming in middle school: What

does it look like?. Journal of Research on

Technology in Education, 42(1), 29-49.

Talking about your program:

…the process of expressing a problem verbally helps

the programmer to develop their own understanding

and can often lead to a solution.(Wray, 2010)

If you only do ONE thing …. try pair programming

Page 11: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Activity : Peer instruction

You will need some A, B, C, D cards

Look around you because you will be discussing in groups of 3

We will do the activity first then reflect on the process

Page 12: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Peer instruction

Well-evidenced pedagogical strategy

Combination of:

- Flipped learning

- Collaborative working

- Well-chosen MCQs

Process

- Step 0: Study topic before session

- Step 1: MCQ question presented to class

- Step 2: Individually decide on answer

- Step 3: All vote

- Step 4: Discuss answer as group

- Step 5: Group decides on answer

- Step 6: All groups vote

- Step 7: Discuss as class

For more information see

http://peerinstruction4cs.org

Page 13: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Example 1

Page 14: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

The variables angel and egyptian contain 1.7 and 2.0 respectively, which represent

their height.

What is written out…?

IF angel > egyptian THEN

SEND "Egyptian is taller" TO DISPLAY

ELSE

SEND "Angel is taller" TO DISPLAY

END IF

A. Egyptian is taller

B. Angel is taller

C. Egyptian is taller Angel is taller

D. <nothing is output>

14

Example 2

Page 15: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Consider what this code does when metalColour is blue, red, or green…

IF metalColour == "blue" THEN

SEND "Cold" TO DISPLAY

ELSE IF metalColour == "red" THEN

SEND "Hot!" TO DISPLAY

ELSE

SEND "Try again!" TO DISPLAY

END IF

END IF

Which options are true?

A. When metalColour is blue, Cold displayed

B. When metalColour is red, Hot! displayed

C. When metalColour is blue, both Cold AND Try again!

displayed

D. When metalColour is green, nothing happens 15

Example 3

Page 16: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

How many times is Hello written out?

SET i TO 0

WHILE i <= 5 DO

SEND "Hello" TO DISPLAY

SET i TO i + 1

END WHILE

A: 4

B: 5

C: 6

D: 7

E: <other> 16

Example 4

Page 17: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Peer Instruction – testing for faulty mental models

• Technique originally developed in Physics by Eric Mazur at Harvard university

• Way of assessing whether novices really understand concepts requiring a precise

understanding

• Based on carefully designed multiple choice questions with structured discussion and voting

17

Page 18: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Peer instruction in a school context

Before

Pupils have worked with the concepts in class or at home.

Individual

•Pupils read the question and choose an answer

•Vote takes place

Group

•Pupils discuss what answer they chose and why

•Vote takes place

Class

•Teacher facilitated discussion

•Vote takes place

Correct Answer

•Teacher reveals the correct answer

•Teacher explains why it’s correct

18

Page 19: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Peer instruction vs teacher explanation: research findings

Statistically

significant

effect

Twice as effective

as a good teacher

explanation

Successfully used in

Physics, Maths and

Computing Science Develops better sense

of self efficacy

particular amongst

girls

19

Page 20: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

What other teachers have told us

Key strategies for teaching Computing

- Unplugged activities

- Relate to the real world

- Work with problems

- Work together

- Practical/hands-on exercises

… And particularly for programming

- Scaffolding programming tasks

- Exercises manipulating/modifying code

- Use examples

- Pair programming

From Computing in the curriculum: challenges and strategies from a teacher’s perspective

Page 21: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Another activity: Tracing code

Page 22: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table Input

Output

a = 9

b = 7

b = a

print b

a = 10

print b

Step 1- Draw a red rectangle around all expressions

Expression evaluator

Page 23: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table Input

Output

a = 9

b = 7

b = a

print b

a = 10

print b

Step 2- Draw in the flow of control as arrows in blue

Expression evaluator

Page 24: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table Input

Output

a = 9

b = 7

b = a

print b

a = 10

print b

Step 3- Hand execute the program

Expression evaluator

Page 25: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

a

1. 9

Variables Table Input

Output

a = 9

b = 7

b = a

print b

a = 10

print b

Step 3- Hand execute the program

Expression evaluator

1

Page 26: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

a b

1. 9 2. 7

Variables Table Input

Output

a = 9

b = 7

b = a

print b

a = 10

print b

Step 3- Hand execute the program

Expression evaluator

1

2

Page 27: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

a b

1. 9 (3) 2. 7

3. 9

Variables Table Input

Output

a = 9

b = 7

b = a

print b

a = 10

print b

Step 3- Hand execute the program

3 a

9

Expression evaluator

1

2

3

Page 28: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

a b

1. 9 (3) 2. 7

3. 9 (4)

Variables Table Input

4. 9

Output

a = 9

b = 7

b = a

print b

a = 10

print b

Step 3- Hand execute the program

3. a

9

4. b

9

Expression evaluator

1

2

3

4

Page 29: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

a b

1. 9 (3) 2. 7

5. 10 3. 9 (4)

Variables Table Input

4. 9

Output

a = 9

b = 7

b = a

print b

a = 10

print b

Step 3- Hand execute the program

3. a

9

4. b

9

Expression evaluator

1

2

3

4

5

Page 30: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

a b

1. 9 (3) 2. 7

5. 10 3. 9 (4,6)

Variables Table Input

4. 96. 9

Output

a = 9

b = 7

b = a

print b

a = 10

print b

Step 3- Hand execute the program

3. a

9

4. b

9

6. b

9

Expression evaluator

1

2

3

4

5

6

Page 31: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Now you try:

Take a handout and a partner

The following example has been adapted from the TRACS system developed by CAS Scotland

(I have called it Mini TRACS)

Page 32: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Page 33: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 1: Draw round all expressions

Page 34: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 2: Draw arrows to show the order the statements are executed

FALSE

TRUE

Page 35: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 3: Work through the program showing variables and output

FALSE

TRUE

counter

Page 36: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 3: Work through the program showing variables and output

FALSE

TRUE

1

counter

Page 37: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 3: Work through the program showing variables and output

FALSE

TRUE

1

counter

1 TRUE

Page 38: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 3: Work through the program showing variables and output

FALSE

TRUE

1

counter

1

counter

Happy days

2

Working out areacounter = counter + 1counter = 1 + 1counter = 2

Page 39: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 3: Work through the program showing variables and output

FALSE

TRUE

1

counter

2 TRUE 2

Happy days

Page 40: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 3: Work through the program showing variables and output

FALSE

TRUE

1

counter

1

counter

Happy days

2

Happy days

3

Working out areacounter = counter + 1counter = 2 + 1counter = 3

Page 41: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 3: Work through the program showing variables and output

FALSE

TRUE

1

counter

3 TRUE 2

3

Happy days

Happy days

Page 42: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 3: Work through the program showing variables and output

FALSE

TRUE

1

counter

1

counter

Happy days

2

Happy days

3

4

Happy days

Working out areacounter = counter + 1counter = 3 + 1counter = 4

Page 43: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 3: Work through the program showing variables and output

FALSE

TRUE

4 FALSE1

counter

1

counter

2

3

4

Happy days

Happy days

Happy days

Page 44: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed?

counter = 1

while counter < 4:

print("Happy days")

counter = counter + 1

print(“End of program”)

Step 3: Work through the program showing variables and output

FALSE

TRUE

1

counter

1

counter

Happy days

2

Happy days

3

4

Happy days

End of program

FALSE

Page 45: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Now for another example

Page 46: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

SET total TO 0

RECEIVE nextInput FROM (INTEGER) KEYBOARD

WHILE nextInput != -1 DO

SET total TO total + nextInput

RECEIVE nextInput FROM (INTEGER) KEYBOARD

END WHILE

SEND total TO DISPLAY

Step 1- Draw a red rectangle around all expressions

Expression evaluator

Page 47: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

SET total TO 0

RECEIVE nextInput FROM (INTEGER) KEYBOARD

WHILE nextInput != -1 DO

SET total TO total + nextInput

RECEIVE nextInput FROM (INTEGER) KEYBOARD

END WHILE

SEND total TO DISPLAY

Step 1- Draw a red rectangle around all expressions

Expression evaluator

This example in pseudocode

Uses PLAN Cs original layout

You can adapt to your own purposes

Page 48: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Variables Table

What is printed? (Output)

def input_name():

name = input("What is your name? ")

counter = 1

while counter <= 4:

print("Hello" + name)

counter = counter + 1

Step 1: Draw round all expressionsStep 2: Draw arrows showing the order in which the statements will be executedStep 3: Work through the program filling in the variables table and the Output box

Working out area

Page 49: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Why so much detail in this tracing process?

“We’re confident that, for many, we are moving too fast and creating an impossible cognitive overlad. If

the underlying mechanisms aren’t properly understood, and the facility with the new language isn’t in

place, then

- How can we expect learners to direct their problem solving process towards the tools/mechniams

that are available?

- How can we expect learners to debug programs if they can’t understand what they’ve written, or

determine precisely the effects of each component of the process description they have created.”

(Connors, Cutts and Donaldson, 2015)

Page 50: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Use-Modify-Create

• From Lee et al (2011)

• Describes a pedagogical framework for

teaching computing in the domains of

robotics, game development and …

• This is an ideal framework for structuring

Scratch program development perhaps

• It will be a useful model for physical

computing with the micro:bit for example

• To what extent is it appropriate for text-based

programming?

Page 51: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

The PRIMM model – research at KCL

A suggested framework for working with beginners using text-based programming might be:

Predict – given a working program, what do you think it will do? (at a high level of abstraction)

Run – run it and test your prediction

Investigate – get into the nitty gritty. What does each line of code mean? (low level of abstraction). Lots

of activities here: trace, annotate, explain, talk about, identify parts, etc….

Modify – edit the program to make it do different things (high and low levels of abstraction)

Make – design a new program that uses the same nitty gritty but that solves a new problem. This

could be called Create or Design … (not quite sure which is most accurate).

These ideas build on existing research, plus my own experience of teaching programming and the

result of talking to lots of teachers.

(See my latest blog post)

This is a current research project – let me know if you’d like to be a guinea-pig

Page 52: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Not mine Partly mine All mine

Predict - Run – Investigate Modify Make

Use-modify-create adapted

Volunteers needed for next phase of research project to work in this way in school at KS3 and KS4

Page 53: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Materials for PRIMM

Current pilot:

• Pre/Post test

• Teachers using

PRIMM approach

• Interviews

Next study:

• Adapt materials

• Observe lessons

http://blogs.kcl.ac.uk/cser/primm-project/

Page 54: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Other strategies…

Debugging code

• Give students some code with 10 errors

in (a mixture of syntax, logic and

runtime errors). Ask them to circle all

the errors.

Commenting code

• Give students some code and ask them

to write a comment under each line

describing what it does.

Creating a buggy version

- Get students to create a bug-filled

version of code then pass to another

student

- Important thing is that they can explain

why the code doesn’t work with the

errors introduced

Identify parts:

- Spot the variables

- What is the purpose of each variable?

- Find the functions being called 54

What is the value of copying code?

Page 55: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Answer

Page 56: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Summary

Focusing on the pedagogy around teaching programming at school is important

With visual environments the pedagogy may be partially embedded in the tool

With text-based programming students may be disadvantaged by having to write too much code too

soon or copy

Use strategies that focus on understanding of the code and the underlying mechanisms

Expect acquisition of secure conceptual knowledge to take time

Ownership of code is important but knowledge can be very fragile so this needs to be scaffolded

We are involved in various research projects with teachers

to develop Computing pedagogy:

• Jane’s primary survey

• Filiz BBC micro:bit survey

• My PRIMM project

• Trial of Torino with visually impaired primary students

• Threshold concepts in programming

Little plug

New book on CS Education out in March 2018:

Sentance, S, Barendsen, E and Schulte, C. (2018) (Eds).

Computer Science Education: Perspectives on teaching

and learning in schools. Bloomsbury

http://bit.ly/2tSvBey

Page 57: Strategies for teaching programming · CAS South East Conference ... SEND "Egyptian is taller" TO DISPLAY ELSE SEND "Angel is taller" TO DISPLAY END IF A. Egyptian is taller B. Angel

Questions?

Thanks for listening

@suesentance

[email protected]