ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
Python in education
1. PYTHON IN Jussi Kasurinen,
D.Sc. (SE)
EDUCATION Lappeenranta
University of
Technology
WHY WE WENT THERE
2. WHO ARE YOU TO TALK ABOUT PYTHON?
Jussi Kasurinen, D.Sc. (Software Engineering)
Author of some of the first Finnish Python manuals
General topics ”Python –ohjelmointiopas” (2006)
Python Imaging library (2007)
Tkinter and GUIs (2007)
Cryptography toolkit (2008)
Book, Python 3 –ohjelmointi, Docendo/WSOYPro 2009
Back in 2006, Python really had not broken through to the mainstream
in Finland.
One book in Finnish, subchapter along with Java and Prolog
Our group was looking for a new programming language to replace old
and tired C-based programming course
3. WHO ARE YOU TO TALK ABOUT PYTHON?
Decision to adopt Python for Fall of 2006 introductory programming was
made.
Started, or at least preceded the “boom” of Python programming courses
at the Finnish universities
Good chance that if you have studied Python in Finland, you have been
doing it with our material, or material based on our material.
Online courses, student assessment models, introductory robotics,
visualization tools…
Today I am going to give a discussion and a short history trip
to the early years of Python in Finland, and talk about using
the language in education (and what we did whit it).
4. THE PROBLEM (IN CONTEXT OF 2006)
Students do nothing
Or at least fail the larger project or exams
Attendance percentages low
Programming is not interesting
Course drop-out percentages high, no interest to have effort on understanding
the concepts.
Failure to see the link between the programming tasks and the actual IT stuff
everyone uses.
Programming is difficult
Even if the motivation is good, programming is still hard.
Unfamiliar tools, unfamiliar operating environment if not Windows
More time spent on learning the tools than learning the language.
5. WHY WE ADOPTED PYTHON? (IN CONTEXT OF
2006)
Excellent ”activity for lines of code”-ratio
Free, simple Windows-platform tools that actually
worked
– Same tools for Linux, OSX
Real platform independence
– One set of instructions, all platforms covered.
6. WHY WE ADOPTED PYTHON? (IN CONTEXT OF
2006)
Simple, clean syntax
Easy to teach, no unnecessary details
Push to remove unnecessary redundancy from syntax
structures (I am looking at you Ruby!)
Ability to data mine student submissions and make
models
Easily extensible
PIL for manipulating images and drawing stuff
Serial adaptors to work with robots
Py2EXE to wrap stuff up
Not a toy, real programming work with full, usable language
7. FUNDAMENTALS
It takes 10 years to become expert in programming. (Winslow
1996)
Several concepts, structure understanding required.
Application of dedicated software to ease the learning process.
Motivational aspects
Data manipulation and command line operations not interesting
for the Internet-generation. (Guzdial and Soloway 2002)
Media literature
Programming should be universal skill in information society.
Video and sound, adjustments for different focus groups
Architects, distance learners, liberal arts…
8. FUNDAMENTALS
Programming is hard to learn: students have to learn several
concepts and structural rules before they can create anything
interesting.
Programming is learned by first understanding the structures
themselves, and later by combining these structures to create
more and more complex functionalities.
Programming languages offer different “building blocks” –
structures – of varying complexity to enable this behavior.
However, there are usually several similar or redundant structures
(iteration, condition).
Some structures can overtake activities (conditions, exception handlers)
So What Do The Newcomers See When Getting
Started With Programming Languages?
9.
10.
11.
12.
13. SO WHY PYTHON?
• Earlier studies show, that the infrastructure has major impact over
course performance.
Results with our earlier course; badly fragmented set of different tasks that
has no relation to each other.
Case studies with art students, at engineering classes etc.
• Usability is an issue, usability over performance should be used at the
first courses
• An argument was made that the first programming course should be the most
difficult one to “cull the herd” and teach the students to approach problems
properly. Why?
• Simple tools which allow all that is necessary but do not require anything
that has no self-evident purpose
“Just trust me, we’ll get back to that later.”
14. CLASSICAL EXAMPLE
Python Java
#-*- coding:cp1252 -*- class HelloWorld
print(”Hello, world!”) {
public static void main(String[] args)
{
System.out.println("Hello, world!");
}
}
How many concepts do you have to explain to cover all these syntax words?
15. CONCERNING STUDENT LEARNING
Students seem to start favor some structures over another,
to a point where personal preferences supersede practicality.
Besides practicality, there are also undesirable issues like shortcuts or
disregard of good programming manners.
However, the way the students program can be used to
assess their programming knowledge:
What structures are they using?
Do they understand all of the structures?
Are they using the structures correctly?
What kind of errors are they encountering?
16. STUDENT MODELING
Structure mapping was done with Python program reading
database dump:
Search for syntax keywords from non-commented lines.
Only functional source codes in the dump!
Python syntax a huge asset in the development of evaluation tools.
Five categories were tested:
while should be used if the number of iterations is not known, otherwise for.
Every input should be taken as a string with raw_input and converted to a
suitable type.
Each open file should be closed after use.
Functions (def) should be used to implement recurrent behavior or refactor
large bodies of code.
Each type conversion to a numeric value and file openings for reading should
be secured with an exception handler.
Final calculations for the BKT-analysis were done with
external tools.
17. STUDENT MODELING
For the 3.Error
1. error log analysis
Collection
4.Structure
For the
analysis
2. Filtering submission
log
5. BKT-
modeling
Unlearned Learned
Invalid Valid
p(T)
1-p(L0) p(L0)
p(G) p(S)
Valid Invalid
18. STUDENT MODELING
4500 4270
4000
3500
3000
2500
2000
1536
1500 1193
1000 659
413 357 335 311
500 183 155 8
0
e
IO
rt
v
e
x
d
ex
ue
pe
n
ut
di
am
ta
un
po
tio
d
al
Ty
0-
ib
yn
In
o
ta
Im
N
V
ttr
nb
S
en
A
U
d
In
19. RECIPE FOR THE PROFILES
XML or CSV dump for all user data
<student id>::<assignment id>::<source>
Load data to 3-dimensional list
Sanity checks
Profile the source codes for applied features
Non-commented applications for profiles
Compare the application against the ”should have used”-list
Calculate the profile for each structure for each student based on all the
assignments where certain structure was expected
20. MAKING MODELS
100 100 95
% of submissions
94 92
80 92
60
40
48 How students handle
41
20 file operations
0
10/1 10/2 11/1 11/2 12/2 13/1 13/2
Week/Assignment
100
% of submissions
80
71 73
60
54
40
23 22
How they handle 20
5 10 8
exceptions 0
10/2 11/1 11/2 12/2 13/1 13/2 13/3 14/2
Week/Assignment
21. MAKING MODELS
100
90
80
58 63 48 62 67 67
% - of students
70
60 46 48 49 52
50
40
30
20
10 How students learned
0
While For Functions Exceptions Files
Threshold p= 0.05 Theshold p = 0.1
Comparison of two
different courses
22. USING VIRTUAL LEARNING ENVIRONMENT
We used Viope virtual learning environment (VLE) to
collect student
submissions.
www.viope.com
3732 source codes and 9420 errors
VLE also provided additional services:
Submission validation: the source code worked as intended
(input/output matching)
Hinting service: “First aid” service to help students in a need of
assistance.
Plagiarism detection: similarity testing with prior submissions.
Student statistics: teachers could observe how much time
students had used, what kind of errors they had encountered, in
which time of the week/day they are actively working etc…
23. VISUAL TOOLS, KILPPARI
Visualization tool to assist teaching
Not only tool, also an API exercise
for students
import control
import visualization
control.MyCommands = ["square"]
def Parser(command):
if command == "square":
for i in range(0,4):
visualization.TurnLeft()
for j in range(0,2):
visualization.TakeStep()
return command
else:
return "Invalid command:"+command
24. ROBOT TOOLS
Python proved to be an excellent platform to control a small robot.
Kit build, gives students some idea on how to work “outside the grey
box”
Related to the Karel the Robot (Guido van Robot) concept
import serial
portti = serial.Serial(3)
portti.write(b"1c")
portti.close()
…. And there she goes!
25. WHAT WE LEARNED ABOUT STUDENTS?
Students work at night.
VLE system is needed, as students tend to work at all hours
Also, automation to do basic sanity checks on student submissions
Nobody does anything during the weekends.
Some people just don’t get programming (over 150h spent on exercises
of 14 week course)
No common sense; students use brute force to get the results they need.
Engineering students do not like visualization tools
”Toys for elementary school”
Robots are cool.
Recording the lectures and putting them to web is really easy task to
add.
26. SO WHAT DID WE LEARN IN GENERAL?
Python was definitely the right choice.
Visualization tools divide opinions, but for truly introductory level they can
be successful.
Python syntax makes it easy to model students with Bayesian models
Same content, different outcomes
Predict learning, easy to collect topics that should be revisited
Steering hardware with the software should be taken more into the
course syllabus (motivational reasons).
Course book is a must!
Not a large 1000-page 200 USD brick that explains everything
Cheap (free?) manual that covers all of the course topics
IDLE was really all that was needed.
27. CURRENT WORK
Immigration to Python 3
More open-source material to allow self-study in Python
topics
Introduction to Python-wiki, by University of Oulu
Viope develops the Python web-course to cover new markets
in Africa and Asia.
28. Jussi Kasurinen,
D.Sc. (SE)
QUESTIONS? Lappeenranta
University of
Technology
...Or drop me an email at
jussi.kasurinen@lut.fi