Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.

Slides:



Advertisements
Similar presentations
Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Advertisements

INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Programming Types of Testing.
Python Programming Chapter 1: The way of the program Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Computers: Tools for an Information Age
Program Flow Charting How to tackle the beginning stage a program design.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
An Overview of Programming Logic and Design
Compilers and Interpreters. Translation to machine language Every high level language needs to be translated to machine code There are different ways.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
Copyright © 2001 by Wiley. All rights reserved. Chapter 1: Introduction to Programming and Visual Basic Computer Operations What is Programming? OOED Programming.
Introduction To C++ Programming 1.0 Basic C++ Program Structure 2.0 Program Control 3.0 Array And Structures 4.0 Function 5.0 Pointer 6.0 Secure Programming.
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
C++ Crash Course Class 1 What is programming?. What’s this course about? Goal: Be able to design, write and run simple programs in C++ on a UNIX machine.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
1 Chapter-01 Introduction to Computers and C++ Programming.
Introduction to High-Level Language Programming
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
CSC-115 Introduction to Computer Programming
Programming Lifecycle
Program Development Life Cycle (PDLC)
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
110-A1 Central Processing Unit Main Memory Monitor Disk Keyboard mouse What's a Computer? Network CPU: (stupid) brain of the computer can do very simple.
What is Programming? A program is a list of instructions that is executed by a computer to accomplish a particular task. Creating those instructions is.
The Software Development Process
Chapter One An Introduction to Programming and Visual Basic.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
Programming and Languages Dept. of Computer and Information Science IUPUI.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Chapter 4 Software. Introduction Program: is a set of sequence instructions that tell the computer what to do. Software: is a collection of programs,
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 1: Introduction to Computers and Programming.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Computer Language
Lecture 1b- Introduction
Development Environment
Introduction to programming
Lecture 1 Introduction Richard Gesick.
CSCI-235 Micro-Computer Applications
A451 Theory – 7 Programming 7A, B - Algorithms.
TRANSLATORS AND IDEs Key Revision Points.
Programming.
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
1.3.7 High- and low-level languages and their translators
Programming Logic and Design Eighth Edition
Presentation transcript:

Programming

Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the computers what to do so that the computers do useful things Software on modern computers usually requires many instructions, millions sometimes so programmers work together in teams at software development companies

Programming skills Programmers need skills to write good programs Some can be learned, some are innate They need to be good communicators, both with machines and with people They should enjoy logic and mental puzzles Ideally they also have knowledge of the domain where their programs will be used

Programming Languages The first computer language was machine language, written in binary (first generation) Humans found it very very tedious Simple actions took hundreds of machine steps Humans had to translate their desired steps into machine instructions and then punch them in or toggle switches to make it happen

Assembly languages Soon the computer operators wanted an easier language to use (second generation) Assembly languages look a little like English – STO 4, X – JMP LAB1 – ADD 23, X – OUT X Still lots of steps but a little more understandable

Assembly languages But assembly language programs had to be translated back to machine code to be useful Machine code is the only language CPUs know The translating program is called an assembler There are still jobs for people who are good at assembly languages. Assembly is still used in game consoles, appliances, chips controlling machines, etc.

Higher Level Languages People still wanted easier languages to use, ones that were closer to how humans think instead of how computers work, more abstract (third generation, high-level languages) FORTRAN was the first commercially successful high-level language (Formula Translator), done in the 1950’s

Compilers High-level languages also need translator programs – they are called compilers and interpreters Other high-level languages are COBOL, Basic (all kinds of versions), C, C++, Java, Perl, Python Some have free translators, some translators cost money

How to Program Any programmer will have a routine to follow when given an assignment or deciding what they want to program UNDERSTAND THE PROBLEM – first! Sometimes they work through it by hand, sometimes they have to ask the customer / manager / employer questions about the details

How to, Part 2 Make a plan! A test plan! – Involves thinking about how to test the program Testing? It does not exist yet! But this early planning can give insights into how to solve the problem Make a design = writing an algorithm in pseudocode Pseudocode is a structured English, with no strict rules It’s a way to write a rough draft of a program before it actually gets put into a programming language

Test Plan Test Case Description InputsExpected OutputsActual Outputs Normal score in A range 92A Normal score in B range 84B Normal score in C range 72C Error due to wrong size of score -23Error message about value Error due to wrong type of input Aundetermined

Design in pseudocode Open the file for reading Get all the data from the file into a list Close the file Start the total at zero For each item in the list – Add the value of the item to a total – If the value is larger than 75, display a message Display the total

Programming Languages Languages (human and computer) have syntax and semantics The rules you learned in grammar school about spelling, punctuation, subject/verbs, parts of speech, etc. were syntax rules for English Programming languages have much stricter rules and will not work if you don’t follow them

Semantics The semantics of a human language is the meaning that the statements convey, the idea that you are trying to send from your brain to your listeners’ brains. The semantics of a programming language is what does the computer do when the program is translated to machine code and run by the CPU

Syntax to a human is not strictly necessary, we can get meaning from a statement which does not have perfect syntax (things like Twitter messages and text messages, for example) Syntax to a computer is required to be correct, so programmers have to have pretty good memories to remember the rules of the language

Errors When an English statement has an error, misspelling, wrong punctuation, wrong word, etc., we can usually figure out what is meant When a program has a syntax error, it cannot be translated, so it’s useless. Programmers get good at fixing syntax errors When a program has a semantics error, it is not doing what the programmer meant it to do (that’s called a bug)

Debugging Debugging (fixing mistakes in programs) is an art Programmers have tools to help them do this, but it is difficult. That’s one reason software packages have various versions. Bugs get fixed and the fixes are released to the customers

A career as a programmer Many people are employed as programmers – They may create new programs for their boss – They may maintain programs which are already written, debugging, modifying, updating, etc. Some people start their own companies to make the software they think will be useful or popular or profitable Some are self-employed contractors, hiring out to do programming jobs for different companies