Lecture 1: Introduction to Programming & Programs



Σχετικά έγγραφα
Προγραμματισμός Χειμερινό Εξάμηνο 2014

Προγραμματισμός Χειμερινό Εξάμηνο 2017

Χειµερινό Εξάµηνο 2013

Προγραμματισμός. Εαρινό Εξάμηνο 2011

Εισαγωγή στον Προγραμματισμό Introduction to Programming

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ

Test Data Management in Practice

BECAUSE WE REALLY WANT TO KNOW WHAT YOU THINK ABOUT SCHOOL AND YOUR GARDEN. Fairly true If I decide to learn something hard, I can.

Εγκατάσταση λογισμικού και αναβάθμιση συσκευής Device software installation and software upgrade

The Simply Typed Lambda Calculus

Section 1: Listening and responding. Presenter: Niki Farfara MGTAV VCE Seminar 7 August 2016

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

derivation of the Laplacian from rectangular to spherical coordinates

C.S. 430 Assignment 6, Sample Solutions

Ανάπτυξη διαδικτυακής διαδραστικής εκπαιδευτικής εφαρμογής σε λειτουργικό σύστημα Android

Instruction Execution Times

ίκτυο προστασίας για τα Ελληνικά αγροτικά και οικόσιτα ζώα on.net e-foundatio // itute: toring Insti SAVE-Monit

ΦΥΛΛΟ ΕΡΓΑΣΙΑΣ Α. Διαβάστε τις ειδήσεις και εν συνεχεία σημειώστε. Οπτική γωνία είδησης 1:.

LESSON 14 (ΜΑΘΗΜΑ ΔΕΚΑΤΕΣΣΕΡΑ) REF : 202/057/34-ADV. 18 February 2014

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

Χρειάζεται να φέρω μαζί μου τα πρωτότυπα έγγραφα ή τα αντίγραφα; Asking if you need to provide the original documents or copies Ποια είναι τα κριτήρια

Modbus basic setup notes for IO-Link AL1xxx Master Block

Lecture 2. Soundness and completeness of propositional logic

FORTRAN και Αντικειμενοστραφής Προγραμματισμός

Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook

2016 IEEE/ACM International Conference on Mobile Software Engineering and Systems

CS 150 Assignment 2. Assignment 2 Overview Opening Files Arrays ( and a little bit of pointers ) Strings and Comparison Q/A

Επίλυση Προβλήματος σε Προγραμματιστικό Περιβάλλον από Παιδιά Προσχολικής Ηλικίας

2 Composition. Invertible Mappings

Example Sheet 3 Solutions

Πώς μπορεί κανείς να έχει έναν διερμηνέα κατά την επίσκεψή του στον Οικογενειακό του Γιατρό στο Ίσλινγκτον Getting an interpreter when you visit your

Block Ciphers Modes. Ramki Thurimella

Κατανοώντας και στηρίζοντας τα παιδιά που πενθούν στο σχολικό πλαίσιο

Galatia SIL Keyboard Information

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

ΕΘΝΙΚΟ ΜΕΤΣΟΒΙΟ ΠΟΛΥΤΕΧΝΕΙΟ

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

Homework 3 Solutions

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 5: Component Adaptation Environment (COPE)

Chapter 2 * * * * * * * Introduction to Verbs * * * * * * *

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

ΑΝΑΠΤΥΞΗ ΠΑΙΧΝΙΔΙΟΥ ΣΟΒΑΡΟΥ ΣΚΟΠΟΥ ΓΙΑ ΤΗΝ ΕΚΜΑΘΗΣΗ ΕΝΝΟΙΩΝ ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΟΥΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΥ ΣΕ JAVA

ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ ΣΕ ΕΙΔΙΚΑ ΘΕΜΑΤΑ ΔΙΕΘΝΩΝ ΣΧΕΣΕΩΝ & ΟΙΚΟΝΟΜΙΑΣ

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

TMA4115 Matematikk 3

