1 / 17

Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction

Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction. Essam Eliwa http://www.cs.nott.ac.uk/~eoe/G50PRO.html eoe@cs.nott.ac.uk Room B49. Course Overview. 1 Semester 20 ish lectures plus lab sessions Assessment: Coursework one: 10% Coursework Two: 30%

Download Presentation

Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to ProgrammingG50PROUniversity of NottinghamUnit 1 : Introduction Essam Eliwa http://www.cs.nott.ac.uk/~eoe/G50PRO.html eoe@cs.nott.ac.uk Room B49

  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 : • Monday : 2 pm, A26, BS-South • Thursday: 2 pm, Exchange C1 • One Lab (2 hours ) : • Thursday: 3 pm, 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 • Getting started with Scratch 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 • 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 executable machine code import java.lang.* --------------------- -------------------- ------- --- ------------- ---- import java.lang.* --------------------- -------------------- ------- --- ------------- ---- Compiler 0010010100110 100101010101 101010101 10101010 import java.lang.* --------------------- -------------------- ------- --- ------------- ---- import java.lang.* --------------------- -------------------- ------- --- ------------- ---- Source Code Print Hello World ------- --- ------------- ---- Run High Level Language code Hello World!

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

  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 ScientistChapter 1, The way of the program http://www.greenteapress.com/thinkapjava/thinkapjava.pdf

  17. Summary • Programming Languages • Compiled Vs Interpreted • Programming Quality • Debugging

More Related