Compsci 101.2, Fall 2015 2.1 Plan For the Day l Discuss Algorithms and Programming at a high level, examples with cooperative/group work  Connect to reading.

Slides:



Advertisements
Similar presentations
CompSci 101 Introduction to Computer Science January 22, 2015 Prof. Rodger compsci101 spring151.
Advertisements

Chapter 1 - An Introduction to Computers and Problem Solving
How does Google search for everything? Searching For and Organizing Data Prof. Susan Rodger Computer Science Dept Duke University Oct. 31, 2014.
Important concepts in software engineering The tools to make it easy to apply common sense!
Computer Science - I Course Introduction Computer Science Department Boston College Hao Jiang.
Compsci 101, Spring COMPSCI 101, Spring 2012 Introduction to Computer Science Owen Astrachan
CompSci 101 Introduction to Computer Science January 13, 2015 Prof. Rodger compsci 101 spring
Ch 1. Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2012.
Teaching Teaching Discrete Mathematics and Algorithms & Data Structures Online G.MirkowskaPJIIT.
Prof. Matthew Hertz WTC 207D /
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Carolyn Seaman University of Maryland, Baltimore County.
Prof. Matthew Hertz WTC 207D /
COMP Introduction to Programming Yi Hong May 13, 2015.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
Compsci 06/101, Fall COMPSCI 06/101, Fall 2010 Owen Astrachan Robert Duvall
Algorithms and Programming
Introduction to Programming ICS2O Findlay. Learning Goals  We will learn  The definitions of a computer, program and programming language.  The different.
Chapter 1 What is Programming? Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Phoenix Software Projects Larry Beaty © 2007 Larry Beaty. Copying and distribution of this document is permitted in any medium, provided this notice is.
CPS 100, Spring Trees: no data structure lovelier?
CompSci Topics since midterm l Java  Methods  Sound  Graphics l Software design  Recursion  Arrays  Copyright issues l Computer systems.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Marie desJardins University of Maryland, Baltimore County.
Compsci 101.2, Fall Plan For the Week l Solve problems by programming in Python  Like to do "real-world" problems, but we're very new to the.
MIS215 Module 0 - Intro 1 MIS 215 Module 0 Intro to Data Structures.
Introduction to Data Structures
1 CSC 427: Data Structures and Algorithm Analysis Fall 2010 See online syllabus (also available through BlueLine): Course goals:
Robert Crawford, MBA West Middle School.  Explain how the binary system is used by computers.  Describe how software is written and translated  Summarize.
1 CSC 222: Object-Oriented Programming Spring 2013 Course goals:  To know and use basic Java programming constructs for object- oriented problem solving.
How to Read Code Benfeard Williams 6/11/2015 Susie’s lecture notes are in the presenter’s notes, below the slides Disclaimer: Susie may have made errors.
CompSci CompSci 6 Programming Design and Analysis I Dietolf (Dee) Ramm
CompSci 101 Introduction to Computer Science Sept. 9, 2014 Prof. Rodger President Brodhead speech graduation 2010 CompSci 101 Fall
C++ and Ubuntu Linux Review and Practice CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and.
CPS 100, Spring Tools: Solve Computational Problems l Algorithmic techniques  Brute-force/exhaustive, greedy algorithms, dynamic programming,
Software Design 14.1 CPS 108 l Object oriented design and programming of medium-sized projects in groups using modern tools and practices in meaningful.
Introduction to Python Lesson 1 First Program. Learning Outcomes In this lesson the student will: 1.Learn some important facts about PC’s 2.Learn how.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
CPS What is Computer Science? What is it that distinguishes it from the separate subjects with which it is related? What is the linking thread.
Iconic Programmer A Visualization Tool for Teaching Concepts without Context.
Compsci 101, Fall Plan For The Day (PFTD) l Practice solving problems  Some solved with a computer, some with Python  Differences in solving.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
CompSci 101 Introduction to Computer Science January 19, 2016 Prof. Rodger compsci 101 spring
Data Structures and Algorithms in Java AlaaEddin 2012.
CompSci 101 Introduction to Computer Science January 28, 2016 Prof. Rodger compsci101 spring161.
Compsci 101.2, Fall Plan for October l Structuring Data and Code for Efficiency  Computer time, how expensive is it?  Data storage, how.
Compsci 06/101, Spring COMPSCI 06/101, Spring 2011 Introduction to Computer Science Owen Astrachan
CompSci 101 Introduction to Computer Science January 15, 2015 Prof. Rodger 1.
7 th Grade Big6 Project Assignment: Make a children’s informational book (It can be in graphic novel format or regular picture-book format)
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
All materials copyright UMBC unless otherwise noted CMSC201 Computer Science I for Majors Lecture 02 – Algorithmic Thinking.
CompSci 101 Introduction to Computer Science Sept 13, 2016 Prof. Rodger compsci101 fall161.
CSC 222: Object-Oriented Programming
CSC 222: Object-Oriented Programming
CompSci 101 Introduction to Computer Science
Introduction to Eclipse
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CompSci 6 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CSC 222: Object-Oriented Programming
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
Introduction CSE 1310 – Introduction to Computers and Programming
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
Prof. Susan Rodger Computer Science Dept Duke University Oct. 31, 2014
Presentation transcript:

