CompSci 101 Introduction to Computer Science

Slides:



Advertisements
Similar presentations
(nothing to see here). First thing you need to learn is that sysadmin is about people, not technology If youre a sysadmin so you dont have to deal with.
Advertisements

CompSci 101 Introduction to Computer Science January 22, 2015 Prof. Rodger compsci101 spring151.
Geo 118/318 – Introduction to GIS Programming Dr. Jim Graham.
1 ENG236: Introduction (1) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
1 COMPUTER SCIENCE 1026A COMPUTER SCIENCE FUNDAMENTALS Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to Computing.
CompSci 101 Introduction to Computer Science January 13, 2015 Prof. Rodger compsci 101 spring
Introducing Java.
Welcome to CS 115! Introduction to Programming. Class URL Please write this down!
Media Computing Instructor Byung Kim Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment.
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
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.
CompSci 101 Introduction to Computer Science Sept. 9, 2014 Prof. Rodger President Brodhead speech graduation 2010 CompSci 101 Fall
Welcome to CS61A Disc. 29/47 :D Dickson Tsai OH: Tu, Th 4-5pm 411 Soda Previous stop: None >>> Today: Working effectively in.
CSE8A: Introduction to Programming in Java Fall 2012 Prof. Christine Alvarado cse8afall.weebly.com.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
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.
Geo 118/318 – Introduction to GIS Programming Dr. Jim Graham.
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
Chapter 1: Introduction to Computer Science and Media Computation.
CompSci 101 Introduction to Computer Science Sept 13, 2016 Prof. Rodger compsci101 fall161.
JavaScript Part 1 Introduction to scripting The ‘alert’ function.
Introduction to CSCI 1311 Dr. Mark C. Lewis
CSC 241: Introduction to Computer Science I
CMPT 201 Computer Science II for Engineers
Course Overview - Database Systems
CMSC104 Problem Solving and Computer Programming Spring 2008
Geo 318 – Introduction to GIS Programming
Week 3 - Wednesday CS 113.
Introduction to Eclipse
Introduction to Programming
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
THIS IS HOW RPROGRAMMING WILL LOOK LIKE IN 10 YEARS TIME.
CompSci 101 Introduction to Computer Science
Computer Science 102 Data Structures CSCI-UA
CompSci 101 Introduction to Computer Science
Introduction CSE 1310 – Introduction to Computers and Programming
Geo 118/318 – Introduction to GIS Programming
Week 1 Gates Introduction to Information Technology cosc 010 Week 1 Gates
Welcome to CS 1010! Algorithmic Problem Solving.
Introduction to Data Programming
Course Overview - Database Systems
CompSci 101 Introduction to Computer Science
CompSci 101 Introduction to Computer Science
Introduction to Computer Programming
Learn… Create… Program
EECE 310 Software Engineering
Geo 318 – Introduction to GIS Programming
Lesson 1: Fundamentals of Programming
Introduction to CS II Data Structures
Learn… Create… Program
CMSC104 Problem Solving and Computer Programming Fall 2010
Last Class We Covered Asymptotic Analysis Run “time” Big O
CS 2530 Intermediate Computing Dr. Schafer
Learn… Create… Program
Learn… Create… Program
Applying principles of computer science in a biological context
CMSC104 Problem Solving and Computer Programming Spring 2010
Professor: Shereen Khoja
CSCI 203: Introduction to Computer Science I
CS 580u Programming Systems and Tools
Zorah Fung University of Washington, Winter 2016
CSC 241: Introduction to Computer Science I
Open data in teaching and education
Week 1 - Friday COMP 1600.
Presentation transcript:

CompSci 101 Introduction to Computer Science Aug 31, 2017 Prof. Rodger compsci 101 fall 2017

Announcements Reading for next time on calendar page RQ 2 due Tuesday Assignment 1 due Tuesday Have fun with Blockly Plan for Today: Algorithms, Problem Solving and Python Where do you find the assignment? Where do you find install instructions? compsci 101 fall 2017

Tips on Using the VM Each netid only one VM Kill the tab you are in when you are done! On Windows 10? Try Microsoft Edge OIT is making available a local VM compsci 101 fall 2017

Software Failure compsci 101 fall 2017

Software Failure compsci 101 fall 2017

Software Failure compsci 101 fall 2017

