an approach to introductory programmingranade/simplecpp/101x.pdf · what should you teach in an...

151
An approach to introductory programming Abhiram Ranade April 21, 2014

Upload: others

Post on 30-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

An approach to introductory programming

Abhiram Ranade

April 21, 2014

Page 2: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What should you teach in an introductory programmingcourse?

Some simple answers...

1. Teach programming language syntax

2. Teach how to design programs

Is there more?

Page 3: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What should you teach in an introductory programmingcourse?

Some simple answers...

1. Teach programming language syntax

2. Teach how to design programs

Is there more?

Page 4: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What should you teach in an introductory programmingcourse?

Some simple answers...

1. Teach programming language syntax

2. Teach how to design programs

Is there more?

Page 5: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some questions we must ask from time to time..

I Is the nature of programming changing as a subject?

Programming is becoming more pervasive. Phones, cars,vacuum cleaners, cameras, all contain processors

Computational ideas are appearing everywhere: biologicalevolution, social phenomenon, understanding text...

I Is the nature of students changing?

Students have many distractions: cellphones/media, financejobs, IAS aspirations..

Attention span of students is small:

You have to work hard to get their attention, and work harderto hold it..

Page 6: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some questions we must ask from time to time..

I Is the nature of programming changing as a subject?

Programming is becoming more pervasive. Phones, cars,vacuum cleaners, cameras, all contain processors

Computational ideas are appearing everywhere: biologicalevolution, social phenomenon, understanding text...

I Is the nature of students changing?

Students have many distractions: cellphones/media, financejobs, IAS aspirations..

Attention span of students is small:

You have to work hard to get their attention, and work harderto hold it..

Page 7: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some questions we must ask from time to time..

I Is the nature of programming changing as a subject?

Programming is becoming more pervasive. Phones, cars,vacuum cleaners, cameras, all contain processors

Computational ideas are appearing everywhere: biologicalevolution, social phenomenon, understanding text...

I Is the nature of students changing?

Students have many distractions: cellphones/media, financejobs, IAS aspirations..

Attention span of students is small:

You have to work hard to get their attention, and work harderto hold it..

Page 8: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some questions we must ask from time to time..

I Is the nature of programming changing as a subject?

Programming is becoming more pervasive. Phones, cars,vacuum cleaners, cameras, all contain processors

Computational ideas are appearing everywhere: biologicalevolution, social phenomenon, understanding text...

I Is the nature of students changing?

Students have many distractions: cellphones/media, financejobs, IAS aspirations..

Attention span of students is small:

You have to work hard to get their attention, and work harderto hold it..

Page 9: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some questions we must ask from time to time..

I Is the nature of programming changing as a subject?

Programming is becoming more pervasive. Phones, cars,vacuum cleaners, cameras, all contain processors

Computational ideas are appearing everywhere: biologicalevolution, social phenomenon, understanding text...

I Is the nature of students changing?

Students have many distractions: cellphones/media, financejobs, IAS aspirations..

Attention span of students is small:

You have to work hard to get their attention, and work harderto hold it..

Page 10: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some questions we must ask from time to time..

I Is the nature of programming changing as a subject?

Programming is becoming more pervasive. Phones, cars,vacuum cleaners, cameras, all contain processors

Computational ideas are appearing everywhere: biologicalevolution, social phenomenon, understanding text...

I Is the nature of students changing?

Students have many distractions: cellphones/media, financejobs, IAS aspirations..

Attention span of students is small:

You have to work hard to get their attention, and work harderto hold it..

Page 11: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some questions we must ask from time to time..

I Is the nature of programming changing as a subject?

Programming is becoming more pervasive. Phones, cars,vacuum cleaners, cameras, all contain processors

Computational ideas are appearing everywhere: biologicalevolution, social phenomenon, understanding text...

I Is the nature of students changing?

Students have many distractions: cellphones/media, financejobs, IAS aspirations..

Attention span of students is small:

You have to work hard to get their attention, and work harderto hold it..

Page 12: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some questions we must ask from time to time..

I Is the nature of programming changing as a subject?

Programming is becoming more pervasive. Phones, cars,vacuum cleaners, cameras, all contain processors

Computational ideas are appearing everywhere: biologicalevolution, social phenomenon, understanding text...

I Is the nature of students changing?

Students have many distractions: cellphones/media, financejobs, IAS aspirations..

Attention span of students is small:

You have to work hard to get their attention, and work harderto hold it..

Page 13: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some strategic measures

I Take programming examples from different domains: science,technology, art, ... to excite wider range of students

I Standard approach: programming examples drawn from basicnumerical processing and text processing.

I May not interest all students, say those not majoring in CS.

I Use graphical input and output, not just text input output.I Natural medium of communication, in the era of video games

and touch screen based cell phones.I Many interesting programming examples can be attempted,

with very little effort.

Empowerment and excitement

Page 14: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some strategic measures

I Take programming examples from different domains: science,technology, art, ... to excite wider range of students

I Standard approach: programming examples drawn from basicnumerical processing and text processing.

I May not interest all students, say those not majoring in CS.

I Use graphical input and output, not just text input output.I Natural medium of communication, in the era of video games

and touch screen based cell phones.I Many interesting programming examples can be attempted,

with very little effort.

Empowerment and excitement

Page 15: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some strategic measures

I Take programming examples from different domains: science,technology, art, ... to excite wider range of students

I Standard approach: programming examples drawn from basicnumerical processing and text processing.

I May not interest all students, say those not majoring in CS.

I Use graphical input and output, not just text input output.I Natural medium of communication, in the era of video games

and touch screen based cell phones.I Many interesting programming examples can be attempted,

with very little effort.

Empowerment and excitement

Page 16: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some strategic measures

I Take programming examples from different domains: science,technology, art, ... to excite wider range of students

I Standard approach: programming examples drawn from basicnumerical processing and text processing.

I May not interest all students, say those not majoring in CS.

I Use graphical input and output, not just text input output.I Natural medium of communication, in the era of video games

and touch screen based cell phones.I Many interesting programming examples can be attempted,

with very little effort.

Empowerment and excitement

Page 17: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some strategic measures

I Take programming examples from different domains: science,technology, art, ... to excite wider range of students

I Standard approach: programming examples drawn from basicnumerical processing and text processing.

I May not interest all students, say those not majoring in CS.

