Lecture 0 CSIS10A Overview. Welcome to CSIS10A (5 mins) – Typical format for class meetings New material first (monitors off, notebooks out) Practice.

Slides:



Advertisements
Similar presentations
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Advertisements

Lecture 1: Overview of Computers & Programming
Week 1 - Wednesday.  What did we talk about last time?  Syllabus  Computers.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
1 Fall 2008ACS-1903 Chapter 1 Topics Java History Java Programs Why Program? Computer Systems: Hardware and Software Programming Languages What Is a Program.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
CMPT 120 Introduction to Computer Science and Programming I Chris Schmidt.
CS211 Data Structures Sami Rollins Fall 2004.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
Topic 1: Introduction to Computers and Programming
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
CIS 260 Computer Programming I in C Prof. Timothy Arndt.
Chapter 1 - Introduction. Ch 1Goals To understand the activity of programming To learn about the architecture of computers To learn about machine code.
COMP Computer Basics Yi Hong May 13, 2015.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
IB Computer Science II Paul Bui
The Study of Computer Science Chapter 0 Intro to Computer Science CS1510, Section 2.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Introducing Java.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
Computer Hardware and Software Chapter 1. Overview Brief History of Computers Hardware of a Computer Binary and Hexadecimal Numbers Compiling vs. Interpreting.
The Computer Systems By : Prabir Nandi Computer Instructor KV Lumding.
How Java Programs Work MIS 3023 Business Programming Concepts II The University of Tulsa Professor: Akhilesh Bajaj All slides in this presentation ©Akhilesh.
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away.
Week 1 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Programming Concept Chapter I Introduction to Java Programming.
Week 1 - Friday.  What did we talk about last time?  Our first Java program.
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
Lecture 8 February 29, Topics Questions about Exercise 4, due Thursday? Object Based Programming (Chapter 8) –Basic Principles –Methods –Fields.
School of Computer Science & Information Technology G6DICP Introduction to Computer Programming Milena Radenkovic.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
Lecture.1: Getting Started With Java Jiang (Jen) ZHENG May 9 th, 2005.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
1 WELCOME TO CIS 1068! Instructor: Alexander Yates.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Chapter 1 09/04/13. Change Your Password  The command is: passwd In the lab first do : ssh -Y onyx  You will have to see me to change it, if you forget.
8 January 2016Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems
Ch 1 - Introduction to Computers and Programming Hardware Terminology Main Memory Auxiliary Memory Drives Writing Algorithms Using Pseudocode Programming.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
Introduction to Computer and Programing Thanachat Thanomkulabut.
CS 177 Recitation Week 1 – Intro to Java. Questions?
ITP 109 Week 2 Trina Gregory Introduction to Java.
Chapter 1 An Overview of Computers and Programming Languages.
Topic 2: Hardware and Software
Java Programming: From the Ground Up
Lecture 1: Introduction to JAVA
Introduction
Introduction to Programming
Introduction to Programming
Chapter 1: Introduction to Computers and Java
Introduction to Java Dept. Business Computing University of Winnipeg
CS190/295 Programming in Python for Life Sciences: Lecture 1
Computer Science I CSC 135.
Introduction CSC 111.
Introduction to Programming
15-110: Principles of Computing
IB Computer Science II Paul Bui
Computer Programming-1 CSC 111
Week 1 - Friday COMP 1600.
Presentation transcript:

Lecture 0 CSIS10A Overview

Welcome to CSIS10A (5 mins) – Typical format for class meetings New material first (monitors off, notebooks out) Practice new material (like a lab) – Syllabus – Aim of this course (learning Java) – Course assumes no prior knowledge of programming. – What is a program? A set of step-by-step instructions that directs a computer to solve some problem. – Pretty much anything you can do with a computer, you can do by programming in Java

Do introductions (15 mins) class website: Click on "Tell me about yourself" – Name – Major and what year – Why taking the course – Something unique about yourself then we go around and tell each other