Lab 1 This Week Done! Run the VM Modify Python program Scratch program for fun We know you don’t know much Python yet, but hopefully you could read a program and figure out just the part you need to modify to make a change. You also got a chance to experiment with Scratch. Scratch and Blockly are both compsci 101 fall 2017

Last Time Scratch program "Hello World" Scratch Program Colors Duke blue: motion Mustard: control Light blue: sensing Orange: data Purple: looks Here is the program we saw last time. This code is all associated with the girl. A program executes commands one after the other. After “when Green flag is clicked” we then go to the next command. compsci 101 fall 2017

Python code hello.py compsci 101 fall 2017 Here is a very simple Python program. Run this in Eclipse compsci 101 fall 2017

Python data reading code f = open("kjv10.txt") st = f.read() total = len(st) zc = st.count('z') print "total # chars = ",total print "number of z’s",zc for ch in 'aeiou': print ch, st.count(ch) Run this program after they answer the questions. compsci 101 fall 2017

Woa!!! Am I suppose to understand all that code right now!!!! We will learn all that over The next month! compsci 101 fall 2017

Explain Python data reading code bit.ly/101f17-0831-1 f = open("kjv10.txt") st = f.read() total = len(st) zc = st.count('z') print "total # chars = ",total print "number of z’s",zc for ch in 'aeiou': print ch, st.count(ch) Run this program, after they answer the questions. The google form gives you the output from this code and you want to answer questions about it.

Daphne Koller, AI Pioneer, Educator Computers learn to diagnose breast cancer? And more? The Data Scientist on a Quest to turn Computers into Doctors http://bit.ly/koller-cancer http://wrd.cm/1E9zFqy On Coursera: "But to practice problem-solving, a student must first master certain concepts. By providing a cost-effective solution for this first step, we can focus precious classroom time on more interactive problem-solving activities that achieve deeper understanding — and foster creativity." Coursera Founder, NY Times, December 5, 2011 She is an Israeli-American who is a computer scientist who works in the area of Artificial Intelligence. Machine Learning, The way breast cancer tissue is evaluated is people look at the tissue under a microscope and score it on a scale based on how it looks. She with other researchers built a software program called C-Path that uses machine learning techniques to analyze the images. They want to predict the scale of the cancer and predict the survival rate. How do they do this, they train the computer by giving it a variety of samples from people who already have cancer and from people who don’t. The program learns what an image should look like for each part of the scale. This program does a pretty good job of determining if someone new has cancer or not. It was more accurate then humans looking at images. She also is the founder of Coursera. Anyone take a course on Coursera? In 2016, became Chief computing officer at Calico, a research and development biotech company compsci 101 fall 2017

Our Programming Environment Install 5 items or just use VM! Why Java? – not using Eclipse – platform for development Python – programming language Pydev – Python IDE for Eclipse Canopy – python libraries Ambient – turnin/snarf files to/from Duke compsci 101 fall 2017

How does one get help in CompSci 101? Consulting hours Sunday-Thursday 7:30-11:30pm Office hours (prof, TAs) Collaborate with other students Piazza Ask questions Do not post your code and ask what is wrong! Post error message and line of code for error message If added class late, may need to add yourself Piazza is your friend!

How to succeed in Compsci 101 Start assignments early, they'll take longer than you think Read the book, we'll build on it in class Collaborate well, but be sure you can do work on your own! Be curious, work hard at beginning, think carefully Show collaboration policy and talk about it. compsci 101 fall 2017

Your goal is to … Get all assignments completed and turned in on time. AND… compsci 101 fall 2017

Your goal is to … Get all assignments completed and turned in on time. Understand the code you turn in. Be able to explain the code you turn in. AND… compsci 101 fall 2017

Algorithm Recipe Sequence of steps that constitute instructions Step-by-step procedure for calculations Biscuits Cookie Sandwich Algorithm Many recipes, such as baking bread you have to follow the recipe exactly or it could be a disaster. Mention my grandmother’s biscuit recipe. I tried to follow her as she made them but she didn’t measure anything Just kept adding ingredients until they felt right. We will look at a much simpler recipe. Make a cookie sandwich. Given cookies and icing. Have students give instructions on how to make a cookie sandwich compsci 101 fall 2017

