1 An Extremely Short Introduction to Computer Programming Mike Scott.

Slides:



Advertisements
Similar presentations
Computer Science Department Introduction To Computers and Programming Knowledge: Understand the concepts of computer, hardware, software and programming.
Advertisements

Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Introduction to Programming. COMP104 Lecture 1 / Slide 2 Objectives * To learn fundamental problem solving techniques: n define a problem n design an.
Chapter Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing Describe.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
CS 101 Course Summary December 5, Big Ideas Abstraction Problem solving Fundamentals of programming.
First Bytes - LabVIEW. Today’s Session Introduction to LabVIEW Colors and computers Lab to create a color picker Lab to manipulate an image Visual ProgrammingImage.
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
Introduction to Programming Programming. COMP102 Prog. Fundamentals I: Introduction / Slide 2 Objectives l To learn fundamental problem solving techniques.
Introduction to Programming. COMP104 Introduction / Slide 2 Objectives * To learn fundamental problem solving techniques * To learn how to design a program.
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Introduction to Programming (in C++) Introduction Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC.
1 ENG236: Introduction (1) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
1 Programming Languages Marjan Sirjani 2 1- The Study of Programming Languages The purpose of language is simply that it must convey meaning. (Confucius)
Announcements — Tues., Jan. 19 For next time, read Learning Computing with Robots, chs. 1 and 2. The Blackboard site is up and operational! not much content.
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
Chapter 0: Introduction CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp.
Chapter 01 Nell Dale & John Lewis.
Introduction to Computer Programming Computer Programming I Introduction to Aerospace Created by The North Carolina School of Science and Math.The North.
History of Programming Languages
Programming Languages – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
Programming Languages CPS120: Introduction to Computer Science Lecture 5.
Introduction COMP104: Fundamentals and Methodology.
Introduction CSE 1310 – Introduction to Computers and Programming
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
Overview of Computing. Computer Science What is computer science? The systematic study of computing systems and computation. Contains theories for understanding.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
Chapter 1 The Big Picture.
CS101 Introduction to Computing Lecture Programming Languages.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
1 Programming Languages Marjan Sirjani Course web site:
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Building Java Programs Chapter 1 Introduction to Java Programming Copyright (c) Pearson All rights reserved.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
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 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Georgia Institute of Technology Speed part 1 Barb Ericson Georgia Institute of Technology May 2006.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
CS154 A History of Computation Thaddeus Aid Department of Computer Science San Jose State University Spring 2016 Creative Commons Attribution-ShareAlike.
Programming. In your own words, explain what an algorithm is, and give an example of how people use algorithms every day.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
Evolution and History of Programming Languages
The language focusses on ease of use
CS 141 Introduction to Computer Science and Structured Programming
Introduction to programming languages, Algorithms & flowcharts
Machine and Assembly Language
Introduction to programming languages, Algorithms & flowcharts
PROGRAMMING LANGUAGES
CSCI-235 Micro-Computer Applications
CSC 221: Computer Programming I Fall 2005
CS101 Introduction to Computing Lecture 19 Programming Languages
Introduction CSE 1310 – Introduction to Computers and Programming
Choice of Programming Language
Programming COMP104: Fundamentals and Methodology Introduction.
Introduction to programming languages, Algorithms & flowcharts
Introduction to Computers and Python
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Introduction to Computer Programming
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Presentation transcript:

1 An Extremely Short Introduction to Computer Programming Mike Scott

2 Who Am I? From St. Charles, Missouri Attended Stanford University US Navy , Nuclear Submariner Married 1997 to Kelly, A US Navy Nurse Masters in CS, 1998, Rensselaer Polytechnic Institute, Troy, New York Out of Navy 1998 (both of us), moved to Austin to work for Motorola (Worst 10 weeks of my life) 2 years teaching CS at Round Rock High School 6 years as a lecturer here at UTCS department