I Use graphical input and output, not just text input output.

I Natural medium of communication, in the era of video gamesand touch screen based cell phones.

I Many interesting programming examples can be attempted,with very little effort.

Empowerment and excitement

Page 18: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some strategic measures

I Take programming examples from different domains: science,technology, art, ... to excite wider range of students

I Standard approach: programming examples drawn from basicnumerical processing and text processing.

I May not interest all students, say those not majoring in CS.

I Use graphical input and output, not just text input output.I Natural medium of communication, in the era of video games

and touch screen based cell phones.

I Many interesting programming examples can be attempted,with very little effort.

Empowerment and excitement

Page 19: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some strategic measures

I Take programming examples from different domains: science,technology, art, ... to excite wider range of students

I Standard approach: programming examples drawn from basicnumerical processing and text processing.

I May not interest all students, say those not majoring in CS.

I Use graphical input and output, not just text input output.I Natural medium of communication, in the era of video games

and touch screen based cell phones.I Many interesting programming examples can be attempted,

with very little effort.

Empowerment and excitement

Page 20: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some strategic measures

I Take programming examples from different domains: science,technology, art, ... to excite wider range of students

I Standard approach: programming examples drawn from basicnumerical processing and text processing.

I May not interest all students, say those not majoring in CS.

I Use graphical input and output, not just text input output.I Natural medium of communication, in the era of video games

and touch screen based cell phones.I Many interesting programming examples can be attempted,

with very little effort.

Empowerment and excitement

Page 21: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Grab students’ attention on day 1 and hold it

I Grabbing attention:I Honestly try to SELL computer programming as an exciting

and important activity in the first lecture.I Give demonstrations of good programs, especially the programs

that students might be able to write by the end of the course.

I Holding attention:I Arrange your material so that interesting exercises are possible

from day 1. Do not lose the tempo!

Page 22: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Grab students’ attention on day 1 and hold it

I Grabbing attention:

I Honestly try to SELL computer programming as an excitingand important activity in the first lecture.

I Give demonstrations of good programs, especially the programsthat students might be able to write by the end of the course.

I Holding attention:I Arrange your material so that interesting exercises are possible

from day 1. Do not lose the tempo!

Page 23: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Grab students’ attention on day 1 and hold it

I Grabbing attention:I Honestly try to SELL computer programming as an exciting

and important activity in the first lecture.

I Give demonstrations of good programs, especially the programsthat students might be able to write by the end of the course.

I Holding attention:I Arrange your material so that interesting exercises are possible

from day 1. Do not lose the tempo!

Page 24: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Grab students’ attention on day 1 and hold it

I Grabbing attention:I Honestly try to SELL computer programming as an exciting

and important activity in the first lecture.I Give demonstrations of good programs, especially the programs

that students might be able to write by the end of the course.

I Holding attention:I Arrange your material so that interesting exercises are possible

from day 1. Do not lose the tempo!

Page 25: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Grab students’ attention on day 1 and hold it

I Grabbing attention:I Honestly try to SELL computer programming as an exciting

and important activity in the first lecture.I Give demonstrations of good programs, especially the programs

that students might be able to write by the end of the course.

I Holding attention:

I Arrange your material so that interesting exercises are possiblefrom day 1. Do not lose the tempo!

Page 26: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Grab students’ attention on day 1 and hold it

I Grabbing attention:I Honestly try to SELL computer programming as an exciting

and important activity in the first lecture.I Give demonstrations of good programs, especially the programs

that students might be able to write by the end of the course.

I Holding attention:I Arrange your material so that interesting exercises are possible

from day 1. Do not lose the tempo!

Page 27: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

The approach followed in the book

I Take programming examples from different areas: math,engineering, art, operations research, ...

I A teaching tool: Simplecpp

Main element of Simplecpp: 2D graphics library

I Turtle graphicsI Coordinate based graphicsI Elementary animationI Elementary graphical inputI Very easy to use; “alternative to <iostream>”

Additional elementsI “New statement”: main programI “New statement”: repeat

I A general pedagogical principle: find and work out convincingreal examples of anything you want to teach.

Page 28: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

The approach followed in the book

I Take programming examples from different areas: math,engineering, art, operations research, ...

I A teaching tool: Simplecpp

Main element of Simplecpp: 2D graphics library

I Turtle graphicsI Coordinate based graphicsI Elementary animationI Elementary graphical inputI Very easy to use; “alternative to <iostream>”

Additional elementsI “New statement”: main programI “New statement”: repeat

I A general pedagogical principle: find and work out convincingreal examples of anything you want to teach.

Page 29: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

The approach followed in the book

I Take programming examples from different areas: math,engineering, art, operations research, ...

I A teaching tool: Simplecpp

Main element of Simplecpp: 2D graphics library

I Turtle graphicsI Coordinate based graphicsI Elementary animationI Elementary graphical inputI Very easy to use; “alternative to <iostream>”

Additional elementsI “New statement”: main programI “New statement”: repeat

I A general pedagogical principle: find and work out convincingreal examples of anything you want to teach.

Page 30: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

The approach followed in the book

I Take programming examples from different areas: math,engineering, art, operations research, ...

I A teaching tool: Simplecpp

Main element of Simplecpp: 2D graphics library

I Turtle graphicsI Coordinate based graphicsI Elementary animationI Elementary graphical input

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

Additional elementsI “New statement”: main programI “New statement”: repeat

I A general pedagogical principle: find and work out convincingreal examples of anything you want to teach.

Page 31: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

The approach followed in the book

I Take programming examples from different areas: math,engineering, art, operations research, ...

I A teaching tool: Simplecpp

Main element of Simplecpp: 2D graphics library

I Turtle graphicsI Coordinate based graphicsI Elementary animationI Elementary graphical inputI Very easy to use; “alternative to <iostream>”

Additional elementsI “New statement”: main programI “New statement”: repeat

I A general pedagogical principle: find and work out convincingreal examples of anything you want to teach.

Page 32: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

The approach followed in the book

I Take programming examples from different areas: math,engineering, art, operations research, ...

I A teaching tool: Simplecpp

Main element of Simplecpp: 2D graphics library

I Turtle graphicsI Coordinate based graphicsI Elementary animationI Elementary graphical inputI Very easy to use; “alternative to <iostream>”

