CS 51 Intro to CS. Art Lee. September 2, 2014



Similar documents
CS 40 Computing for the Web

Fall 2012 Q530. Programming for Cognitive Science

Chapter 13: Program Development and Programming Languages

What is a programming language?

Chapter 13: Program Development and Programming Languages

Objectives. Python Programming: An Introduction to Computer Science. Lab 01. What we ll learn in this class

9/11/15. What is Programming? CSCI 209: Software Development. Discussion: What Is Good Software? Characteristics of Good Software?

The course assumes successful completion of CSCI E-50a and CSCI E-50b, i.e. at least two semesters of programming, with a grade of C- or better.

COURSE TITLE COURSE DESCRIPTION

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Python Programming: An Introduction to Computer Science

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

Programming Languages

DEGREE PLAN INSTRUCTIONS FOR COMPUTER ENGINEERING

Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

Computer Programming. Course Details An Introduction to Computational Tools. Prof. Mauro Gaspari:

CSE 307: Principles of Programming Languages

Welcome to Introduction to Computers and Programming Course using Python

CS 1361-D10: Computer Science I

Programming Languages & Tools

Example of Standard API

CSC 314: Operating Systems Spring 2005

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

CS 253: Intro to Systems Programming

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

1/20/2016 INTRODUCTION

Chapter 12 Programming Concepts and Languages

Python Programming: An Introduction to Computer Science

How To Pass The Cis 50 Online Course

Fundamentals of Computer Programming CS 101 (3 Units)

M.Tech. Software Systems

Mobile Application Development

EE361: Digital Computer Organization Course Syllabus

02-201: Programming for Scientists

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Describe the process of parallelization as it relates to problem solving.

Masters in Human Computer Interaction

Datavetenskapligt Program (kandidat) Computer Science Programme (master)

Ch. 10 Software Development. (Computer Programming)

Lecture 1: Course Introduction"

Department of Computer Science

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Fluency in Information Technology

Introduction to programming

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

CMSC Fundamentals of Computer Programming II (C++)

Levels of Programming Languages. Gerald Penn CSC 324

McGraw-Hill The McGraw-Hill Companies, Inc.,

Software: Systems and Application Software

Syllabus for CS 134 Java Programming

INFSCI 1017 Implementation of Information Systems

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz

School of Computer Science

3 SOFTWARE AND PROGRAMMING LANGUAGES

CS 1340 Sec. A Time: 8:00AM, Location: Nevins Instructor: Dr. R. Paul Mihail, 2119 Nevins Hall, rpmihail@valdosta.

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Computer Science 1015F ~ 2010 ~ Notes to Students

CSCE 314 Programming Languages

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

Chapter 1 Fundamentals of Java Programming

CS 261 C and Assembly Language Programming. Course Syllabus

1001ICT Introduction To Programming Lecture Notes

Image credits:

A Python Tour: Just a Brief Introduction CS 303e: Elements of Computers and Programming

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008

CSCI E 98: Managed Environments for the Execution of Programs

Programming Languages

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Computer Layers. Hardware BOOT. Operating System. Applications

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

How To Get A Computer Science Degree At Appalachian State

Department of Computer Science

Computer and Information Sciences