Ασφάλεια σε χώρους αναψυχής: Ένα σύστημα από έξυπνα αντικείμενα

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.

Advanced Subsidiary Unit 1: Understanding and Written Response

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

Διάλεξη 1η: Εισαγωγή

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006

PortSip Softphone. Ελληνικά Ι English 1/20

Μετανάστευση Σπουδές. Σπουδές - Πανεπιστήμιο. Για να δηλώσετε ότι θέλετε να εγγραφείτε

Στεγαστική δήλωση: Σχετικά με τις στεγαστικές υπηρεσίες που λαμβάνετε (Residential statement: About the residential services you get)

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

EE512: Error Control Coding

Εργαστήριο 9. Styling with Javascript

Example of the Baum-Welch Algorithm

Section 9.2 Polar Equations and Graphs

ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΝΟΣΗΛΕΥΤΙΚΗΣ

ΕΘΝΙΚΗ ΣΧΟΛΗ ΗΜΟΣΙΑΣ ΙΟΙΚΗΣΗΣ

Οι αδελφοί Montgolfier: Ψηφιακή αφήγηση The Montgolfier Βrothers Digital Story (προτείνεται να διδαχθεί στο Unit 4, Lesson 3, Αγγλικά Στ Δημοτικού)

Paper Reference. Paper Reference(s) 1776/04 Edexcel GCSE Modern Greek Paper 4 Writing. Thursday 21 May 2009 Afternoon Time: 1 hour 15 minutes

Partial Trace and Partial Transpose

«ΑΓΡΟΤΟΥΡΙΣΜΟΣ ΚΑΙ ΤΟΠΙΚΗ ΑΝΑΠΤΥΞΗ: Ο ΡΟΛΟΣ ΤΩΝ ΝΕΩΝ ΤΕΧΝΟΛΟΓΙΩΝ ΣΤΗΝ ΠΡΟΩΘΗΣΗ ΤΩΝ ΓΥΝΑΙΚΕΙΩΝ ΣΥΝΕΤΑΙΡΙΣΜΩΝ»

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Data & Open Technologies A Perfect Combination Introduction Lecture

CS255 - Programming Lab

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΜΗΧΑΝΙΚΩΝ Η/Υ & ΠΛΗΡΟΦΟΡΙΚΗΣ. του Γεράσιμου Τουλιάτου ΑΜ: 697

ΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ ΒΑΛΕΝΤΙΝΑ ΠΑΠΑΔΟΠΟΥΛΟΥ Α.Μ.: 09/061. Υπεύθυνος Καθηγητής: Σάββας Μακρίδης

UNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications:

ΚΒΑΝΤΙΚΟΙ ΥΠΟΛΟΓΙΣΤΕΣ

ΓΗΠΛΧΜΑΣΗΚΖ ΔΡΓΑΗΑ ΑΡΥΗΣΔΚΣΟΝΗΚΖ ΣΧΝ ΓΔΦΤΡΧΝ ΑΠΟ ΑΠΟΦΖ ΜΟΡΦΟΛΟΓΗΑ ΚΑΗ ΑΗΘΖΣΗΚΖ

Μηχανική Μάθηση Hypothesis Testing

Ενότητα 2 Εργαλεία για την αναζήτηση εργασίας: Το Βιογραφικό Σημείωμα

1) Abstract (To be organized as: background, aim, workpackages, expected results) (300 words max) Το όριο λέξεων θα είναι ελαστικό.

How to register an account with the Hellenic Community of Sheffield.

TaxiCounter Android App. Περδίκης Ανδρέας ME10069

Επιβλέπουσα Καθηγήτρια: ΣΟΦΙΑ ΑΡΑΒΟΥ ΠΑΠΑΔΑΤΟΥ

Τo πρόγραμμα «Διάγραμμα Ροής» και η διδακτική του αξιοποίηση στην Διδασκαλία του προγραμματισμού

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά.

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

