Programming Languages

Software Construction Techniques: Writing Good Code (Seminar)

Engineering good software is challenging. Beyond activities such as requirement engineering or design, what’s also very important is software construction itself, that is, actually writing the code. Doing this well will make your code more correct, easier to understand and debug, easier to adapt to new requirements. Overall, it will be more pleasant to work with for you and your colleagues.

In this seminar, we will study and discuss together good techniques for software construction. To this end, you will read and present chapters from books on the topic. At the same time, you will learn about and practice important skills such as critical reading, scientific writing and presentation.

News on the course will be announced through this page.

News

  • 02.08.2015: started linking to presentations and papers (see schedule).
  • 18.05.2015: revised slides of lecture 3 (only updated slide 41); added info on rehearsals.
  • 21.04.2015: revised webpage; added absence policy, and topics info. Please register until 22.04, 14:00; hard registration deadline: 24.04.
  • 08.05.2015: updated course calendar.

Schedule

Lectures are normally at 17:15-19:00, Room A301; exceptions are highlighted.

If a date is missing, there is no lecture then.

  1. 15.04.2015 16:15-18:00Room A302, Kick-off meeting. Slides.
  2. 22.04.2015 17:15-19:00 — Discussion on topic choice. Lecture on paper writing. Updated slides.
  3. 29.04.2015 — Presentations crash-course. Slides, part 1. Slides, part 2.
  4. 06.05.2015 — Calendar setup and topic deadline. Please submit your topics earlier to have more time for working on them. Booked topics are listed here.

  5. 20.05.2015 — First presentations: Designing Classes, High-quality Routines.
  6. 03.06.2015 — Presentations: Naming Variables, Design in Construction.
  7. 10.06.2015 — Presentations: Defensive Programming (Paper), Pseudocode (Paper).
  8. 17.06.2015 — Presentations: Organizing statements—Conditionals and Loops, Unusual Control Structures, Refactoring (Paper).
  9. 24.06.2015 — Presentations: Collaborative Construction, Layout and Style.
  10. 26.06.2015, 23:59 — Firm deadline for term papers (updated). Please submit to me by email in PDF.
  11. 01.07.2015 — Presentations: Testing (Paper), How Program Size Affects Construction (Paper).
  12. 08.07.2015 — Presentations: Debugging, Code Tuning.
  13. 15.07.2015 — Last presentation: Integration. Seminar wrap-up.
  14. 07.08.2015 — Deadline for reviews. (No meeting!)

Rehearsals

Students are grouped according to your presentation date. I’ll send you info about your group.

The week before your presentation, you are required to:

  • meet with your group to rehearse to each other your presentation, and get feedback on it; please take these criteria (taken from lecture 3) into account.
  • meet with me, after your rehearsals, to discuss feedback and improvements.

This way, you’ll receive feedback early and have enough time to address it.

Please make sure to set up both meetings early enough. To setup a meeting with me, see this page.

Relevant literature

We will read portions of:

  • Steve McConnell. Code Complete, 2nd ed. (hereafter CC). Microsoft Press. Accessible in English or German translation only from the department Intranet. A physical copy is present in the library.
  • Andrew Hunt, David Thomas. The Pragmatic Programmer (hereafter PP). Addison-Wesley. Accessible in English only from the department Intranet.
  • Additionally, you are encouraged to find additional sources where appropriate on your particular topic, once you have picked it well enough.

Topics

Choosing a topic

You should choose topics to prevent excessive overlap between different presentations. Within your topic, you can refine your scope.

  • Select a chapter from CC (Code Complete):
    • Look at Contents at a Glance to find something interesting.
    • Then check the Table of Contents for a more detailed overview.
    • Finally, go to the key points highlighted at the end of the chapter to learn the main claims of that chapter. That should give you enough info to say whether you care about the topic. Later you can look into the chapter to learn the arguments for these claims.
  • Let me know which chapter you are interested in; I’ll let you know whether it’s available.

  • Learn more about your topic and select which ideas, or which claims, to present.
    • Don’t worry too much of presenting “enough” content. Pick some ideas and present them well.
    • Don’t try to say everything your sources say, especially in your presentations. They should advertise the content — they should explain why should I care about it.
    • Look into the chapter to learn the arguments supporting claims. Do you agree with them?
    • As soon as possible, and at least one week before your presentation, send me an outline of topics for your presentation & paper.

