ITP © Ron Poet Lecture 1 1 IT Programming Introduction.

Slides:



Advertisements
Similar presentations
compilers and interpreters
Advertisements

Software Development Languages and Environments. Programming languages High level languages are problem orientated contain many English words are easier.
Lecture 0 CSIS10A Overview. Welcome to CSIS10A (5 mins) – Typical format for class meetings New material first (monitors off, notebooks out) Practice.
Creating a Program In today’s lesson we will look at: what programming is different types of programs how we create a program installing an IDE to get.
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.
How to Create a Java program CS115 Fall George Koutsogiannakis.
Section 2.4: Errors. Common errors ● Mismatched parentheses ● Omitting space after operator or between numbers ● Putting operator between operands.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
01 Introduction1June Introduction CE : Fundamental Programming Techniques.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
 MODERN DATABASE MANAGEMENT SYSTEMS OVERVIEW BY ENGINEER BILAL AHMAD
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
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.
Computer Science 101 Introduction to Programming.
Programming In C++ Spring Semester 2013 Programming In C++, Lecture 1.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Java Programs COMP 102 #3.
Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction Paul Tennent
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Introduction to Java Tonga Institute of Higher Education.
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)
CS110/CS119 Introduction to Computing (Java)
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Programming Translators.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
Chapter 1: Introduction to Computers and Programming.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
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.
Computer Science 101 Introduction to Programming.
Week 1 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Program Development Life Cycle (PDLC)
© 2006 Pearson Education 1 Obj: cont 1.3 and 1.4, to become familiar with identifiers and to understand how programming languages work HW: p.51 #1.8 –
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
Editing & Compiling: UNIX vs. IDE and an Intro to Architecture.
CHAPTER 1 INTRODUCTION. CHAPTER GOALS To understand the activity of programming To understand the activity of programming To learn about the architecture.
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
1 CS1100 Fall Instructor: David Gries CS100M: Matlab No prior programming experience One semester of calculus Math & engineering type problems CS100J:
TEACHING AND LEARNING What you need to know School of Computing and Mathematics.
Intro to CS ACO 101 Lab Rat. Academic Integrity What does that mean in programming? Log into Blackboard and take the test titled “Applied Computing Course.
SC Introduction to Programming Lecture 1: 5 th May 2003.
 Programming - the process of creating computer programs.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Java Programs COMP 102 #3.
Object Oriented Programming Criteria: P2 Date: 07/10/15 Name: Thomas Jazwinski.
CS12230 Introduction to Programming Lecture 6-2 –Errors and Exceptions 1.
Computer Science Reaching Wider Summer School 2012.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
Compilers and Interpreters
© Peter Andreae Java Programs COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
Introduction to Computing Systems and Programming Programming.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Computer Science I ISMAIL ABUMUHFOUZ | CS 180. CS 180 Description BRIEF SUMMARY: This course covers a study of the algorithmic approach and the object.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
Introduction to PAD2 Dr. Mark C. Lewis
JavaScript/ App Lab Programming:
Development Environment
Component 1.6.
Component 1.6.
CSc 1302 Principles of Computer Science II
TRANSLATORS AND IDEs Key Revision Points.
Unit 1: Introduction Lesson 1: PArts of a java program
Programming.
Chapter 1 Introduction to Programming
Review of Previous Lesson
Presentation transcript:

ITP © Ron Poet Lecture 1 1 IT Programming Introduction

ITP © Ron Poet Lecture 1 2 No Programming Experience  We assume that many students on this course have never programmed.  The course will be geared to these students.  It is hoped that all students will be able to program reasonably well by the end of Further Programming.

ITP © Ron Poet Lecture 1 3 If You Have Programmed Before  The initial parts of the programming course will appear straightforward.  But the approach may be different to the one you have taken in the past.  At some point the programming ‘train’ will go past your current ability.  You should be on the train for a smooth transition.  Rather than having to jump onto a moving train.

ITP © Ron Poet Lecture 1 4 Keeping Connected  You should attend the lectures even if you have programmed before.  That way you notice new things as they appear.  You should attend the labs and do the labwork.  You can go when you have finished.  You should read ahead in the text book.  And do some of the textbook exercises in the lab.

ITP © Ron Poet Lecture 1 5 Initial Programming Labs  You will be part of a lab group, with a tutor and a demonstrator to help with problems.  There will be labwork each week.  There will be regular exercise which you should complete during the lab.  They will be marked by your tutor during the lab.

ITP © Ron Poet Lecture 1 6 Further Programming Labs  Later exercises will be assessed.  You will have to hand them in.  The programs will be submitted electronically.  So that we can run them.  You will get written feedback after they are marked.

ITP © Ron Poet Lecture 1 7 Talking with Computers  Computers are machines and don't understand anything.  They cannot resolve ambiguities by drawing on experience.  Computers are unbelievably pedantic about grammar.

