Title: COMP 110004 Introduction to Programming http:www.cs.unc.edudorianmcomp110
1COMP 110-004Introduction to Programminghttp//ww
w.cs.unc.edu/dorianm/comp110
- Dorian Miller
- August 22, 2005
- MWF 200-315 pm
- Sitterson 014
2Big Picture
- Introduction to COMP 110
- Course motivation and details
- Overview of the Internet
- With class exercise
3Instructor Contact
- Dorian Miller
- Sitterson Hall 361
- Office hours
- MW 330-430pm
- I expect basic understanding of lecture material
- Contact
- dorianm_at_email.unc.edu
- Please start subject line with comp 110
- TA - TBA
4Questions and Feedbackhttp//www.cs.unc.edu/dori
anm/comp110
- In class questions
- Ask in person
- Post question on course web page
- Anonymous feedback online
- Please keep responses respectful and appropriate
5Summary of Programming
- Programming process of creating software
- Examples of software applications
- Internet email, browser
- Office Applications word processor, spreadsheet
- Games card game, 3D-first person
6Top 10 reasons to take COMP 110
710. Want to be a Comp Sci major
- Have you had a programming course?
- Talk to me consider COMP 401
- Science majors consider
- COMP 116 learn programming with Matlab
- This course tailored to non-CS majors
- no programming knowledge assumed
- Assume basic computer skills
- web browsing, email, word processor, etc.
89. Complete a math or other requirement
- We use high school math, algebra
98. Like solving puzzles, tinkering, learning how
things work
- Writing a program is like puzzle solving
- Create a program to solve a problem
- Solution built from limited commands in
programming language
107. Want to become less scared of computers
- Become familiar with technology
- Evaluate what is feasible with software
- Example American Idol
- Feasible Computer collects and tallies audience
votes - Not Feasible Computer judges contestants
116. Use computers in your own field
- Processing data with software
- Calculate results for experiment
- Tailor Microsoft Excel spreadsheet
- Automate repetitive tasks
- Collect 100 peoples contact information
125. We will learn programming for the web
- We use web programming to teach programming
fundamentals - Programming languages
- Javascript
- Java
- Javascript examples
- Web forms (links)
- Fancy web page animation (link)
- Custom Google maps (link)
134. You have time on your hands
- Is COMP 110 right for you?
- Time commitment 10-12 hours/week
- Gets harder after drop point
- Surviving COMP 110
- Allocate time, work hard
- Start early on assignments
- Make use of resources
- office hours, recitation, email
143. Program, Program, Program
- Course involves lots of programming
- No essays
- What makes programming tough?
- Programming assignments expected to be complete
and functional - Computer unforgiving with mistakes
152. You do not have to purchase a textbook
- We will use online reading
- Electronic books from UNC library
- Web sites for reference
- Purchase hardcopy
- If you do not like reading longer text from the
computer screen - Ask me which ones
161. Learn a lot
17Top 10 reasons to take COMP 110
- 10. Want to be a Computer Science major
- 9. Complete a math or other requirement
- 8. Like solving puzzles, tinkering, learning how
things work - 7. Want to become less scared of computers
- 6. Use computer in your own field
- 5. We will learn programming for the web
- 4. You have time on your hands
- 3. Program, Program, Program
- 2. You do not have to purchase a textbook
- 1. Learn a lot
18Other COMP courses
- Other COMP 110 sections MWF 3-415pm
- COMP 116 Intro to Matlab
- COMP 401 For experienced programmers
- More general COMP courses
- COMP 80 Freshman, Assistive Technology
- COMP 380 Computers and society
- COMP 4 (Spring) Power Tools for the Mind
19Course Web Page
- Course home page
- http//www.cs.unc.edu/dorianm/comp110
- Lectures, recitation, assignments
- UNC Blackboard System
- http//blackboard.unc.edu
- List grades
- Online surveys and turn-in
20Weekly Schedule
- Lecture Monday Wednesday
- Recitation Friday
- Time 2-315 pm
- Place Sitterson 014
21Lecture Format
- Big picture
- Present new material
- Analogy
- Concept
- Programming examples
- In-class exercises
- work in groups
- Lecture notes posted 3-days ahead
- When possible
- Notes might change
22Friday is Recitation!
- Attendance mandatory
- Mini-lab
- Hands-on programming practice
- Answer questions from lecture
- Group activities
- Should always have a laptop
23Assignments Exams
- Programming
- 6-7 assignments
- Problem solving
- 5 assignments
- Exams Mid-term, final
- In class, closed book
24Late policy
- Generally no late assignments accepted
- Exceptions
- Documented personal emergency
- Cleared in days before due date
25Collaborating
- Dont cheat!
- You can
- talk to each other about the lecture topics
- talk about assignment requirements
- work in groups during recitation on recitation
assignments only - You should
- do your own assignments -- design and code
- You should never
- talk to each other about assignment solutions
- share code -- it is easy to detect and we will
prosecute - Pledge Form
26Grades
- Programming Assignments 40
- Homeworks 15
- Midterm Exam 15
- Final Exam 25
- Class Participation 5
- In class, office hours, email, etc
27Free Software
- Javascript
- Text editor
- Web browser
- AFS file system
- Java
- JAVA SDK
- Eclipse
28For Friday
- Bring laptop to recitation
- Bring Ethernet cable to recitation
- On BlackBoard
- Complete survey to introduce yourself
- Read Honor pledge and sign it
29Questions so far
30Next How does the internet work?
- We will program for the web
- Must have overview of web
- Friday we create web pages
31Geography review
- 2,865 miles apart
- Seattle Chapel Hill
32Browsing a web page
- University of Washington, Seattle Wa
- http//www.washington.edu/
- Where is the web page?
- Web server (a computer) in Seattle WA
- How does it get to your computer?
- transmitted over internet (network of computers)
UNC, Chapel Hill NC
33Requesting web page
- Our computer sends a web page request to the
server - Web server sends response
- Web messages divided into packets of
information
34The internet
- Web of computers
- Wide Area Network (WAN)
- Local Area Network (LAN)
35Internet backbone in UShigh-high speed connection
Router High speed network
- Router a computer that passes packets
- Reference
- http//www.cybergeography.org/atlas/more_isp_maps.
html - Other networks http//navigators.com/isp.html
36Where is the web page?
- DOS command tracert www.washington.edu
- Trace result (computers between us and web site)
- ciscokid-cs.net.unc.edu 152.2.31.1
- ciscokid.net.unc.edu 152.2.255.254
- unc7600.internet.unc.edu 128.109.36.254
- rtp7600-gw-to-unc7600-gw.ncren.net
128.109.70.33 - nlr-atl-to-rtp7600.ncren.net 128.109.70.106
- 216.24.186.34
- denv-chic-36.layer3.nlr.net 216.24.186.5
- seat-denv-58.layer3.nlr.net 216.24.186.7
- hnsp2-wes-ge-2-1-0-802.pnw-gigapop.net
209.124.179.45 - uwbr-ads-01-te3-1.cac.washington.edu
209.124.176.23 - uwcr-ads-01-vlan1802.cac.washington.edu
205.175.101.9 - uwcr-ads-01-vlan3829.cac.washington.edu
205.175.101.118 - acar-ads-01-vlan3802.cac.washington.edu
205.175.108.10 - www11.cac.washington.edu 140.142.11.167
37Wide Area Network (WAN) Analogy
- WAN
- Network at US level
- Analogy
- Web page request equivalent to passing envelop
between students - Envelopes
- Packets of web request and response
- Students
- router computer that relays messages
- Router connected by wire to neighboring router
(student)
Router (student) High speed network
38WAN Network Rules
- Message passing between router (student)
- Along same row or one row back
- Packets can traverse different paths
- Dropped packets (envelops)
- Router too busy
- Router problem
39Local Area Network
- On the scale of classroom
Local
Local
WIDE AREA
Local
Local
Local
40Local Area Network (LAN)
- Computers share same channel
- Ethernet for wired connection
- 802.11 for wireless
41Local Area Network (LAN) Analogy
- LAN
- connecting computers in a room
- LAN technology called Ethernet
- Analogy
- Sending packets equivalent to students calling
out - All computers connected to same wire (students
can hear each other) - Packet sending
- Students shout out
- Student
- Represents your computer
- Rules
- Shout out, back off, shout out again
42Network securityWAN Denial of service
- Web server overloaded by bombardment of packets
- Analogy all students send packets to one
computer
43Network security LAN Privacy, ease dropping
- Third party listen to packets
- Analogy Everyone can hear messages
44Questions
- Local Area Network
- Sitterson 014
45For Friday
- Bring laptop to recitation
- Bring Ethernet cable to recitation
- On BlackBoard
- Complete survey to introduce yourself
- Read Honor pledge and sign it