Art of debugging
methodically Replicate
so that you can Isolate
and ultimately Eliminate
Slide 10
Slide 10 text
Principles
1. Know thy enemy
2. Close the gap
3. Expect the unexpected
Slide 11
Slide 11 text
1. Know thy enemy
Slide 12
Slide 12 text
ݾ൴ɼඦፌෆຆɻ
“If you know both
yourself and your
enemy, you can win
a hundred battles
without jeopardy.”
http://www.flickr.com/photos/katieharbath/4856255673
Slide 13
Slide 13 text
Simulators
mobilexweb.com/emulators
Slide 14
Slide 14 text
Get real devices
http://www.flickr.com/photos/sidesh0w/6675107387
http://bradfrostweb.com/blog/mobile/test-on-real-mobile-devices-without-breaking-the-bank/
Slide 15
Slide 15 text
Get FREE devices
http://www.flickr.com/photos/sidesh0w/6675107387
http://bradfrostweb.com/blog/mobile/test-on-real-mobile-devices-without-breaking-the-bank/
WTF?
Wikipedia
has more
JavaScript
than Gmail?
http://remysharp.com/mobile-battery-performance/
Slide 20
Slide 20 text
"200k of JavaScript held within a block
comment adds 240ms during page load,
whereas 200k of JavaScript that is parsed
during page load added 2600 ms."
Slide 21
Slide 21 text
Network monitoring
Slide 22
Slide 22 text
Charles - $50
Fiddler - windows - free
Slide 23
Slide 23 text
http://code.google.com/p/pcaphar
Slide 24
Slide 24 text
Make test cases
Slide 25
Slide 25 text
2. Close the gap
http://www.flickr.com/photos/bowbrick/2093650123
Slide 26
Slide 26 text
Save
Refresh
Slide 27
Slide 27 text
Host locally
•Network Utility (mac)
ifconfig en0 inet / ifconfig eth0
ipconfig (look for ip4v)
•Point mobile to that IP
•localtunnel (to get out of VMs)
Slide 28
Slide 28 text
No content
Slide 29
Slide 29 text
jsconsole :listen
Slide 30
Slide 30 text
weinre
“Pronounced like the word
‘winery’. Or maybe like the
word ‘weiner’. Who knows,
really.”
http://www.flickr.com/photos/booleansplit/6924192819/
Slide 31
Slide 31 text
Adobe Shadow
Slide 32
Slide 32 text
iWebInspector /
Hooking Web Inspector
iWebInspector
Build your own tools
http://www.flickr.com/photos/jannem/3312946500
Test for events
Performance metrics
Emulate APIs & event types
etc...
Slide 43
Slide 43 text
remote-tilt.com
Slide 44
Slide 44 text
jsbin 3
jsbin.com
Slide 45
Slide 45 text
3. Expect the
unexpected
http://www.flickr.com/photos/jdhancock/3669455809
Slide 46
Slide 46 text
Once upon a time...
Demoing mobile app
Same code
Same mobile device
Same OS version
But different result
Slide 47
Slide 47 text
Wifi != ISP network
Slide 48
Slide 48 text
msie=/*@cc_on!@*/0;
Slide 49
Slide 49 text
Tether and check via desktop
O2
you can change username
to "bypass"
to confirm bugs, not to solve them. Also will
need to check with providers to be sure.