Compsci 101.2, Fall Plan For the Day l Discuss Algorithms and Programming at a high level, examples with cooperative/group work  Connect to reading when appropriate  Use real-world examples, thinking for now, programming next week l Administrivia/details about course  Including Due Dates and course information l Vocabulary and Concepts  Again, related to book when possible

Compsci 101.2, Fall Who took Compsci 101 (Astrachan)?

Compsci 101.2, Fall Algorithm l Recipe l Sequence of steps that constitute instructions l Step-by-step procedure for calculations What does Nate Silver do? How do Netflix and Amazon know me? l Compsci101 project: capable of implementation as a program, but much more basic

Compsci 101.2, Fall

Compsci 101.2, Fall What is Computer Science? l You each/all answered this in last class  How is this connected to algorithms? Ask Wikipedia: " An alternate, more succinct definition of computer science is the study of automating algorithmic processes that scale."

Compsci 101.2, Fall Duke Connection: Fred Brooks '53 l What Would FB Say? "The most important single decision I ever made was to change the IBM 360 series from a 6-bit byte to an 8-bit byte, thereby enabling the use of lowercase letters. That change propagated everywhere." l "Fred Brooks" by Copyright owned by SD&M ( - Request for picture sent by to Fred Brooks by uploader (Mark Pellegrini; user:Raul654) Fred sent this photo back, along with contact information for Carola Lauber at SD&M, who gave copyright permission.. Licensed under CC BY-SA 3.0 via Wikimedia Commons - d_Brooks.jpg d_Brooks.jpg

Compsci 101.2, Fall Why is programming fun? Fred Brooks l First is the sheer joy of making things l Second is the pleasure of making things that are useful l Third is the fascination of fashioning complex puzzle-like objects of interlocking moving parts l Fourth is the joy of always learning Finally, there is the delight of working in such a tractable medium. The programmer, like the poet, works only slightly removed from pure thought-stuff.

Compsci 101.2, Fall Developing an Algorithm l K39es K39es $193, $540, $820, $700, $749. Are these reasonable? Why?

Compsci 101.2, Fall I'm thinking of a number … l You guess. I'll tell you high, low, or correct  Goal: guess quickly, minimal number of guesses  Number between 1 and 100…  Number between 1 and 1000… l Can you describe an algorithm, instructions, that would allow someone to use your instructions to play this game correctly. Start with 1 and 100, but ideally your instructions work with 1 and N

Compsci 101.2, Fall Guess a Number Algorithm

Compsci 101.2, Fall Analyzing the binary search algorithm l Is the algorithm correct?  Try it, again, and again and …  Reason about it: logically, informally, … l How efficient is the algorithm?  How many guesses will it take (roughly, exactly)  Should we care about efficiency? l When do we really care about efficiency?  Examples?

Compsci 101.2, Fall Anderson 2. Applegate 3. Bethune 4. Brooks 5. Carter 6. Douglas 7. Edwards 8. Franklin 9. Griffin 10. Holhouser 11. Jefferson 12. Klatchy 13. Morgan 14. Munson 15. Narten 16. Oliver 17. Parker 18. Rivers 19. Roberts 20. Stevenson 21. Thomas 22. Wilson 23. Woodrow 24. Yarbrow Find Narten