Lesson 06: Basics of Software Development (W02D2

Data Centers and Cloud Computing

COS 333: Advanced Programming Techniques

CS 170 Java Programming 1. Welcome to CS 170. All about CS 170 The CS 170 Online Materials Java Mechanics: Your First Program

ATSBA: Advanced Technologies Supporting Business Areas. Programming with Java. 1 Overview and Introduction

DATA SCIENCE ADVISING NOTES David Wild - updated May 2015

CS Standards Crosswalk: CSTA K-12 Computer Science Standards and Oracle Java Programming (2014)

The programming language C. sws1 1

ELEC 377. Operating Systems. Week 1 Class 3

Course MS10975A Introduction to Programming. Length: 5 Days

COWLEY COLLEGE & Area Vocational Technical School

Computer Science. General Education Students must complete the requirements shown in the General Education Requirements section of this catalog.

CS101 Lecture 24: Thinking in Python: Input and Output Variables and Arithmetic. Aaron Stevens 28 March Overview/Questions

REGULATIONS FOR THE DEGREE OF BACHELOR OF SCIENCE IN BIOINFORMATICS (BSc[BioInf])

Cloud Computing. Up until now

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

Programming Languages

Computer Science Graduate Program Rules and Procedures Michigan Technological University. May 9, 2012

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

JR 204 Introduction to Web Design. Course Syllabus. Course Description: 3 Credits. Course Overview. Course Structure. Prerequisite: none

AP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities

02 B The Java Virtual Machine

Transcription:

CS 51 Intro to CS Art Lee September 2, 2014

Announcements Course web page at: http://www.cmc.edu/pages/faculty/alee/cs51/ Homework/Lab assignment submission on Sakai: https://sakai.claremont.edu/portal/site/cx_mtg_79055 Survey form: See Announcements on the course web Reading assignment for this week: Chapter 1 of Reges Emacs don t worry about it yet Take a break around 10:15am 2

Goals Introduction to computer science Learn how to solve a problem by: defining the problem developing a solution (algorithm) implementing the solution by writing a computer program testing and fixing the programming solution Learn to program in Java 3

Philosophy Welcome all majors and backgrounds! Provide a healthy mix of the practical and theory Develop problem solving skills 4

Still deciding? Prerequisites: none Known as "CS 51" - the first course in the introduction to computer science sequence For non-cs majors, this course is an excellent way to get an introduction to what computer science is all about and learn how to program; however you may consider taking CS 40 (Computing for the Web) if you are not intending to pursue further study in CS beyond the first course. For CS majors, this course is a launching point into the computer science sequence/major 5

Take this course if you... like solving (tricky) problems like building things (will) work with large data sets are curious about how Facebook, Google, etc. work have never written a computer program before are shopping around for a major CS 51 is a good indicator of who will enjoy and succeed in CS 6

How to succeed in this class Attend class Not all information is in my lecture notes or in the book I draw a lot on the board Take the homework and lab assignments seriously Start early Homework will take longer than you think Read the reading assignments and review the lecture notes and example code Learning to read code takes practice Ask questions if confused. Don't stay confused. 7

Textbook "Building Java Programs: A Back To Basics Approach" by Reges and Stepp I will post links to other references as we go 8

Homework There will be about one assignment per week Homework assignments will be posted to the course web You will turn in homework on Sakai Respect the homework assignments! Designed to challenge you in applying what you've learned so far Start early! Programming projects almost always take longer than expected Study the solutions and compare with your own work Read "How To Approach This Class" in the syllabus for detailed suggestions. 9

Lab There are two lab sections: Section 1: Tuesday, 8:00-8:50am, Room TBD Section 2: Tuesday, 11:00-11:50am, Room TBD You may attend either one Attending labs is optional but the lab assignments are mandatory Lab assignments will be posted to the course web site Turn in lab assignments on Sakai 10

Cooperation vs. cheating Cooperation (talking over problems) is a good way to learn and is encouraged Copying is not allowed on homework or exams no matter the source (written or verbal). When you submit your homework or tests, you are pledging that the work is your own and you have not copied it. You are also pledging that you have not allowed others to copy it. For more details on my policy on this matter, refer to the one in the course syllabus 11

Grading See the "Grading" section of the course web site for details Also browse the class web to see other info that I am not going over in class 12

What is computer science? A definition from the Internet: Computer science is the systematic study of computing systems and computation. The body of knowledge resulting from this discipline contains theories for understanding computing systems and methods; design methodology, algorithms, and tools; methods for the testing of concepts; methods of analysis and verification; and knowledge representation and implementation. 13

For us, we will Learn how to begin with a problem statement and systematically design a computer program that solves the problem Write programs Using a programming language, Java in particular While interacting with a computer through an operating system such as DOS, Windows, or Unix/Linux/Mac OS X Execute the programs Using a compiler and an interpreter in the case of Java While trying to understand what is happening in each step of the process 14

So,... We will learn how to write a program that solves a given problem We will learn enough of the programming language Java to write such programs Along the way we will learn many fundamental concepts in computer science that make all these possible We will use a Java compiler (and a Java bytecode interpreter) as part of a programming environment called jgrasp or Eclipse We will use some hardware, whatever computer that you happen to be using We will learn the entire lifecycle of program development: from a concept in your head to a program to a piece of compiled code to electrical signals that run through the wires (abstracted views on the low-level elements of course) 15

So,... (cont.) At the end of the semester you will be comfortable enough (?) to write Java programs that solve fairly complex problems You will have hopefully learned enough about computer science by then and be able to decide whether or not CS is for you to pursue as a discipline, if you are not sure of that yet In any event the CS concepts/fundamentals that you learn in the course will help you understand the concept of computing and some of the key technologies that underlie the real world computing systems that you see now and you will see in the future 16

What do computer scientists do? In general, computer scientists deal with many things, some of which include: Build computers Build operating systems Programming languages and compilers Theory of computation Algorithms and data structures Parallel systems, distributed systems Web systems including social networking systems Software engineering Computer architecture Databases 17

(Cont.) Artificial intelligence Computer graphics Human-Computer Interaction Natural language processing Speech recognition Computer vision Cryptography Computer security Networking Scientific computing Biocomputing... 18

The big picture of a computer Hardware CPU Memory I/O devices Disk Bus Software Operating system (DOS, Windows, Unix/OSX) Applications Web apps Mobile apps Hello.java program that we will see soon Java compiler (the 'javac' command that we will see) Firefox, Chrome, Facebook, Tic Tac Toe, etc. 19

What is a program? A sequence of instructions that specifies how to perform a computational task see Hello.java What is the computational task that we perform in this example? 20

What is programming? Programming is the process of writing a program using a programming language Also referred to as "writing code" or simply "coding Program execution: the act of carrying out the instructions contained in a program A computer is pretty dumb though Consequently, you have to give super clear and precise instructions A computer will happily do the same thing forever (on an infinite loop) if you tell it to do so, even if you didn't mean to! Learning to program is just like learning a "natural" language like Spanish. You have to LEARN the: Syntax: the words and rules in the language Semantics: the meaning of each word or phrase in the language 21

What is a programming language? A systematic set of rules used to describe computations in a format that is editable by humans A "formal" language as opposed to a "natural" language Java (cf. C, C++, C#, Python, Objective-C, Javascript, etc.) High-level languages Low-level languages 22

Computer instructions: machine language Binary instruction (1's and 0's) Most instructions just move data around or perform simple arithmetic operations Binary programming is ready hard and tedious but early programmers used to this! Example: on Intel x86 processors, 1011000001100001 means to copy a 97 to a particular register 23

Computer instructions: assembly language Symbolic (meaningful) names for binary instructions and memory More readable Feasible for programmers to use Example: ADD DR, SR1, SR2 ; DR <- (SR1) + (SR2) LD DR, LABEL ; DR <= Mem[LABEL] LDR DR, BaseR, Offset ; DR <- Mem[BaseR + Offset] STI SR, LABEL ; Mem[Mem[LABEL]] <= SR 24

Computer instructions: high-level language Symbolic names for assembly instructions and memory Symbolic names for basic operations such as conditionals and looping Language constructs for abstracting a set of instructions Close to "natural" languages - close to being readable! Example: print("welcome to CS!"); y = a * x * x + b * x + c; 25

Why use a high-level language? Conciseness high-level programming languages allow us to perform common operations in a concise and readable fashion Maintainability Modifying and maintaining code is much easier when the code is concise and easy to read (as compared to lengthy and difficult to read assembly or binary code) Portability Different CPU's accept different binary instructions Writing in a high-level language allows code to be translated or "compiled" into a platform-specific binary code Allows your code to be "ported" to another platform 26

Why Java? Relatively simple simpler than C++ General-purpose, object-oriented Platform independent (Mac, Windows,...) Java has good support Widely used http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html 27

Java s roots C was developed in the early 1970 s C was designed to be small, fast, with little built in safety C++ was developed in the late 1970 s C++ is a superset of C and extends C to include object-oriented concepts Java borrowed from C/C++ but more concerned about safety and productivity at the cost of some speed Java's creator James Gosling has described Java as "C++ without guns, knives, and clubs Designed to be used in the Internet era 28

Demo: some examples of what we will do this semester: Hello.java Ttt.java Jukebox.java 29

Do these before next class Send me your survey form Read the course syllabus Read the course web Start reading Chapter 1 of Reges (will try to complete Ch 1 on Thursday) For Java compiler installation, you may wait until the first lab session 30

Two pieces of advice Attend every class! DO NOT GET BEHIND!! 31