Programming Languages

Software Construction Techniques: Writing Good Code (Seminar)

En­gi­neer­ing good soft­ware is chal­leng­ing. Be­yond ac­tiv­i­ties such as re­quire­ment en­gi­neer­ing or de­sign, what’s also very im­por­tant is soft­ware con­struc­tion it­self, that is, ac­tu­ally writ­ing the code. Doing this well will make your code more cor­rect, eas­ier to un­der­stand and debug, eas­ier to adapt to new re­quire­ments. Over­all, it will be more pleas­ant to work with for you and your col­leagues.

In this sem­i­nar, we will study and dis­cuss to­gether good tech­niques for soft­ware con­struc­tion. To this end, you will read and pre­sent chap­ters from books on the topic. At the same time, you will learn about and prac­tice im­por­tant skills such as crit­i­cal read­ing, sci­en­tific writ­ing and pre­sen­ta­tion.

News on the course will be an­nounced through this page.

News

  • 02.08.2015: started link­ing to pre­sen­ta­tions and pa­pers (see sched­ule).
  • 18.05.2015: re­vised slides of lec­ture 3 (only up­dated slide 41); added info on re­hearsals.
  • 21.04.2015: re­vised web­page; added ab­sence pol­icy, and top­ics info. Please reg­is­ter until 22.04, 14:00; hard reg­is­tra­tion dead­line: 24.04.
  • 08.05.2015: up­dated course cal­en­dar.

Sched­ule

Lec­tures are nor­mally at 17:15-19:00, Room A301; ex­cep­tions are high­lighted.

If a date is miss­ing, there is no lec­ture then.

  1. 15.04.2015 16:15-18:00Room A302, Kick-off meet­ing. Slides.
  2. 22.04.2015 17:15-19:00 — Dis­cus­sion on topic choice. Lec­ture on paper writ­ing. Up­dated slides.
  3. 29.04.2015 — Pre­sen­ta­tions crash-course. Slides, part 1. Slides, part 2.
  4. 06.05.2015 — Cal­en­dar setup and topic dead­line. Please sub­mit your top­ics ear­lier to have more time for work­ing on them. Booked top­ics are listed here.

  5. 20.05.2015 — First pre­sen­ta­tions: De­sign­ing Classes, High-qual­ity Rou­tines.
  6. 03.06.2015 — Pre­sen­ta­tions: Nam­ing Vari­ables, De­sign in Con­struc­tion.
  7. 10.06.2015 — Pre­sen­ta­tions: De­fen­sive Pro­gram­ming (Paper), Pseudocode (Paper).
  8. 17.06.2015 — Pre­sen­ta­tions: Or­ga­niz­ing state­ments—Con­di­tion­als and Loops, Un­usual Con­trol Struc­tures, Refac­tor­ing (Paper).
  9. 24.06.2015 — Pre­sen­ta­tions: Col­lab­o­ra­tive Con­struc­tion, Lay­out and Style.
  10. 26.06.2015, 23:59 — Firm dead­line for term pa­pers (up­dated). Please sub­mit to me by email in PDF.
  11. 01.07.2015 — Pre­sen­ta­tions: Test­ing (Paper), How Pro­gram Size Af­fects Con­struc­tion (Paper).
  12. 08.07.2015 — Pre­sen­ta­tions: De­bug­ging, Code Tun­ing.
  13. 15.07.2015 — Last pre­sen­ta­tion: In­te­gra­tion. Sem­i­nar wrap-up.
  14. 07.08.2015 — Dead­line for re­views. (No meet­ing!)

Re­hearsals

Stu­dents are grouped ac­cord­ing to your pre­sen­ta­tion date. I’ll send you info about your group.

The week be­fore your pre­sen­ta­tion, you are re­quired to:

  • meet with your group to re­hearse to each other your pre­sen­ta­tion, and get feed­back on it; please take these cri­te­ria (taken from lec­ture 3) into ac­count.
  • meet with me, after your re­hearsals, to dis­cuss feed­back and im­prove­ments.

This way, you’ll re­ceive feed­back early and have enough time to ad­dress it.

Please make sure to set up both meet­ings early enough. To setup a meet­ing with me, see this page.

Rel­e­vant lit­er­a­ture

We will read por­tions of:

  • Steve Mc­Connell. Code Com­plete, 2nd ed. (here­after CC). Mi­crosoft Press. Ac­ces­si­ble in Eng­lish or Ger­man trans­la­tion only from the de­part­ment In­tranet. A phys­i­cal copy is pre­sent in the li­brary.
  • An­drew Hunt, David Thomas. The Prag­matic Pro­gram­mer (here­after PP). Ad­di­son-Wes­ley. Ac­ces­si­ble in Eng­lish only from the de­part­ment In­tranet.
  • Ad­di­tion­ally, you are en­cour­aged to find ad­di­tional sources where ap­pro­pri­ate on your par­tic­u­lar topic, once you have picked it well enough.

Top­ics

Choos­ing a topic

