Upgrade to Pro — share decks privately, control downloads, hide ads and more …

I am bad at my job.

Ce86d68173d477a17396b5e611468f52?s=47 Matt Robenolt
September 28, 2017

I am bad at my job.

App Academy - September 28th 2017

Ce86d68173d477a17396b5e611468f52?s=128

Matt Robenolt

September 28, 2017
Tweet

More Decks by Matt Robenolt

Other Decks in Technology

Transcript

  1. I am bad at my job. App Academy September 28th

    2017 Matt Robenolt Matt
  2. hello @mattrobenolt

  3. Principal Software Engineer

  4. This computer stuff is really hard.

  5. None
  6. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; }
  7. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } $ ./program
  8. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } $ ./program 10 20 619512036
  9. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } $ ./program 10 20 619512036 $ ./program 10 20 369033241
  10. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } Physical Memory Chip 0x0000 0x0004 4 bytes 0x0008 0x000C 0xFFFF
  11. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } Physical Memory Chip 0x0000 0x0004 4 bytes 0x0008 0x000C 0xFFFF 0x0000 (0)
  12. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } Physical Memory Chip 0x0000 0x0004 4 bytes 0x0008 0x000C 0xFFFF 0x000A (10) 0x0014 (20) 0x0000 (0)
  13. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } Physical Memory Chip 0x0000 4 bytes 0x0008 0x000C 0xFFFF 0x000A (10) 0x0014 (20) 0x0000 (0) 0x0004
  14. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } Physical Memory Chip 0x0000 4 bytes 0x0008 0x000C 0xFFFF 0x000A (10) 0x0014 (20) 0x0000 (0) 0x0004 “address of things” + (i * sizeof(int))
  15. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } Physical Memory Chip 0x0000 4 bytes 0x0008 0x000C 0xFFFF 0x000A (10) 0x0014 (20) 0x0000 (0) 0x0004 0x0004 + (0 * 4) == 0x0004 &0x0004 == 0x000A (10)
  16. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } Physical Memory Chip 0x0000 4 bytes 0x0008 0x000C 0xFFFF 0x000A (10) 0x0014 (20) 0x0001 (1) 0x0004
  17. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } Physical Memory Chip 0x0000 4 bytes 0x0008 0x000C 0xFFFF 0x000A (10) 0x0014 (20) 0x0001 (1) 0x0004 0x0004 + (1 * 4) == 0x0008 &0x0008 == 0x0014 (20)
  18. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } Physical Memory Chip 0x0000 4 bytes 0x0008 0x000C 0xFFFF 0x000A (10) 0x0014 (20) 0x0002 (2) 0x0004
  19. #include <stdio.h> int main() { int i = 0; int

    things[] = {10, 20}; for (; i < 3; i++) { printf("%d\n", things[i]); } return 0; } Physical Memory Chip 0x0000 4 bytes 0x0008 0x000C 0xFFFF 0x000A (10) 0x0014 (20) 0x0002 (2) 0x0004 0x0004 + (2 * 4) == 0x000C &0x000C == ???? ????
  20. JavaScript is especially hard.

  21. sentry $ find node_modules -type f | wc -l 36882

    sentry $ du -hs node_modules 308M node_modules
  22. function multiply() { var rv = 1; for (var i

    = 0; i < arguments.length; i++) rv += arguments[i]; return rv; } > multiply(2, 2) <- 4
  23. test('multiply 2 * 2 to equal 4', () => {

    expect(multiply(2, 2)).toBe(4); }); 100% test coverage btw
  24. > multiply(2, 2) <- 4

  25. > multiply(2, 2) <- 4 > multiply() <- 1

  26. > multiply(2, 2) <- 4 > multiply() <- 1 >

    multiply(1, 1) <- 3
  27. > multiply(2, 2) <- 4 > multiply() <- 1 >

    multiply(1, 1) <- 3 > multiply(1, {}) <- "2[object Object]"
  28. Shipping code is the worst.

  29. window.Notification.requestPermission().then(function() { new Notification("I see you."); });

  30. Yas, I did it!

  31. I think my computer is broken.

  32. Step 1:

  33. Step 1: Acceptance

  34. This is hard. But that’s ok.

  35. Step 2:

  36. Step 2: Self-awareness

  37. You won’t know everything. You will make mistakes. But that’s

    OK.
  38. Step 3:

  39. Step 3: Do your best

  40. Learn from mistakes. assume the worst.

  41. How to deal with production.

  42. Bug-free code is very rare.

  43. Respond quickly when things are broken.

  44. Monitoring is good.

  45. Meet Sentry.

  46. Error reporting

  47. window.Notification.requestPermission().then(function() { new Notification("I see you."); });

  48. None
  49. None
  50. Context is good.

  51. Questions? I may or may not have answers. @mattrobenolt github.com/mattrobenolt

    sentry.io github.com/getsentry/sentry