• No results found

Some unique features of computer programming

N/A
N/A
Protected

Academic year: 2022

Share "Some unique features of computer programming"

Copied!
220
0
0

Loading.... (view fulltext now)

Full text

(1)

An approach to introductory programming

Abhiram Ranade IIT Bombay

February 24, 2015

(2)

Some unique features of computer programming

I Computer programming allows students to buildsomething, unlike other courses which are about memorizing and understanding.

I You can write programs about anything: math, engineering, commerce, even art. You can explorethe world.

I Every student can feel that he/she is in control of the computer. This is psychologically liberating.

There is potential for students to fall in love with programming. But do they?

Introductory programming = first course in CS/IT

I If students love programming, they will have positive attitude towards rest of CS/IT.

(3)

Some unique features of computer programming

I Computer programming allows students to buildsomething, unlike other courses which are about memorizing and understanding.

I You can write programs about anything: math, engineering, commerce, even art. You can explorethe world.

I Every student can feel that he/she is in control of the computer. This is psychologically liberating.

There is potential for students to fall in love with programming. But do they?

Introductory programming = first course in CS/IT

I If students love programming, they will have positive attitude towards rest of CS/IT.

(4)

Some unique features of computer programming

I Computer programming allows students to buildsomething, unlike other courses which are about memorizing and understanding.

I You can write programs about anything: math, engineering, commerce, even art. You can explorethe world.

I Every student can feel that he/she is in control of the computer. This is psychologically liberating.

There is potential for students to fall in love with programming. But do they?

Introductory programming = first course in CS/IT

I If students love programming, they will have positive attitude towards rest of CS/IT.

(5)

Some unique features of computer programming

I Computer programming allows students to buildsomething, unlike other courses which are about memorizing and understanding.

I You can write programs about anything: math, engineering, commerce, even art. You can explorethe world.

I Every student can feel that he/she is in control of the computer. This is psychologically liberating.

There is potential for students to fall in love with programming. But do they?

Introductory programming = first course in CS/IT

I If students love programming, they will have positive attitude towards rest of CS/IT.

(6)

Some unique features of computer programming

I Computer programming allows students to buildsomething, unlike other courses which are about memorizing and understanding.

I You can write programs about anything: math, engineering, commerce, even art. You can explorethe world.

I Every student can feel that he/she is in control of the computer. This is psychologically liberating.

There is potential for students to fall in love with programming.

But do they?

Introductory programming = first course in CS/IT

I If students love programming, they will have positive attitude towards rest of CS/IT.

(7)

Some unique features of computer programming

I Computer programming allows students to buildsomething, unlike other courses which are about memorizing and understanding.

I You can write programs about anything: math, engineering, commerce, even art. You can explorethe world.

I Every student can feel that he/she is in control of the computer. This is psychologically liberating.

There is potential for students to fall in love with programming.

But do they?

Introductory programming = first course in CS/IT

I If students love programming, they will have positive attitude towards rest of CS/IT.

(8)

Some unique features of computer programming

I Computer programming allows students to buildsomething, unlike other courses which are about memorizing and understanding.

I You can write programs about anything: math, engineering, commerce, even art. You can explorethe world.

I Every student can feel that he/she is in control of the computer. This is psychologically liberating.

There is potential for students to fall in love with programming.

But do they?

Introductory programming = first course in CS/IT

I If students love programming, they will have positive attitude towards rest of CS/IT.

(9)

Some unique features of computer programming

I Computer programming allows students to buildsomething, unlike other courses which are about memorizing and understanding.

I You can write programs about anything: math, engineering, commerce, even art. You can explorethe world.

I Every student can feel that he/she is in control of the computer. This is psychologically liberating.

There is potential for students to fall in love with programming.

But do they?

Introductory programming = first course in CS/IT

I If students love programming, they will have positive attitude towards rest of CS/IT.

(10)

Our goal

Teach programming in a manner that

I Students will want to write programs as a hobby, for fun!

I Whenever students see a problem in real life, they will ask, can I write a program to understand this problem better?

I Programming can help you better understand math, science, engineering.

I Programming can help you explore questions such as “Is this the best way to build a timetable/dam/airport?”

I Students appreciatethe difficulty and beauty in programming.

(11)

Our goal

Teach programming in a manner that

I Students will want to write programs as a hobby, for fun!

I Whenever students see a problem in real life, they will ask, can I write a program to understand this problem better?

I Programming can help you better understand math, science, engineering.

I Programming can help you explore questions such as “Is this the best way to build a timetable/dam/airport?”

I Students appreciatethe difficulty and beauty in programming.

(12)

Our goal

Teach programming in a manner that

I Students will want to write programs as a hobby, for fun!

I Whenever students see a problem in real life, they will ask, can I write a program to understand this problem better?

I Programming can help you better understand math, science, engineering.

