Skip to content

[DRAFT] How do I explain my code to someone?

Brian "Beej Jorgensen" Hall edited this page Oct 23, 2019 · 1 revision

When in an interview situation or at work, being able to concisely explain code is an extremely valuable skill. It minimizes the amount of time spent clearly conveying information to the listener so they can understand it as quickly and completely as possible.

  • What was your process, how did you think through it, where did you start?

    • Reminds you of something?
  • Describe underlying motivations

    • Big picture, why
    • What problems are we trying to solve
  • Pause for questions, slow down

    • The questioner might guide the presentation
    • Make it a conversation, keep them from zoning out
  • Rationale for tech stack, tools used

  • Describe the program at a high level

    • See if you can do this in a single sentence.
  • Break down the program to smaller pieces and say how they interact

  • If the smaller pieces themselves warrant more breakdown, do it

  • Say what it does and why it does it, not how it does it.

  • They can read code--don't read it to them.

    • similar to don't read the bullets in powerpoint
  • Comment blocks that say what code does, and why, but not how (unless absolutely needed)

  • Point out and explain anything that's unusual

    • e.g. iterating through a list by 3s
  • Be enthusiastic and respectful, show you have fun with it

  • Don't throw anyone under the bus

  • Don't be nervous

    • Calm professional
    • Be cool

[Can you make a formula they can easily follow? Acronym for the formula? Acronym for the Acronym?]

[Example here]