Version without JavaScript, read-only: workshops, quizzes and running code are not available here. Full version · Catalogue · Sign in
Lecture notes
The module's contract, and the map of notions
What is expected, how it is marked, what the assistant is allowed to do, and the twenty-eight notions of the module with the exam question for each of the thirteen certified ones.
This text is to be read in session 0, with the prerequisites test. It contains everything the module will ask of you, and nothing else will be required at the end of the module.
The contract
The actual timetable
The module consists of nine lecture slots, two project slots, one day with Fabien ESCOURBIAC and an oral defence, that is 15 h 45 of lectures in total.
| When | What |
|---|---|
| Wed 23/09, 8:30 | Lecture: relationships between classes, inheritance and composition, interfaces |
| Tue 06/10, 13:30 | Project kick-off, forming the teams, remote, with F. ESCOURBIAC |
| Thu 15/10, full day | Unit testing and professional practices, with F. ESCOURBIAC |
| Tue 20/10, 13:30 | Project: second check-in, remote, with F. ESCOURBIAC |
| Wed 21/10, full day | Lectures: 6 sequences |
| Fri 23/10, 10:15 | Lecture |
| Tue 03/11, 13:30 | Lecture, remediation, revision |
| Wed 04/11, 13:30 to 17:00 | Oral defence, rooms 315 and 316 |
| after the lectures | Individual written exam, on paper |
There are three periods without lectures: from 24/09 to 05/10, from 07/10 to 19/10 and from 24/10 to 02/11. Each has its own roadmap, planned for at most two hours of work a week, which takes your work-study schedule into account.
Organisation of the sequences
Each notion is covered in a 45-minute sequence, always in the same order: a situation, seven minutes of explanation, a break where you choose your level, and an exercise checked by provided tests.
The module distinguishes three levels of requirement, announced from the start:
- Core: 13 notions, certified individually, on paper and without a computer. These are the skills the module guarantees.
- Reading: the lecture notes and the quizzes. This content is covered, but not certified in depth.
- Project: assessed on what you produce, with the assistant allowed, and orally.
At each break, you freely choose your level. There are no streamed groups: nobody is ranked once and for all.
The core exercises offer three hints, from the vaguest to the most detailed. Using them is not penalised; if you are stuck, it is better to use them than to lose time.
The code-generation assistant
The assistant is forbidden in some activities and expected in others.
Forbidden: during the core exercises, the quizzes, the prerequisites test and the written exam. These activities are used to check that you can read code, spot a flaw in it and fix it. If an assistant answers in your place, the result no longer says anything about your level, and you lose a useful indication.
Expected: on the project, on the challenges and at the oral. Writing a precise request, checking the answer, keeping what is correct and discarding the rest is part of the job. This skill is assessed, in particular your ability to spot the assistant's mistakes.
No detector or monitoring software is used. Checks are made on paper, or orally by asking you to justify your own code.
What is marked
The mark is based on two assessments, and the first conditions the second.
- The written exam, without AI, after the end of the lectures: thirteen questions, one per core notion, on code to read, diagnose and fix, in 1 h 30 to 2 h. There are no questions on the course itself: each question is about a given piece of code, whose flaws you have to spot and explain.
- The project and its defence, with AI allowed. What is assessed is the command of the concepts, the quality of the design, teamwork and your ability to explain and defend your code.
The prerequisites test in session 0 is not marked; it is used to identify what you need to review.
Why this format
This format can give the impression of learning less than in a lecture course, since the explanation lasts seven minutes per sequence instead of an hour. Measurements show, however, that you learn more this way. A smooth lecture gives an impression of understanding, but it is the effort of retrieving a notion from memory that makes it stick.
You will probably have covered fewer things than in other modules, but you will be able to do more with them.
The map of notions
A notion is something you must know how to do, stated with a verb whose achievement can be checked. The module has twenty-eight of them: 13 in the core (S), 3 already acquired in COOA (A), 8 for reading (L) and 4 in the project (P).
The thirteen core notions and their exam question
The table gives the exact form of the thirteen questions of the written exam. Each question is about an extract of code provided with the paper.
| Seq. | Date | Notion | The exam question | Chapter |
|---|---|---|---|---|
| 1 | 23/09 | N8 Name the relationship between two classes, and say what changing it entails | “Name the relationship between A and B in this code, then say what breaks if it is replaced by an aggregation.” | 3 |
| 2 | 23/09 | N3 Choose between inheritance and composition, and justify | “This code uses inheritance; say whether composition would be better suited, and justify in one sentence.” | 4 |
| 3 | 23/09 | N10 Make a class depend on an interface, and say what that allows | “Rewrite the signature of this constructor so that the class no longer depends on the implementation, and say what that makes possible.” | 5 |
| 4 | 21/10 | N2 Spot a breach of encapsulation and fix it | “Here is a class; point out where its state can be modified from the outside, and fix it.” | 7 |
| 5 | 21/10 | N9 Spot a coupling or cohesion flaw and propose a split | “List the dependencies of this class, propose a split in two, and say what each half does.” | 8 |
| 6 | 21/10 | N13 Spot a violation of a SOLID principle and name it | “This code violates a SOLID principle; name it, and say what will have to be modified at the next change.” | 8, 13 |
| 7 | 21/10 | N15 Predict the flow of a try/catch/finally | “What does this program print, and what does the method return? Give the exact order of the lines.” | 9 |
| 7 | 21/10 | N16 Spot an exception-handling anti-pattern and fix it | “Spot the three exception-handling mistakes in this code and fix them.” | 9 |
| 8 | 21/10 | N19 Use try-with-resources, and say why finally is not enough | “This code closes its resource in a finally; show which exception is lost, then rewrite it with try-with-resources.” | 9 |
| 9 | 21/10 | N14 Choose between checked and unchecked exception, and justify | “For each of these three situations, which exception should be thrown, checked or not, and why?” | 9 |
| 10 | 23/10 | N11 Recognise the problem a pattern solves | “This code has a problem that a well-known pattern solves; name the problem, then the pattern.” | 10 |
| 11 | 03/11 | N18 Write the preconditions of a method; check or document | “Write the preconditions of this method; say which ones you check at run time, which ones you document.” | 14 |
| 12 | 03/11 | N28 Recognise the problem an Observer or an Adapter solves | “This code must plug in a class with a foreign interface, or notify several objects of a change; name the pattern, and say what it decouples.” | 10 |
The thirteenth sequence, on 03/11, is a reserve sequence, devoted to remediation and to revising the points that are least well mastered.
Order of the notions
Some notions assume others. In the diagram, an arrow means that the first notion is needed to understand the second.
flowchart LR
N8["N8 · relationships<br>seq. 1"] --> N3["N3 · inherit or compose<br>seq. 2"]
N3 --> N10["N10 · interface<br>seq. 3"]
N8 --> N10
N10 --> N11["N11 · patterns, 1st series<br>seq. 10"]
N11 --> N28["N28 · patterns, 2nd series<br>seq. 12"]
N8 --> N9["N9 · coupling, cohesion<br>seq. 5"]
N9 --> N13["N13 · SOLID<br>seq. 6"]
N15["N15 · try/finally flow<br>seq. 7"] --> N16["N16 · anti-patterns<br>seq. 7"]
N15 --> N19["N19 · try-with-resources<br>seq. 8"]
N14["N14 · checked or not<br>seq. 9"] --> N18["N18 · preconditions<br>seq. 11"]
N2["N2 · encapsulation<br>seq. 4"]The top chain, N8 → N3 → N10, takes up the whole lecture of 23/09: these are the notions needed to break down your project properly on 06/10. N2 belongs to the OOP that the course description considers already acquired; the module takes it up again from the angle of the invariant to protect.
What you already have from COOA
You worked on these three notions in Advanced object-oriented concepts, and they were assessed in the exam of 3 April. They are not taught again, and they are not in the written exam. A fifteen-minute diagnostic, on the morning of 21/10, checks that they still hold; if one no longer does, the roadmap that follows 23/10 says what to review.
| Notion | Chapter |
|---|---|
| N1 Predict which method runs when the declared type differs from the actual type | 6 |
N4 Write consistent equals and hashCode | 11 |
| N20 Choose the collection suited to a need | - |
The reading notions
Each of these notions is the subject of a quiz question and a passage of the lecture notes, but they are not certified. None of them will be in the written exam.
| Notion | Chapter |
|---|---|
| N5 Write an enumeration that carries behaviour, rather than constants | 12 |
| N6 Read a generic signature and say which types it accepts | 12 |
| N7 Explain why a piece of generic code does not compile (erasure, variance) | 12 |
| N17 Write a custom exception, and say what it brings | 9 |
| N21 Predict the cost of an operation on a collection | - |
| N22 Read a Streams pipeline and say what it produces | - |
| N23 Spot a side effect in a stream, or a faulty capture in a lambda | - |
| N24 Spot a race condition in multi-threaded code | - |
The project notions
These notions are put into practice in the project, with the assistant, and defended orally.
| Notion |
|---|
| N12 Choose the pattern suited to a need, or justify not using one |
| N25 Read and write a file, access a database |
| N26 Spot a design or exception error in code generated by an assistant, and fix it |
| N27 Justify orally a design decision of your project, without the assistant |
What the module does not certify
With 15 h 45 of lectures, choices had to be made, and it is the lowest-priority notions of the map that were reduced:
- multi-threading is only covered for reading (N24);
- files and databases are only covered in the project (N25);
- Git and unit tests are dealt with during the day of 15/10, with F. ESCOURBIAC, and are not part of the written exam.