I Programming can help you explore questions such as “Is this the best way to build a timetable/dam/airport?”

I Students appreciatethe difficulty and beauty in programming.

(13)

Our goal

Teach programming in a manner that

I Students will want to write programs as a hobby, for fun!

I Whenever students see a problem in real life, they will ask, can I write a program to understand this problem better?

I Programming can help you better understand math, science, engineering.

I Programming can help you explore questions such as “Is this the best way to build a timetable/dam/airport?”

I Students appreciatethe difficulty and beauty in programming.

(14)

Our goal

Teach programming in a manner that

I Students will want to write programs as a hobby, for fun!

I Whenever students see a problem in real life, they will ask, can I write a program to understand this problem better?

I Programming can help you better understand math, science, engineering.

I Programming can help you explore questions such as “Is this the best way to build a timetable/dam/airport?”

I Students appreciatethe difficulty and beauty in programming.

(15)

Our goal

Teach programming in a manner that

I Students will want to write programs as a hobby, for fun!

I Whenever students see a problem in real life, they will ask, can I write a program to understand this problem better?

I Programming can help you better understand math, science, engineering.

I Programming can help you explore questions such as “Is this the best way to build a timetable/dam/airport?”

I Students appreciatethe difficulty and beauty in programming.

(16)

The Book

Available in bookstores Available on-line

(17)

Outline

I The prevailing approach to programming education

I General education principles

I Our approach

I Overview

I Getting to the essence of programming on day 1

I ”Real life” applications within reach of beginners

I About the book

(18)

The prevailing approach to programming education

I Too much emphasis on syntax. Learn language X, then language Y...

Learn just one modern language, but learn it well!

I Nothing exciting happens in the first 3-4 weeks.

I ”It is inevitable because students need to understand compiling, declarations, machine models.”

Do they really?

I One popular book spends the first few chapters on how to print with desired formatting!

I Students dont see any relation between programming and other subjects they study or with their day to day life.

I ”Not enough time”

Better time management and planning needed.

(19)

The prevailing approach to programming education

I Too much emphasis on syntax. Learn language X, then language Y...

Learn just one modern language, but learn it well!

I Nothing exciting happens in the first 3-4 weeks.

I ”It is inevitable because students need to understand compiling, declarations, machine models.”

Do they really?

I One popular book spends the first few chapters on how to print with desired formatting!

I Students dont see any relation between programming and other subjects they study or with their day to day life.

I ”Not enough time”

Better time management and planning needed.

(20)

The prevailing approach to programming education

I Too much emphasis on syntax. Learn language X, then language Y...

Learn just one modern language, but learn it well!

I Nothing exciting happens in the first 3-4 weeks.

I ”It is inevitable because students need to understand compiling, declarations, machine models.”

Do they really?

I One popular book spends the first few chapters on how to print with desired formatting!

I Students dont see any relation between programming and other subjects they study or with their day to day life.

I ”Not enough time”

Better time management and planning needed.

(21)

The prevailing approach to programming education

I Too much emphasis on syntax. Learn language X, then language Y...

Learn just one modern language, but learn it well!

I Nothing exciting happens in the first 3-4 weeks.

I ”It is inevitable because students need to understand compiling, declarations, machine models.”

Do they really?

I One popular book spends the first few chapters on how to print with desired formatting!

I Students dont see any relation between programming and other subjects they study or with their day to day life.

I ”Not enough time”

Better time management and planning needed.

(22)

The prevailing approach to programming education

I Too much emphasis on syntax. Learn language X, then language Y...

Learn just one modern language, but learn it well!

I Nothing exciting happens in the first 3-4 weeks.

I ”It is inevitable because students need to understand compiling, declarations, machine models.”

Do they really?

I One popular book spends the first few chapters on how to print with desired formatting!

I Students dont see any relation between programming and other subjects they study or with their day to day life.

I ”Not enough time”

Better time management and planning needed.

(23)

The prevailing approach to programming education

I Too much emphasis on syntax. Learn language X, then language Y...

Learn just one modern language, but learn it well!

I Nothing exciting happens in the first 3-4 weeks.

I ”It is inevitable because students need to understand compiling, declarations, machine models.”

Do they really?

I One popular book spends the first few chapters on how to print with desired formatting!

I Students dont see any relation between programming and other subjects they study or with their day to day life.

I ”Not enough time”

Better time management and planning needed.

(24)

The prevailing approach to programming education

I Too much emphasis on syntax. Learn language X, then language Y...

Learn just one modern language, but learn it well!

I Nothing exciting happens in the first 3-4 weeks.

I ”It is inevitable because students need to understand compiling, declarations, machine models.”

Do they really?

I One popular book spends the first few chapters on how to print with desired formatting!

I Students dont see any relation between programming and other subjects they study or with their day to day life.

I ”Not enough time”

