~/talk

Test-Driven Development of a Static Code Analyzer in Python

Talkat PyCon APAC 2018 · 2018-05-31..06-02· [testing, python]
name:Terry Yin
links:none on file
slides:none on file

A Python static analyzer called lizard grows from weekend prototypes into a working cross‑language tool that measures cyclomatic complexity, finds code clones, and runs on huge repos (Ansible-sized) in under two minutes. Implementation follows strict TDD: tiny failing test, just‑enough code, refactor, repeat — hundreds of commits that reveal design. Clone detector skips header parsing (no headers), avoids hashing by matching token sequences directly, and proves fast and accurate enough for CI.

AI-written summary · about

  1. 0:00Introduction and speaker
  2. 1:07Three steps to make software
  3. 3:40Introduction to Lizard tool
  4. 8:36Cyclomatic complexity explained
  5. 12:58Test-driven development basics
  6. 17:04TDD cycle and iteration time
  7. 18:32Duplicate code and defect correlation
  8. 19:55Implementing clone detector
  9. 22:50First failing test and refactoring
  10. 26:08Building test data and passing tests
  11. 29:16Refactoring and design emergence
  12. 33:40Code smells and anti-patterns
  13. 37:00Design from working software
  14. 40:40Performance considerations in TDD
  15. 42:28Duplicate rate analysis results
  16. 44:19Summary of three steps
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.