Some available topics

Each chapter of Code Complete (CC) from Ch. 6 to Ch. 34 can be used as basis for a topic. Here I list some of those topics, with additional notes on them.

  • Organizing Statements (CC Part IV)
    • Multiple topics are possible in this area. Alternatively, this topic could be suitable for group presentations.
    • For instance, the debate on goto (Sec. 17.3) could be a subtopic on its own.
  • Managing Construction (CC Ch. 28)

  • Self-documenting Code (CC Ch. 32)

  • Programming Character (CC Ch. 33)

  • The Principles for Building Software Well (“Themes in Software Craftsmanship”) (CC Ch. 34)

Booked topics

  • Design in Construction (CC Ch. 5)
    • What software design is and what its goals are.
    • Crucial topic, recommended for two people.
  • Designing Classes (CC Ch. 6)
    • Key concept: Classes are a tool to modularize software.
    • Also recommended, if this was not discussed earlier.
  • High-Quality Routines (CC Ch. 7)

  • Defensive Programming (CC Ch. 8)

  • Pseudocode (CC Ch. 9)
    • Discuss alternatives to pseudocode programming in higher-level languages.
  • Naming Variables (CC Ch. 11)

  • Organizing statements, Conditionals and Loops (CC Ch. 15/16)

  • Unusual control structures (CC Ch. 17)

  • Collaborative Construction (CC Ch. 21)

  • Testing (CC Ch. 22; PP Ch. 8, Sec. 43)

  • Debugging (CC Ch. 23)

  • Refactoring (CC Ch. 24)

  • Code Tuning Strategies and Techniques (CC Ch. 25-26)

  • Code Tuning Strategies and Techniques (CC Ch. 25-26)

  • How Program Size Affects Construction (CC Ch. 27)
    • This insightful chapter explains how the role of construction, relative to other activities, varies across different project sizes.
    • Key conclusion: bigger projects can’t be done as chaotically as small ones.
  • Integration (CC Ch. 29)

  • Layout and Style (CC Ch. 31)
    • Pick only a few layout directives;
    • Make sure to show the general ideas behind these directives.

Organizational

Your tasks

  • Write a term paper.
  • Give a presentation about the topic. A presentation from one person should last 15 minutes. Any group presentations (two-three persons) should last 25-35 minutes.

  • Write 2 reviews about other term papers—instructions below.

Reviewing

Reviews rate whether the paper reaches its goals. There is no size limit, but a length of ~500 words is a good guideline for a review. Your reviews will not affect the grading of the reviewed paper, but will affect the grading of the reviewer (info below).

  • More info on writing reviews is provided by Shriram Krishnamurthi’s essay.
  • You might want to review again the slides on writing for guidance on what is expected from term papers.
  • The submission deadline is 07 August 2015 at noon (12:00). Late submissions will be penalized proportionally to the delay or rejected if the delay is excessive.

Grading

  • The grade is affected by three factors:
    • your talk (40%);
    • your paper (40%);
    • your reviews and your participation to discussion (20%).

Absence policy

It is necessary that you actually attend meetings in order to benefit from the seminar and pass it.

You are allowed to miss at most two of the meetings and still pass the seminar. Should this become a problem and should the absences be due to justifiable reasons, we might be able to agree on alternative loads to compensate for the absences.

Other info

Language: English
Credits: 4 LP
LSF entry
Weekly meeting: Wednesday 17:15-19:00.
Lecture room: A301

Instructors

Paolo Giarrusso
Alumni
Paolo G. Giarrusso