7 Present PERFECT Simple. 8 Present PERFECT Continuous. 9 Past PERFECT Simple. 10 Past PERFECT Continuous. 11 Future PERFECT Simple

Living and Nonliving Created by: Maria Okraska

Objectives-Στόχοι: -Helping your Child become a fantastic language learner «Βοηθώντας το παιδί σας να γίνει εξαιρετικό στην εκμάθηση γλωσσών» 6/2/2014

Code Breaker. TEACHER s NOTES

Η ΠΡΟΣΩΠΙΚΗ ΟΡΙΟΘΕΤΗΣΗ ΤΟΥ ΧΩΡΟΥ Η ΠΕΡΙΠΤΩΣΗ ΤΩΝ CHAT ROOMS

ΕΙΣΑΓΩΓΗ ΣΤΟN ΠΡΟΓΡΑΜΜΑΤΙΣΜΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΜΗΧΑΝΙΚΩΝ Η/Υ ΚΑΙ ΠΛΗΡΟΦΟΡΙΚΗΣ

ΟΙΚΟΝΟΜΟΤΕΧΝΙΚΗ ΑΝΑΛΥΣΗ ΕΝΟΣ ΕΝΕΡΓΕΙΑΚΑ ΑΥΤΟΝΟΜΟΥ ΝΗΣΙΟΥ ΜΕ Α.Π.Ε

Statistical Inference I Locally most powerful tests

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΤΜΗΜΑ ΗΛΕΚΤΡΟΛΟΓΩΝ ΜΗΧΑΝΙΚΩΝ ΚΑΙ ΤΕΧΝΟΛΟΓΙΑΣ ΥΠΟΛΟΓΙΣΤΩΝ ΤΟΜΕΑΣ ΣΥΣΤΗΜΑΤΩΝ ΗΛΕΚΤΡΙΚΗΣ ΕΝΕΡΓΕΙΑΣ

5.4 The Poisson Distribution.

ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ - ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΠΛ 133: ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΗΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial

Assalamu `alaikum wr. wb.

Démographie spatiale/spatial Demography

ΕΠΛ221: Οργάνωση Υπολογιστών και Συμβολικός Προγραμματισμός. Εργαστήριο Αρ. 2

the total number of electrons passing through the lamp.

Πανεπιστήμιο Δυτικής Μακεδονίας. Τμήμα Μηχανικών Πληροφορικής & Τηλεπικοινωνιών. Ηλεκτρονική Υγεία

Transcript:

ΗΥ-150 Προγραμματισμός CS-150 Programming Lecture 1: Introduction to Programming & Programs G. Papagiannakis

Overview What is this course about? What should you already know? What will you be expected to do? What will you know when you finish What is programming Applications of programming A simple program Lecture: Introduction to Programming, Slide 2

Who am I? http://www.csd.uoc.gr/~papagian Assistant Professor of Computer Graphics, University of Crete Research Fellow, Computer Vision and Robotics Laboratory, ICS-FORTH Senior researcher and Visiting Lecturer on Computer Graphics (2006-2009), MIRALab, University of Geneva PhD in Computer Science, An illumination registration model for dynamic virtual humans in mixed reality (2002-2006) Research assistant (1999-2006), MIRALab, University of Geneva Lecture: Introduction to Programming, Slide 3

Εισαγωγή Περιεχόμενο : μέθοδοι προγραμματισμού προγραμματιστικές αρχές δομημένος προγραμματισμός, αφαιρετικότητα, (abstraction) υλοποίηση, έλεγχος, και αποσφαλμάτωση καλές πρακτικές γλώσσα προγραμματισμού: C++ Lecture: Introduction to Programming, Slide 4

Στόχοι Αλγοριθμική σκέψη & Προγραμματισμός Βάση για την Πληροφορική και Υπολογιστικά Μαθηματικά Μέθοδοι επίλυσης προβλημάτων - αλγόριθμοι Κωδικοποίηση αλγορίθμων Διόρθωση/Κατανόηση/Αλλαγή προγράμματος ενημέρωση επαναχρησιμοποίηση Lecture: Introduction to Programming, Slide 5

Γλώσσα προγραμματισμού C++ Μια από τις πιο σημαντικές γλώσσες : ΈΈχει στοιχεία υψηλού & χαμηλού επιπέδου Γενική πολλαπλές εφαρμογές Αποδοτικά προγράμματα Συμβατότητα / πρότυπο (ISO) Σημαντικό βήμα για την εκμάθηση άλλων γλωσσών Lecture: Introduction to Programming, Slide 6

Είναι σημαντικός ο προγραμματισμός για επαγγελματική αποκατάσταση; The Doers - A TEDxAthens Documentary: http://www.youtube.com/watch?v=zxcmxt4rano&list=plbe7d87788b2430f1 Lecture: Introduction to Programming, Slide 7

Διαλέξεις Φροντιστήρια Ασκήσεις Multiple-choice quiz Τελικό Διαγώνισμα Διδασκαλία Lecture: Introduction to Programming, Slide 8

Αξιολόγηση Το µάθηµα θα έχει: 4 σειρές ασκήσεων και αντίστοιχες παραδόσεις/προφορικές εξετάσεις Φροντιστήρια Multiple-choice quiz Τελικό γραπτό διαγώνισµα Βαθµολογία: Ασκήσεις 40% Τελικό 60% Multiple-choice quiz 5% (bonus) Θεωρείται δεδοµένη: η χρήση λογαριασµού στο τµήµα η εγγραφή στη λίστα ηλεκτρονικού ταχυδροµείου του µαθήµατος Η εγγραφή στο http://elearn.uoc.gr/ και µετά στο ΗΥ150: http://www.csd.uoc.gr/~hy150b Κάνει redirect στο: https://elearn.uoc.gr/course/view.php?id=160 Ηλεκτρονική Λίστα: hy150b-list@csd.uoc.gr. Εγγραφή: στείλτε µήνυµα στο majordomo@csd.uoc.gr, χωρίς subject µε κείµενο subscribe hy150b-list Η λίστα είναι µόνο για γενικές ανακοινώσεις και όχι για απορίες! Για απορίες θα χρησιµοποιείτε τις οµάδες συζητήσεων (forums) στο web-site Lecture: Introduction to Programming, Slide 9

Πρόγραμμα μαθήματος Πρόγραμμα Μαθήματος Τρίτη 5-7 (Αμφ. Α) και Πέμπτη 11-1 (Αμφ. Α) Παρασκευή 5-7 (Αμφ. Α) για φροντιστήριο και αναπληρώσεις Lecture: Introduction to Programming, Slide 10

Ασκήσεις Διαβάθμιση ως προς την δυσκολία - Απλά και πιο σύνθετα (δύσκολα) ερωτήματα Παραδίδονται μέσω της submit στο web-site - εμπρόθεσμα Καθυστέρηση κατά την κατάθεση μειώνει τον βαθμό κατά 1 μονάδα για κάθε μέρα (Σαββατοκύριακο = 1 μέρα). Πρέπει να εκτελούνται στις υποστηριζόμενες πλατφόρμες του μαθήματος (gnu gcc/g++, visual studio) Εξετάζονται και προφορικά από τους βοηθούς μετά από ραντεβού Το multiple-choice quiz θα συμπληρώνεται online στο website του μαθήματος και ο βαθμός που επιτυγχάνεται θα προσμετράται σαν bonus Lecture: Introduction to Programming, Slide 11

Φροντιστήρια Για να βοηθήσουν όσους έχουν δυσκολίες Για να βοηθήσουν σε εξάσκηση Σε κάθε φροντιστήριο θα λύνονται ασκήσεις Θα επιλύονται απορίες Lecture: Introduction to Programming, Slide 12

ασκήσεις: υποχρεωτικές Quiz: προαιρετικά (bonus) Εξετάσεις Οι γραπτές εξετάσεις του μαθήματος θα διεξαχθούν με ανοιχτά τα βιβλία του μαθήματος. Μπορείτε να έχετε ένα βιβλίο (όποιο πάρετε από το Τμήμα) για προσωπική και μόνο χρήση. Lecture: Introduction to Programming, Slide 13

Περιεχόμενο μαθήματος Εισαγωγή στον Προγραμματισμό και στη γλώσσα προγραμματισμού C++ Τύποι Δεδομένων, Τελεστές και Αριθμητικές Εκφράσεις Είσοδος & ΈΈξοδος Δεδομένων Εντολές επιλογής & Συνθήκες επιλογής Εντολές επανάληψης Συναρτήσεις, Εμβέλεια Μεταβλητών GUI programming, κλάσεις και αντικείμενα Πίνακες Συναρτήσεις Δομές δεδομένων Δυναμικές δομές δεδομένων Αναδρομή Αποσφαλμάτωση προγραμμάτων Τεχνικές προγραμματισμού μεγάλων προγραμμάτων, εισαγωγή στον αντικειμενοστρεφή προγραμματισμό Lecture: Introduction to Programming, Slide 14

Εμβάθυνση σε αυτό το μάθημα Πρακτικότητα Πληρότητα Εφαρμογή σε πραγματικά προβλήματα Επεκτασιμότητα Lecture: Introduction to Programming, Slide 15

Εισαγωγή: Εργαλεία Σε LINUX/MacOSX g++, μεταφραστής/compiler της C++ gdb, debugger της C++ (εύρεση λαθών) Editors : Emacs, vi, vim, gvim, pico,, XCODE για την συγγραφή προγραμμάτων Σε Windows Ολοκληρωμένα Περιβάλλοντα προγραμματισμού της C++, όπως ο δωρεάν Microsoft Visual Studio 2010 C++ express: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visualcpp-express/ cygwin ή MinGW (http://www.mingw.org/), για προγραμματισμό Πρόταση: Στήστε ένα βολικό περιβάλλον προγραμματισμού και εξοικειωθείτε μαζί του Lecture: Introduction to Programming, Slide 16

Βοήθεια! Απορίες στο μάθημα Κατά τις ώρες των φροντιστηρίων Στις ομάδες συζητήσεων στο web-site του μαθήματος Στις ώρες γραφείου Lecture: Introduction to Programming, Slide 17

Εισαγωγή: Περί Αντιγραφής Τι είναι: Αντιγραφή κώδικα ή μέρους αυτού από άλλη πηγή (συμφοιτητή, διαδίκτυο, κάποιον τρίτο, κτλ) Αντιγραφή της ιδέας ενός αλγορίθμου (χωρίς αναφορά στις πηγές) Αντιγραφή κειμένου ή μέρους αυτού κατά την διάρκεια εξέτασης Αυτόματη ανίχνευση Συνέπειες: το λιγότερο μηδενισμός της άσκησης, διαγωνίσματος κτλ. σε όλα τα μέρη που εμπλέκονται στην αντιγραφή ΌΌποιος αντιγράφει στον προγραμματισμό θα αντιγράφει συνέχεια: το μάθημα είναι η βάση για τα περισσότερα μαθήματα του τμήματος Μην αφήνετε τους άλλους να αντιγράψουν από εσάς. Κλειδώστε τις περιοχές σας: chmod 700 mydir chmod 600 myfile Lecture: Introduction to Programming, Slide 18

Επικοινωνία Διδάσκων: Γιώργος Παπαγιαννάκης (papagian@csd.uoc.gr), Επίκουρος καθηγητής csd.uoc.gr/~papagian ΏΏρες γραφείου: Πέμπτη 1-3, γραφείο TBD Ιστοσελίδα μαθήματος: https://elearn.uoc.gr/course/view.php?id=160 http://www.csd.uoc.gr/~hy150b Γραφτείτε πρώτα στο http://elearn.uoc.gr! Βοηθοί Ζηδιανάκης Εμμανουήλ, Μιχαήλ ΈΈλενα, Λαμπράκη Ιωάννα, Σημαντιράκη Ολυμπία Μαρία Μαμαλάκη Lecture: Introduction to Programming, Slide 19

Προτάσεις Ρωτήστε, ενημερωθείτε, διαβάστε, ζητήστε βοήθεια Βοήθεια δεν προσπαθώ Εκμεταλλευτείτε τα εργαστήρια-φροντιστήρια (6) Ο προγραμματισμός μαθαίνεται μόνο με προγραμματισμό ~ ποδήλατο - κολύμβηση Υπομονή, επιμονή, προσπάθεια Η εξάσκηση (διάβασμα και προγραμματισμός) θα σας κάνει ικανούς για τη λύση ασκήσεων Καλός προγραμματιστής ~ γραμμές κώδικα που έχει γράψει Lecture: Introduction to Programming, Slide 20

Course Bibliography B. Stroustrup, Programming: Principles and Practise Using C+ +, Addison-Wesley, pp. 1 1268, Jul. 2009. B. Stroustrup, Προγραμματισμός με C++, Εκδόσεις Παπασωτηρίου, 2009 Lecture: Introduction to Programming, Slide 21

Abstract Today, we ll outline the aims for this course and present a rough course plan. We ll introduce the basic notion of programming and give examples of areas in which software is critical to our civilization. Finally, we ll present the simplest possible C++ program and outline how it can be made into running code. Lecture: Introduction to Programming, Slide 22

Course aims and outline Programming Hello, world! Compilation Overview Lecture: Introduction to Programming, Slide 23

In Programming For beginners who want to become professionals This is a course i.e., people who can produce systems that others will use who are assumed to be bright Though not (necessarily) geniuses who are willing to work hard Though do need sleep occasionally, and take a normal course load Using the C++ programming language Lecture: Introduction to Programming, Slide 24

A course in The C++ programming language For students Not! who want to become language lawyers We try not to get bogged down in technical obscurities who are assumed to be a bit dim and fairly lazy Using We try not to spoon feed Some untested software development methodologies and a lot of unnecessarily long words Lecture: Introduction to Programming, Slide 25

Teach/learn Fundamental programming concepts Key useful techniques Basic Standard C++ facilities After the course, you ll be able to The Aims Write small colloquial C++ programs Read much larger programs Learn the basics of many other languages by yourself Proceed with an advanced C++ programming course After the course, you will not (yet) be An expert programmer A C++ language expert An expert user of advanced libraries Lecture: Introduction to Programming, Slide 26

Lectures Attend every one Notes The Means Read notes ahead (about one per lecture) Will be posted online Read the notes again after each lecture Will be updated online Feedback is welcome (typos, suggestions, etc.) Lecture: Introduction to Programming, Slide 27

Cooperate on Learning Except for the work you hand in as individual contributions, we strongly encourage you to collaborate and help each other If in doubt if a collaboration is legitimate: ask! Don t claim to have written code that you copied from others Don t give anyone else your code (to hand in for a grade) When you rely on the work of others, explicitly list all of your sources i.e. give credit to those who did the work Don t study alone when you don t have to Form study groups Do help each other (without plagiarizing) Go to your TA's labs Go prepared with questions The only stupid questions are the ones you wanted to ask but didn t Lecture: Introduction to Programming, Slide 28

Why C++? You can t learn to program without a programming language The purpose of a programming language is to allow you to express your ideas in code C++ is the language that most directly allows you to express ideas from the largest number of application areas C++ is the most widely used language in engineering areas http://www.research.att.com/~bs/applications.html Lecture: Introduction to Programming, Slide 29

Why C++? C++ is precisely and comprehensively defined by an ISO standard And that standard is almost universally accepted C++ is available on almost all kinds of computers Programming concepts that you learn using C++ can be used fairly directly in other languages Including C, Java, C#, and (less directly) Fortran Objective-C (ios development) is also very similar to C++ Lecture: Introduction to Programming, Slide 30

Part I: The basics Course outline in Parts Types, variables, strings, console I/O, computations, errors, vectors functions, source files, classes Part II: Input and Output File I/O, I/O streams Graphical output Graphical User Interface Part III: Data structures and algorithms Free store, pointers, and arrays Lists, maps, sorting and searching, vectors, templates The STL Part IV: Broadening the view Software ideals and history Text processing, numerics, embedded systems programming, testing, C, etc. Lecture: Introduction to Programming, Slide 31

Rough course outline (Cont.) Throughout Program design and development techniques C++ language features Background and related fields, topics, and languages Note: Appendices C++ language summary C++ standard library summary Index (extensive) Glossary (short) Lecture: Introduction to Programming, Slide 32

Promises Detail: We will try to explain every construct used in this course in sufficient detail for real understanding There is no magic Utility: We will try to explain only useful concepts, constructs, and techniques We will not try to explain every obscure detail Completeness: The concepts, constructs, and techniques can be used in combination to construct useful programs There are, of course, many useful concepts, constructs, and techniques beyond what is taught here Lecture: Introduction to Programming, Slide 33

More Promises Realism: the concepts, constructs, and techniques can be used to build industrial strength programs i.e., they have been used to Simplicity: The examples used are among the simplest realistic ones that illustrate the concepts, constructs, and techniques Your exercises and projects will provide more complex examples Scalability: The concepts, constructs, and techniques can be used to construct large, reliable, and efficient programs i.e., they have been used to Lecture: Introduction to Programming, Slide 34

Feedback request Please post questions and constructive comments to the web-site discussion forums (not mailing list) Your feedback will be most appreciated On style, contents, detail, examples, clarity, conceptual problems, exercises, missing information, depth, etc. Local course support website forums: http://www.csd.uoc.gr/~hy150b (https://elearn.uoc.gr/course/view.php?id=160) Ανακοινώσεις, νέα, ειδήσεις Γενικά (θεωρία, εργαλεία, compiliers, IDE) ΆΆσκηση 1 ΆΆσκηση 2 ΆΆσκηση 3 ΆΆσκηση 4 Lecture: Introduction to Programming, Slide 35

Why programming? Our civilization runs on software Most engineering activities involve software Note: most programs do not run on things that look like a PC a screen, a keyboard, a box under the table Lecture: Introduction to Programming, Slide 36

Ships Design Construction Management Monitoring Engine Hull design Pumps Lecture: Introduction to Programming, Slide 37

Aircraft Communication Control Display Signal processing Gadget control Monitoring Lecture: Introduction to Programming, Slide 38

Phones Voice quality User interfaces Billing Mobility Switching Reliability Provisioning Images Lecture: Introduction to Programming, Slide 39

Energy Control Monitoring Analysis Communications Visualization Manufacturing Design Lecture: Introduction to Programming, Slide 40

Computer Graphics Movie 3D Industry Computer games Scientific visualization Computer Aided Design (CAD) Virtual and Augmented Reality Digital photography and video Human Computer Interaction Art Lecture: Introduction to Programming, Slide 41

PC/workstation/mobile There s a lot more to computing than games, word processing, browsing, and spreadsheets! Lecture: Introduction to Programming, Slide 42

Just about everywhere Where is C++ Used? Android, ios, Mars rovers, animation, graphics, Photoshop, GUI, OS, compilers, slides, chip design, chip manufacturing, semiconductor tools, etc. See www.research.att/~bs/applications.html Lecture: Introduction to Programming, Slide 43

A first program just the guts // int main() // main() is where a C++ program starts { cout << "Hello, world!\n"; // output the 13 characters Hello, world! // followed by a new line return 0; // return a value indicating success } // quotes delimit a string literal // NOTE: smart quotes will cause compiler problems. // so make sure your quotes are of the style " " // \n is a notation for a new line Lecture: Introduction to Programming, Slide 44

A first program complete // a first program: #include "std_lib_facilities.h" // get the library facilities needed for now int main() // main() is where a C++ program starts { cout << "Hello, world!\n"; // output the 13 characters Hello, world! // followed by a new line return 0; // return a value indicating success } // note the semicolons; they terminate statements // curly brackets { } group statements into a block // main( ) is a function that takes no arguments ( ) // and returns an int (integer value) to indicate success or failure Lecture: Introduction to Programming, Slide 45

A second program // modified for Windows console mode: #include "std_lib_facilities.h" // get the facilities for this course from the site int main() // main() is where a C++ program starts { cout << "Hello, world\n"; // output the 13 characters hello, world! // followed by a new line keep_window_open(); // wait for a keystroke return 0; // return a value indicating success } // without keep_window_open() the output window will be closed immediately // before you have a chance to read the output (on Visual C++ 2005) Lecture: Introduction to Programming, Slide 46

Hello, world! Hello world is a very important program Its purpose is to help you get used to your tools Compiler Program development environment Program execution environment Type in the program carefully After you get it to work, please make a few mistakes to see how the tools respond; for example Forget the header Forget to terminate the string Misspell return (e.g. retrun) Forget a semicolon ; Forget { or } Typical execution: g++ -o helloworld HelloWorld.cpp./helloWorld Lecture: Introduction to Programming, Slide 47

few usual errors Lecture: Introduction to Programming, Slide 48

Hello world Only cout << "Hello, world!\n" directly does nothing That s normal Most of our code, and most of the systems we use simply exist to make some other code elegant and/or efficient real world non-software analogies abound Boiler plate, that is, notation, libraries, and other support is what makes our code simple, comprehensible, trustworthy, and efficient. Would you rather write 1,000,000 lines of machine code? This implies that we should not just get things done ; we should take great care that things are done elegantly, correctly, and in ways that ease the creation of more/other software: Style Matters! Lecture: Introduction to Programming, Slide 49

Compilation and linking C++ source code Executable program You write C++ source code Source code is (in principle) human readable The compiler translates what you wrote into object code (sometimes called machine code) Object code is simple enough for a computer to understand The linker links your code to system code needed to execute E.g. input/output libraries, operating system code, and windowing code The result is an executable program E.g. a.exe file on windows or an a.out file on Unix C++ compiler linker Object code Library Object code Lecture: Introduction to Programming, Slide 50

So what is programming? Conventional definitions Telling a very fast moron exactly what to do A plan for solving a problem on a computer Specifying the order of a program execution But modern programs often involve millions of lines of code And manipulation of data is central Definition from another domain (academia) A program is an organized and directed accumulation of resources to accomplish specific objectives Good, but no mention of actually doing anything The definition we ll use Specifying the structure and behavior of a program, and testing that the program performs its task correctly and with acceptable performance Never forget to check that it works Software == one or more programs Lecture: Introduction to Programming, Slide 51

Programming Programming is fundamentally simple Just state what the machine is to do So why is programming hard? We want the machine to do complex things And computers are nitpicking, unforgiving, dumb beasts The world is more complex than we d like to believe So we don t always know the implications of what we want Programming is understanding When you can program a task, you understand it When you program, you spend significant time trying to understand the task you want to automate Programming is part practical, part theory If you are just practical, you produce non-scalable unmaintainable hacks If you are just theoretical, you produce toys Lecture: Introduction to Programming, Slide 52

What is programming? Things to remember Set-up a development environment Familiarize yourself with the tools Make sure you all compile/run the HelloWorld.cpp program by next lecture How the compiler and linker work Create an account in http://elearn.uoc.gr/ and register on the web-site For next time: Read Chapters 1 and 2 from Stroustrup Lecture: Introduction to Programming, Slide 53

Thank you!