+ All Categories
Home > Technology > Death Defying Feats of Debuggery

Death Defying Feats of Debuggery

Date post: 13-Apr-2017
Category:
Upload: john-need
View: 229 times
Download: 3 times
Share this document with a friend
20
Defying Feats of Debuggery The Futile Art of Pursuing Perfect Code
Transcript
Page 1: Death Defying Feats of Debuggery

Death Defying Feats of

DebuggeryThe Futile Art of Pursuing

Perfect Code

Page 2: Death Defying Feats of Debuggery

Grace Hopper, Inventor of the bug

Page 3: Death Defying Feats of Debuggery

The first computer bug, literally

Page 4: Death Defying Feats of Debuggery

Grace Hopper’s Field Guide to Bugs

Page 5: Death Defying Feats of Debuggery

Bugs of Yore

Page 6: Death Defying Feats of Debuggery

Bugs of Yore

Page 7: Death Defying Feats of Debuggery

Bugs of Yore

Page 8: Death Defying Feats of Debuggery

Breakpoint Dancing

Page 9: Death Defying Feats of Debuggery

Avoiding Leaks

Page 10: Death Defying Feats of Debuggery

Wicked Good Toys

Page 11: Death Defying Feats of Debuggery

Linting Tools

PAIN

HUMILIATION

ESLint

Page 12: Death Defying Feats of Debuggery

The Alignment of Various Linting Tools Chaotic Good

Chaotic Neutral Chaotic Evil

Neutral Good Neutral Neutral

Neutral Evil

Lawful Good Lawful Neutral Lawful Evil

Page 13: Death Defying Feats of Debuggery

Quick Checkjscheck.jsDouglas Crockford2012-04-24

Public Domain

JSCheck is a testing tool for JavaScript. It was inspired by QuickCheck, a testing tool for Haskell developed by Koen Claessen and John Hughes of Chalmers University of Technology.

JSCheck is a specification-driven testing tool. From a description of the properties of a system, function, or object, it will generate random test cases attempting to prove those properties, and then report its findings. That can be especially effective in managing the evolution of a program because it can show the conformance of new code to old code. It also provides an interesting level of self-documentation, because the executable specifications it relies on can provide a good view of the workings of a program.

All of JSCheck can be loaded from a small file called jscheck.js.

The source is available at https://github.com/douglascrockford/JSCheck.The documentation is available at http://www.JSCheck.org/.

Page 14: Death Defying Feats of Debuggery

Which QuickCheck is Right for You?Sexiness

PITA Factor

JS-Quick-Check

PureScript-QuickCheck

jsVerify

Page 15: Death Defying Feats of Debuggery

Complexity Checkers

Page 16: Death Defying Feats of Debuggery

Complexity M = E − N + 2P E = the number of edges of the graph.N = the number of nodes of the graph.P = the number of connected components.

function factorialSize(myAwesomeInt) {

var factorial = 1; var size;

for(let i = 1; i <= myAwesomeInt; i+=1) { factorial = factorial * i; } if(factorial > 999) { size = "Yuge!" } else { size = "meh" }

return size;}

9 - 8 + 2 * 1 = 3

Parameter count: 1Cyclomatic complexity: 3Cyclomatic complexity density: 30%Halstead difficulty: 14Halstead volume: 153Halstead effort: 2103

Page 17: Death Defying Feats of Debuggery

Complexity Simplified Score What It Means Emoji Equivalent

1 - 10 A simple program, without much risk

11 - 20 More complex, moderate risk

21 - 50 Complex, high risk program

> 50 Untestable program (very high risk)

Page 18: Death Defying Feats of Debuggery

Maps

Page 19: Death Defying Feats of Debuggery

Extensions!Ember Inspector

AngularJS BatarangAngular Watchers

React Developer Tools

Polymer DevTools Extension

Meteor DevTools

Page 20: Death Defying Feats of Debuggery

Who does this guy think he is?John NeedFront End Code MonkeyGalen Healthcare

Twitter : @JohnNeed

GitHub : https://github.com/johnneed

CodePen : http://codepen.io/johnneed/

Linked In : https://www.linkedin.com/in/johnneed


Recommended