Write an algorithm for making a cookie sandwich bit.ly/101f17-0831-2 Cookie Sandwich Here are your supplies: should look like: Algorithm Many recipes, such as baking bread you have to follow the recipe exactly or it could be a disaster. We will look at a much simpler recipe. Make a cookie sandwich. Given cookies and icing. Have students give instructions on how to make a cookie sandwich compsci 101 fall 2017

Algorithm http://53eig.ht/1tZy909 Recipe Sequence of steps that constitute instructions Step-by-step procedure for calculations How do Netflix and Amazon know me? Compsci101 project: capable of implementation as a program, but much more basic What does Nate Silver do? http://53eig.ht/1tZy909 More on algorithms: Nate Silver – Statitician and journalist. he has predicted presidential winner in every state – last two years, also big in sports Nate Silver – Baby Names Recommender - project later in the semester another algorithm http://moreintelligentlife.com/content/features/anonymous/slaves-algorithm compsci 101 fall 2017

Algorithm – Nate Silver and others Data from the social security administration on the names of babies for each year. For some names they were only popular at certain times. So if your name is Betty or Dorothy, you are probably in your 60’s or older. If your name is Brittany, you are probably in your 20’s. Some names keep popular through the years, such as Anna compsci 101 fall 2017

compsci 101 fall 2017 Nate silver also does these kinda polls This picture is from late August 2016. compsci 101 fall 2017

Google Algorithm – with News Algorithms are in the news everywhere. Google algorithms but look in the news feed. They are being used in all disciplines to solve problems compsci 101 fall 2017

Google Algorithm – with News Algorithms are in the news everywhere. Google algorithms but look in the news feed. They are being used in all disciplines to solve problems compsci 101 fall 2017

Algorithms that scale: An example Human Genome Project Multiple approaches, relying heavily on computational power and algorithms Combine reads of DNA sequences, we'll look at an illustrative example These combine bio/chemistry techniques with computational techniques to recreate the sequencing, e.g., CGATTCCG… from "live data", actual DNA. Human Genome project has revolutionized biology, genomic medicine All kinds of ways of understanding disease, and cures, new drugs They are all here because we have the human genome mapped out. The whole field of biology has been transformed by being able to digitize dna. Once you have that dna, then you can replicate it and you can do amazing things. It is computer scientists that made it possible, Computer Scientists read these DNA sequences and used biochemistry techniques And computational techniques to digitize., get the CGAT’s from real live data I want to get those sequences into my computer. Because once I know what the sequences are I so I can design experiments on them, and then I can try the experiements on live DNA that can change human kind. OLD , Digitize DNA – duplicate it a lot and chop it up Want to construct it digitally – turn it into 0’s and 1’s Google genome shotgun – combining new sequencing scientist and algorithms working together that collaborate – CS couldn’t do this by themselves compsci 101 fall 2017

Eugene (Gene) Myers 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.” BLAST and WG-Shotgun It was interesting because there were two big groups who were racing to sequence the human genome. Gene Myers was the main computer scientist. He collaborated with other scientists. They worked together to come up with the algorithm. By themselves they may not have been able to solve this problem. These are the algorithms they came up with many years ago that are still being used. BLAST - search tool to look up proteins in a database to look for similarities Where does this genome come from?

Whole Genome Shotgun with words 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 … Creation algorithm Take a phrase Replicate it four times Chop into "chunks" 15-22 characters How to recreate original phrase? We have a problem for you to solve. We have come up with a problem that is like the whole genome shotgun algorithm, but we are applying it to words, a paragraph, instead of DNA. You take a whole bunch of text, you replicate it and then you chop it up. Then you try to reassemble it by looking at areas of overlap. This is what they do with DNA. In this case we have already replicated it and chopped it up. We want you to think about how you would use the pieces to recreate the original phrase. Think about how you are solving the problem as you solve it. What are the steps in the algorithm http://bit.ly/101f17-0831-3 compsci 101 fall 2017

From Algorithms to Code An algorithm that scales needs to run on a computer --- programming to the rescue! Extensive libraries help with programming Brain or Neuroscience Engineering and Mathematics Genomics Graphic User Interfaces, … We are using Python, extensible and simple We will be using large amounts of data and look at algorithms that scale. Python has a lot of libraries compsci 101 fall 2017