Wednesday, April 4, 2018

Episode 76: Code Documentation

Download

We are sponsored by audible! http://www.audibletrial.com/programmingthrowdown

We are on Patreon! https://www.patreon.com/programmingthrowdown

T-Shirts! http://www.cafepress.com/programmingthrowdown/13590693

Intro

How to prepare for System Design & ML Design interviews.

News/Links

Book of the Show

Tool of the Show

  • Jason: iFunny/9GAG
  • Patrick: PUBG Mobile

Code Documentation (52:42)

  • Why Document?
    • More people will read code than write it.
    • Recover context on a piece of code quickly.
    • Avoid unexpected inputs
  • Vanilla code comments
    • At the top
    • At the line
  • Ways to self-document code
    • Function & Variable signatures
    • Extra scope around variables
    • Avoid variable reuse
    • (Sometimes) describe the type in the variable name
  • Generators
    • C/C++/Java
      • Doxygen
      • Javadocs
    • Python
      • Sphinx
    • Javascript
      • JSDoc

No comments:

Post a Comment