Better time management and planning needed.

(25)

The prevailing approach to programming education

I Too much emphasis on syntax. Learn language X, then language Y...

Learn just one modern language, but learn it well!

I Nothing exciting happens in the first 3-4 weeks.

I ”It is inevitable because students need to understand compiling, declarations, machine models.”

Do they really?

I One popular book spends the first few chapters on how to print with desired formatting!

I Students dont see any relation between programming and other subjects they study or with their day to day life.

I ”Not enough time”

Better time management and planning needed.

(26)

The prevailing approach to programming education

I Too much emphasis on syntax. Learn language X, then language Y...

Learn just one modern language, but learn it well!

I Nothing exciting happens in the first 3-4 weeks.

I ”It is inevitable because students need to understand compiling, declarations, machine models.”

Do they really?

I One popular book spends the first few chapters on how to print with desired formatting!

I Students dont see any relation between programming and other subjects they study or with their day to day life.

I ”Not enough time”

Better time management and planning needed.

(27)

The prevailing approach to programming education

I Too much emphasis on syntax. Learn language X, then language Y...

Learn just one modern language, but learn it well!

I Nothing exciting happens in the first 3-4 weeks.

I ”It is inevitable because students need to understand compiling, declarations, machine models.”

Do they really?

I One popular book spends the first few chapters on how to print with desired formatting!

I Students dont see any relation between programming and other subjects they study or with their day to day life.

I ”Not enough time”

Better time management and planning needed.

(28)

Some educational principles (1)

Motivations for learning:

I ”I cannot get a degree unless I learn this”

I ”My teacher tells me it will be useful later”

I ”I like it and I see it is useful”

“If you want to build a ship, don’t drum up people together to collect wood and don’t assign them tasks and work, but rather teach them to long for the endless immensity of the sea.”

– Antoine de Saint-Exupery

(29)

Some educational principles (1)

Motivations for learning:

I ”I cannot get a degree unless I learn this”

I ”My teacher tells me it will be useful later”

I ”I like it and I see it is useful”

“If you want to build a ship, don’t drum up people together to collect wood and don’t assign them tasks and work, but rather teach them to long for the endless immensity of the sea.”

– Antoine de Saint-Exupery

(30)

Some educational principles (1)

Motivations for learning:

I ”I cannot get a degree unless I learn this”

I ”My teacher tells me it will be useful later”

I ”I like it and I see it is useful”

“If you want to build a ship, don’t drum up people together to collect wood and don’t assign them tasks and work, but rather teach them to long for the endless immensity of the sea.”

– Antoine de Saint-Exupery

(31)

Some educational principles (1)

Motivations for learning:

I ”I cannot get a degree unless I learn this”

I ”My teacher tells me it will be useful later”

I ”I like it and I see it is useful”

“If you want to build a ship, don’t drum up people together to collect wood and don’t assign them tasks and work, but rather teach them to long for the endless immensity of the sea.”

– Antoine de Saint-Exupery

(32)

Some educational principles (1)

Motivations for learning:

I ”I cannot get a degree unless I learn this”

I ”My teacher tells me it will be useful later”

I ”I like it and I see it is useful”

“If you want to build a ship, don’t drum up people together to collect wood and don’t assign them tasks and work, but rather teach them to long for the endless immensity of the sea.”

– Antoine de Saint-Exupery

(33)

Some educational principles (1)

Motivations for learning:

I ”I cannot get a degree unless I learn this”

I ”My teacher tells me it will be useful later”

I ”I like it and I see it is useful”

“If you want to build a ship, don’t drum up people together to collect wood and don’t assign them tasks and work, but rather teach them to long for the endless immensity of the sea.”

– Antoine de Saint-Exupery

(34)

Some educational principles (2)

How learning is assimilated:

I New learning must be reconciled with prior knowledge.

I Reconciliation can improve quality of both!

I By drawing on prior knowledge, learning can be speeded up. Prior knowledge:

I Mathematics: Arithmetic, algebra, geometry, calculus, statistics.

I Physics: Mechanics, optics, circuit theory.

I General Knowledge: Networks of various kinds: family trees, web pages, transportation networks..

Students should get a taste of the computation in these areas.

(35)

Some educational principles (2)

How learning is assimilated:

I New learning must be reconciled with prior knowledge.

I Reconciliation can improve quality of both!

I By drawing on prior knowledge, learning can be speeded up. Prior knowledge:

I Mathematics: Arithmetic, algebra, geometry, calculus, statistics.

I Physics: Mechanics, optics, circuit theory.

I General Knowledge: Networks of various kinds: family trees, web pages, transportation networks..

Students should get a taste of the computation in these areas.

(36)

Some educational principles (2)

How learning is assimilated:

I New learning must be reconciled with prior knowledge.

I Reconciliation can improve quality of both!

