Welcome to COMP 202 - McGill School Of Computer Science

advertisement
COMP-202 Foundations of Programming
Welcome to
COMP 202
Foundations of Programming
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
Reasons for Being Here
• This is a required course for my program
• I'm debating whether to go into Computer Science
• Computer programming a useful subject to know a
little about
• I want to write the next big video game!
• I have masochistic tendencies and enjoy staying in
isolation while programming until wee hours of
morning
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
2
Focus of the Course
• Introduction to programming using Java
• Aimed at students with little or no background in
programming and knowledge of Computer Science
• If you know some
programming already,
start with COMP-250!
• If you are not sure,
ask for the placement quiz!
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
3
Goals of this Course
• Understand how computers “think”
• Being able to describe a task in a way a computer can
understand
• Breaking complex tasks into smaller, simpler tasks
• Translating these instructions into the programming language Java
• Be comfortable developing moderately complex programs
• Learn how to learn more about computers and
programming
• Pass this course
• Have fun!
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
4
I Heard that This Course is Hard
• That’s true
• Programming computers is a very time consuming
and sometimes difficult process
• We will do all we can to make it less stressful for
you, but
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
5
Fixing YOUR Programs is Time Consuming
“As soon as we started programming, we found to our surprise
that it wasn’t as easy to get programs right as we had thought.
Debugging had to be discovered. I can remember the exact instant
when I realized that a large part of my life from then on was
going to be spent in finding mistakes in my own programs.”
Maurice Wilkes, 1949
“Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are –
by definition – not smart enough to debug it.” Brian Kernighan
“There are two ways to write error-free programs; only the third
one works.” Alan J. Perlis
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
6
I hate this @#$# Course!
• Even if you never write another program, this
course will help you to:
• Understand what types of problems computers can and
can't solve in practice. (Applications?)
• Improve your logical thinking and problem solving
skills
• A new tool to help you with your other courses
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
7
How do I Ace This Course?
•
•
Practice! When you see an example in class, try it at home
Do your assignments!!!!!!!
• Don’t skip the warmup questions
• Ask the TAs for help when you’re stuck
•
•
Prepare for the lectures ahead of time. Make sure you
understand the previous lecture and come prepared to class
with questions
Ask a question whenever you don't understand something
• It's the best way for Dan / me to know they are not explaining
something clearly
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
8
Course Outline
• Week 1-2: Introduction
• Weeks 2-3: Java in 2 weeks
• Variables and Assignments
• if-then-else and loops
• the Class Concept
•
•
•
•
•
Week 4: Data and Expression and Classes in Detail
Weeks 5-6: Control structures
Week 7-8: Object-oriented programming
Week 9: Arrays
Week 10-13: Advanced Topics
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
9
Week 1
•
•
•
•
Administrative
What is programming?
How does a computer work?
Our first programs
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
10
What you have to do
• 4 Assignments
• Part 1
• Not graded
• Simple questions and small exercises to reinforce what was learned in
class
• TAs will help during lab hours to solve the problems
• Part 2
• Graded
• Programming tasks
• Midterm + Final
• Tutorials: optional, but highly recommended
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
11
Course Structure
•
•
3 hours lecture per week
Optional tutorials (7)
• Setting up your programming environment, how to use myCourses to
submit assignments
• One for each assignment (4)
• One for the midterm review
• One for the final review
• Schedule on myCourses
•
Lab TA-Office hours
• Schedule on myCourses
• A TA will be in the labs on the 3rd floor of the Trottier building, go
around and answer questions
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
12
Grading Scheme
• Assignments: 25%
• Assignments 1, 2, 4 have the same weight (5%)
• Assignment 3: 10%
• Late penalty
• Midterm: 25%
• Date: Feb 18th, 6pm - 9pm
• Final: 50%
• Automatic 75% final option
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
13
Communication
•
My Courses
•
•
•
•
•
•
•
Assignment hand-in
Discussions
Announcements
TA office hours
Tutorial schedule
Email: in emergency situations
Course webpage:
• http://www.cs.mcgill.ca/~cs202/2013-01/web/
• Lecture notes
• Assignment hand-outs, assignment solutions
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
14
Recommended Textbooks
• “How to Think like a Computer Scientist”,
4th edition, by Allen B. Downey
• http://www.greenteapress.com/thinkapjava/thinkapjava.pdf
• “Java Software Solutions: Foundations of Program
Design”, 7th edition, by John Lewis and William
Loftus, Addison-Wesley. 2012.
ISBN: 0132149184
• McGill bookstore
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
15
SOCS Computer Labs
•
•
If you are officially registered in the course, you can create an
account to use the computers on the 3rd floor of Trottier
building
Computer availability:
• Computers in open areas: physically accessible 24 hours a day, 7 days
a week
• Computers inside rooms: physically accessible on weekdays 10:00 20:00, weekends 12:00 - 20:00
•
•
Consultant on duty: weekdays 10:00 - 20:00, weekends 12:00
- 20:00
Computers run GNU/Linux (Unix-like OS), not MS Windows
• Unix seminars are offered by SOCS Systems staff
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
16
Required Software
•
•
You are encouraged to use your personal computer or laptop to
complete course work
Software used in this course
• Required: Java Development Kit (JDK)
• Optional: Dr.Java, RText, Eclipse (later in the course)
• See course outline for details on how to obtain the above software
packages
•
All programs you submit for assignments must compile and
run using JDK 6 or later
• JDK is backward compatible; programs that compile and run under
previous versions also compile and run under JDK 6
• More info can be found on course webpage
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
17
Useful Tips
• Do read everything carefully: slides, notes, textbooks,
instructions, assignment specifications, documentation,
announcements on myCourses, ...
• Do not wait until the last minute to do your assignments
• Do not fall behind; each new concept builds on previous ones
• Contact instructors / TAs if you have difficulties
• Do not expect to be given every single detail; you will have
to look things up in the provided material and deduce some
things on your own
• Experiment
• Practice!
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
18
http://mycourses2.mcgill.ca/
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
19
Login Screen
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
20
Course List
Click on COMP-202
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
21
The Course
Access to Documents
and Discussions
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
22
Instructor Coordinates
•
Jörg Kienzle
•
Address: McConnell Eng. Building, Room 327
•
•
Email: Joerg.Kienzle@mcgill.ca
Web: http://www.cs.mcgill.ca/~joerg/
•
•
Phone: (514) 398-2049
Office Hours:
• Monday 11:30 am- 12:30 pm
•
Dan Pomerantz
• Sections 2 (TR 10:05 - 11:25) and Section 3 (MTR 3:35 - 4:25)
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
23
My Background
• Born in Princeton, NJ, USA
• German parents
• Grown up in Basel, Switzerland
(German speaking part)
• Studied at the Swiss Federal Institute of
Technology, Lausanne
(French speaking part)
• Married to a Canadian Girl
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
24
My Programming Background
•
Gate, published by ToolBox / Seven Hills Software
•
•
•
•
Action / Adventure
Apple II GS: Assembler (1991)
Macintosh: Assembler (graphics), C, Pascal (1995)
Spacefox, published by Seven Hills Software (1992)
•
•
•
Side-scrolling shoot-them-up
Apple II GS: Assembler
Geokid (1996)
•
•
•
Kid game
Macintosh: C++
Hexomania (Hex) (1998)
•
•
•
•
Board-game
Shareware
Macintosh: C++
Distributed Transaction Processing System (2000)
•
Unix: Ada95
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
25
Challenge: Increasing Software Complexity
Programming “in the small”
1960s
Software Engineering
2010
Tacoma Narrows Bridge Collapse
Nov. 7th, 1940
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
26
Challenge: Long-Term Availability
• AIRBUS A300 Life Cycle
• Program began in 1972, production stopped in 2007
• 2007-1972 = 35 years...
• Support will last until 2050
• 2050-1972 = 78 years !!
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
27
Jörg’s Interests
• Dependable Software Development
• Fault tolerance
• Integrating the concern of fault tolerance into
software development
• Fault tolerance for massively multi-player games
• Model-Driven Engineering
•
•
Model software under development from
different points of view / at different
levels of abstraction
Generate code!
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
28
Current Projects: TouchRAM
•
Multi-touch enabled software design modelling tool
• Intuitive editing using multi-touch gestures
• Reuse existing middleware
or code libraries
• Simultaneous support
for multi-touch (TUIO)
as well as mouse /
keyboard input
•
Download TouchRAM
• http://www.cs.mcgill.ca/~joerg/SEL/TouchRAM.html
• System requirements:
•
Windows/Linux/MacOS running Java 1.5, 3D graphics
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
29
Current Development Projects - Mammoth
• Massively Multiplayer Game Research
Framework
•
•
http://mammoth.cs.mcgill.ca/
Research areas:
• Scalability, Fault Tolerance,
Cheating, Consistency, Modelling, AI, Simulation,
Content Creation, Software Engineering,
Aspect-Orientation, Testing
• 4 Professors:
• Jörg Kienzle, Clark Verbrugge,
Bettina Kemme, Doina Precup
COMP-202 - Introduction, © 2013, Jörg Kienzle, Dan Pomerantz, Bettina Kemme, Clark Verbrugge, and others
30
Download