The Questionnaire for Investigating Novice Programmers’Mental Models

Investigation into Mental Models of Programmers

My name is Linxiao Ma and as part of my PhD research I am investigating the ways in which people learn to program. This test is designed to explore the kind of mental models that programmers create when problem-solving. I am very grateful for your assistance in completing this study.

Instructions

  1. This test questionnaire is divided into three parts: part1, part2, part3. Please finish each part in order, and please do not go back to previous part after you have finished it.
  2. Please complete the test as quickly as possible and not refer to any other information (books, web pages) or execute the statements on a computer.
  3. Please return the paper to me when you have finished.

Please fill your personal information:

Name:
Registration No:
Is this your first course in programming?
Did you learn any other programming language before? If so, please list the languages here.

The questionnaire results will be recorded in a database. They will never be revealed to any person who could in any way identify you from the data given above. They will never be used for assessment purposes.

I consent to the research use of my questionnaire ……………………………

Participant’s signature

Part1: The Close-ended Questions for Value Assignment

[* Thispart is from Dehnadi & Bornat (2006)]

1. Read the following statements and tick the box next to the correct answer in the next column.
int a = 10;
int b = 20;
a = b; / The new values of a and b are:
a = 20 b = 0
a = 20 b = 20
a = 0 b = 10
a = 10 b = 10
a = 30 b = 20
a = 30 b = 0
a = 10 b = 30
a = 0 b = 30
a = 10 b = 20
a = 20 b = 10
Any other values for a and b:
a = b =
a = b =
a = b = / Use this column for your rough notes please
2. Read the following statements and tick the box next to the correct answer in the next column.
int a = 10;
int b = 20;
b = a; / The new values of a and b are:
a = 20 b = 0
a = 20 b = 20
a = 10 b = 30
a = 0 b = 30
a = 30 b = 10
a = 30 b = 0
a = 10 b = 20
a = 20 b = 10
a = 0 b = 10
a = 10 b = 10
Any other values for a and b:
a = b =
a = b =
a = b =
3. Read the following statements and tick the box next to the correct answer in the next column.
int big = 10;
int small = 20;
big = small; / The new values of big and small are:
big = 20 small = 0
big = 10 small = 20
big = 20 small = 10
big = 20 small = 20
 big = 0 small = 10
big = 10 small = 10
big = 30 small = 20
big = 30 small = 0
big = 10 small = 30
 big = 0 small = 30
