Principles of Programming I (CIE 105)

Slides:



Advertisements
Similar presentations
The Peanut Butter & Jelly Computer Instructor’s Handout (modified from zerorobotics and CS10K Community handouts) KEY CONCEPTS Software and hardware work.
Advertisements

Making a “P and J” sandwich
Component 4: Introduction to Information and Computer Science Unit 5: Overview of Programming Languages, Including Basic Programming Concepts Lecture 1.
Introduction to Information and Computer Science Computer Programming Lecture a This material (Comp4_Unit5a) was developed by Oregon Health and Science.
Introduction to Programming
Peanut Butter and Jelly Sandwich Ingredients Peanut butterTwo slices of bread Jelly or jamKnifePlate.
JAVA Programming Environment © Juhani Välimäki 2003.
Begin Java Pepper. Objectives What is a program? Learn the basics of your programming tool: BlueJ Write a first Java program and see it run Make some.
Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions.
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
Lecturer: Fintan Costello Welcome to Hdip 001 Introduction to Programming.
How do we make our HelloTester.java program do something? The java in our HelloTester.java file won’t do anything by itself. We need to tell the computer.
HST 952 Computing for Biomedical Scientists Lecture 2.
Week 1 basic Python programs, defining functions Special thanks to Scott Shawcroft, Ryan Tucker, and Paul Beck for their work on these slides. Except where.
Slide 1 of 40. Lecture A The Java Programming Language Invented 1995 by James Gosling at Sun Microsystems. Based on previous languages: C, C++, Objective-C,
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Writing Methods. Create the method Methods, like functions, do something They contain the code that performs the job Methods have two parts.
Introduction to Java.
1 SD1042: Introduction to Software Development SD1042 Introduction to Software Development SCHOOL OF COMPUTING AND TECHNOLOGY Getting Started MODULE TEAM.
How to Make a Peanut Butter and Jelly Sandwich Presented by: Christopher DiFabio Project 5: How to Make a PB & J Sandwich May 21, 2012.
1 Building Java Programs Chapter 1: Introduction to Java Programming These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They may.
By: Rachel Kenney. First Step Get a plate and bread out.
CS110/CS119 Introduction to Computing (Java)
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
How to make a Peanut Butter and Jelly Sandwich!
Computer Bugs Original Powerpoint By: Spring LIS4480 Coding Team Jon.
Java ACO101: Introduction to Computer Science. The History of Java Started out as a research project at Sun Microsystems in 1991 Code named “Green” Based.
Java and C# [this is a bonus – it is not a required lesson] ACO101: Introduction to Computer Science.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
 Instructor: Dr. Jason Nichols –  Office Hours: – 9:30-10:30 M/W/F or by appointment – Business Building.
Week 1 basic Python programs, defining functions Special thanks to Scott Shawcroft, Ryan Tucker, and Paul Beck for their work on these slides. Except where.
How to Make a Peanut Butter and Jelly Sandwich Presented by: Andrew Stockmoe Project 5: How to Make a PB & J Sandwich 5/3/12.
Introduction to Programming in VB Chapter 1. 2 Software Development Life Cycle Gather Requirements Design Program Code & Test Program Implement u Software.
Presented by: Mr. Pugh’s Class 2011 Ingredients Peanut Butter Jelly Two Slices of Bread.
1/10/2008. >>> About Us Paul Beck * Third quarter TA * Computer Engineering * Ryan Tucker * Second quarter TA * Computer.
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
ITP 109 Week 2 Trina Gregory Introduction to Java.
8/2/07. >>> About Me Scott Shawcroft * Junior * Computer Engineering * Third Quarter TA * Creative Commons Intern * Small-time Open Source Developer
Computer Science I Lab 1 ISMAIL ABUMUHFOUZ | CS 180.
Algorithms. An algorithm is an effective method expressed as a finite list of well- defined instructions for accomplishing a goal.. Have one student give.
CS-140 Dick Steflik Lecture 3. Java C++ Interpreted optimized for the internet Runs on virtual ized machine Derived from C++ Good object model Widely.
Informational Writing (Procedural) ELACC5W2: Write informative/explanatory texts to examine a topic and convey ideas and information clearly. EQ: How can.
Introduction to Object Oriented
CSC 241: Introduction to Computer Science I
Chapter 1 – Introduction
Development Environment
Algorithms.
How do the students earn points on the essay?
C Programming Language
basic Python programs, defining functions
The Need for Algorithms 2 days
CS 240 – Lecture 11 Pseudocode.
Agile Web Development with Ruby and Rails
Getting Started ARCS Lab..
How to Run a Java Program
basic Python programs, defining functions
Introduction to Algorithm Design
UNIT 3 CHAPTER 1 LESSON 4 Using Simple Commands.
Fundamentals of Programming
SCIENCE ON FRIDAYS.
How to Run a Java Program
Introduction to AppInventor
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Introduction to Python programming for KS3
CSE 142, Winter 2014 Building Java Programs Chapter 1
Developing A Good Procedure
CSC 241: Introduction to Computer Science I
Presentation transcript:

Principles of Programming I (CIE 105) Lecture 1

Coursework Attendance 10% Class Quizzes 10% WAC 5% Lab Practice Exercises & Homework 15% Mid Term Exam 25% Final Exam 35% Total 100%

Purpose of a machine A central theme in computing is the design of a process for carrying out a task. Q: Could you suggest any tasks that could be carry by computers?

What is an algorithm? An algorithm is a finite sequence of steps for performing a task, such that: each step is a clear and unambiguous instruction that can be executed in a finite time; the sequence in which the steps are to be executed is clearly defined; the process is guaranteed to stop after a finite number of steps have been executed.

Try to create an algorithm for making a peanut butter and jelly sandwich? 1. Get out two slices of bread (and put the rest back). 2. Get out the peanut butter, the jelly, and a butter knife. 3. Spread the peanut butter on one slice of bread and the jelly on the other one. 4. Put the peanut butter and jelly away, and take care of the knife. 5. Put the slices together, put the sandwich on a plate, and bring it to me. Thanks!

Same, but for small kid and computer. 1. a) Locate bread. b) Pick up bread. c) Move to empty counter. d) Set down bread on counter. e) Open bag of bread. ... For computer. • Initialize item-to-location database. • If bread is in bread box: – Open bread box. – Pick up bread. – Remove hands from bread box. – Close bread box. …

What Is Programming? Programming is telling your computer how to do something. Large tasks must be broken up into smaller tasks, which must be broken up into still smaller tasks, down until you get to the most basic tasks that you don’t have to describe, the tasks your computer already knows how to do. (These are really basic things such as arithmetic or displaying some text on your screen.)

The Art of Programming An important part of programming is, of course, making a program that does what it’s supposed to do. Programs aren’t just built in one go, like a bridge. They are talked about, sketched out, prototyped, played with, refactored, tuned, tested, tweaked, deleted, rewritten.... A programmer not built; it is grown.

Programming Languages There are many languages to choose from (C, Java, Ruby, Perl...), and some have a larger set of those basic elements than others. Ruby has a fine set and is one of the easiest to learn (as well as being elegant and forgiving and the name of my daughter, and so forth), so we’ll use that one.

Java Source code public class HelloWorld { public static void main(String []args) { System.out.println("Hello World"); } Result Hello World

Ruby Source code puts ' Hello World‘ Result Hello World

Ruby Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features.

Getting Started We’ll be using three main tools when we program: 1. Text editor (to write your programs) 2. The Ruby interpreter (to run your programs), 3. And your command line (which is how you tell your computer which programs you want to run). (cmd)

Windows http://rubyinstaller.rubyforge.org/wiki/wiki.pl http://rubyforge.org/frs/?group_id=167&release_id=28426 Good text editor http://www.scintilla.org/SciTEDownload.html Bad Good!

Mac OS X , Linux Mac OS X http://www.barebones.com/products/textwrangler/ Linux http://www.scintilla.org/SciTE.html

First task. 1. Download installer 2. Install it 3. try to create and run you first program like this puts “Hello world”