TL;DR: Reading Code Is Harder Than Writing It

3d6ace9554821d552146413bcdf874f6?s=47 Trisha Gee
September 11, 2019

TL;DR: Reading Code Is Harder Than Writing It

It's funny that computer languages are the only languages where one learns to write before learning to read. It's actually not uncommon for people to never really learn to read code. This seems a little unbalanced given that we actually read code much more frequently than we write it.

Even those who promote software as a craft sometimes fall into the trap of often talking about writing clean code that people can read, yet not placing much emphasis on the skill of reading the code.

The ability to read code must also be a skill, and as such it must be something that can be learnt and practiced. In this presentation, we're going to look at:

- The different reasons we might have to read code, and how that should impact our reading
- The problems we face when reading code (even our own!)
- Tips to bear in mind when we're reading code
- Tools we can use to help our understanding
- How and where to practice these skills

At the end of the talk we will at least have considered whether we need to level up our "Reading Code" skill.


Trisha Gee

September 11, 2019


  1. None
  2. Room on the Broom by Julia Donaldson & Axel Scheffler

  3. None
  4. None
  5. None
  6. None

  8. None
  9. None
  10. None
  11. None
  12. None
  13. None
  14. “Every programmer occasionally, when nobody’s home, turns off the

    lights, pours a glass of scotch, puts on some light German electronica, and opens up a file on their computer. They read over the lines, and weep at their beauty….”
  15. None
  16. None
  17. None
  18. None
  19. None
  20. None
  21. None
  22. “This file is Good Code. It has sensible and

    consistent names for functions and variables. It’s concise. It doesn’t do anything obviously stupid…. It reads like poetry written by someone over thirty.”
  23. None
  24. None
  25. None
  26. None
  27. None
  28. None
  29. None
  30. None
  31. None
  32. None
  33. None
  34. None
  35. None
  36. None
  37. None
  38. None
  39. None
  40. None
  41. Badass: Making Users Awesome Kathy Sierra “After enough exposure with

    feedback, your brain began detecting patterns and underlying structures, without your conscious awareness. With more exposure, your brain finetuned its perception and eventually figured out what really mattered. Your brain was making finer distinctions and sorting signal from noise even if you couldn’t explain how. It was just your brain learning... without bothering you with all those pesky details”
  42. • • • •

  43. None
  44. • • • • • • •

  45. None
  46. Twelfth Night William Shakespeare

  47. • • • • • • • • • •

  48. None
  49. None
  50. Twelfth Night William Shakespeare If music be the food of

    love, play on, Give me excess of it; that surfeiting, The appetite may sicken, and so die.
  51. The Canterbury Tales, and Other Poems Geoffrey Chaucer Whylom, as

    olde stories tellen us, Ther was a duk that highte Theseus; Of Athenes he was lord and governour, And in his tyme swich a conquerour, That gretter was ther noon under the sonne.
  52. • • • • • • •

  53. None
  54. None
  55. None
  56. None
  57. None
  58. IDE Navigation

  59. None
  60. Everything Bad is Good for You: How Popular Culture is

    Making Us Smarter Steven Johnson “If you don't think about the underlying mechanics of the simulation— even if that thinking happens in a semiconscious way—you won't last very long in the game. You have to probe to progress.”
  61. • • • •

  62. None
  63. “The game scholar James Paul Gee breaks probing down into

    a four-part process, which he calls the ‘probe, hypothesize, reprobe, rethink’ cycle” Everything Bad is Good for You: How Popular Culture is Making Us Smarter Steven Johnson
  64. None
  65. None
  66. Good Omens Neil Gaiman & Terry Pratchett “It may, or

    may not, have helped Anathema get a clear view of things if she’d been allowed to spot the very obvious reason why she couldn’t see Adam’s aura. It was for the same reason that people in Trafalgar Square can’t see England.”
  67. • • • • • • • • •

  68. None
  69. None
  70. None
  71. None
  72. The Giant of Jum Elli Woollard & Benji Davies “I’m

    grizzly and grumpy and grouchy and grumbly I’ve not been called lovely before!”
  73. None
  74. None
  75. None
  76. None
  77. Clean Code: A Handbook of Agile Software Craftsmanship Robert C.

    Martin “Indeed, the ratio of time spent reading versus writing is well over 10 to 1.”
  78. “Indeed, the ratio of time spent reading versus writing is

    well over 10 to 1. We are constantly reading old code as part of the effort to write new code. ...[Therefore,] making it easy to read makes it easier to write.” Clean Code: A Handbook of Agile Software Craftsmanship Robert C. Martin
  79. None
  80. None
  81. None
  82. Pride & Prejudice Jane Austen “My fingers,” said Elizabeth, “do

    not move over this instrument in the masterly manner which I see so many women’s do. They have not the same force or rapidity, and do not produce the same expression. But then I have always supposed it to be my own fault — because I will not take the trouble of practising. It is not that I do not believe my fingers as capable as any other woman's of superior execution.”
  83. None