I By drawing on prior knowledge, learning can be speeded up. Prior knowledge:

I Mathematics: Arithmetic, algebra, geometry, calculus, statistics.

I Physics: Mechanics, optics, circuit theory.

I General Knowledge: Networks of various kinds: family trees, web pages, transportation networks..

Students should get a taste of the computation in these areas.

(37)

Some educational principles (2)

How learning is assimilated:

I New learning must be reconciled with prior knowledge.

I Reconciliation can improve quality of both!

I By drawing on prior knowledge, learning can be speeded up. Prior knowledge:

I Mathematics: Arithmetic, algebra, geometry, calculus, statistics.

I Physics: Mechanics, optics, circuit theory.

I General Knowledge: Networks of various kinds: family trees, web pages, transportation networks..

Students should get a taste of the computation in these areas.

(38)

Some educational principles (2)

How learning is assimilated:

I New learning must be reconciled with prior knowledge.

I Reconciliation can improve quality of both!

I By drawing on prior knowledge, learning can be speeded up.

Prior knowledge:

I Mathematics: Arithmetic, algebra, geometry, calculus, statistics.

I Physics: Mechanics, optics, circuit theory.

I General Knowledge: Networks of various kinds: family trees, web pages, transportation networks..

Students should get a taste of the computation in these areas.

(39)

Some educational principles (2)

How learning is assimilated:

I New learning must be reconciled with prior knowledge.

I Reconciliation can improve quality of both!

I By drawing on prior knowledge, learning can be speeded up.

Prior knowledge:

I Mathematics: Arithmetic, algebra, geometry, calculus, statistics.

I Physics: Mechanics, optics, circuit theory.

I General Knowledge: Networks of various kinds: family trees, web pages, transportation networks..

Students should get a taste of the computation in these areas.

(40)

Some educational principles (2)

How learning is assimilated:

I New learning must be reconciled with prior knowledge.

I Reconciliation can improve quality of both!

I By drawing on prior knowledge, learning can be speeded up.

Prior knowledge:

I Mathematics: Arithmetic, algebra, geometry, calculus, statistics.

I Physics: Mechanics, optics, circuit theory.

I General Knowledge: Networks of various kinds: family trees, web pages, transportation networks..

Students should get a taste of the computation in these areas.

(41)

Some educational principles (2)

How learning is assimilated:

I New learning must be reconciled with prior knowledge.

I Reconciliation can improve quality of both!

I By drawing on prior knowledge, learning can be speeded up.

Prior knowledge:

I Mathematics: Arithmetic, algebra, geometry, calculus, statistics.

I Physics: Mechanics, optics, circuit theory.

I General Knowledge: Networks of various kinds: family trees, web pages, transportation networks..

Students should get a taste of the computation in these areas.

(42)

Some educational principles (2)

How learning is assimilated:

I New learning must be reconciled with prior knowledge.

I Reconciliation can improve quality of both!

I By drawing on prior knowledge, learning can be speeded up.

Prior knowledge:

I Mathematics: Arithmetic, algebra, geometry, calculus, statistics.

I Physics: Mechanics, optics, circuit theory.

I General Knowledge: Networks of various kinds: family trees, web pages, transportation networks..

Students should get a taste of the computation in these areas.

(43)

Some educational principles (2)

How learning is assimilated:

I New learning must be reconciled with prior knowledge.

I Reconciliation can improve quality of both!

I By drawing on prior knowledge, learning can be speeded up.

Prior knowledge:

I Mathematics: Arithmetic, algebra, geometry, calculus, statistics.

I Physics: Mechanics, optics, circuit theory.

I General Knowledge: Networks of various kinds: family trees, web pages, transportation networks..

Students should get a taste of the computation in these areas.

(44)

Some educational principles (3)

Any subject = Principles or Essence + Details

Details must be taught, but they must not overwhelm the principles/essensce.

What is the essence of computer programming?

(45)

Some educational principles (3)

Any subject = Principles or Essence + Details

Details must be taught, but they must not overwhelm the principles/essensce.

What is the essence of computer programming?

(46)

Some educational principles (3)

Any subject = Principles or Essence + Details

Details must be taught, but they must not overwhelm the principles/essensce.

What is the essence of computer programming?

(47)

Some educational principles (3)

Any subject = Principles or Essence + Details

Details must be taught, but they must not overwhelm the principles/essensce.

What is the essence of computer programming?

(48)

Some educational principles (4)

How learning happens:

”I hear and I forget. I see and I remember. I do and I understand.” – Confucious

I Pictures are important. Animations even more so. Even more interesting if the student herself does the animation.

I Doing and experiencing is more important than dry theory.

(49)

Some educational principles (4)

How learning happens:

”I hear and I forget. I see and I remember. I do and I understand.” – Confucious

I Pictures are important. Animations even more so. Even more interesting if the student herself does the animation.

