1 Intro
1 Intro
for Mathemati-
cians
John Perry
Computer
programming MAT 685: C++ for Mathematicians
Words I
shouldn’t have Introduction
to say
Summary
John Perry
Spring 2017
MAT 685: C++
for Mathemati-
cians
Outline
John Perry
Computer
programming
1 What this class is about
Words I
shouldn’t have
to say
Summary
2 Computer programming
4 Summary
MAT 685: C++
for Mathemati-
cians
Outline
John Perry
Computer
programming
1 What this class is about
Words I
shouldn’t have
to say
Summary
2 Computer programming
4 Summary
MAT 685: C++
for Mathemati-
cians
Description
John Perry
Computer
programming
Words I
shouldn’t have
Mathematically-centered introduction to computer
to say programming for mathematicians
Summary
MAT 685: C++
for Mathemati-
cians
Description
John Perry
Computer
programming
Words I
shouldn’t have
Mathematically-centered introduction to computer
to say programming for mathematicians
Summary
• introduction: there is a huge world beyond this
• mathematically-centered, as opposed to computer
science-centered
• focus on numbers, computation — not strings, I/O
MAT 685: C++
for Mathemati-
cians
Outline
John Perry
Computer
programming
1 What this class is about
Words I
shouldn’t have
to say
Summary
2 Computer programming
4 Summary
MAT 685: C++
for Mathemati-
cians
Desired outcomes
John Perry
Computer
programming
Words I
1 Familiarity with programming
shouldn’t have
to say
• transferability to other languages
Summary 2 Experience with C++
• basic syntax
• preprocessing, compiling, linking, debugging
• “gcc toolchain”
3 Introduction to design
4 Hands-on experience with external project
MAT 685: C++
for Mathemati-
cians
Required caveats
John Perry
Words I
• breaking task into pieces
shouldn’t have
to say • solving difficult problems
Summary • somewhat steep learning curve
• generalizing and creating abstractions
• advanced problems require advanced techniques
• cannot learn without doing and struggling
MAT 685: C++
for Mathemati-
cians
Required caveats
John Perry
Words I
• breaking task into pieces
shouldn’t have
to say • solving difficult problems
Summary • somewhat steep learning curve
• generalizing and creating abstractions
• advanced problems require advanced techniques
• cannot learn without doing and struggling
The point
One course will not make you an expert programmer. In fact, it
will not even make you a particularly competent one. But you
will get out of this what you put into it!
MAT 685: C++
for Mathemati-
cians
For example
John Perry
Summary
ca. 1999 Java (self-study)
ca. 2003 Eiffel (self-study, research)
ca. 2008 Python (self-study, research)
ca. 2013 C++ (self-study, research)
MAT 685: C++
for Mathemati-
cians
For example
John Perry
Summary
ca. 1999 Java (self-study)
ca. 2003 Eiffel (self-study, research)
ca. 2008 Python (self-study, research)
ca. 2013 C++ (self-study, research)
The point
• requires self-study
• understanding concepts make self-study possible
• you will probably need this in the future
MAT 685: C++
for Mathemati-
cians
Why program?
John Perry
Summary
MAT 685: C++
for Mathemati-
cians
Why program?
John Perry
• Cons of programming
• longer development time
• generally inconvenient
• can be difficult to maintain/extend
MAT 685: C++
for Mathemati-
cians
Programming v. “math systems”
John Perry
• Cons of programming
• longer development time
• generally inconvenient
• can be difficult to maintain/extend
Computer
programming
1 What this class is about
Words I
shouldn’t have
to say
Summary
2 Computer programming
4 Summary
MAT 685: C++
for Mathemati-
cians
Yes, this is a “Dr. Perry” class
John Perry
Words I
• don’t cheat
shouldn’t have
to say • ask questions… but not “dumb” questions
Summary
MAT 685: C++
for Mathemati-
cians
Yes, this is a “Dr. Perry” class
John Perry
“High” expectations (this is grad school, after all)
What this class
is about
• read the text
Computer • do the assigned work
programming
Words I
• don’t cheat
shouldn’t have
to say • ask questions… but not “dumb” questions
Summary Objection: “There’s no such thing as a dumb question”
Oh, really?
MAT 685: C++
for Mathemati-
cians
Yes, this is a “Dr. Perry” class
John Perry
“High” expectations (this is grad school, after all)
What this class
is about
• read the text
Computer • do the assigned work
programming
Words I
• don’t cheat
shouldn’t have
to say • ask questions… but not “dumb” questions
Summary Objection: “There’s no such thing as a dumb question”
Oh, really?
• Definitions, grading information, important dates
• you can look them up (index, syllabus, final exam date)
• caveat: not dumb if I forget to define/assign/record it
MAT 685: C++
for Mathemati-
cians
Yes, this is a “Dr. Perry” class
John Perry
“High” expectations (this is grad school, after all)
What this class
is about
• read the text
Computer • do the assigned work
programming
Words I
• don’t cheat
shouldn’t have
to say • ask questions… but not “dumb” questions
Summary Objection: “There’s no such thing as a dumb question”
Oh, really?
• Definitions, grading information, important dates
• you can look them up (index, syllabus, final exam date)
• caveat: not dumb if I forget to define/assign/record it
Words I
• don’t cheat
shouldn’t have
to say • ask questions… but not “dumb” questions
Summary Objection: “There’s no such thing as a dumb question”
Oh, really?
• Definitions, grading information, important dates
• you can look them up (index, syllabus, final exam date)
• caveat: not dumb if I forget to define/assign/record it
Computer
programming
The following comments help no one
Words I • “I don’t understand.”
shouldn’t have
to say • “This is complicated.”
Summary
• “My program isn’t working.”
• “Other classes don’t have to work so hard!”
MAT 685: C++
for Mathemati-
cians
On the other hand…
John Perry
Computer
programming
The following comments help no one
Words I • “I don’t understand.”
shouldn’t have
to say • “This is complicated.”
Summary
• “My program isn’t working.”
• “Other classes don’t have to work so hard!”
Common misconceptions
• “I can’t do this.”
• “I’ll never learn.”
• “Programming’s not for me.”
MAT 685: C++
for Mathemati-
cians
Has cheating been a problem?
John Perry
Computer
• using someone else’s solution to the same problem
programming
• pretty much any online search
Words I
shouldn’t have
to say
• looking up a solution to a similar problem online
Summary
• adapting an online solution to a similar problem
• do not use online help sites
MAT 685: C++
for Mathemati-
cians
“What, me cheat?”
John Perry
Computer
• using someone else’s solution to the same problem
programming
• pretty much any online search
Words I
shouldn’t have
to say
• looking up a solution to a similar problem online
Summary
• adapting an online solution to a similar problem
• do not use online help sites
Definitely not cheating:
• asking the professor for help
• I will help you, though it may not be fun
• reading the book
• adapting a book/class program to a similar problem
• discussing program design/implementaiton with others
• just don’t copy or have them tell you what to type
MAT 685: C++
for Mathemati-
cians
Outline
John Perry
Computer
programming
1 What this class is about
Words I
shouldn’t have
to say
Summary
2 Computer programming
4 Summary
MAT 685: C++
for Mathemati-
cians
Summary
John Perry
Computer
programming
Words I
shouldn’t have
to say
• Class on mathematical problem solving with computers
Summary
• programming via C++
• High expectations
• hopefully not scared you out of the class