Do administrative stuff (10 mins) – Few if any handouts will be printed. They will be posted on the web instead. – No late work (model solutions, quick turnaround) – For conflicts with class meetings: let me know now! – We will use the online textbook JavaNotes by EckJavaNotes Textbook does not always line up with class, but is a great reference – I will provide notes for each lab. – We will use online labs by Michael Kowalczk, used with permission. We will thank him at the end of class!Michael Kowalczk – Academic dishonesty – Office hours, and by appointment – Computer science tutor will be available – Steve Bruemmer our instructional tech, 9-5 most days

Do PB & J demonstration (20 mins) – Get into groups and write up instructions (10 mins) – Present the results and have me follow those directions (10 mins)

PBJ Debrief – Talk about observations; similarities to programming Explicitness Sequence, selection, repetition Dependencies - when does order matter? Closing open files and stuff What is a basic command? Unexpected uses of software Infinite loops

– Course will be challenging, fun, painful at times - much like making a sandwich But, you will make yourself more marketable or may get sold on computer science!

Basic computer anatomy

What the parts do CPU – ``The brain''; performs relatively basic operations – It only executes machine language – The machine language varies from CPU to CPU Storage – Primary storage/random-access memory/RAM/``memory'' Fast, but volatile and expensive – Secondary storage/hard drive/hard disk Cheap and non-volatile, but slow Input devices (the ``I'' in ``I/O'') – Mouse, keyboard Output devices (the ``O'' in ``I/O'') – Monitor, speakers, printer

How hardware relates to programming – Your.java program files are files, therefore found on the hard drive (typically) – Programs need to run fast, so the computer uses primary memory for programs that are currently running. – There are ways to communicate with I/O devices in Java.

Communicating instructions to the computer Problem: We want to give instructions to the CPU, but the CPU's language is hard for humans to read, write, and understand. How do we handle this? One (painful) solution: Just program in machine code – Why is this so painful? Just note this C code: main() { printf("hello, world"); } – does the same thing as the machine code on the next slide. – Since machine code depends on the CPU, the program would only work on a limited number of machines anyway

"Hello World" program in machine code

One (bad) solution: Try to make a system where we can just type in instructions with natural language, and have the computer translate that into machine code. – Extremely difficult – Very ambiguous; for example, in ``I called the guy with the cell phone'' - who is carrying the cell phone?

One (better) solution: Use an intermediate language that is somewhat easy for humans to use (i.e. Pascal, C++, etc.), and have the computer translate that into machine code. This translator is called a compiler. – Compiled languages such as C work in this way.

Running programs the Java way In Java, the computer simulates an imaginary CPU with very particular specifications. – This imaginary CPU is called the Java virtual machine (or JVM). – Java simulates the JVM much like an emulator simulates a Super-Nintendo Main advantage: The same code can be made to run on any machine without modification (see previous slide). – Example: Good for Java applets on the web Another advantage: Much better security can be implemented when running code in a virtual machine. – Example: again, crucial for Java applets on the web One disadvantage: Simulating the JVM makes the program run slower One caveat: There can actually be variations in your program from machine to machine, for a number of reasons – Different I/O devices – Different library implementations (or bugs) – Bugs in a JVM implementation (yes, it happens)

Source file  compiler  bytecode The JVM's language is bytecode, which is found inside.class files. – The compiler converts java files into class files – Class files are not human readable See the bytecode for the HelloWorld.java program

Java source file public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }

Java Bytecode for previous slide

A source file contains source code and is really just a simple text file. It contains (among other things) instructions for the computer to execute. – A ``.java'' ending is used to distinguish it as a Java source file – Java files have special structure so that the computer can translate it into machine code. – Use a text editor or an IDE (in this class we use BlueJ but you can also use Eclipse) to create source and make changes to it. – We'll make a simple "Hello World" program now!