Additional elementsI “New statement”: main programI “New statement”: repeat

I A general pedagogical principle: find and work out convincingreal examples of anything you want to teach.

Page 33: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

The approach followed in the book

I Take programming examples from different areas: math,engineering, art, operations research, ...

I A teaching tool: Simplecpp

Main element of Simplecpp: 2D graphics library

I Turtle graphicsI Coordinate based graphicsI Elementary animationI Elementary graphical inputI Very easy to use; “alternative to <iostream>”

Additional elementsI “New statement”: main programI “New statement”: repeat

I A general pedagogical principle: find and work out convincingreal examples of anything you want to teach.

Page 34: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Outline

I Turtle graphicsI Introduced in lecture 1 of the courseI main program and repeat

I Coordinate based graphics

I Recursion using graphicsI Other issues

I Program design vis-a-vis algorithm design.I Object oriented programmingI Software engineeringI Standard library

I Concluding remarks

I Demos

Page 35: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Turtle graphics

Invented in 1960s by Seymour Pappert, as part of the Logoprogramming language for teaching programming to children.

Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has a pen, which draws on the screen as the turtle moves.

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

Page 36: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Turtle graphics

Invented in 1960s by Seymour Pappert, as part of the Logoprogramming language for teaching programming to children.

Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has a pen, which draws on the screen as the turtle moves.

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

Page 37: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Turtle graphics

Invented in 1960s by Seymour Pappert, as part of the Logoprogramming language for teaching programming to children.

Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has a pen, which draws on the screen as the turtle moves.

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

Page 38: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Turtle graphics

Invented in 1960s by Seymour Pappert, as part of the Logoprogramming language for teaching programming to children.

Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has a pen, which draws on the screen as the turtle moves.

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

Page 39: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Turtle graphics

Invented in 1960s by Seymour Pappert, as part of the Logoprogramming language for teaching programming to children.

Turtle: a symbolic animal that lives on the screen.

Moves as per commands issued by the program.

Has a pen, which draws on the screen as the turtle moves.

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

Page 40: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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.

Page 41: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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.

Page 42: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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.

Page 43: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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>: includes graphics functionality. Also includes“using namespace std;”, and <iostream>.

I main program: No need to explain int main().I Students must eventually understand namespaces, iostreams,

int main, but not on day 1.I main program is a C++ preprocessor macro, so it

automatically gets translated to int main()

Page 44: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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>: includes graphics functionality. Also includes“using namespace std;”, and <iostream>.

I main program: No need to explain int main().I Students must eventually understand namespaces, iostreams,

int main, but not on day 1.I main program is a C++ preprocessor macro, so it

automatically gets translated to int main()

Page 45: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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>: includes graphics functionality. Also includes“using namespace std;”, and <iostream>.

I main program: No need to explain int main().

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

I main program is a C++ preprocessor macro, so itautomatically gets translated to int main()

Page 46: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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>: includes graphics functionality. Also includes“using namespace std;”, and <iostream>.

I main program: No need to explain int main().I Students must eventually understand namespaces, iostreams,

int main, but not on day 1.

I main program is a C++ preprocessor macro, so itautomatically gets translated to int main()

Page 47: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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>: includes graphics functionality. Also includes“using namespace std;”, and <iostream>.

I main program: No need to explain int main().I Students must eventually understand namespaces, iostreams,

int main, but not on day 1.I main program is a C++ preprocessor macro, so it

automatically gets translated to int main()

Page 48: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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 }

Page 49: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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 }

Page 50: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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!

Page 51: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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!

Page 52: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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!

Page 53: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

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!

Page 54: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What have students learnt on day 1?

1. Control flow

2. Elementary iteration

3. Basic ideas of syntax, spaces, indentation

4. Importance of observing patterns in what is to beaccomplished, and expressing them using repeat

You should not write 100 statements to draw a 100 sidedprogram!

Very important activity while designing programs!

Homework on day 1: draw chessboard, draw circles (as limit of nsided polygon). Draw 5 sided star.

Need some high school geometry. However, most programmingneeds some domain knowledge.

Students are happy to do this because they can see interestingthings happening.

Page 55: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What have students learnt on day 1?

1. Control flow

2. Elementary iteration

3. Basic ideas of syntax, spaces, indentation

4. Importance of observing patterns in what is to beaccomplished, and expressing them using repeat

You should not write 100 statements to draw a 100 sidedprogram!

Very important activity while designing programs!

Homework on day 1: draw chessboard, draw circles (as limit of nsided polygon). Draw 5 sided star.

Need some high school geometry. However, most programmingneeds some domain knowledge.

Students are happy to do this because they can see interestingthings happening.

Page 56: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What have students learnt on day 1?

1. Control flow

2. Elementary iteration

3. Basic ideas of syntax, spaces, indentation

4. Importance of observing patterns in what is to beaccomplished, and expressing them using repeat

You should not write 100 statements to draw a 100 sidedprogram!

Very important activity while designing programs!

Homework on day 1: draw chessboard, draw circles (as limit of nsided polygon). Draw 5 sided star.

Need some high school geometry. However, most programmingneeds some domain knowledge.

Students are happy to do this because they can see interestingthings happening.

Page 57: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What have students learnt on day 1?

1. Control flow

2. Elementary iteration

3. Basic ideas of syntax, spaces, indentation

4. Importance of observing patterns in what is to beaccomplished, and expressing them using repeat

You should not write 100 statements to draw a 100 sidedprogram!

Very important activity while designing programs!

Homework on day 1: draw chessboard, draw circles (as limit of nsided polygon). Draw 5 sided star.

Need some high school geometry. However, most programmingneeds some domain knowledge.

Students are happy to do this because they can see interestingthings happening.

Page 58: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What have students learnt on day 1?

1. Control flow

2. Elementary iteration

3. Basic ideas of syntax, spaces, indentation

4. Importance of observing patterns in what is to beaccomplished, and expressing them using repeat

You should not write 100 statements to draw a 100 sidedprogram!

Very important activity while designing programs!

Homework on day 1: draw chessboard, draw circles (as limit of nsided polygon). Draw 5 sided star.

Need some high school geometry. However, most programmingneeds some domain knowledge.

Students are happy to do this because they can see interestingthings happening.

Page 59: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What have students learnt on day 1?

1. Control flow

2. Elementary iteration

