Recap session 9 – Algorithms, Graphs, Figures, and Tables

image from

image from

Today’s session topic was “Algorithms, Graphs, Figures, and Tables”. You read chapters 10 and 11 in Zobel’s “Writing for Computer Science” in preparation for class.

Today we flipped the classroom such as you had the opportunity to enter the stage in front of the class. Instead giving you a writing prompt I asked you to form 3 groups. Each group was assigned a topic from “Algorithms”, “Graphs and Figures”, and “Tables” and you had some time to recap the aspects you read for each respective topic. Afterwards, you presented the aspects of your group on the whiteboard and we discussed each topic extensively.

This was a little experiment we tried in order to make the discussion a little more lively and it turned out really well. Thanks to everyone for a great session! This was really fun.

So here are some aspects we discussed for each section or chapter, respectively:


  • content
    • show the steps an algorithm takes
    • give information about the environment (input, output, data structures, …)
    • report about the scope of its application
    • report about advantages and limitations
    • demonstrate correctness and performance
  • formal analysis
    • asymptotic cost analysis – consider important variables
    • initialization of data structures might be expensive – you have to point this out
  • presentation
    • pay attention to the level of detail
    • prefer a mathematical notation
    • figures vs. descriptions (doubly-linked)
    • list of steps
    • three modes: pseudocode, prosecode, and literate code

Graphs and Figures

  • use only when needed (not as embellishment of your paper)
  • use appropriate software
  • mind copyright issues when you use a figure from someone else’s paper
  • reduce clutter
  • be consistent in style
  • caption goes below the figure and give enough information such that the reader understands the figure without having read the paper in detail
  • pay attention to the scaling of axes of graphs, sometimes it’s smart to use a logarithmic scaling
  • prefer greys instead of color
  • don’t forget labeling your axes and data points
  • follow CS conventions for elements in figures (i.e. use symbols from UML)
  • figures should be as sparse as possible


  • use tables for showing exact values for a small amount of data
  • unclutter tables – no grids, use whitespace for vertical separation
  • structure tables hiearchical if appropriate
  • no empty cells, use dashes to indicate that there is no data (and you just didn’t forget to write it down)
  • use it to compare alternatives

On a side note, we also talked a little about LaTeX tools and stuff, I will cover this in a separate post. Lena mentioned Edward Tufte’s “Data-to-ink ratio” (aka “remove unnecessary clutter”) as a measure for good diagrams. I found two interesting articles that go a little more into detail on that: “Less Is More – Improving The Data-To-Ink Ratio” and “8 Simple Tips for Better Data Visuals”.

This was our last input session for this semester. Next week’s session is an offer to you to work on your student project papers in the familiar writer’s workshop atmosphere. You can come and just use the time to write in an allocated time slot, ask questions, and get help. Sebastian and I will be there to assist you (or write ourselves). If you decide to work on your paper another time and in another place, that’s fine. You choose your path, young padawans, but choose it wisely.

Be sure to upload your papers BEFORE our session on June 23 so that we can distribute them for reviewing.

We will definitely meet in class on June 23 and write the reviews for your assigned paper.


Describing algorithms is a core task in computer science. It is not as trivial as it might seem as we sometimes just think in code. For reporting and demonstration of the inner works of an algorithm, it is necessary to give explanations on a more abstract level. Use this homework assignment to practise this task.

(from Zobel “Writing for Computer Science”, p. 273)

  1. Choose a simple algorithm and a standard description of it, such as linear search
    in a sorted array. Rewrite the algorithm in prosecode. Repeat the exercise with a
    more interesting algorithm, such as heapsort. Now choose an algorithm with an
    asymptotic cost analysis. Rewrite the algorithm as literate code, incorporating
    the important elements of the analysis into the algorithm’s description.

Leave a Reply

Your email address will not be published. Required fields are marked *