370 likes | 758 Views
Computer Programming 1. Introduction to CA165. Introduction. About Me Background Education Industry Entrepreneurship Software Development Java, C#, Ruby Computer Programming 1 My Experiences. What will you learn on this course?. How to make a computer do what you want:.
E N D
Computer Programming 1 Introduction to CA165
Introduction • About Me • Background • Education • Industry • Entrepreneurship • Software Development • Java, C#, Ruby • Computer Programming 1 • My Experiences
What will you learn on this course? How to make a computer do what you want: • Write programs to quickly solve complex problems • Write programs to process information in various ways • Write programs to respond to different situations. You will also develop a useful attitude towards computers • Not to be afraid when things go wrong, but to debug • To try things on your computer and learn from your mistakes • To solve problems in a clear, unambiguous and precise way.
Why would you want to learn this? Everyone should be able to do some programming (it’s the 21st century version of being able to type) Being able to program allows you to create useful tools in any area of study Psychology: Computational theory of mind is dominant in psychology today Languages: Programming is closely related to linguistics Using and programming automated translation aids is part of the work of a professional translator
Why learn programming? More reasons Physics: Computational simulation Large-scale experiments run by computer Genetics: Computational analysis of gene structure genome projects run by computer Business: Runs on computer program infrastructure Programs to predict market performance, test implications of economic changes There is no area where a knowledge of programming is not a noticable advantage
Ireland needs programmers! From Fourth Report of the Expert Group on Future Skills Needs presented to the Tánaiste and Minister for Enterprise, Trade and Employment and Minister for Education and Science
But first the Module Details • The Timetable • The Syllabus • The Web page • Module Objectives • What you need to do • How the module is graded • How the module fits in with other modules
Timetable • Lectures: Tuesday@10am, Thursday 9am until 11am • There will be a two hour labs on Tuesdays@2pm, Thursdays@2pm and Fridays@9am (Wks 3-5) • Tutorials Tuesday 11-12, 12-1
Tutorials • Times • Student Allocation
Labs • Times (Including moved labs for specified weeks) • Allocation
You will also need • The World Wide Web (WWW). • The page for this module is • http://www.computing.dcu.ie/~poleary/index.html • The Textbook • “Java Concepts" • Author: Cay Horstmann
Academic Year • See the module Web page
Module Objectives • At the end of the module the student will • have a good working knowledge of syntax (structural rules) and semantics (meaning) of a subset of the Java programming language. • understand what happens when a Java instruction is executed. • be able to write and debug Java programs. • understand how to solve certain problems using Java.
What you need to do • You will have to work to learn to program • Use the facilities provided; lectures, workshops, labs, email, WWW and get the book. • Do all the exercises on time • Think on the bus!
How the Module is Graded • Lab exercises. • Programming exams. • Programming exercises. (These will be discussed in the workshops.)
This Module and the Degree • This module leads onto computer Programming 2. • The ability to program will be required for most modules on the course. • Computer Systems looks at computer hardware. Hardware will be required to run the programs you write.
The Computer • Software (programs) • Operating system: Windows (XP, NT, 2000), UNIX, • MAC OS • Applications: Word • Hardware • Processor (brains) • RAM (short term memory) • Hard Disk (long term memory) • Input / Output: Screen, Speakers, keyboard, mouse
DCU Computers • Computers in the labs have • a processor that operates at 3 GHz • 2 GB RAM • 250 Gbyte hard disc • The Network • The computers in computer applications are connected in a network. You have an account which means you have a network drive. You can access this drive from any computer in the building. • You can also access the internet (and use email)
Computer Programming • What is a program? • A set of instructions for a computer • How do we write the instructions? • in a programming language: Java • What is programming? • Why would one want to program?
Programming • Computer instructions are very simple • Many instructions combine to make a complex program • To be a good programmer you need • to be precise • to manage complexity: there are many techniques to help manage complexity, structured programming, modular programming and Object-oriented programming
Programs and algorithms: some terms An algorithm is a precise description of how to solve a problem A program is a series of instructions or commands to a computer A well written program implements an algorithm which solves a problem Running a program == carrying out the instructions
Algorithm for making tea boil water; put teabag into cup; pour water into cup until full; wait 3 minutes; remove teabag; if (want milk){ put milk into cup; } if (want sugar){ put sugar into cup; } stir;
Algorithms An ALGORITHM is: 1. Unambiguous 2. Executable 3. Terminating
Problem: open a door Algorithm: read sign on door; if (sign says "pull") { pull the door open; } else { push the door open; } Will this work for all doors?
Problem: Say hello to someone Algorithm: Ask the person’s name; Remember their name: NAME their name; Say(“Hello “ + NAME);
Programming languages Natural languages: French, English, Swahili… Natural languages are forgiving: if you have wrong the grammar, pronounciation, or speling, people can still understanding you be. Programming languages: C, perl, Java... Computers are not as smart as people: if you don’t have your program’s grammar and spelling exactly right, the computer will not understand and will give an error
Summary • What is a program? • To program you must • be precise • manage complexity (using objects) • This requires lots of practice • do the exercises • think! • Ask questions. Make friends • Buy the book.