3. Basic ideas of syntax, spaces, indentation

4. Importance of observing patterns in what is to beaccomplished, and expressing them using repeat

You should not write 100 statements to draw a 100 sidedprogram!

Very important activity while designing programs!

Homework on day 1: draw chessboard, draw circles (as limit of nsided polygon). Draw 5 sided star.

Need some high school geometry. However, most programmingneeds some domain knowledge.

Students are happy to do this because they can see interestingthings happening.

Page 60: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What have students learnt on day 1?

1. Control flow

2. Elementary iteration

3. Basic ideas of syntax, spaces, indentation

4. Importance of observing patterns in what is to beaccomplished, and expressing them using repeat

You should not write 100 statements to draw a 100 sidedprogram!

Very important activity while designing programs!

Homework on day 1: draw chessboard, draw circles (as limit of nsided polygon). Draw 5 sided star.

Need some high school geometry. However, most programmingneeds some domain knowledge.

Students are happy to do this because they can see interestingthings happening.

Page 61: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What have students learnt on day 1?

1. Control flow

2. Elementary iteration

3. Basic ideas of syntax, spaces, indentation

4. Importance of observing patterns in what is to beaccomplished, and expressing them using repeat

You should not write 100 statements to draw a 100 sidedprogram!

Very important activity while designing programs!

Homework on day 1: draw chessboard, draw circles (as limit of nsided polygon). Draw 5 sided star.

Need some high school geometry. However, most programmingneeds some domain knowledge.

Students are happy to do this because they can see interestingthings happening.

Page 62: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What have students learnt on day 1?

1. Control flow

2. Elementary iteration

3. Basic ideas of syntax, spaces, indentation

4. Importance of observing patterns in what is to beaccomplished, and expressing them using repeat

You should not write 100 statements to draw a 100 sidedprogram!

Very important activity while designing programs!

Homework on day 1: draw chessboard, draw circles (as limit of nsided polygon). Draw 5 sided star.

Need some high school geometry. However, most programmingneeds some domain knowledge.

Students are happy to do this because they can see interestingthings happening.

Page 63: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

What have students learnt on day 1?

1. Control flow

2. Elementary iteration

3. Basic ideas of syntax, spaces, indentation

4. Importance of observing patterns in what is to beaccomplished, and expressing them using repeat

You should not write 100 statements to draw a 100 sidedprogram!

Very important activity while designing programs!

Homework on day 1: draw chessboard, draw circles (as limit of nsided polygon). Draw 5 sided star.

Need some high school geometry. However, most programmingneeds some domain knowledge.

Students are happy to do this because they can see interestingthings happening.

Page 64: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Not losing the tempo on day 2

Introduction must be followed by discussion of computer hardware.Then data types and variables.Drill assignments are possible, but how to catch the imagination?

main_program{int i = 1;turtleSim();repeat(10){forward(i*10); right(90);forward(i*10); right(90);i = i + 1;

}}

“What does this do?”

Reassignment of variables is a difficult idea to understand.Students want to know why this program works, and so take thetime to think about it.

Page 65: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Not losing the tempo on day 2Introduction must be followed by discussion of computer hardware.Then data types and variables.

Drill assignments are possible, but how to catch the imagination?

main_program{int i = 1;turtleSim();repeat(10){forward(i*10); right(90);forward(i*10); right(90);i = i + 1;

}}

“What does this do?”

Reassignment of variables is a difficult idea to understand.Students want to know why this program works, and so take thetime to think about it.

Page 66: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Not losing the tempo on day 2Introduction must be followed by discussion of computer hardware.Then data types and variables.Drill assignments are possible, but how to catch the imagination?

main_program{int i = 1;turtleSim();repeat(10){forward(i*10); right(90);forward(i*10); right(90);i = i + 1;

}}

“What does this do?”

Reassignment of variables is a difficult idea to understand.Students want to know why this program works, and so take thetime to think about it.

Page 67: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Not losing the tempo on day 2Introduction must be followed by discussion of computer hardware.Then data types and variables.Drill assignments are possible, but how to catch the imagination?

main_program{int i = 1;turtleSim();repeat(10){forward(i*10); right(90);forward(i*10); right(90);i = i + 1;

}}

“What does this do?”

Reassignment of variables is a difficult idea to understand.Students want to know why this program works, and so take thetime to think about it.

Page 68: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Not losing the tempo on day 2Introduction must be followed by discussion of computer hardware.Then data types and variables.Drill assignments are possible, but how to catch the imagination?

main_program{int i = 1;turtleSim();repeat(10){forward(i*10); right(90);forward(i*10); right(90);i = i + 1;

}}

“What does this do?”

Reassignment of variables is a difficult idea to understand.Students want to know why this program works, and so take thetime to think about it.

Page 69: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Coordinate based graphics

Creating graphical objects

Circle c1(200,225,25);// c1 = circle at (200,225), r = 25

Rectangle r1(200,200,50,70);// center coordinates, width, height

Manipulating graphical objects

r1.right(45); // rotate 45 degreesc1.move(10,20); // move by 10,20 in x,y directions

Elementary graphical input

int z = getClick();// z = 65536 * x coordinate of cursor + y coordinate

Excitement value: Elementary animation can be done.Educational goals acheived: Implicit introduction to constructorand member access syntax. Repetition will be needed to dointeresting animations.

Page 70: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Coordinate based graphicsCreating graphical objects

Circle c1(200,225,25);// c1 = circle at (200,225), r = 25

Rectangle r1(200,200,50,70);// center coordinates, width, height

Manipulating graphical objects

r1.right(45); // rotate 45 degreesc1.move(10,20); // move by 10,20 in x,y directions

Elementary graphical input

int z = getClick();// z = 65536 * x coordinate of cursor + y coordinate

Excitement value: Elementary animation can be done.Educational goals acheived: Implicit introduction to constructorand member access syntax. Repetition will be needed to dointeresting animations.

Page 71: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Coordinate based graphicsCreating graphical objects

Circle c1(200,225,25);// c1 = circle at (200,225), r = 25

Rectangle r1(200,200,50,70);// center coordinates, width, height

Manipulating graphical objects

r1.right(45); // rotate 45 degreesc1.move(10,20); // move by 10,20 in x,y directions

Elementary graphical input

int z = getClick();// z = 65536 * x coordinate of cursor + y coordinate