Any other values for big and small :
big = small =
big = small =
big = small = / Use this column for your rough notes please
4. Read the following statements and tick the box next to the correct answer in the next column.
int a = 10;
int b = 20;
a = b;
b = a; / The new values of a and b are:
a = 0 b = 30
a = 40 b = 30
a = 30 b = 0
a = 0 b = 20
a = 20 b = 20
a = 10 b = 0
a = 10 b = 10
a = 30 b = 50
a = 10 b = 20
a = 20 b = 10
a = 30 b = 30
Any other values for a and b:
a = b =
a = b =
a = b =
5. Read the following statements and tick the box next to the correct answer in the next column.
int a = 10;
int b = 20;
b = a;
a = b; / The new values of a and b are:
a = 0 b = 30
a = 10 b = 20
a = 10 b = 20
a = 20 b = 10
a = 10 b = 0
a = 10 b = 10
a = 0 b = 20
a = 20 b = 20
a = 40 b = 30
a = 30 b = 0
a = 30 b = 50
a = 30 b = 30
Any other values for a and b:
a = b =
a = b =
a = b =
6. Read the following statements and tick the box next to the correct answer in the next column.
int a = 10;
int b = 20;
int c = 30;
a = b;
b = c; / The new values of a and b and c are:
a = 30 b = 50 c = 0
a = 30 b = 30 c = 50
a = 0 b = 30 c = 50
a = 20 b = 30 c = 0
a = 20 b = 30 c = 30
a = 0 b = 10 c = 0
a = 10 b = 10 c = 10
a = 60 b = 20 c = 30
a = 60 b = 0 c = 0
a = 10 b = 30 c = 40
a = 0 b = 0 c = 60
a = 10 b = 20 c = 30
a = 20 b = 30 c = 20
a = 20 b = 20 c = 20
a = 30 b = 30 c = 30
a = 0 b = 10 c = 20
a = 10 b = 10 c = 20
a = 30 b = 50 c = 30
Any other values for a and b and c :
a = b = c =
a = b = c =
a = b = c = / Use this column for your rough notes please
7. Read the following statements and tick the box next to the correct answer in the next column.
int a = 5;
int b = 3;
int c= 7;
a = c;
b = a;
c = b; / The new values of a and band c are:
a = 3 b = 5 c = 5
a = 12 b = 14 c = 22
a = 0 b = 0 c = 15
a = 8 b = 15 c = 12
a = 3 b = 12 c = 0
a = 5 b = 3 c = 7
a = 3 b = 5 c = 7
a = 5 b = 5 c = 5
a = 3 b = 3 c = 3
a = 7 b = 5 c = 3
a = 3 b = 7 c = 5
a = 12 b = 8 c = 10
a = 10 b = 8 c = 12
a = 0 b = 0 c = 7
a = 7 b = 7 c = 7
a = 3 b = 5 c = 5
Any other values for a and b and c :
a = b = c =
a = b = c =
a = b = c =
8. Read the following statements and tick the box next to the correct answer in the next column.
int a = 5;
int b = 3;
int c= 7;
c = b;
b = a;
a = c; / The new values of a and band c are:
a = 15 b = 8 c = 10
a = 10 b = 5 c = 0
a = 15 b = 10 c = 22
a = 0 b = 0 c = 15
a = 5 b = 3 c = 7
a = 3 b = 5 c = 7
a = 5 b = 5 c = 5
a = 3 b = 3 c = 3
a = 7 b = 5 c = 3
a = 3 b = 7 c = 5
a = 12 b = 8 c = 10
a = 8 b = 10 c = 12
a = 3 b = 5 c = 0
a = 3 b = 5 c = 3
a = 0 b = 0 c = 7
a = 7 b = 7 c = 7
Any other values for a and b and c :
a = b = c =
a = b = c =
a = b = c = / Use this column for your rough notes please
9. Read the following statements and tick the box next to the correct answer in the next column.
int a = 5;
int b = 3;
int c= 7;
c = b;
a = c;
b = a; / The new values of a and band c are:
a = 7 b = 0 c = 5
a = 7 b = 7 c = 5
a = 15 b = 18 c = 10
a = 0 b = 15 c = 0
a = 15 b = 10 c = 12
a = 10 b = 0 c = 5
a = 5 b = 3 c = 7
a = 7 b = 3 c = 5
a = 5 b = 5 c = 5
a = 7 b = 7 c = 7
a = 7 b = 5 c = 3
a = 3 b = 7 c = 5
a = 12 b = 8 c = 10
a = 8 b = 10 c = 12
a = 0 b = 3 c = 0
a = 3 b = 3 c = 3
Any other values for a and b and c :
a = b = c =
a = b = c =
a = b = c =
10. Read the following statements and tick the box next to the correct answer in the next column.
int a = 5;
int b = 3;
int c= 7;
b = a;
c = b;
a = c; / The new values of a and band c are:
a = 3 b = 7 c = 3
a = 20 b = 8 c = 15
a = 15 b = 0 c = 0
a = 8 b = 10 c = 15
a = 0 b = 7 c = 8
a = 5 b = 3 c = 7
a = 5 b = 7 c = 3
a = 3 b = 3 c = 3
a = 7 b = 7 c = 7
a = 7 b = 5 c = 3
a = 3 b = 7 c = 5
a = 12 b = 8 c = 10
a = 8 b = 10 c = 12
a = 5 b = 0 c = 0
a = 5 b = 5 c = 5
a = 0 b = 7 c = 3
Any other values for a and b and c :
a = b = c =
a = b = c =
a = b = c = / Use this column for your rough notes please
11. Read the following statements and tick the box next to the correct answer in the next column.
int a = 5;
int b = 3;
int c = 7;
b = a;
a = c;
c = b; / The new values of a and band c are:
a = 12 b = 8 c = 15
a = 7 b = 0 c = 8
a = 8 b = 18 c = 15
a = 0 b = 15 c = 0
a = 5 b = 3 c = 7
a = 7 b = 3 c = 5
a = 5 b = 5 c = 5
a = 7 b = 7 c = 7
a = 7 b = 5 c = 3
a = 3 b = 7 c = 5
a = 12 b = 8 c = 10
a = 8 b = 10 c = 12
a = 7 b = 0 c = 5
a = 7 b = 5 c = 5
a = 0 b = 3 c = 0
a = 3 b = 3 c = 3
Any other values for a and b and c :
a = b = c =
a = b = c =
a = b = c =
12. Read the following statements and tick the box next to the correct answer in the next column.
int a = 5;
int b = 3;
int c = 7;
a = c;
c = b;
b = a; / The new values of a and band c are:
a = 20 b = 15 c = 12
a = 15 b = 0 c = 0
a = 5 b = 3 c = 7
a = 5 b = 7 c = 3
a = 3 b = 3 c = 3
a = 7 b = 7 c = 7
a = 7 b = 5 c = 3
a = 3 b = 7 c = 5
a = 12 b = 8 c = 10
a = 8 b = 10 c = 12
a = 0 b = 7 c = 3
a = 7 b = 7 c = 3
a = 5 b = 0 c = 0
a = 5 b = 5 c = 5
a = 12 b = 15 c = 10
a = 0 b = 12 c = 3
Any other values for a and b and c :
a = b = c =
a = b = c =
a = b = c = / Use this column for your rough notes please