I Doing and experiencing is more important than dry theory.

(50)

Some educational principles (4)

How learning happens:

”I hear and I forget. I see and I remember. I do and I understand.”

– Confucious

I Pictures are important. Animations even more so. Even more interesting if the student herself does the animation.

I Doing and experiencing is more important than dry theory.

(51)

Some educational principles (4)

How learning happens:

”I hear and I forget. I see and I remember. I do and I understand.”

– Confucious

I Pictures are important. Animations even more so. Even more interesting if the student herself does the animation.

I Doing and experiencing is more important than dry theory.

(52)

Some educational principles (4)

How learning happens:

”I hear and I forget. I see and I remember. I do and I understand.”

– Confucious

I Pictures are important. Animations even more so. Even more interesting if the student herself does the animation.

I Doing and experiencing is more important than dry theory.

(53)

Our approach: main theses

The essence of programmingis to understand the pattern of the computation and express it using the appropriate language construct.

Language learning is relatively easy if there is the opportunity to use what is learnt in a realistic setting. Language learning is boring, and even difficult/stressful, if the only goal is to memorize, and there is no opportunity for use.

Useprogramming examples from math and science, and even fun and art, to have synergy with the prior knowledge, and career goals of our students.

In the era of cellphones,graphical input and output are very important if the students are to take us seriously. Graphics is important also for science and math visualization.

Learning toreason about and talk about programs, formally and informally, is important.

(54)

Our approach: main theses

The essence of programmingis to understand the pattern of the computation and express it using the appropriate language construct.

Language learning is relatively easy if there is the opportunity to use what is learnt in a realistic setting. Language learning is boring, and even difficult/stressful, if the only goal is to memorize, and there is no opportunity for use.

Useprogramming examples from math and science, and even fun and art, to have synergy with the prior knowledge, and career goals of our students.

In the era of cellphones,graphical input and output are very important if the students are to take us seriously. Graphics is important also for science and math visualization.

Learning toreason about and talk about programs, formally and informally, is important.

(55)

Our approach: main theses

The essence of programmingis to understand the pattern of the computation and express it using the appropriate language construct.

Language learning is relatively easy if there is the opportunity to use what is learnt in a realistic setting. Language learning is boring, and even difficult/stressful, if the only goal is to memorize, and there is no opportunity for use.

Useprogramming examples from math and science, and even fun and art, to have synergy with the prior knowledge, and career goals of our students.

In the era of cellphones,graphical input and output are very important if the students are to take us seriously. Graphics is important also for science and math visualization.

Learning toreason about and talk about programs, formally and informally, is important.

(56)

Our approach: main theses

The essence of programmingis to understand the pattern of the computation and express it using the appropriate language construct.

Language learning is relatively easy if there is the opportunity to use what is learnt in a realistic setting. Language learning is boring, and even difficult/stressful, if the only goal is to memorize, and there is no opportunity for use.

Useprogramming examples from math and science, and even fun and art, to have synergy with the prior knowledge, and career goals of our students.

In the era of cellphones,graphical input and output are very important if the students are to take us seriously. Graphics is important also for science and math visualization.

Learning toreason about and talk about programs, formally and informally, is important.

(57)

Our approach: main theses

The essence of programmingis to understand the pattern of the computation and express it using the appropriate language construct.

Language learning is relatively easy if there is the opportunity to use what is learnt in a realistic setting. Language learning is boring, and even difficult/stressful, if the only goal is to memorize, and there is no opportunity for use.

Useprogramming examples from math and science, and even fun and art, to have synergy with the prior knowledge, and career goals of our students.

In the era of cellphones,graphical input and output are very important if the students are to take us seriously. Graphics is important also for science and math visualization.

Learning toreason about and talk about programs, formally and informally, is important.

(58)

Our approach: main theses

The essence of programmingis to understand the pattern of the computation and express it using the appropriate language construct.

Language learning is relatively easy if there is the opportunity to use what is learnt in a realistic setting. Language learning is boring, and even difficult/stressful, if the only goal is to memorize, and there is no opportunity for use.

Useprogramming examples from math and science, and even fun and art, to have synergy with the prior knowledge, and career goals of our students.

In the era of cellphones,graphical input and output are very important if the students are to take us seriously. Graphics is important also for science and math visualization.

Learning toreason about and talk about programs, formally and informally, is important.

(59)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct. Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ... A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(60)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct. Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ... A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(61)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct. Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ... A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(62)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct. Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ... A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(63)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct.

Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ... A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(64)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct.

Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ... A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(65)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct.

Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ...

A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(66)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct.

Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ...

A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(67)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct.

Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ...

A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(68)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct.

Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ...

A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(69)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct.

Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ...

A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(70)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct.

Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ...

A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(71)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct.

Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ...

A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(72)

Our approach: implementation

Realistic application driven language learning:

I ”Consider problem X. X cannot be solved using what you know so far. So we will learn a language construct.”

I For every language construct, e.g. loops, functions, arrays, OOP, we discuss many detailed realistic applications.

I Formal and informal reasoning about each language construct.

Programming applications from many areas:

I Math, engineering, art, logistics, ... games, fun ...

A teaching tool: Simplecpp

I Turtle graphics, Coordinate based 2D graphics

I Graphical input, Elementary animation

I Very easy to use; “alternative to<iostream>”

I Appropriate for the era of touch screens and cell phones

I Useful for illustrating recursion, classes, ...

I “New statement”: repeat

(73)

Choice of Language: Pick C++ over C

String processing: C++ string class is much safer than null

terminated char arrays of C. Possibility of many bugs is eliminated. Initialization: By using constructors, proper initialization can be forced in C++. Less danger of forgetting.

Standard (Template) library: provides many features that you want, e.g. lists, priority queues, sorting. Also customizable algorithms, e.g. sorting.

Dynamic memory management: Reduce bugs by using standard idioms. Even better: avoid entirely by using standard library. Object oriented features: Encapsulation, inheritance, polymorphism indeed make it easier and safer to write and extend programs. Even without object orientation, teach C++ rather than C.

(74)

Choice of Language: Pick C++ over C

String processing: C++ string class is much safer than null

terminated char arrays of C. Possibility of many bugs is eliminated.

Initialization: By using constructors, proper initialization can be forced in C++. Less danger of forgetting.

Standard (Template) library: provides many features that you want, e.g. lists, priority queues, sorting. Also customizable algorithms, e.g. sorting.

Dynamic memory management: Reduce bugs by using standard idioms. Even better: avoid entirely by using standard library. Object oriented features: Encapsulation, inheritance, polymorphism indeed make it easier and safer to write and extend programs. Even without object orientation, teach C++ rather than C.

(75)

Choice of Language: Pick C++ over C

String processing: C++ string class is much safer than null

terminated char arrays of C. Possibility of many bugs is eliminated.

Initialization: By using constructors, proper initialization can be forced in C++. Less danger of forgetting.

Standard (Template) library: provides many features that you want, e.g. lists, priority queues, sorting. Also customizable algorithms, e.g. sorting.

Dynamic memory management: Reduce bugs by using standard idioms. Even better: avoid entirely by using standard library. Object oriented features: Encapsulation, inheritance, polymorphism indeed make it easier and safer to write and extend programs. Even without object orientation, teach C++ rather than C.

(76)

Choice of Language: Pick C++ over C

String processing: C++ string class is much safer than null

terminated char arrays of C. Possibility of many bugs is eliminated.

Initialization: By using constructors, proper initialization can be forced in C++. Less danger of forgetting.

Standard (Template) library: provides many features that you want, e.g. lists, priority queues, sorting. Also customizable algorithms, e.g. sorting.

Dynamic memory management: Reduce bugs by using standard idioms. Even better: avoid entirely by using standard library. Object oriented features: Encapsulation, inheritance, polymorphism indeed make it easier and safer to write and extend programs. Even without object orientation, teach C++ rather than C.

(77)

Choice of Language: Pick C++ over C

String processing: C++ string class is much safer than null

terminated char arrays of C. Possibility of many bugs is eliminated.

Initialization: By using constructors, proper initialization can be forced in C++. Less danger of forgetting.

Standard (Template) library: provides many features that you want, e.g. lists, priority queues, sorting. Also customizable algorithms, e.g. sorting.

Dynamic memory management: Reduce bugs by using standard idioms. Even better: avoid entirely by using standard library.

Object oriented features: Encapsulation, inheritance, polymorphism indeed make it easier and safer to write and extend programs. Even without object orientation, teach C++ rather than C.

(78)

Choice of Language: Pick C++ over C

String processing: C++ string class is much safer than null

terminated char arrays of C. Possibility of many bugs is eliminated.

Initialization: By using constructors, proper initialization can be forced in C++. Less danger of forgetting.

Standard (Template) library: provides many features that you want, e.g. lists, priority queues, sorting. Also customizable algorithms, e.g. sorting.

Dynamic memory management: Reduce bugs by using standard idioms. Even better: avoid entirely by using standard library.

Object oriented features: Encapsulation, inheritance, polymorphism indeed make it easier and safer to write and extend programs.

Even without object orientation, teach C++ rather than C.

(79)

Choice of Language: Pick C++ over C

String processing: C++ string class is much safer than null

terminated char arrays of C. Possibility of many bugs is eliminated.

Initialization: By using constructors, proper initialization can be forced in C++. Less danger of forgetting.

Standard (Template) library: provides many features that you want, e.g. lists, priority queues, sorting. Also customizable algorithms, e.g. sorting.

Dynamic memory management: Reduce bugs by using standard idioms. Even better: avoid entirely by using standard library.