Excitement value: Elementary animation can be done.Educational goals acheived: Implicit introduction to constructorand member access syntax. Repetition will be needed to dointeresting animations.

Page 72: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Coordinate based graphicsCreating graphical objects

Circle c1(200,225,25);// c1 = circle at (200,225), r = 25

Rectangle r1(200,200,50,70);// center coordinates, width, height

Manipulating graphical objects

r1.right(45); // rotate 45 degreesc1.move(10,20); // move by 10,20 in x,y directions

Elementary graphical input

int z = getClick();// z = 65536 * x coordinate of cursor + y coordinate

Excitement value: Elementary animation can be done.Educational goals acheived: Implicit introduction to constructorand member access syntax. Repetition will be needed to dointeresting animations.

Page 73: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Coordinate based graphicsCreating graphical objects

Circle c1(200,225,25);// c1 = circle at (200,225), r = 25

Rectangle r1(200,200,50,70);// center coordinates, width, height

Manipulating graphical objects

r1.right(45); // rotate 45 degreesc1.move(10,20); // move by 10,20 in x,y directions

Elementary graphical input

int z = getClick();// z = 65536 * x coordinate of cursor + y coordinate

Excitement value: Elementary animation can be done.

Educational goals acheived: Implicit introduction to constructorand member access syntax. Repetition will be needed to dointeresting animations.

Page 74: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Coordinate based graphicsCreating graphical objects

Circle c1(200,225,25);// c1 = circle at (200,225), r = 25

Rectangle r1(200,200,50,70);// center coordinates, width, height

Manipulating graphical objects

r1.right(45); // rotate 45 degreesc1.move(10,20); // move by 10,20 in x,y directions

Elementary graphical input

int z = getClick();// z = 65536 * x coordinate of cursor + y coordinate

Excitement value: Elementary animation can be done.Educational goals acheived: Implicit introduction to constructorand member access syntax. Repetition will be needed to dointeresting animations.

Page 75: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics using recursion

Drawing a mathematical tree

I Recursion is “visible”

Drawing of a realistic tree

I Perhaps recursion is more applicable than we thought?

Page 76: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics using recursion

Drawing a mathematical tree

I Recursion is “visible”

Drawing of a realistic tree

I Perhaps recursion is more applicable than we thought?

Page 77: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics using recursion

Drawing a mathematical tree

I Recursion is “visible”

Drawing of a realistic tree

I Perhaps recursion is more applicable than we thought?

Page 78: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics using recursion

Drawing a mathematical tree

I Recursion is “visible”

Drawing of a realistic tree

I Perhaps recursion is more applicable than we thought?

Page 79: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics using recursion

Drawing a mathematical tree

I Recursion is “visible”

Drawing of a realistic tree

I Perhaps recursion is more applicable than we thought?

Page 80: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics as example of inheritance

Sprite: Class of all graphics objects

Rectangle, Circle, Polygon,...: Subclasses of Sprite.

Turtle: Subclass of Polygon.

Sprite holds attributes common to all graphics objects.

I Data members: on-screen position coordinates. Orientation.Colour...

I Function members: move, right, left

Rectangle class holds

I Data members: width and height

I Function member: function that actually draws the rectangleon the screen.

Page 81: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics as example of inheritance

Sprite: Class of all graphics objects

Rectangle, Circle, Polygon,...: Subclasses of Sprite.

Turtle: Subclass of Polygon.

Sprite holds attributes common to all graphics objects.

I Data members: on-screen position coordinates. Orientation.Colour...

I Function members: move, right, left

Rectangle class holds

I Data members: width and height

I Function member: function that actually draws the rectangleon the screen.

Page 82: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics as example of inheritance

Sprite: Class of all graphics objects

Rectangle, Circle, Polygon,...: Subclasses of Sprite.

Turtle: Subclass of Polygon.

Sprite holds attributes common to all graphics objects.

I Data members: on-screen position coordinates. Orientation.Colour...

I Function members: move, right, left

Rectangle class holds

I Data members: width and height

I Function member: function that actually draws the rectangleon the screen.

Page 83: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics as example of inheritance

Sprite: Class of all graphics objects

Rectangle, Circle, Polygon,...: Subclasses of Sprite.

Turtle: Subclass of Polygon.

Sprite holds attributes common to all graphics objects.

I Data members: on-screen position coordinates. Orientation.Colour...

I Function members: move, right, left

Rectangle class holds

I Data members: width and height

I Function member: function that actually draws the rectangleon the screen.

Page 84: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics as example of inheritance

Sprite: Class of all graphics objects

Rectangle, Circle, Polygon,...: Subclasses of Sprite.

Turtle: Subclass of Polygon.

Sprite holds attributes common to all graphics objects.

I Data members: on-screen position coordinates. Orientation.Colour...

I Function members: move, right, left

Rectangle class holds

I Data members: width and height

I Function member: function that actually draws the rectangleon the screen.

Page 85: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics as example of inheritance

Sprite: Class of all graphics objects

Rectangle, Circle, Polygon,...: Subclasses of Sprite.

Turtle: Subclass of Polygon.

Sprite holds attributes common to all graphics objects.

I Data members: on-screen position coordinates. Orientation.Colour...

I Function members: move, right, left

Rectangle class holds

I Data members: width and height

I Function member: function that actually draws the rectangleon the screen.

Page 86: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics as example of inheritance

Sprite: Class of all graphics objects

Rectangle, Circle, Polygon,...: Subclasses of Sprite.

Turtle: Subclass of Polygon.

Sprite holds attributes common to all graphics objects.

I Data members: on-screen position coordinates. Orientation.Colour...

I Function members: move, right, left

Rectangle class holds

I Data members: width and height

I Function member: function that actually draws the rectangleon the screen.

Page 87: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics as example of inheritance

Sprite: Class of all graphics objects

Rectangle, Circle, Polygon,...: Subclasses of Sprite.

Turtle: Subclass of Polygon.

Sprite holds attributes common to all graphics objects.

I Data members: on-screen position coordinates. Orientation.Colour...

I Function members: move, right, left

Rectangle class holds

I Data members: width and height

I Function member: function that actually draws the rectangleon the screen.

Page 88: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics as example of inheritance

Sprite: Class of all graphics objects