Compsci 101.2, Fall Looking for a Needle in a Haystack l If a computer can examine 10 million names/numbers a second, suppose the list isn't sorted, or I say "yes/no", not "high/low"  How long to search a list of 10 million?  How long to search a list of a billion?  14 billion pixels in a 2 hour blu-ray movie l What about using binary search? How many guesses for 1000, 10 6, 10 9,  One of the things to remember: 2 10 = 1024

Compsci 101.2, Fall Administrivia for Compsci 101 l Lab 1 this week, complete by Sunday  Install software used in the course, test it l Reading Quizzes: RQ01 was due today, next quiz, RQ02, due Tuesday l Assignment one going out today, due in one week (doesn't use Python/Eclipse) l Keep up with Piazza and Sakai, also course website linked-to from Sakai

Compsci 101.2, Fall How to succeed in Compsci 101 l Start assignments early, they'll take longer than you think they will l Read the book, but we'll cover the material in class, so … l Collaborate well, but be sure you can do work on your own! l Be curious, work hard at beginning, think carefully, visit Prof. Rodger or Prof. Astrachan

Compsci 101.2, Fall Algorithms that scale: another example l Human Genome Project  Multiple approaches, relying heavily on computational power and algorithms  Combine reads of DNA sequences, we'll look at an illustrative example l These combine bio/chemistry techniques with computational techniques to recreate the sequencing, e.g., CGATTCCG… from "live data", actual DNA.

Compsci 101.2, Fall Eugene (Gene) Myers l Lead computer scientist/software engineer at Celera Genomics, then at Berkeley, now at Janelia Farms Research Institute (HHMI) "What really astounds me is the architecture of life. The system is extremely complex. It's like it was designed." … " There's a huge intelligence there.” l BLAST and WG-Shotgun

Compsci 101.2, Fall Whole Genome Shotgun with words l Creation algorithm  Take a phrase  Replicate it four times  Chop into "chunks" characters l How to recreate original phrase? olve problems. ratively, create, compsci101 we get t 01 we get to work colla vely, create, and s. In compsci1 y, create, and s e get to work collabo …

Compsci 101.2, Fall

Compsci 101.2, Fall From Algorithms to Code l An algorithm that scales needs to run on a computer --- programming to the rescue! l Extensive libraries help with programming  Brain or Neuroscience  Engineering and Mathematics  Genomics  Graphic User Interfaces, … l We are using Python, extensible and simple

Compsci 101.2, Fall Understanding terminology: code l Move from "Hello World" to "Hello Around the World"  Look at Python, code, libraries  Learning (reviewing) terminology about Python print "hello world" f = open("hello_unicode.txt") for line in f: print line)

Compsci 101.2, Fall Getting ready to code in Python l You need a programming environment  Eclipse, PyDev, Python, Ambient Open source or free for academics l You need a computer with an operating system  Installing the suite of tools can be cumbersome Persist, Perserve, Get Help, start over  l Getting used to the environment can take time  Once you've got it, second nature! Easy to reuse with a new language

Compsci 101.2, Fall Running and Understanding Code l Need Python compiler/interpreter  We're using Canopy, includes libraries l Need an editor development environment  We use Eclipse and PyDev, open source and widely used, Ambient is Duke Plugin l You need experience thinking and coding and debugging ideas and code:  Installing the suite of tools can be cumbersome Persist, Perservere, Get Help, start over 

Compsci 101.2, Fall Code Dissection l Every line thought about, occasionally understood at different levels  Use your understanding of natural language and experience, apply to Python  Run program and apply knowledge to each of the other lines f = open("hello_unicode.txt") for line in f: print line f = open("hello_unicode.txt")

Compsci 101.2, Fall Questions about Python Code l Every line thought about, occasionally understood  What about when you make changes to the program? Answer these questions about possible errors introduced when making changes

Compsci 101.2, Fall Barbara Liskov l (one of) first women to earn PhD from compsci dept  Stanford 1968 l Turing award in 2008 l OO, SE, PL “It's much better to go for the thing that's exciting. But the question of how you know what's worth working on and what's not separates someone who's going to be really good at research and someone who's not. There's no prescription. It comes from your own intuition and judgment.”