Day 17 — Pair programming is fun!

Today I paired with Taro to walk us through the present codebase. It was a nice learning experience to talk about (and explain) how everything is structured because I don't get to do that while working alone. I need to pair program more!

After the walkthrough, we came up with some pseudocode to add support for presenting Jupyter notebooks:


  delims = ['<hr>', '---']

  def parse(cells):
      slides = []

      groups = split_on_delims(slides, delims)

      for group in groups:
          # parse slide
          slide_elements = []
          for cell in group:
              if cell['cell_type'] == 'markdown':
                  markdown_elements = parse_markdown(cell)
                  slide_elements.extend(markdown_elements)
              elif cell['cell_type'] == 'code':
                  code_block = parse_code(cell)
                  slide_elements.append(code_block)

          slides.extend(Slide(slide_elements))

I also added a contributor's guide to present!