Rectangle, Circle, Polygon,...: Subclasses of Sprite.

Turtle: Subclass of Polygon.

Sprite holds attributes common to all graphics objects.

I Data members: on-screen position coordinates. Orientation.Colour...

I Function members: move, right, left

Rectangle class holds

I Data members: width and height

I Function member: function that actually draws the rectangleon the screen.

Page 89: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Graphics as example of inheritance

Sprite: Class of all graphics objects

Rectangle, Circle, Polygon,...: Subclasses of Sprite.

Turtle: Subclass of Polygon.

Sprite holds attributes common to all graphics objects.

I Data members: on-screen position coordinates. Orientation.Colour...

I Function members: move, right, left

Rectangle class holds

I Data members: width and height

I Function member: function that actually draws the rectangleon the screen.

Page 90: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Other uses of graphics

I Interesting new applications. Formula layout. Example ofstructural recursion.

I Visualizing output of programs. N-body simulation,Gravitational simulation.

I Visualization is important also because it can help discoverprogramming errors more quickly.

Page 91: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Other uses of graphics

I Interesting new applications. Formula layout. Example ofstructural recursion.

I Visualizing output of programs. N-body simulation,Gravitational simulation.

I Visualization is important also because it can help discoverprogramming errors more quickly.

Page 92: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Other uses of graphics

I Interesting new applications. Formula layout. Example ofstructural recursion.

I Visualizing output of programs. N-body simulation,Gravitational simulation.

I Visualization is important also because it can help discoverprogramming errors more quickly.

Page 93: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Other uses of graphics

I Interesting new applications. Formula layout. Example ofstructural recursion.

I Visualizing output of programs. N-body simulation,Gravitational simulation.

I Visualization is important also because it can help discoverprogramming errors more quickly.

Page 94: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some traditional issues in introductory programming

I Program design vs. algorithm design

I How much software engineering should you teach?

I How much methodology/OOP?

I How much history of computing?

I How much hardware?

I How much of STL?

Page 95: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Some traditional issues in introductory programming

I Program design vs. algorithm design

I How much software engineering should you teach?

I How much methodology/OOP?

I How much history of computing?

I How much hardware?

I How much of STL?

Page 96: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm design

Program design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 97: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.

Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 98: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 99: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 100: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 101: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 102: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 103: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 104: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 105: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 106: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 107: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 108: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Program design vs. Algorithm designProgram design: Writing a program when you know how to solvethe problem using paper and pencil.Algorithm design: Deciding what to calculate to solve a problem.

Main focus: Program design

However, Recursion is covered well.

Many good algorithms are described

I Root finding, curve fitting

I Sorting including mergesort

I Solving linear systems of equations

I Gravitational simulation

I Backtracking, e.g. 8 queens.

I A few advanced algorithms to pique the interest for projects,further study.

Coding some of these is left for exercises.

Page 109: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Programming methodologies

Some introductory programming courses teach OOP on day 1.

My strategy: Pose progressively harder programming problems tothe student, and teach whatever is needed to solve those.

Need for OOP can be made to evolve. The book has substantialdiscussion, but not at the beginning.

Chapter on “inheritance based design”.

I A substantial application developed earlier without inheritanceis rewritten with inheritance.

I New implementation is easier to extend. A non-trivialextension is carried out.

Page 110: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Programming methodologies

Some introductory programming courses teach OOP on day 1.

My strategy: Pose progressively harder programming problems tothe student, and teach whatever is needed to solve those.

Need for OOP can be made to evolve. The book has substantialdiscussion, but not at the beginning.

Chapter on “inheritance based design”.

I A substantial application developed earlier without inheritanceis rewritten with inheritance.

I New implementation is easier to extend. A non-trivialextension is carried out.

Page 111: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Programming methodologies

Some introductory programming courses teach OOP on day 1.

My strategy: Pose progressively harder programming problems tothe student, and teach whatever is needed to solve those.

Need for OOP can be made to evolve. The book has substantialdiscussion, but not at the beginning.

Chapter on “inheritance based design”.

I A substantial application developed earlier without inheritanceis rewritten with inheritance.

I New implementation is easier to extend. A non-trivialextension is carried out.

Page 112: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Programming methodologies

Some introductory programming courses teach OOP on day 1.

My strategy: Pose progressively harder programming problems tothe student, and teach whatever is needed to solve those.

Need for OOP can be made to evolve. The book has substantialdiscussion, but not at the beginning.

Chapter on “inheritance based design”.

I A substantial application developed earlier without inheritanceis rewritten with inheritance.

I New implementation is easier to extend. A non-trivialextension is carried out.

Page 113: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Programming methodologies

Some introductory programming courses teach OOP on day 1.

My strategy: Pose progressively harder programming problems tothe student, and teach whatever is needed to solve those.

Need for OOP can be made to evolve. The book has substantialdiscussion, but not at the beginning.

Chapter on “inheritance based design”.

I A substantial application developed earlier without inheritanceis rewritten with inheritance.

I New implementation is easier to extend. A non-trivialextension is carried out.

Page 114: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Programming methodologies

Some introductory programming courses teach OOP on day 1.

My strategy: Pose progressively harder programming problems tothe student, and teach whatever is needed to solve those.

Need for OOP can be made to evolve. The book has substantialdiscussion, but not at the beginning.

Chapter on “inheritance based design”.

I A substantial application developed earlier without inheritanceis rewritten with inheritance.

I New implementation is easier to extend. A non-trivialextension is carried out.

Page 115: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Programming methodologies

Some introductory programming courses teach OOP on day 1.

My strategy: Pose progressively harder programming problems tothe student, and teach whatever is needed to solve those.

Need for OOP can be made to evolve. The book has substantialdiscussion, but not at the beginning.

Chapter on “inheritance based design”.

I A substantial application developed earlier without inheritanceis rewritten with inheritance.

I New implementation is easier to extend. A non-trivialextension is carried out.

Page 116: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Software engineering

Writing specs: Must be stressed. The book has some discussion.Specs for most non-trivial programs have been carefully developed.

Invariants/program proving: Substantial discussion. Necessarybecause students usually try a few cases and declare their programto be correct.

Testing: Some discussion of how to generate test cases. Also somediscussion of code coverage.

Page 117: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Software engineering

Writing specs: Must be stressed. The book has some discussion.Specs for most non-trivial programs have been carefully developed.