Object oriented features: Encapsulation, inheritance, polymorphism indeed make it easier and safer to write and extend programs.

Even without object orientation, teach C++ rather than C.

(80)

Getting to the essence of programming on day 1

Introduction using ”Turtle Geometry”:

Invented in 1960s by Seymour Pappert, as part of the Logo programming language for teaching programming tochildren. Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has apen, which draws on the screen as the turtle moves. Goal of turtle graphics: Draw interesting pictures on the screen.

(81)

Getting to the essence of programming on day 1

Introduction using ”Turtle Geometry”:

Invented in 1960s by Seymour Pappert, as part of the Logo programming language for teaching programming tochildren. Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has apen, which draws on the screen as the turtle moves. Goal of turtle graphics: Draw interesting pictures on the screen.

(82)

Getting to the essence of programming on day 1

Introduction using ”Turtle Geometry”:

Invented in 1960s by Seymour Pappert, as part of the Logo programming language for teaching programming tochildren.

Turtle: a symbolic animal that lives on the screen. Moves as per commands issued by the program.

Has apen, which draws on the screen as the turtle moves. Goal of turtle graphics: Draw interesting pictures on the screen.

(83)

Getting to the essence of programming on day 1

Introduction using ”Turtle Geometry”:

Invented in 1960s by Seymour Pappert, as part of the Logo programming language for teaching programming tochildren.

Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has apen, which draws on the screen as the turtle moves. Goal of turtle graphics: Draw interesting pictures on the screen.

(84)

Getting to the essence of programming on day 1

Introduction using ”Turtle Geometry”:

Invented in 1960s by Seymour Pappert, as part of the Logo programming language for teaching programming tochildren.

Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has apen, which draws on the screen as the turtle moves. Goal of turtle graphics: Draw interesting pictures on the screen.

(85)

Getting to the essence of programming on day 1

Introduction using ”Turtle Geometry”:

Invented in 1960s by Seymour Pappert, as part of the Logo programming language for teaching programming tochildren.

Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has apen, which draws on the screen as the turtle moves.

Goal of turtle graphics: Draw interesting pictures on the screen.

(86)

Getting to the essence of programming on day 1

Introduction using ”Turtle Geometry”:

Invented in 1960s by Seymour Pappert, as part of the Logo programming language for teaching programming tochildren.

Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has apen, which draws on the screen as the turtle moves.

Goal of turtle graphics: Draw interesting pictures on the screen.

(87)

A simple program fragment

turtleSim(); // Start turtle graphics forward(100);

right(90);

forward(100);

right(90);

forward(100);

right(90);

forward(100);

What does this draw?

This program can be discussed in the first lecture.

(88)

A simple program fragment

turtleSim(); // Start turtle graphics forward(100);

right(90);

forward(100);

right(90);

forward(100);

right(90);

forward(100);

What does this draw?

This program can be discussed in the first lecture.

(89)

A simple program fragment

turtleSim(); // Start turtle graphics forward(100);

right(90);

forward(100);

right(90);

forward(100);

right(90);

forward(100);

What does this draw?

This program can be discussed in the first lecture.

(90)

The real day 1 program

#include <simplecpp>

main_program{

turtleSim();

forward(100); wait(0.5); right(90); wait(0.5);

forward(100); wait(0.5); right(90); wait(0.5);

forward(100); wait(0.5); right(90); wait(0.5);

forward(100);

wait(5);

}

I <simplecpp>: For graphics functionality. Also includes “using namespace std;”, and <iostream>.

I Students must eventually understand namespaces, iostreams, int main, but not on day 1.

I main program: C++ preprocessor macro. Automatically gets translated to int main()

I wait : So that we have time to see..

(91)

The real day 1 program

#include <simplecpp>

main_program{

turtleSim();

forward(100); wait(0.5); right(90); wait(0.5);

forward(100); wait(0.5); right(90); wait(0.5);

forward(100); wait(0.5); right(90); wait(0.5);

forward(100);

wait(5);

}

I <simplecpp>: For graphics functionality. Also includes “using namespace std;”, and <iostream>.

I Students must eventually understand namespaces, iostreams, int main, but not on day 1.

I main program: C++ preprocessor macro. Automatically gets translated to int main()

I wait : So that we have time to see..

(92)

The real day 1 program

#include <simplecpp>

main_program{

turtleSim();

forward(100); wait(0.5); right(90); wait(0.5);

forward(100); wait(0.5); right(90); wait(0.5);

forward(100); wait(0.5); right(90); wait(0.5);

forward(100);

wait(5);

}

I <simplecpp>: For graphics functionality. Also includes “using namespace std;”, and <iostream>.

I Students must eventually understand namespaces, iostreams, int main, but not on day 1.

I main program: C++ preprocessor macro. Automatically gets translated to int main()