3 Olivia and Isabelle

4 Computer Science and Computer Programming There are many different fields of study in Computer Science Robotics Architecture Graphics Artificial Intelligence Systems And many, many more

5 Where Does Programming Fit in? "Having surveyed the relationships of computer science with other disciplines, it remains to answer the basic questions: What is the central core of the subject? What is it that distinguishes it from the separate subjects with which it is related? What is the linking thread which gathers these disparate branches into a single discipline? My answer to these questions is simple -- it is the art of programming a computer. It is the art of designing efficient and elegant methods of getting a computer to solve problems, theoretical or practical, small or large, simple or complex. It is the art of translating this design into an effective and accurate computer program." –C.A.R. Hoare, Essays in Computing Science Many different areas of Computer Science, computer programming is an important tool in almost all of those areas

6 Algorithms and Computer Programs Algorithm, a set of detailed, exact instructions, to carry out some task or solve some problem A computer program is the expression of an algorithm in a language a computer can understand A high level programming language is something that is used to implement an algorithm –suppose to be easy for humans to understand

7 Programming Languages Many different programming languages –Java, C, C++, Scheme, Haskell, Visual Basic, Perl, Python, Tcl/Tk, Pascal, Basic, Lisp, Prolog, Cobol, C#, Smalltalk, Eiffel, Fortran, Ada, Mathematica, MatLab, LabView These languages are divided into may different types –Object Oriented, Procedural, Functional, Graphical many different ways to solve a problem

8 LabView LabVIEW is a graphical programming language –as opposed to a text based programming language such as Java or C++ –originally developed to collect and analyze data from instrumentation. –can be used as a general purpose programming language There are similarities –must think about what the problem is –what is the program suppose to do? –must plan a solution –must implement and test the solution The difference is what you do when implementing solution. –typing vs. working with icons

9 LabView Program

10 Java Program (Partial) public void paintValue(Graphics g) { floath,s,b; intcol; Stringwks,outs; intred,green,blue; h = (float)hValue; s = (float)sValue; b = (float)bValue; col = Color.HSBtoRGB(h,s,b); g.setColor(new java.awt.Color(col)); g. fill3DRect(mainx, mainy+mainh+cy, mainw+cx+satw,cy*2, true); int wk = col/256/256/256; col = col - wk; red = col/256/256; green = (col-red*256*256)/256; blue = col-red*256*256-green*256; wks = Integer.toString(255+red,16); if (wks.length()==1) wks = "0" + wks; outs = wks; wks = Integer.toString(255+green,16); if (wks.length()==1) wks = "0" + wks; outs = outs + wks; wks = Integer.toString(255+blue,16); if (wks.length()==1) wks = "0" + wks; outs = outs + wks; g.clearRect(0, mainy+mainh+cy*3, size().width, 35); g.setColor(Color.black); g.drawString("Color value = " + outs.toUpperCase(), mainx+5, mainy+mainh+cy*3+25); }

11 Result

12 What a Computer Does Programs must be converted into instructions the Central Processing Unit of a computer can understand The CPU carries out simple operations. Addition, subtraction, multiplication, division on numbers So what is the difference between a computer and a calculator? –The Big Difference is a computer can do calculations really fast Pentium 4 chip from 2001 can perform approximately 1,700,000,000 computations per second  If something can be represented numerically it can be stored on a computer and manipulated via the computer! pictures, images, video, music, text, DNA data, …

13 Program Conversion high level programming languages are easier for humans to use a CPU understands a limited set of instructions expressed in binary, 1s and 0s the programs you write are translated or converted into a set of instructions the cpu can understand and carry out –this is done by another program called a compiler

14 Humans = Smart, Computers = Dumb Programming languages are just tools for writing programs No one best programming language LabVIEW -> do a lot of interesting stuff very quickly Really good programmers know lots of languages and pick the right one for a particular task –part of solving the problem, how to frame the solution