Reference

Dehnadi, S., Bornat, R., (2006). The Camel has Two Humps, Middlesex University Working Paper. Retrieved 17th May, 2006, from The Open-ended Question

Please trace the following statements. Describe what happens when each of the statements is executed. You may use both text and diagrams in your answer.
Person a, b;
a = new Person ("Jack");
b= new Person (“Tom”);
b = a;

[* This part was an original contribution of this thesis]

1

A-3: The Close-ended Questions for Reference Concept

[* This part was an original contribution of this thesis]

Given that a Person class has been defined that holds a name field as a String, which of the following diagrams most closely represents the state of memory after all the statements have been executed? Please circle the letter of the correct answer:
Question 1:
Person a, b;
a = new Person ("Jack");
b = a;
A) / / Use this column for your rough notes please
B) /
C) /
D) /
E) /
F) /
G) /
H) /
J) /
K) /
If the answer is not list above, please give your answer here:
Question 2:
Person a, b;
a = new Person ("Jack");
b = new Person (“Tom”);
b = a;
A) / / Use this column for your rough notes please
B) /
C) /
D) /
E) /
F) /
G) /
H) /
I) /
J) /
If the answer is not list above, please give your answer here:
Question 3:
Person a, b;
a = new Person ("Jack");
b = new Person (“Tom”);
b = a;
a = b;
A) / / Use this column for your rough notes please
B) /
C) /
D) /
E) /
F) /
G) /
H) /
I) /
If the answer is not list above, please give your answer here:
Question 4:
Person a, b, c;
a = new Person ("Jack");
b = new Person (“Tom”);
c = new Person (“Jim”);
b = a;
a = c;
c = b;
A) / / Use this column for your rough notes please
B) /
C) /
D) /
E) /
F) /
G) /
H) /
I) /
J) /
If the answer is not list above, please give your answer here:

1