You should choose top­ics to pre­vent ex­ces­sive over­lap be­tween dif­fer­ent pre­sen­ta­tions. Within your topic, you can re­fine your scope.

  • Se­lect a chap­ter from CC (Code Com­plete):
    • Look at Con­tents at a Glance to find some­thing in­ter­est­ing.
    • Then check the Table of Con­tents for a more de­tailed overview.
    • Fi­nally, go to the key points high­lighted at the end of the chap­ter to learn the main claims of that chap­ter. That should give you enough info to say whether you care about the topic. Later you can look into the chap­ter to learn the ar­gu­ments for these claims.
  • Let me know which chap­ter you are in­ter­ested in; I’ll let you know whether it’s avail­able.

  • Learn more about your topic and se­lect which ideas, or which claims, to pre­sent.
    • Don’t worry too much of pre­sent­ing “enough” con­tent. Pick some ideas and pre­sent them well.
    • Don’t try to say every­thing your sources say, es­pe­cially in your pre­sen­ta­tions. They should ad­ver­tise the con­tent — they should ex­plain why should I care about it.
    • Look into the chap­ter to learn the ar­gu­ments sup­port­ing claims. Do you agree with them?
    • As soon as pos­si­ble, and at least one week be­fore your pre­sen­ta­tion, send me an out­line of top­ics for your pre­sen­ta­tion & paper.

Some avail­able top­ics

Each chap­ter of Code Com­plete (CC) from Ch. 6 to Ch. 34 can be used as basis for a topic. Here I list some of those top­ics, with ad­di­tional notes on them.

  • Or­ga­niz­ing State­ments (CC Part IV)
    • Mul­ti­ple top­ics are pos­si­ble in this area. Al­ter­na­tively, this topic could be suit­able for group pre­sen­ta­tions.
    • For in­stance, the de­bate on goto (Sec. 17.3) could be a subtopic on its own.
  • Man­ag­ing Con­struc­tion (CC Ch. 28)

  • Self-doc­u­ment­ing Code (CC Ch. 32)

  • Pro­gram­ming Char­ac­ter (CC Ch. 33)

  • The Prin­ci­ples for Build­ing Soft­ware Well (“Themes in Soft­ware Crafts­man­ship”) (CC Ch. 34)

Booked top­ics

  • De­sign in Con­struc­tion (CC Ch. 5)
    • What soft­ware de­sign is and what its goals are.
    • Cru­cial topic, rec­om­mended for two peo­ple.
  • De­sign­ing Classes (CC Ch. 6)
    • Key con­cept: Classes are a tool to mod­u­lar­ize soft­ware.
    • Also rec­om­mended, if this was not dis­cussed ear­lier.
  • High-Qual­ity Rou­tines (CC Ch. 7)

  • De­fen­sive Pro­gram­ming (CC Ch. 8)

  • Pseudocode (CC Ch. 9)
    • Dis­cuss al­ter­na­tives to pseudocode pro­gram­ming in higher-level lan­guages.
  • Nam­ing Vari­ables (CC Ch. 11)

  • Or­ga­niz­ing state­ments, Con­di­tion­als and Loops (CC Ch. 15/16)

  • Un­usual con­trol struc­tures (CC Ch. 17)

  • Col­lab­o­ra­tive Con­struc­tion (CC Ch. 21)

  • Test­ing (CC Ch. 22; PP Ch. 8, Sec. 43)

  • De­bug­ging (CC Ch. 23)

  • Refac­tor­ing (CC Ch. 24)

  • Code Tun­ing Strate­gies and Tech­niques (CC Ch. 25-26)

  • Code Tun­ing Strate­gies and Tech­niques (CC Ch. 25-26)

  • How Pro­gram Size Af­fects Con­struc­tion (CC Ch. 27)
    • This in­sight­ful chap­ter ex­plains how the role of con­struc­tion, rel­a­tive to other ac­tiv­i­ties, varies across dif­fer­ent pro­ject sizes.
    • Key con­clu­sion: big­ger pro­jects can’t be done as chaot­i­cally as small ones.
  • In­te­gra­tion (CC Ch. 29)

  • Lay­out and Style (CC Ch. 31)
    • Pick only a few lay­out di­rec­tives;
    • Make sure to show the gen­eral ideas be­hind these di­rec­tives.

Or­ga­ni­za­tional

Your tasks

  • Write a term paper.
  • Give a pre­sen­ta­tion about the topic. A pre­sen­ta­tion from one per­son should last 15 min­utes. Any group pre­sen­ta­tions (two-three per­sons) should last 25-35 min­utes.

  • Write 2 re­views about other term pa­pers—in­struc­tions below.

Re­view­ing

Re­views rate whether the paper reaches its goals. There is no size limit, but a length of ~500 words is a good guide­line for a re­view. Your re­views will not af­fect the grad­ing of the re­viewed paper, but will af­fect the grad­ing of the re­viewer (info below).

  • More info on writ­ing re­views is pro­vided by Shri­ram Kr­ish­na­murthi’s essay.
  • You might want to re­view again the slides on writ­ing for guid­ance on what is ex­pected from term pa­pers.
  • The sub­mis­sion dead­line is 07 Au­gust 2015 at noon (12:00). Late sub­mis­sions will be pe­nal­ized pro­por­tion­ally to the delay or re­jected if the delay is ex­ces­sive.

Grad­ing

  • The grade is af­fected by three fac­tors:
    • your talk (40%);
    • your paper (40%);
    • your re­views and your par­tic­i­pa­tion to dis­cus­sion (20%).

Ab­sence pol­icy

It is nec­es­sary that you ac­tu­ally at­tend meet­ings in order to ben­e­fit from the sem­i­nar and pass it.

You are al­lowed to miss at most two of the meet­ings and still pass the sem­i­nar. Should this be­come a prob­lem and should the ab­sences be due to jus­ti­fi­able rea­sons, we might be able to agree on al­ter­na­tive loads to com­pen­sate for the ab­sences.

Other info

Lan­guage: Eng­lish
Cred­its: 4 LP
LSF entry
Weekly meet­ing: Wednes­day 17:15-19:00.
Lec­ture room: A301

In­struc­tors

Paolo Gi­a­r­russo
Alumni
Paolo G. Gi­a­r­russo