Invariants/program proving: Substantial discussion. Necessarybecause students usually try a few cases and declare their programto be correct.

Testing: Some discussion of how to generate test cases. Also somediscussion of code coverage.

Page 118: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Software engineering

Writing specs: Must be stressed. The book has some discussion.Specs for most non-trivial programs have been carefully developed.

Invariants/program proving: Substantial discussion. Necessarybecause students usually try a few cases and declare their programto be correct.

Testing: Some discussion of how to generate test cases. Also somediscussion of code coverage.

Page 119: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Software engineering

Writing specs: Must be stressed. The book has some discussion.Specs for most non-trivial programs have been carefully developed.

Invariants/program proving: Substantial discussion. Necessarybecause students usually try a few cases and declare their programto be correct.

Testing: Some discussion of how to generate test cases. Also somediscussion of code coverage.

Page 120: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Libraries, especially STL

String, Vector, Map classes covered in depth.

A baby version of String class is developed to illustrate idea ofclass design + memory management.

Priority queue class is used in chapter on simulation.

Page 121: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Libraries, especially STL

String, Vector, Map classes covered in depth.

A baby version of String class is developed to illustrate idea ofclass design + memory management.

Priority queue class is used in chapter on simulation.

Page 122: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Libraries, especially STL

String, Vector, Map classes covered in depth.

A baby version of String class is developed to illustrate idea ofclass design + memory management.

Priority queue class is used in chapter on simulation.

Page 123: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Libraries, especially STL

String, Vector, Map classes covered in depth.

A baby version of String class is developed to illustrate idea ofclass design + memory management.

Priority queue class is used in chapter on simulation.

Page 124: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Unusual/Advanced topics

I Lambda expressions (C++ 11)

I Memory management, including reference counting

I Simulation. Gravitational simulation, airport simulation.Dijkstra’s algorithm as a simulation. A general framework isdeveloped.

Page 125: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Demos

Could be shown on day 1 of the course.

I Plate design

I Line Fitting

I Button based turtle controller

I Tree drawing

I Formula layout

I Gravitational Simulation

I Airport simulation

All require less than 250 lines of code. Many less than 50.

Page 126: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Demos

Could be shown on day 1 of the course.

I Plate design

I Line Fitting

I Button based turtle controller

I Tree drawing

I Formula layout

I Gravitational Simulation

I Airport simulation

All require less than 250 lines of code. Many less than 50.

Page 127: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Demos

Could be shown on day 1 of the course.

I Plate design

I Line Fitting

I Button based turtle controller

I Tree drawing

I Formula layout

I Gravitational Simulation

I Airport simulation

All require less than 250 lines of code. Many less than 50.

Page 128: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Demos

Could be shown on day 1 of the course.

I Plate design

I Line Fitting

I Button based turtle controller

I Tree drawing

I Formula layout

I Gravitational Simulation

I Airport simulation

All require less than 250 lines of code. Many less than 50.

Page 129: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Demos

Could be shown on day 1 of the course.

I Plate design

I Line Fitting

I Button based turtle controller

I Tree drawing

I Formula layout

I Gravitational Simulation

I Airport simulation

All require less than 250 lines of code. Many less than 50.

Page 130: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Demos

Could be shown on day 1 of the course.

I Plate design

I Line Fitting

I Button based turtle controller

I Tree drawing

I Formula layout

I Gravitational Simulation

I Airport simulation

All require less than 250 lines of code. Many less than 50.

Page 131: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Demos

Could be shown on day 1 of the course.

I Plate design

I Line Fitting

I Button based turtle controller

I Tree drawing

I Formula layout

I Gravitational Simulation

I Airport simulation

All require less than 250 lines of code. Many less than 50.

Page 132: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Demos

Could be shown on day 1 of the course.

I Plate design

I Line Fitting

I Button based turtle controller

I Tree drawing

I Formula layout

I Gravitational Simulation

I Airport simulation

All require less than 250 lines of code. Many less than 50.

Page 133: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Demos

Could be shown on day 1 of the course.

I Plate design

I Line Fitting

I Button based turtle controller

I Tree drawing

I Formula layout

I Gravitational Simulation

I Airport simulation

All require less than 250 lines of code. Many less than 50.

Page 134: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks

I Must excite the imagination of students and then challengethem.

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

– Antoine de Saint-Exupery

“When you want to teach children to think, you begin bytreating them seriously when they are little, giving themresponsibilities, talking to them candidly, providing privacyand solitude for them, and making them readers and thinkersof significant thoughts from the beginning. That’s if you wantto teach them to think.”

– Bertrand Russell

Taking students seriously: explaining the course goals in thelanguage and using images that they understand.

Page 135: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks

I Must excite the imagination of students and then challengethem.

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

– Antoine de Saint-Exupery

“When you want to teach children to think, you begin bytreating them seriously when they are little, giving themresponsibilities, talking to them candidly, providing privacyand solitude for them, and making them readers and thinkersof significant thoughts from the beginning. That’s if you wantto teach them to think.”

– Bertrand Russell

Taking students seriously: explaining the course goals in thelanguage and using images that they understand.

Page 136: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks

I Must excite the imagination of students and then challengethem.

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

– Antoine de Saint-Exupery

“When you want to teach children to think, you begin bytreating them seriously when they are little, giving themresponsibilities, talking to them candidly, providing privacyand solitude for them, and making them readers and thinkersof significant thoughts from the beginning. That’s if you wantto teach them to think.”

– Bertrand Russell

Taking students seriously: explaining the course goals in thelanguage and using images that they understand.

Page 137: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks

I Must excite the imagination of students and then challengethem.

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

– Antoine de Saint-Exupery

“When you want to teach children to think, you begin bytreating them seriously when they are little, giving themresponsibilities, talking to them candidly, providing privacyand solitude for them, and making them readers and thinkersof significant thoughts from the beginning. That’s if you wantto teach them to think.”

– Bertrand Russell

Taking students seriously: explaining the course goals in thelanguage and using images that they understand.

Page 138: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks

I Must excite the imagination of students and then challengethem.

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

– Antoine de Saint-Exupery

“When you want to teach children to think, you begin bytreating them seriously when they are little, giving themresponsibilities, talking to them candidly, providing privacyand solitude for them, and making them readers and thinkersof significant thoughts from the beginning. That’s if you wantto teach them to think.”

