Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction Paul Tennent

Similar presentations


Presentation on theme: "Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction Paul Tennent"— Presentation transcript:

1 Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction Paul Tennent http://paultennent.wordpress.com/G50PRO.html paul.tennent@nottingham.ac.uk Room C41

2 Course Overview 1 Semester 20 ish lectures plus lab sessions Assessment: Coursework one: 10% Coursework Two: 30% Coursework Three: 60% Course Objectives : To learn to think algorithmically and to express in sound implementations using a programming language (Scratch/Java).

3 Time Table 2 lectures a week : Wednesday: 9 am, Dearing Building, C35 Thursday: 3pm, Business School South, A25+ One Lab (2 hours) 5 weeks : Wednesday: 10am, CS C11

4 General References How to Think Like a Computer Scientist (Java Version) by Allen B. Downey. Available on Web: http://www.greenteapress.com/thinkapjava/thinkapjava.pdf http://www.greenteapress.com/thinkapjava/thinkapjava.pdf Getting started with Scratch http://info.scratch.mit.edu/Support http://info.scratch.mit.edu/Support Java. How to Program by Deitel & Deitel (Prentice Hall) Sun Java Tutorial: http://java.sun.com/docs/books/tutorial/getStarted/index.html http://java.sun.com/docs/books/tutorial/getStarted/index.html WWW - Google

5 Intro. Programming / coding Computer programming: is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. source code is written in a programming language. The purpose of programming is to create a efficient and evolvable program (software) that provide a certain desired behaviour

6 Programming / coding A program is a sequence of instructions The way to deal with a difficult task is to recursively break it down into a number of less difficult tasks The single most important skill for a computer scientist is problem-solving problem-solving is the ability to formulate problems, think creatively about solutions, and express a solution clearly and accurately.

7 Programming languages A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer. A way of communication between Humans and Computers Many programming languages have some form of written specification of their syntax (form) and semantics (meaning) Pascal, Java, C, C++, C#, PHP ….

8 Programming languages A program must be translated into machine language before it can be executed on a particular type of CPU This can be accomplished in several ways such as A compiler reads a high-level program and translates it all at once, before executing any of the commands. Often you compile the program as a separate step, and then execute the compiled code later. the high-level program is called the source code, and the translated program is called the object code or the executable.

9 Programming languages interpreted language is a programming language whose programs are translated to machine code at the time of execution through using an interpreter program A compiled language is a programming language which need the use of compilers to generate executable machine code in order to run the program

10 Compiled Languages import java.lang.* --------------------- -------------------- ------- --- ------------- ---- import java.lang.* --------------------- -------------------- ------- --- ------------- ---- import java.lang.* --------------------- -------------------- ------- --- ------------- ---- import java.lang.* --------------------- -------------------- ------- --- ------------- ---- Source Code Print Hello World ------- --- ------------- ---- 0010010100110 100101010101 101010101 10101010 Compiler executable machine code High Level Language code Run Hello World!

11 Interpreted Languages import java.lang.* --------------------- -------------------- ------- --- ------------- ---- import java.lang.* --------------------- -------------------- ------- --- ------------- ---- import java.lang.* --------------------- -------------------- ------- --- ------------- ---- import java.lang.* --------------------- -------------------- ------- --- ------------- ---- Source Code Print Hello World ------- --- ------------- ---- Interpreter High Level Language code Run Hello World!

12 Programming Quality Efficiency/performance: the amount of system resources a program consumes processor time memory space disk Storage network bandwidth the less, the better. This also includes correct disposal of some resources, such as cleaning up temporary files and lack of memory leaks.

13 Programming Quality Reliability: how often the results of a program are correct. This depends on conceptual correctness of algorithms Robustness: how well a program anticipates problems not due to programmer error. This includes situations such as: Incorrect data Unavailability of needed resources such as memory, operating system services and network connections User error.

14 Programming Quality Usability: the ease with which a person can use the program for its intended purpose Portability: the range of computer hardware and operating system platforms on which the source code of a program can be compiled / interpreted and run (Java vs C/C++).

15 Debugging A methodical process of finding and reducing the number of bugs (errors) in a computer program

16 Recommended Reading How to Think Like a Computer Scientist Chapter 1, The way of the program http://www.greenteapress.com/thinkapjava/thi nkapjava.pdf

17 Summary Programming Languages Compiled Vs Interpreted Programming Quality Debugging


Download ppt "Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction Paul Tennent"

Similar presentations


Ads by Google