The great programming haiku competition

In a few weeks I will be teaching again my Introductory Programming course at ETH, based for the first time on the published “Touch of Class” textbook [1]. For fun (mine if no one else’s) every lecture will conclude with a haiku summarizing the topic.

I made up a few, given below, and am opening a competition for more. Every proposal should be submitted in the form of a comment to this post. Every winner’s haiku and name will appear in the course slides, and in the special Programming Haiku page which will be added to the book’s site. There are four rules:

  • The contribution has to be a proper haiku: “three unrhymed lines of five, seven, and five syllables”.
  • It must summarize the principal concept of a chapter or main section of the textbook or, better yet, of one of the course’s lectures; see [2] for the lecture plan.
  • It must give the book reference (chapter or section) or lecture number or both.
  • The prize committee’s members are secret and its judgments final.

Here, for a start, are my own examples.

Proof of the undecidability of the halting problem

Section 7.5 of the book; lecture 5.2.

If it stops, it loops,
Yet if it looped, it would stop.
Sad contradiction.

Recursion

Chapter 14, especially section 14.3; lecture 9.1.


Often, I call you.
But when the going gets tough,
I will call myself.

Topological sort

Chapter 15; lectures 11.1 and 11.2.


Partial to total?
With the right data structures,
O of m plus n.

Dynamic binding

Section 16.3; lecture 8.1.


O-O programmers:
How many to screw a bulb?
None whatsoever.

Deferred classes

Section 16.5; lecture 8.1.


Do not implement!
Though for a truly Zen spec
You need a contract.

References

[1] Touch of Class: An Introduction to Programming Well Using Objects and Contracts, Springer Verlag, 2009. See Amazon page (still wrongly says the book is not yet published).

[2] “Introduction to Programming” course at ETH Zurich, Fall 2009: course page. This does not have the slides yet, but you can see last year’s slides in last year’s page.

VN:F [1.9.10_1130]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.10_1130]
Rating: +1 (from 1 vote)
The great programming haiku competition, 10.0 out of 10 based on 2 ratings
Be Sociable, Share!

5 Comments

  1. Tanjamaltija says:

    Proof of the undecidability of the halting problem

    Yields a query
    Calls are always expressions;
    Easy to recall!

    Recursion

    Codify knowledge;
    A collection of concepts…
    Structure, reason, proof!

    Topological sort

    What is a B Tree?
    Who are Widmayer, Sedgewick?
    Five Concepts to know.

    Dynamic binding

    Is overloading evil?
    Is it too good to be true?
    Does it cause burn-out?

    Deferred classes

    Design by Contract
    Eiffel is easier to learn…
    Ask Bertrand Meyer!

    VN:F [1.9.10_1130]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.10_1130]
    Rating: 0 (from 0 votes)
  2. Banjobeni says:

    Loop variant.

    Loop by loop you go.
    I make sure you stay on path,
    Your loop variant.

    More to come!

    VN:F [1.9.10_1130]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.10_1130]
    Rating: 0 (from 0 votes)
  3. Banjobeni says:

    Recursion.

    Call me once or more.
    But please don’t fall from the shelf
    if I call myself.

    PS: Is “three unrhymed lines” a condition or a relaxation from the expected?

    VN:F [1.9.10_1130]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.10_1130]
    Rating: 0 (from 0 votes)
    • bmeyer says:

      “Unrhymed”, in my understanding, should be “not necessarily rhymed”. There are rhymed variants of haiku.

      rukw2xbi6t

      VN:F [1.9.10_1130]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.10_1130]
      Rating: 0 (from 0 votes)
  4. Banjobeni says:

    Dynamic binding.

    Feel free to call me.
    But if i’m not there myself
    You call someone else.

    VN:F [1.9.10_1130]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.10_1130]
    Rating: 0 (from 0 votes)

Leave a Reply

You must be logged in to post a comment.