– Bertrand Russell

Taking students seriously: explaining the course goals in thelanguage and using images that they understand.

Page 139: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Simplecpp graphics is very elementary. Even primary schoolchildren understand turtle graphics – Logo experience.

I Pictorially observing the effect of iteration, recursion driveshome the concepts effortlessly.

I New learning must be integrated with old learning whereverpossible: ask problems from physics and math learnt in juniorcollege. Or even problems related to art.

There is great satisfaction in actually using the math andscience you have learnt.

I Book contains a lot of applications which will help studentsfor doing projects. Preface describes which parts should becovered in 1 or 2 semester courses.

I Transparencies for lectures will soon appear on McGraw Hillhomepage and my homepage.

Page 140: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Simplecpp graphics is very elementary. Even primary schoolchildren understand turtle graphics – Logo experience.

I Pictorially observing the effect of iteration, recursion driveshome the concepts effortlessly.

I New learning must be integrated with old learning whereverpossible: ask problems from physics and math learnt in juniorcollege. Or even problems related to art.

There is great satisfaction in actually using the math andscience you have learnt.

I Book contains a lot of applications which will help studentsfor doing projects. Preface describes which parts should becovered in 1 or 2 semester courses.

I Transparencies for lectures will soon appear on McGraw Hillhomepage and my homepage.

Page 141: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Simplecpp graphics is very elementary. Even primary schoolchildren understand turtle graphics – Logo experience.

I Pictorially observing the effect of iteration, recursion driveshome the concepts effortlessly.

I New learning must be integrated with old learning whereverpossible: ask problems from physics and math learnt in juniorcollege. Or even problems related to art.

There is great satisfaction in actually using the math andscience you have learnt.

I Book contains a lot of applications which will help studentsfor doing projects. Preface describes which parts should becovered in 1 or 2 semester courses.

I Transparencies for lectures will soon appear on McGraw Hillhomepage and my homepage.

Page 142: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Simplecpp graphics is very elementary. Even primary schoolchildren understand turtle graphics – Logo experience.

I Pictorially observing the effect of iteration, recursion driveshome the concepts effortlessly.

I New learning must be integrated with old learning whereverpossible: ask problems from physics and math learnt in juniorcollege. Or even problems related to art.

There is great satisfaction in actually using the math andscience you have learnt.

I Book contains a lot of applications which will help studentsfor doing projects. Preface describes which parts should becovered in 1 or 2 semester courses.

I Transparencies for lectures will soon appear on McGraw Hillhomepage and my homepage.

Page 143: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Simplecpp graphics is very elementary. Even primary schoolchildren understand turtle graphics – Logo experience.

I Pictorially observing the effect of iteration, recursion driveshome the concepts effortlessly.

I New learning must be integrated with old learning whereverpossible: ask problems from physics and math learnt in juniorcollege. Or even problems related to art.

There is great satisfaction in actually using the math andscience you have learnt.

I Book contains a lot of applications which will help studentsfor doing projects. Preface describes which parts should becovered in 1 or 2 semester courses.

I Transparencies for lectures will soon appear on McGraw Hillhomepage and my homepage.

Page 144: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Simplecpp graphics is very elementary. Even primary schoolchildren understand turtle graphics – Logo experience.

I Pictorially observing the effect of iteration, recursion driveshome the concepts effortlessly.

I New learning must be integrated with old learning whereverpossible: ask problems from physics and math learnt in juniorcollege. Or even problems related to art.

There is great satisfaction in actually using the math andscience you have learnt.

I Book contains a lot of applications which will help studentsfor doing projects. Preface describes which parts should becovered in 1 or 2 semester courses.

I Transparencies for lectures will soon appear on McGraw Hillhomepage and my homepage.

Page 145: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Simplecpp graphics is very elementary. Even primary schoolchildren understand turtle graphics – Logo experience.

I Pictorially observing the effect of iteration, recursion driveshome the concepts effortlessly.

I New learning must be integrated with old learning whereverpossible: ask problems from physics and math learnt in juniorcollege. Or even problems related to art.

There is great satisfaction in actually using the math andscience you have learnt.

I Book contains a lot of applications which will help studentsfor doing projects. Preface describes which parts should becovered in 1 or 2 semester courses.

I Transparencies for lectures will soon appear on McGraw Hillhomepage and my homepage.

Page 146: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Some applications may appear to be difficult. But please readthe relevant portions of the book – you may decide they arenot hard after all.

I It is possible to skip the “difficult” sections if your course isshort.

I Comments and suggestions on the book will be greatlyappreciated.

I We can have an electronic discussion group..

Thank you!!!

Page 147: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Some applications may appear to be difficult. But please readthe relevant portions of the book – you may decide they arenot hard after all.

I It is possible to skip the “difficult” sections if your course isshort.

I Comments and suggestions on the book will be greatlyappreciated.

I We can have an electronic discussion group..

Thank you!!!

Page 148: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Some applications may appear to be difficult. But please readthe relevant portions of the book – you may decide they arenot hard after all.

I It is possible to skip the “difficult” sections if your course isshort.

I Comments and suggestions on the book will be greatlyappreciated.

I We can have an electronic discussion group..

Thank you!!!

Page 149: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Some applications may appear to be difficult. But please readthe relevant portions of the book – you may decide they arenot hard after all.

I It is possible to skip the “difficult” sections if your course isshort.

I Comments and suggestions on the book will be greatlyappreciated.

I We can have an electronic discussion group..

Thank you!!!

Page 150: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Some applications may appear to be difficult. But please readthe relevant portions of the book – you may decide they arenot hard after all.

I It is possible to skip the “difficult” sections if your course isshort.

I Comments and suggestions on the book will be greatlyappreciated.

I We can have an electronic discussion group..

Thank you!!!

Page 151: An approach to introductory programmingranade/simplecpp/101x.pdf · What should you teach in an introductory programming course? Some simple answers... 1. Teach programming language

Concluding remarks (contd.)

I Some applications may appear to be difficult. But please readthe relevant portions of the book – you may decide they arenot hard after all.

I It is possible to skip the “difficult” sections if your course isshort.

I Comments and suggestions on the book will be greatlyappreciated.

I We can have an electronic discussion group..

Thank you!!!