I wait : So that we have time to see..

(93)

The real day 1 program

#include <simplecpp>

main_program{

turtleSim();

forward(100); wait(0.5); right(90); wait(0.5);

forward(100); wait(0.5); right(90); wait(0.5);

forward(100); wait(0.5); right(90); wait(0.5);

forward(100);

wait(5);

}

I <simplecpp>: For graphics functionality. Also includes “using namespace std;”, and <iostream>.

I Students must eventually understand namespaces, iostreams, int main, but not on day 1.

I main program: C++ preprocessor macro. Automatically gets translated to int main()

I wait : So that we have time to see..

(94)

The real day 1 program

#include <simplecpp>

main_program{

turtleSim();

forward(100); wait(0.5); right(90); wait(0.5);

forward(100); wait(0.5); right(90); wait(0.5);

forward(100); wait(0.5); right(90); wait(0.5);

forward(100);

wait(5);

}

I <simplecpp>: For graphics functionality. Also includes “using namespace std;”, and <iostream>.

I Students must eventually understand namespaces, iostreams, int main, but not on day 1.

I main program: C++ preprocessor macro. Automatically gets translated to int main()

I wait : So that we have time to see..

(95)

The second program for day 1

#include <simplecpp>

main_program{

turtleSim();

repeat(4){

forward(100); right(90);

} }

“New statement”: repeat

repeat (count) { statements to be repeated }

Introduced to enable interesting programs from day 1. Students understand it instantly.

Implemented using C++ macros. Students can be told later.

(96)

The second program for day 1

#include <simplecpp>

main_program{

turtleSim();

repeat(4){

forward(100); right(90);

} }

“New statement”: repeat

repeat (count) { statements to be repeated }

Introduced to enable interesting programs from day 1. Students understand it instantly.

Implemented using C++ macros. Students can be told later.

(97)

The second program for day 1

#include <simplecpp>

main_program{

turtleSim();

repeat(4){

forward(100); right(90);

} }

“New statement”: repeat

repeat (count) { statements to be repeated }

Introduced to enable interesting programs from day 1.

Students understand it instantly.

Implemented using C++ macros. Students can be told later.

(98)

The second program for day 1

#include <simplecpp>

main_program{

turtleSim();

repeat(4){

forward(100); right(90);

} }

“New statement”: repeat

repeat (count) { statements to be repeated }

Introduced to enable interesting programs from day 1.

Students understand it instantly.

Implemented using C++ macros. Students can be told later.

(99)

The second program for day 1

#include <simplecpp>

main_program{

turtleSim();

repeat(4){

forward(100); right(90);

} }

“New statement”: repeat

repeat (count) { statements to be repeated }

Introduced to enable interesting programs from day 1.

Students understand it instantly.

Implemented using C++ macros. Students can be told later.

(100)

Another day 1 program

main_program{

turtleSim();

repeat(10){

repeat(4){

forward(100); right(90);

}

right(10);

}

wait(10);

}

“What do you think it does?”

This is what I ask students. Most figure it out! Why? Because it is an interesting challenge!

(101)

Another day 1 program

main_program{

turtleSim();

repeat(10){

repeat(4){

forward(100); right(90);

}

right(10);

}

wait(10);

}

“What do you think it does?”

This is what I ask students. Most figure it out! Why? Because it is an interesting challenge!

(102)

Another day 1 program

main_program{

turtleSim();

repeat(10){

repeat(4){

forward(100); right(90);

}

right(10);

}

wait(10);

}

“What do you think it does?”

This is what I ask students. Most figure it out!

Why? Because it is an interesting challenge!

(103)

Another day 1 program

main_program{

turtleSim();

repeat(10){

repeat(4){

forward(100); right(90);

}

right(10);

}

wait(10);

}

“What do you think it does?”

This is what I ask students. Most figure it out!

Why? Because it is an interesting challenge!

References

Related documents

But you will learn enough basic principles of programming to enable you to learn to program in different environment relatively easily..?. So Let's

Trust, confidence, role models Same as what runs community services!.. What runs the

I understand that I am being asked to participate in a research study conducted by Mr.Allwyn Prem Raj.P, Msc (N) student of Omayal Achi College of Nursing. This research study

Temporal consistency maintenance can be described as a real-time scheduling problem: Given m transactions (or tasks) with computation time (C i ) and validity interval constraint ( V

Apply computer science principles and practices to a real-world problem; demonstrate in- depth knowledge in the area of the project they have undertaken; solve problems

Apply computer science principles and practices to a real-world problem; demonstrate in- depth knowledge in the area of the project they have undertaken; solve problems

(d) A 'Compensatory Afforestation Fund' shall be created in which all the monies received from the user-agencies towards compensatory

Results indicated that Ruksha samples have higher antioxidant potential and can better protect the erythrocytes from oxidative damage with more protein and