ITP © Ron Poet Lecture 1 8 Machines  Because computers are machines, like DVD players.  They will not ‘understand what you mean’ if you get the instructions slightly wrong.  You need to develop a mental model of how computers work to be able to program them well.

ITP © Ron Poet Lecture 1 9 Steep Learning Curve  Programming can be difficult at first.  It requires good problem solving skills.  It will be hard at first, and requires persistence.  Suddenly everything will click and programming will make sense.

ITP © Ron Poet Lecture 1 10 Ambiguous?  If you ask a person if they want fries or salad, they may reply  I'll have the salad, I value my health, or  I'm a Glaswegian, so it's fries.  A computer would reply  Yes!  Because it will choose one or the other.

ITP © Ron Poet Lecture 1 11 Grammar Freak  I might say "Glasgow is the best university in it's region"  You might reply  Yes, that's why I'm here, or  You would say that wouldn't you.  A computer would reply  Grammatical error!

ITP © Ron Poet Lecture 1 12 Does Not Understand  We could state the formula  radius = 10  CircleArea = 4 * radius * radius  A human would say  Where did you learn your maths?  A computer would say  The area of the circle is 400!

ITP © Ron Poet Lecture 1 13 Low Level Computer Languages  The Central Processing Unit (CPU) of a computer works with very basic instructions.  Even the simplest of operations involves a large number of very tedious steps.  Fortunately most programmers don't have to program at this level.  Although some do.

ITP © Ron Poet Lecture 1 14 High Level Languages  Almost all programming is done in a high level programming language.  A translation program is run to convert this to a low level language that the computer understands.  This low level language program is then run.

ITP © Ron Poet Lecture 1 15 Compiler  The translation program is called a compiler.  It will check for grammatical errors, called syntax errors.  Eventually, when the program is free of syntax errors, it produces an executable program.  This can then be run, or executed.

ITP © Ron Poet Lecture 1 16 Many Computer Languages  The instructions in a low level language must match the electronics on the chip.  There is not much room for variation.  The high level language has no such restrictions.  Provided a compiler can be written to translate the instructions into a low level language.  Plenty of scope for inventing languages.

ITP © Ron Poet Lecture 1 17 Why Java  All computer languages have advantages and disadvantages.  Java has the advantage that it is wide ranging.  Whatever you want to do, there is the Java way of doing it.  Thus there is a consistent way of solving computer problems.

ITP © Ron Poet Lecture 1 18 Object Oriented  There are many different styles of programming.  Object Oriented is currently the best.  Java is object oriented.  Object orientation makes it easier to write large programs.  Smaller programs can be more complicated then they need be.

ITP © Ron Poet Lecture 1 19 Program Development  Running Java programs needs:  An editor to create the program.  A compiler to produce the executable.  A way of integrating libraries.  A way of launching the program.  Basic System uses separate tools  A general purpose editor like notepad.  General purpose program development tools. Make, javac, java.

ITP © Ron Poet Lecture 1 20 Integrated Development Environment  This is a self contained program that provides everything.  The editor understands Java  The compiler can indicate where an error occurred by marking lines in the editor.  Libraries are automatically included.  It keeps track of program files.  We will use the IDE eclipse on this course.

ITP © Ron Poet Lecture 1 21 Developing a Program - Syntax  Start by creating the program text in the editor.  Compile the program.  This will normally generate syntax errors.  Keep editing the program until there are no more syntax errors.

ITP © Ron Poet Lecture 1 22 Developing a Program - Runtime  Run the program.  This will normally generate run time errors.  The grammar is correct but program will eventually try and do something illegal.  Keep editing the program until there are no more runtime errors.

ITP © Ron Poet Lecture 1 23 Developing a Program -Semantic  Test the program.  The program may run and appear to work.  But the logic is wrong.  These logical errors are called semantic errors.  Semantic errors are the hardest to remove.

ITP © Ron Poet Lecture 1 24 Finding Semantic Errors  Work out a number of scenarios.  Different ways in which the program can run.  Work out your expected results by hand.  Run the program with each scenarios.  If the results are different, find out why.  Print out intermediate values to locate the errors.  Develop the program bit by bit, checking as you go.

ITP © Ron Poet Lecture 1 25 In the Lab This Afternoon  Accessing our system  You will need a user name, which is public.  and a password, keep it secret.  The password we give you will not be very memorable.  Change it when you have time.  Using  Most course announcements are by .

ITP © Ron Poet Lecture 1 26 Try out eclipse  I will give you some programs to type in and see what happens.  You are not expected to know a single word of Java at this stage.  There will be time for discussion during the tutorial at the end of the day.

ITP © Ron Poet Lecture 1 27 Conduct in the Lab  It is good to discuss aspects of the course with other students.  If you want to help a fellow student,  teach them how to do things,  don't do it for them.  You must do the assessed exercises yourself.