From 11e72e6b1a36a4afd3d7c6e51a37435b37c8ee5d Mon Sep 17 00:00:00 2001 From: Thanassis Avgerinos Date: Fri, 23 Oct 2026 17:47:21 +0300 Subject: [PATCH 1/2] Point chapter 7 to the 2026-27 lecture 7 slides The 2026-27 deck (assets/pdf/lec07.pdf on the course site) has 21 pages instead of 23. On p. 2 the AWS outage is replaced by a PHP security flaw and the question of which language the PHP interpreter is written in (C). The three GRCPC result pages (old pp. 3-5) are now one empty announcements page, so every later page moves down by 2 (old pp. 6-23 are new pp. 4-21). The filter loop for the product of the odd multiples of 7 now starts at i = 101, fixing the old i = 100. Chapter 7 opens with the PHP example and keeps the AWS and GRCPC material, labelled as 2025-26. The warm-up section shows the fixed loop and explains the 2025-26 version. The chapter, its two slide questions, the extract notes, the manifest and `make fetch` now point to the new deck. --- Makefile | 2 +- README.md | 2 +- chapters/07-problem-solving/README.md | 43 ++++++++++------- questions/README.md | 4 +- .../slides/slides-lec07-even-descending.md | 6 +-- .../slides/slides-lec07-odd-multiples-of-7.md | 6 +-- sources/extract/lec07.yaml | 47 ++++++++++--------- sources/manifest.yaml | 2 +- 8 files changed, 61 insertions(+), 51 deletions(-) diff --git a/Makefile b/Makefile index a009d87..58bec89 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ $(BUILD)/llms.txt: $(CHAPTERS) glossary.md $(BUILD)/questions.md tools/llms.py t .PHONY: all fetch lint check-code exercises check clean fetch: mkdir -p sources/slides/2026 sources/hw/2023 sources/hw/2024 sources/hw/2025 - for f in lec00 lec01 lec02 lec03 lec04 lec05 lec06; do curl -fsSL -o sources/slides/2026/$$f.pdf https://progintro.github.io/assets/pdf/$$f.pdf; done + for f in lec00 lec01 lec02 lec03 lec04 lec05 lec06 lec07; do curl -fsSL -o sources/slides/2026/$$f.pdf https://progintro.github.io/assets/pdf/$$f.pdf; done gh release download 2025 -R $(REPO) -D sources/slides -p 'lec*.pdf' -p make.pdf --skip-existing gh release download 2025 -R $(REPO) -D sources/hw/2025 -p 'hw*.pdf' -p stergios.pdf --skip-existing gh release download 2024 -R $(REPO) -D sources/hw/2024 -p 'hw*.pdf' --skip-existing diff --git a/README.md b/README.md index 5dad7a8..0c8e2de 100644 --- a/README.md +++ b/README.md @@ -325,7 +325,7 @@ chatbot ή agent το [`llms-full.txt`](llms-full.txt) (όλος ο οδηγός Ο οδηγός γράφτηκε από τις διαφάνειες των διαλέξεων του 2025-26 ([progintro.github.io](https://progintro.github.io/)) και ενημερώνεται με τις διαφάνειες -του 2026-27 καθώς δημοσιεύονται (ως τώρα: Διαλέξεις 0–6), τις +του 2026-27 καθώς δημοσιεύονται (ως τώρα: Διαλέξεις 0–7), τις [σημειώσεις](https://progintro.github.io/notes/) του μαθήματος, τα [εργαστήρια](https://progintro.github.io/lab-material/) και τα θέματα εξετάσεων και τις εργασίες προηγούμενων ετών. Οι ασκήσεις έχουν υποδείξεις αλλά όχι λύσεις. diff --git a/chapters/07-problem-solving/README.md b/chapters/07-problem-solving/README.md index c4fb15f..cdbb9c8 100644 --- a/chapters/07-problem-solving/README.md +++ b/chapters/07-problem-solving/README.md @@ -3,9 +3,9 @@ layout: chapter chapter: 7 lecture: 7 title: "Επίλυση Προβλημάτων" -date: 2025-10-24 +date: 2026-10-23 part: B -slides: https://github.com/progintro/progintro.github.io/releases/download/2025/lec07.pdf +slides: https://progintro.github.io/assets/pdf/lec07.pdf prev: 06-control-flow next: 08-control-flow-2 topics: [problem-solving, loops, good-practice, editors, git] @@ -50,9 +50,15 @@ labs: [lab03, lab01, lab02] ### §7.1 Γιατί μας ενδιαφέρει η ποιότητα του λογισμικού -Η διάλεξη άνοιξε με ένα επίκαιρο γεγονός: τη διακοπή λειτουργίας της υπηρεσίας -cloud AWS της Amazon τον Οκτώβριο του 2025, που επηρέασε επιχειρήσεις σε όλο τον -κόσμο. Η βασική αιτία (root cause) ήταν ένα υποσύστημα που παρακολουθεί την υγεία +Η διάλεξη του 2026-27 άνοιξε με ένα επίκαιρο γεγονός: ένα κενό ασφαλείας στην PHP, +τη γλώσσα στην οποία τρέχει περίπου το 70% των ιστοσελίδων, που οδήγησε ιστοσελίδες +σε όλο τον κόσμο να κλείσουν. Η ερώτηση της διαφάνειας: σε ποια γλώσσα είναι γραμμένος +ο διερμηνέας της PHP; Η απάντηση είναι σε C. Ένα λάθος στον κώδικα C του διερμηνέα +αγγίζει κάθε ιστοσελίδα που τρέχει πάνω του. + +Στις διαφάνειες του 2025-26 το αντίστοιχο γεγονός ήταν η διακοπή λειτουργίας της +υπηρεσίας cloud AWS της Amazon τον Οκτώβριο του 2025, που επηρέασε επιχειρήσεις σε +όλο τον κόσμο. Η βασική αιτία (root cause) ήταν ένα υποσύστημα που παρακολουθεί την υγεία των load balancers του δικτύου τους. Ο καθηγητής Ken Birman (Cornell) σχολίασε ότι οι προγραμματιστές πρέπει να χτίζουν λογισμικό με καλύτερη **ανοχή σε σφάλματα** (fault tolerance), δηλαδή λογισμικό που συνεχίζει να λειτουργεί σωστά @@ -69,8 +75,9 @@ cloud AWS της Amazon τον Οκτώβριο του 2025, που επηρέα ### §7.2 Ανακοινώσεις: ο διαγωνισμός GRCPC -Οι διαφάνειες έδειξαν τους πίνακες αποτελεσμάτων του GRCPC για το 2023, το 2024 -και το 2025. Είναι ο ελληνικός περιφερειακός διαγωνισμός προγραμματισμού του ICPC +Οι διαφάνειες του 2025-26 έδειξαν τους πίνακες αποτελεσμάτων του GRCPC για το 2023, +το 2024 και το 2025 (στις διαφάνειες του 2026-27 η σελίδα των ανακοινώσεων είναι +κενή). Είναι ο ελληνικός περιφερειακός διαγωνισμός προγραμματισμού του ICPC (ICPC Greece Regional Competition), όπου ομάδες φοιτητών λύνουν αλγοριθμικά προβλήματα υπό πίεση χρόνου. Η κατάταξη γίνεται με βάση πόσα προβλήματα έλυσε κάθε ομάδα και, σε ισοβαθμία, με βάση την ποινή χρόνου (penalty)· οι πίνακες δείχνουν @@ -178,7 +185,7 @@ flowchart TD τελευταία τιμή που βγάζει ο βρόχος είναι αυτές που περιμένετε. Προσέξτε ακόμη ότι η `for` επιτρέπει πολλές αρχικοποιήσεις χωρισμένες με κόμμα: -`for (product = 1, i = 100; ...)` δίνει αρχική τιμή και στον **συσσωρευτή** +`for (product = 1, i = 101; ...)` δίνει αρχική τιμή και στον **συσσωρευτή** (accumulator) `product` και στη μεταβλητή του βρόχου. Ένας συσσωρευτής γινομένου ξεκινά από το 1 (το ουδέτερο στοιχείο του πολλαπλασιασμού), όπως ένας συσσωρευτής αθροίσματος ξεκινά από το 0. @@ -374,16 +381,17 @@ $ ./even | wc -l για `mod 7 = 0`: ```c -for (product = 1, i = 100 ; i <= 999 ; i += 2) { +for (product = 1, i = 101 ; i <= 999 ; i += 2) { if ( i % 7 == 0 ) product *= i; } ``` -Προσέξτε την αρχική τιμή: το 100 είναι *άρτιος*, και με βήμα 2 το `i` περνάει -μόνο από άρτιους (100, 102, …, 998). Όπως είναι γραμμένος, ο βρόχος υπολογίζει το -γινόμενο των άρτιων πολλαπλασίων του 7 (112, 126, …). Για τους περιττούς, η -αρχική τιμή πρέπει να είναι ο πρώτος τριψήφιος περιττός, `i = 101`. +Προσέξτε την αρχική τιμή: πρέπει να είναι ο πρώτος τριψήφιος *περιττός*, το 101, +ώστε με βήμα 2 το `i` να περνάει μόνο από περιττούς (101, 103, …, 999). Οι +διαφάνειες του 2025-26 ξεκινούσαν από `i = 100`: το 100 είναι άρτιος, οπότε εκείνος +ο βρόχος περνάει μόνο από άρτιους (100, 102, …, 998) και υπολογίζει το γινόμενο των +*άρτιων* πολλαπλασίων του 7 (112, 126, …). **Λύση με βήμα.** Ο πρώτος τριψήφιος περιττός που διαιρείται με το 7 είναι το $105 = 15 \cdot 7$. Τα επόμενα πολλαπλάσια του 7 εναλλάσσονται άρτιο, περιττό, @@ -400,8 +408,7 @@ for (prod = 1, i = 105 ; i <= 999 ; i += 14) { 450. Οι διαφάνειες δεν δείχνουν τον τύπο των `product` και `prod`. Το γινόμενο αυτών των 64 αριθμών έχει 172 δεκαδικά ψηφία, οπότε δεν χωράει σε κανέναν ακέραιο τύπο της C (ακόμη και ένας `unsigned long long` φτάνει μέχρι περίπου -$1{,}8 \cdot 10^{19}$). Το παρακάτω πρόγραμμα τρέχει και τις δύο λύσεις (με -διορθωμένη αρχική τιμή στην πρώτη) με `double`, που κρατά ένα προσεγγιστικό +$1{,}8 \cdot 10^{19}$). Το παρακάτω πρόγραμμα τρέχει και τις δύο λύσεις με `double`, που κρατά ένα προσεγγιστικό αποτέλεσμα: ```c @@ -507,7 +514,7 @@ prod = 1.211521e+171 (64 terms) ## Διάβασμα -- **Διαφάνειες:** [Διάλεξη 7](https://github.com/progintro/progintro.github.io/releases/download/2025/lec07.pdf), σελ. 1–23. AWS και ανοχή σε σφάλματα: σελ. 2· GRCPC: σελ. 3–5· flow: σελ. 8· βρόχοι: σελ. 9–12· προθέρμανση: σελ. 13–18· θέματα ζωντανής επίλυσης: σελ. 19–20· επόμενη φορά: σελ. 22. +- **Διαφάνειες:** [Διάλεξη 7](https://progintro.github.io/assets/pdf/lec07.pdf) (2026-27), σελ. 1–21. PHP και C: σελ. 2· flow: σελ. 6· βρόχοι: σελ. 7–10· προθέρμανση: σελ. 11–16· θέματα ζωντανής επίλυσης: σελ. 17–18· επόμενη φορά: σελ. 20. Οι διαφάνειες του 2025-26 ([Διάλεξη 7 (2025)](https://github.com/progintro/progintro.github.io/releases/download/2025/lec07.pdf)) έχουν δύο σελίδες παραπάνω: στη θέση της σελ. 2 το AWS και η ανοχή σε σφάλματα, και στις σελ. 3–5 τα αποτελέσματα του GRCPC· από εκεί και πέρα οι σελίδες τους είναι κατά 2 μεγαλύτερες. - **Σημειώσεις:** [Κεφάλαιο 12: Καλές πρακτικές, συχνά λάθη και βιβλιογραφία](https://progintro.github.io/notes/chapters/12-good-practice/), ενότητες «Ένα πρόγραμμα C πρέπει να είναι …» και «Συχνά προγραμματιστικά λάθη στην C» (K04, σελ. 178–182)· [Κεφάλαιο 1: Πρώτα προγράμματα σε C](https://progintro.github.io/notes/chapters/01-first-programs/), ενότητες «Καλημέρα κόσμε της C» (σύνταξη σχολίων) και «Πόσο είναι το $\pi$;» (πρόγραμμα με σχόλια ανά γραμμή) (K04, σελ. 19–23)· [Κεφάλαιο 3: Η ροή του ελέγχου](https://progintro.github.io/notes/chapters/03-control-flow/), ενότητες «Εντολές βρόχου `while`» και «Εντολή βρόχου `for`» (K04, σελ. 52–55). - **Εργαστήριο:** [Εργαστήριο 3](https://progintro.github.io/lab-material/labs/lab03/): εισαγωγή για τους τρεις βρόχους, άσκηση `seq.c` (`while`, `for`, `do...while`) και το παράρτημα για τα λογικά λάθη (`limit.c`)· [Εργαστήριο 2](https://progintro.github.io/lab-material/labs/lab02/): «Βήμα 1: Το περιβάλλον προγραμματισμού Visual Studio Code»· [Εργαστήριο 1](https://progintro.github.io/lab-material/labs/lab01/): «Βήμα 6: Git και GitHub» και «Άσκηση 1: Το πρώτο σας repository (info.txt)». - **Άλλα:** @@ -591,8 +598,8 @@ prod = 1.211521e+171 (64 terms) ### Ζέσταμα: από τις διαφάνειες (Α7.1–Α7.2) -- **[Α7.1](../../questions/slides/slides-lec07-even-descending.md)** Τριψήφιοι άρτιοι σε φθίνουσα σειρά: Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 14 · ★☆☆ · programming · `slides-lec07-even-descending` -- **[Α7.2](../../questions/slides/slides-lec07-odd-multiples-of-7.md)** Γινόμενο τριψήφιων περιττών πολλαπλασίων του 7: Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 16 · ★★☆ · programming · `slides-lec07-odd-multiples-of-7` +- **[Α7.1](../../questions/slides/slides-lec07-even-descending.md)** Τριψήφιοι άρτιοι σε φθίνουσα σειρά: Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 12 · ★☆☆ · programming · `slides-lec07-even-descending` +- **[Α7.2](../../questions/slides/slides-lec07-odd-multiples-of-7.md)** Γινόμενο τριψήφιων περιττών πολλαπλασίων του 7: Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 14 · ★★☆ · programming · `slides-lec07-odd-multiples-of-7` ### Σχετικές ασκήσεις από άλλα κεφάλαια diff --git a/questions/README.md b/questions/README.md index efdc91f..e006553 100644 --- a/questions/README.md +++ b/questions/README.md @@ -275,8 +275,8 @@ ### Ζέσταμα: από τις διαφάνειες (Α7.1–Α7.2) -- **[Α7.1](../questions/slides/slides-lec07-even-descending.md)** Τριψήφιοι άρτιοι σε φθίνουσα σειρά: Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 14 · ★☆☆ · programming · `slides-lec07-even-descending` -- **[Α7.2](../questions/slides/slides-lec07-odd-multiples-of-7.md)** Γινόμενο τριψήφιων περιττών πολλαπλασίων του 7: Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 16 · ★★☆ · programming · `slides-lec07-odd-multiples-of-7` +- **[Α7.1](../questions/slides/slides-lec07-even-descending.md)** Τριψήφιοι άρτιοι σε φθίνουσα σειρά: Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 12 · ★☆☆ · programming · `slides-lec07-even-descending` +- **[Α7.2](../questions/slides/slides-lec07-odd-multiples-of-7.md)** Γινόμενο τριψήφιων περιττών πολλαπλασίων του 7: Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 14 · ★★☆ · programming · `slides-lec07-odd-multiples-of-7` ## [Κεφάλαιο 8: Ροή Ελέγχου #2](../chapters/08-control-flow-2/) diff --git a/questions/slides/slides-lec07-even-descending.md b/questions/slides/slides-lec07-even-descending.md index fa9818f..cbe7e37 100644 --- a/questions/slides/slides-lec07-even-descending.md +++ b/questions/slides/slides-lec07-even-descending.md @@ -3,9 +3,9 @@ id: slides-lec07-even-descending kind: slides title: "Τριψήφιοι άρτιοι σε φθίνουσα σειρά" source: - title: "Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 14" - url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec07.pdf - years: [2025] + title: "Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 12" + url: https://progintro.github.io/assets/pdf/lec07.pdf + years: [2025, 2026] chapters: [7] topics: [loops, problem-solving] difficulty: 1 diff --git a/questions/slides/slides-lec07-odd-multiples-of-7.md b/questions/slides/slides-lec07-odd-multiples-of-7.md index 3a735da..d992fec 100644 --- a/questions/slides/slides-lec07-odd-multiples-of-7.md +++ b/questions/slides/slides-lec07-odd-multiples-of-7.md @@ -3,9 +3,9 @@ id: slides-lec07-odd-multiples-of-7 kind: slides title: "Γινόμενο τριψήφιων περιττών πολλαπλασίων του 7" source: - title: "Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 16" - url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec07.pdf - years: [2025] + title: "Διάλεξη 7: Επίλυση Προβλημάτων, διαφάνεια 14" + url: https://progintro.github.io/assets/pdf/lec07.pdf + years: [2025, 2026] chapters: [7] topics: [loops, problem-solving, operators] difficulty: 2 diff --git a/sources/extract/lec07.yaml b/sources/extract/lec07.yaml index 566e0d9..75760b4 100644 --- a/sources/extract/lec07.yaml +++ b/sources/extract/lec07.yaml @@ -1,33 +1,36 @@ lecture: 7 -pages: 23 +year: 2026-27 # updated from the 2025-26 deck (23 pages) on 2026-10-23 +slides: https://progintro.github.io/assets/pdf/lec07.pdf +pages: 21 outline: - {pages: "1-2", section: "Γιατί μας ενδιαφέρει η ποιότητα του λογισμικού"} - - {pages: "3-5", section: "Ανακοινώσεις: ο διαγωνισμός GRCPC"} - - {pages: "6-7", section: "Γιατί μας ενδιαφέρει η ποιότητα του λογισμικού"} - - {pages: "8", section: "Flow: η κατάσταση πλήρους συγκέντρωσης"} - - {pages: "9-12", section: "Ανακεφαλαίωση: οι τρεις βρόχοι"} - - {pages: "13-18", section: "Από την περιγραφή στον βρόχο"} - - {pages: "19-20", section: "Σχολιασμός προγραμμάτων"} - - {pages: "20", section: "Δημιουργία README"} - - {pages: "20", section: "Μορφοποίηση κώδικα"} - - {pages: "20", section: "Editors"} - - {pages: "20", section: "Git και γραμμή εντολών"} - - {pages: "21-23", section: "Git και γραμμή εντολών"} + - {pages: "3", section: "Ανακοινώσεις: ο διαγωνισμός GRCPC"} # empty in 2026-27; GRCPC is on 2025-26 pp. 3-5 + - {pages: "4-5", section: "Γιατί μας ενδιαφέρει η ποιότητα του λογισμικού"} + - {pages: "6", section: "Flow: η κατάσταση πλήρους συγκέντρωσης"} + - {pages: "7-10", section: "Ανακεφαλαίωση: οι τρεις βρόχοι"} + - {pages: "11-16", section: "Από την περιγραφή στον βρόχο"} + - {pages: "17-18", section: "Σχολιασμός προγραμμάτων"} + - {pages: "18", section: "Δημιουργία README"} + - {pages: "18", section: "Μορφοποίηση κώδικα"} + - {pages: "18", section: "Editors"} + - {pages: "18", section: "Git και γραμμή εντολών"} + - {pages: "19-21", section: "Git και γραμμή εντολών"} pointers: - - {page: 3, text: "GRCPC 2023 results: https://grcpc.upatras.gr/wp-content/uploads/sites/177/2023/10/GRCPC-2023-RESULTS.pdf"} - - {page: 4, text: "GRCPC 2024 scoreboard: https://grcpc.upatras.gr/wp-content/uploads/sites/177/2024/10/Scoreboard-GRCPC2024.pdf"} - - {page: 5, text: "GRCPC 2025 scoreboard: https://grcpc.upatras.gr/wp-content/uploads/sites/177/2025/10/Greece_Universities_Scoreboard1.pdf"} - - {page: 8, text: "Wikipedia: Flow (psychology) (https://en.wikipedia.org/wiki/Flow_(psychology)), plus links to Positive psychology, Mental state, Attention"} - - {page: 22, text: "How to write good comments: https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/"} - - {page: 22, text: "README.md guide [1]: https://medium.com/@kc_clintone/the-ultimate-guide-to-writing-a-great-readme-md-for-your-project-3d49c2023357"} - - {page: 22, text: "README.md guide [2]: https://github.com/banesullivan/README"} - - {page: 22, text: "README.md guide [3]: https://www.freecodecamp.org/news/how-to-write-a-good-readme-file/"} + - {page: 3, text: "(2025-26 deck) GRCPC 2023 results: https://grcpc.upatras.gr/wp-content/uploads/sites/177/2023/10/GRCPC-2023-RESULTS.pdf"} + - {page: 4, text: "(2025-26 deck) GRCPC 2024 scoreboard: https://grcpc.upatras.gr/wp-content/uploads/sites/177/2024/10/Scoreboard-GRCPC2024.pdf"} + - {page: 5, text: "(2025-26 deck) GRCPC 2025 scoreboard: https://grcpc.upatras.gr/wp-content/uploads/sites/177/2025/10/Greece_Universities_Scoreboard1.pdf"} + - {page: 6, text: "Wikipedia: Flow (psychology) (https://en.wikipedia.org/wiki/Flow_(psychology)), plus links to Positive psychology, Mental state, Attention"} + - {page: 20, text: "How to write good comments: https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/"} + - {page: 20, text: "README.md guide [1]: https://medium.com/@kc_clintone/the-ultimate-guide-to-writing-a-great-readme-md-for-your-project-3d49c2023357"} + - {page: 20, text: "README.md guide [2]: https://github.com/banesullivan/README"} + - {page: 20, text: "README.md guide [3]: https://www.freecodecamp.org/news/how-to-write-a-good-readme-file/"} takeaways_slide: null issues: + - "2026-27 deck (21 pages) vs 2025-26 (23 pages). p. 2: the AWS outage (Reuters, Oct 2025) is replaced by a PHP security flaw headline (PHP 8.5.12, Oct 2026) with the question «Το 70% του internet τρέχει την γλώσσα PHP. Σε ποια γλώσσα είναι γραμμένος ο διερμηνέας της;» (answer: C). The three GRCPC announcement pages (2025-26 pp. 3-5) became one empty announcements page (p. 3). From there on, 2025-26 page N is 2026-27 page N-2 (pp. 6-23 -> 4-21). pp. 4-5 add painting captions. p. 15 (old p. 17) fixes the filter loop to start at i = 101. p. 17 (old p. 19) shows the demo machine's IP. The chapter keeps the AWS and GRCPC material, labelled as 2025-26. The issues below use 2025-26 page numbers." - "No key-takeaways slide; «Κύρια σημεία» are synthesised from the warm-up problems and the topic list on p. 20." - "pp. 19-20 are a live session with volunteers (ssh to a shared Ubuntu machine) on comments, README, formatting, editors, git/command line; the slides carry only the topic titles. The Θεωρία sections for these topics are built from notes 12-good-practice «Ένα πρόγραμμα C πρέπει να είναι …», notes 01-first-programs (comment syntax), FAQ #14, #52, #65, faq2 #122, #128, hw0 2025 (README.md requirement), lab01 (git) and lab02 (VS Code), and the reading the slides assign on p. 22. The comment guidelines paraphrase the Stack Overflow blog post; nothing records what was actually typed live." - - "p. 19 shows an ssh password for the live-demo machine; deliberately not copied into the chapter." - - "p. 17: the filter version `for(product = 1, i = 100; i <= 999; i += 2) if (i % 7 == 0) ...` starts at an even number, so it visits only even numbers and computes the product of the EVEN three-digit multiples of 7, not the odd ones asked for. Verified by running it (3.796882e+171 vs 1.211521e+171 for the correct answer). The chapter transcribes it faithfully and points out the fix (i = 101). Unclear whether the bug was intentional." + - "p. 19 shows an ssh password for the live-demo machine (2026-27 p. 17 also shows its IP); deliberately not copied into the chapter." + - "p. 17: the filter version `for(product = 1, i = 100; i <= 999; i += 2) if (i % 7 == 0) ...` starts at an even number, so it visits only even numbers and computes the product of the EVEN three-digit multiples of 7, not the odd ones asked for. Verified by running it (3.796882e+171 vs 1.211521e+171 for the correct answer). The chapter transcribes it faithfully and points out the fix (i = 101). Unclear whether the bug was intentional. Fixed in the 2026-27 deck (p. 15 starts at i = 101); the chapter now shows i = 101 and explains the 2025-26 version." - "p. 18 keeps the subtitle 'και έλεγχο για mod 7 = 0' from p. 17 although its code (start 105, step 14) has no mod check; the chapter describes it as the step-based solution." - "pp. 17-18 do not declare the types of product/prod; the product has 172 decimal digits and overflows every integer type. The chapter's complete program uses double and says so; this is the chapter's addition, not the slides'." - "p. 21 is only 'Kahoot Time!'; no quiz questions in the slides, none transcribed." diff --git a/sources/manifest.yaml b/sources/manifest.yaml index 5d57c84..3ce3d98 100644 --- a/sources/manifest.yaml +++ b/sources/manifest.yaml @@ -28,7 +28,7 @@ lectures: - {n: 4, slug: 04-git-operators, date: 2026-10-12, part: A, slides: lec04.pdf, url: "https://progintro.github.io/assets/pdf/lec04.pdf", title: "Git και Τελεστές", notes: [02-types-operators], labs: [lab01]} - {n: 5, slug: 05-operators-statements, date: 2026-10-16, part: B, slides: lec05.pdf, url: "https://progintro.github.io/assets/pdf/lec05.pdf", title: "Τελεστές και Εντολές", notes: [02-types-operators, 03-control-flow], labs: [lab03]} - {n: 6, slug: 06-control-flow, date: 2026-10-19, part: B, slides: lec06.pdf, url: "https://progintro.github.io/assets/pdf/lec06.pdf", title: "Εντολές και Ροή Ελέγχου", notes: [03-control-flow], labs: [lab03]} - - {n: 7, slug: 07-problem-solving, date: 2025-10-24, part: B, slides: lec07.pdf, title: "Επίλυση Προβλημάτων", notes: [01-first-programs], labs: [lab03]} + - {n: 7, slug: 07-problem-solving, date: 2026-10-23, part: B, slides: lec07.pdf, url: "https://progintro.github.io/assets/pdf/lec07.pdf", title: "Επίλυση Προβλημάτων", notes: [01-first-programs], labs: [lab03]} - {n: 8, slug: 08-control-flow-2, date: 2025-10-27, part: B, slides: lec08.pdf, title: "Ροή Ελέγχου #2", notes: [03-control-flow], labs: [lab03]} - {n: 9, slug: 09-input, date: 2025-10-31, part: B, slides: lec09.pdf, title: "Δεδομένα Εισόδου", notes: [01-first-programs, 09-io], labs: [lab04]} - {n: 10, slug: 10-arrays, date: 2025-11-03, part: C, slides: lec10.pdf, title: "Πίνακες", notes: [05-pointers-arrays], labs: [lab06]} From 3c86b67a8e8cc88205a2b13d1578aa0c592ec2f5 Mon Sep 17 00:00:00 2001 From: Thanassis Avgerinos Date: Mon, 26 Oct 2026 12:03:41 +0200 Subject: [PATCH 2/2] Point chapter 8 to the 2026-27 lecture 8 slides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 2026-27 deck (assets/pdf/lec08.pdf on the course site) has the same 25 pages as 2025-26, with no content changes and no page numbers moved. pp. 3-4 add painting captions, pp. 13 and 15-18 fix the accent in «Πώς», and the reading list on p. 24 adds a link to Edsger Dijkstra. The chapter, its six slide questions, the extract notes, the manifest and `make fetch` now point to the new deck, and the chapter's reading list adds the Dijkstra link. --- Makefile | 2 +- README.md | 2 +- chapters/08-control-flow-2/README.md | 8 ++++---- questions/slides/slides-lec08-digit-names.md | 4 ++-- questions/slides/slides-lec08-print-all-issue.md | 4 ++-- questions/slides/slides-lec08-product-multiples-of-7.md | 4 ++-- questions/slides/slides-lec08-product-overflow.md | 4 ++-- questions/slides/slides-lec08-season.md | 4 ++-- questions/slides/slides-lec08-smallest-three-digit.md | 4 ++-- sources/extract/lec08.yaml | 4 ++++ sources/manifest.yaml | 2 +- 11 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 58bec89..4359b1b 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ $(BUILD)/llms.txt: $(CHAPTERS) glossary.md $(BUILD)/questions.md tools/llms.py t .PHONY: all fetch lint check-code exercises check clean fetch: mkdir -p sources/slides/2026 sources/hw/2023 sources/hw/2024 sources/hw/2025 - for f in lec00 lec01 lec02 lec03 lec04 lec05 lec06 lec07; do curl -fsSL -o sources/slides/2026/$$f.pdf https://progintro.github.io/assets/pdf/$$f.pdf; done + for f in lec00 lec01 lec02 lec03 lec04 lec05 lec06 lec07 lec08; do curl -fsSL -o sources/slides/2026/$$f.pdf https://progintro.github.io/assets/pdf/$$f.pdf; done gh release download 2025 -R $(REPO) -D sources/slides -p 'lec*.pdf' -p make.pdf --skip-existing gh release download 2025 -R $(REPO) -D sources/hw/2025 -p 'hw*.pdf' -p stergios.pdf --skip-existing gh release download 2024 -R $(REPO) -D sources/hw/2024 -p 'hw*.pdf' --skip-existing diff --git a/README.md b/README.md index 0c8e2de..06f7bef 100644 --- a/README.md +++ b/README.md @@ -325,7 +325,7 @@ chatbot ή agent το [`llms-full.txt`](llms-full.txt) (όλος ο οδηγός Ο οδηγός γράφτηκε από τις διαφάνειες των διαλέξεων του 2025-26 ([progintro.github.io](https://progintro.github.io/)) και ενημερώνεται με τις διαφάνειες -του 2026-27 καθώς δημοσιεύονται (ως τώρα: Διαλέξεις 0–7), τις +του 2026-27 καθώς δημοσιεύονται (ως τώρα: Διαλέξεις 0–8), τις [σημειώσεις](https://progintro.github.io/notes/) του μαθήματος, τα [εργαστήρια](https://progintro.github.io/lab-material/) και τα θέματα εξετάσεων και τις εργασίες προηγούμενων ετών. Οι ασκήσεις έχουν υποδείξεις αλλά όχι λύσεις. diff --git a/chapters/08-control-flow-2/README.md b/chapters/08-control-flow-2/README.md index f6e260b..59707d8 100644 --- a/chapters/08-control-flow-2/README.md +++ b/chapters/08-control-flow-2/README.md @@ -3,9 +3,9 @@ layout: chapter chapter: 8 lecture: 8 title: "Ροή Ελέγχου #2" -date: 2025-10-27 +date: 2026-10-26 part: B -slides: https://github.com/progintro/progintro.github.io/releases/download/2025/lec08.pdf +slides: https://progintro.github.io/assets/pdf/lec08.pdf prev: 07-problem-solving next: 09-input topics: [loops, control-flow, conditionals, integer-representation] @@ -538,13 +538,13 @@ switch (month) { ## Διάβασμα -- **Διαφάνειες:** [Διάλεξη 8](https://github.com/progintro/progintro.github.io/releases/download/2025/lec08.pdf), σελ. 1–25. Υπερχείλιση στο γινόμενο: σελ. 2· παραδείγματα βρόχων και σημαία: σελ. 5–8· `break`: σελ. 9–10· `continue`: σελ. 11–12· `switch`: σελ. 13–18· `goto` και δομημένος προγραμματισμός: σελ. 19–22. +- **Διαφάνειες:** [Διάλεξη 8](https://progintro.github.io/assets/pdf/lec08.pdf) (2026-27), σελ. 1–25. Υπερχείλιση στο γινόμενο: σελ. 2· παραδείγματα βρόχων και σημαία: σελ. 5–8· `break`: σελ. 9–10· `continue`: σελ. 11–12· `switch`: σελ. 13–18· `goto` και δομημένος προγραμματισμός: σελ. 19–22. Οι διαφάνειες του 2025-26 έχουν την ίδια αρίθμηση: [Διάλεξη 8 (2025)](https://github.com/progintro/progintro.github.io/releases/download/2025/lec08.pdf). - **Σημειώσεις:** [Κεφάλαιο 3: Η ροή του ελέγχου](https://progintro.github.io/notes/chapters/03-control-flow/), ενότητες «Εντολή `switch`», «Εντολές `break` και `continue`», «Εντολή `goto` και ετικέτες» (K04, σελ. 50–51 και 56–57). Οι διαφάνειες συνιστούν να έχετε καλύψει τις σημειώσεις του κ. Σταματόπουλου μέχρι και τη σελίδα 71, δηλαδή και το [Κεφάλαιο 4: Συναρτήσεις](https://progintro.github.io/notes/chapters/04-functions/) μέχρι την ενότητα «Μετατροπές μεταξύ δεκαδικών και δυαδικών αριθμών». - **Εργαστήριο:** [Εργαστήριο 3](https://progintro.github.io/lab-material/labs/lab03/): ασκήσεις `seq.c` (βρόχοι), `birthdate.c` (αντιστοίχιση `IDAY % 7` σε ημέρα, κατάλληλη για `switch`) - **Άλλα:** - [Break and Continue (W3Schools)](https://www.w3schools.com/c/c_break_continue.php) - [Switch statement (GeeksforGeeks)](https://www.geeksforgeeks.org/c-switch-statement/) - - Wikipedia: [Considered harmful](https://en.wikipedia.org/wiki/Considered_harmful), [Spaghetti code](https://en.wikipedia.org/wiki/Spaghetti_code) + - Wikipedia: [Considered harmful](https://en.wikipedia.org/wiki/Considered_harmful), [Edsger W. Dijkstra](https://en.wikipedia.org/wiki/Edsger_W._Dijkstra), [Spaghetti code](https://en.wikipedia.org/wiki/Spaghetti_code) - [IOCCC](https://ioccc.org/): διαγωνισμός δυσνόητου κώδικα C ## Συχνά λάθη diff --git a/questions/slides/slides-lec08-digit-names.md b/questions/slides/slides-lec08-digit-names.md index d64fb26..c35e371 100644 --- a/questions/slides/slides-lec08-digit-names.md +++ b/questions/slides/slides-lec08-digit-names.md @@ -4,8 +4,8 @@ kind: slides title: "Το αγγλικό όνομα κάθε ψηφίου" source: title: "Διάλεξη 8: Ροή Ελέγχου #2, διαφάνεια 13" - url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec08.pdf - years: [2025] + url: https://progintro.github.io/assets/pdf/lec08.pdf + years: [2025, 2026] chapters: [8] topics: [conditionals, control-flow] difficulty: 1 diff --git a/questions/slides/slides-lec08-print-all-issue.md b/questions/slides/slides-lec08-print-all-issue.md index a8027c8..bad46aa 100644 --- a/questions/slides/slides-lec08-print-all-issue.md +++ b/questions/slides/slides-lec08-print-all-issue.md @@ -4,8 +4,8 @@ kind: slides title: "Υπάρχει θέμα με αυτή την υλοποίηση;" source: title: "Διάλεξη 8: Ροή Ελέγχου #2, διαφάνεια 7" - url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec08.pdf - years: [2025] + url: https://progintro.github.io/assets/pdf/lec08.pdf + years: [2025, 2026] chapters: [8] topics: [loops, control-flow] difficulty: 1 diff --git a/questions/slides/slides-lec08-product-multiples-of-7.md b/questions/slides/slides-lec08-product-multiples-of-7.md index ee32392..3d7b320 100644 --- a/questions/slides/slides-lec08-product-multiples-of-7.md +++ b/questions/slides/slides-lec08-product-multiples-of-7.md @@ -4,8 +4,8 @@ kind: slides title: "Γινόμενο τριψήφιων περιττών πολλαπλασίων του 7" source: title: "Διάλεξη 8: Ροή Ελέγχου #2, διαφάνεια 5" - url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec08.pdf - years: [2025] + url: https://progintro.github.io/assets/pdf/lec08.pdf + years: [2025, 2026] chapters: [8] topics: [loops] difficulty: 1 diff --git a/questions/slides/slides-lec08-product-overflow.md b/questions/slides/slides-lec08-product-overflow.md index 326525b..bd2b021 100644 --- a/questions/slides/slides-lec08-product-overflow.md +++ b/questions/slides/slides-lec08-product-overflow.md @@ -4,8 +4,8 @@ kind: slides title: "Αρνητικό γινόμενο σε βρόχο" source: title: "Διάλεξη 8: Ροή Ελέγχου #2, διαφάνεια 2" - url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec08.pdf - years: [2025] + url: https://progintro.github.io/assets/pdf/lec08.pdf + years: [2025, 2026] chapters: [8, 2] topics: [integer-representation, loops] difficulty: 1 diff --git a/questions/slides/slides-lec08-season.md b/questions/slides/slides-lec08-season.md index c61413e..89a89ee 100644 --- a/questions/slides/slides-lec08-season.md +++ b/questions/slides/slides-lec08-season.md @@ -4,8 +4,8 @@ kind: slides title: "Η εποχή κάθε μήνα" source: title: "Διάλεξη 8: Ροή Ελέγχου #2, διαφάνεια 17" - url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec08.pdf - years: [2025] + url: https://progintro.github.io/assets/pdf/lec08.pdf + years: [2025, 2026] chapters: [8] topics: [conditionals, control-flow] difficulty: 1 diff --git a/questions/slides/slides-lec08-smallest-three-digit.md b/questions/slides/slides-lec08-smallest-three-digit.md index bf947d8..465df09 100644 --- a/questions/slides/slides-lec08-smallest-three-digit.md +++ b/questions/slides/slides-lec08-smallest-three-digit.md @@ -4,8 +4,8 @@ kind: slides title: "Ο μικρότερος τριψήφιος πολλαπλάσιο του 2 και του 5 αλλά όχι του 4" source: title: "Διάλεξη 8: Ροή Ελέγχου #2, διαφάνεια 6" - url: https://github.com/progintro/progintro.github.io/releases/download/2025/lec08.pdf - years: [2025] + url: https://progintro.github.io/assets/pdf/lec08.pdf + years: [2025, 2026] chapters: [8] topics: [loops, control-flow] difficulty: 1 diff --git a/sources/extract/lec08.yaml b/sources/extract/lec08.yaml index 9381da6..4b83dfe 100644 --- a/sources/extract/lec08.yaml +++ b/sources/extract/lec08.yaml @@ -1,4 +1,6 @@ lecture: 8 +year: 2026-27 # updated from the 2025-26 deck (25 pages) on 2026-10-26; same page numbers +slides: https://progintro.github.io/assets/pdf/lec08.pdf pages: 25 outline: - {pages: "1-2", section: "Υπερχείλιση σε βρόχους που πολλαπλασιάζουν"} @@ -19,8 +21,10 @@ pointers: - {page: 24, text: "Break and Continue: https://www.w3schools.com/c/c_break_continue.php"} - {page: 24, text: "Switch statement: https://www.geeksforgeeks.org/c-switch-statement/"} - {page: 24, text: "Considered harmful: https://en.wikipedia.org/wiki/Considered_harmful"} + - {page: 24, text: "Edsger Dijkstra: https://en.wikipedia.org/wiki/Edsger_W._Dijkstra"} takeaways_slide: null issues: + - "2026-27 deck vs 2025-26 (both 25 pages): no content changes and no page numbers moved. pp. 3-4 add painting captions, pp. 13 and 15-18 fix the accent «Πως» -> «Πώς», and the reading list on p. 24 adds a link to Edsger Dijkstra (Wikipedia), now also in the chapter's «Άλλα»." - "No explicit key-takeaways slide. The callouts on pp. 16-18 (break ends the switch; several cases together; only equality; integer expression and constants) and p. 21-22 (structured programming means no goto) were treated as takeaways." - "p. 2: the question 'τι συμβαίνει;' has no answer on the slides. The chapter explains it as signed int overflow (standard C). Verified locally: the loop multiplies 64 factors and, with 32-bit wraparound, prints -1187656959 as on the slide." - "p. 5: the first solution starts at i = 100 with i += 2, so it visits even numbers although the problem asks for odd ones. The chapter keeps the slide code and points out the bug (should start at 101). Also the range text '105, …, 987' is computed (the largest odd three-digit multiple of 7 is 987)." diff --git a/sources/manifest.yaml b/sources/manifest.yaml index 3ce3d98..6291476 100644 --- a/sources/manifest.yaml +++ b/sources/manifest.yaml @@ -29,7 +29,7 @@ lectures: - {n: 5, slug: 05-operators-statements, date: 2026-10-16, part: B, slides: lec05.pdf, url: "https://progintro.github.io/assets/pdf/lec05.pdf", title: "Τελεστές και Εντολές", notes: [02-types-operators, 03-control-flow], labs: [lab03]} - {n: 6, slug: 06-control-flow, date: 2026-10-19, part: B, slides: lec06.pdf, url: "https://progintro.github.io/assets/pdf/lec06.pdf", title: "Εντολές και Ροή Ελέγχου", notes: [03-control-flow], labs: [lab03]} - {n: 7, slug: 07-problem-solving, date: 2026-10-23, part: B, slides: lec07.pdf, url: "https://progintro.github.io/assets/pdf/lec07.pdf", title: "Επίλυση Προβλημάτων", notes: [01-first-programs], labs: [lab03]} - - {n: 8, slug: 08-control-flow-2, date: 2025-10-27, part: B, slides: lec08.pdf, title: "Ροή Ελέγχου #2", notes: [03-control-flow], labs: [lab03]} + - {n: 8, slug: 08-control-flow-2, date: 2026-10-26, part: B, slides: lec08.pdf, url: "https://progintro.github.io/assets/pdf/lec08.pdf", title: "Ροή Ελέγχου #2", notes: [03-control-flow], labs: [lab03]} - {n: 9, slug: 09-input, date: 2025-10-31, part: B, slides: lec09.pdf, title: "Δεδομένα Εισόδου", notes: [01-first-programs, 09-io], labs: [lab04]} - {n: 10, slug: 10-arrays, date: 2025-11-03, part: C, slides: lec10.pdf, title: "Πίνακες", notes: [05-pointers-arrays], labs: [lab06]} - {n: 11, slug: 11-pointers-recursion, date: 2025-11-07, part: C, slides: lec11.pdf, title: "Δείκτες και Αναδρομή", notes: [04-functions, 05-pointers-arrays], labs: [lab05, lab06]}