EPISODE · May 10, 2021 · 59 MIN
030: Debugging in Elm
from Elm Radio · host Dillon Kearns
Rubber duckingLay out your assumptions explicitlyVeritasium video The Most Common Cognitive BiasElm Debugging techniquesDebug.todoFrame then fill inAnnotation let bindingsUsing nonsense names as a stepElm review rule to check for nonsense nameHardcoded values vs debug.todoTodos don't allow you to get feedback by running your codeTDDFake it till you make itSimplest thing that could possibly workJoël Quenneville's article Classical Reasoning and DebuggingDebugging is like pruning a treeBreaksTake a walk. Step away from the keyboard when you're grinding on a problemsscce.org (Short, Self Contained, Correct (Compilable), Example)Create a smaller reproduction of the problemReduce the variables, you reduce the noise and get more useful feedbackReasoning by analogy from Joël's postElm debug log browser extensionnode --inspectelm-test-rsDebug.log in unit testsTest.only for running just one test or describePut Debug.logs in each path of an if or case expressionUse the browser elm debugger to inspect the modelScaling Elm Application episodeNarrow down your search space with Elm typesParse, Don't Validate episodeTiny steps help you prune the treeExploratory TestingWrap early, unwrap late
What this episode covers
We talk about our favorite debugging techniques, and how to make the most of Elm's guarantees when debugging.
NOW PLAYING
030: Debugging in Elm
No transcript for this episode yet