App Academy - September 28th 2017
I am bad at my job.App AcademySeptember 28th 2017Matt RobenoltMatt
View Slide
hello @mattrobenolt
Principal Software Engineer
This computer stuff isreally hard.
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}$ ./program
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}$ ./program1020619512036
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}$ ./program1020619512036$ ./program1020369033241
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}Physical Memory Chip0x00000x00044 bytes0x00080x000C0xFFFF
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}Physical Memory Chip0x00000x00044 bytes0x00080x000C0xFFFF0x0000 (0)
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}Physical Memory Chip0x00000x00044 bytes0x00080x000C0xFFFF0x000A (10)0x0014 (20)0x0000 (0)
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}Physical Memory Chip0x00004 bytes0x00080x000C0xFFFF0x000A (10)0x0014 (20)0x0000 (0)0x0004
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}Physical Memory Chip0x00004 bytes0x00080x000C0xFFFF0x000A (10)0x0014 (20)0x0000 (0)0x0004“address of things” + (i * sizeof(int))
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}Physical Memory Chip0x00004 bytes0x00080x000C0xFFFF0x000A (10)0x0014 (20)0x0000 (0)0x00040x0004 + (0 * 4) == 0x0004&0x0004 == 0x000A (10)
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}Physical Memory Chip0x00004 bytes0x00080x000C0xFFFF0x000A (10)0x0014 (20)0x0001 (1)0x0004
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}Physical Memory Chip0x00004 bytes0x00080x000C0xFFFF0x000A (10)0x0014 (20)0x0001 (1)0x00040x0004 + (1 * 4) == 0x0008&0x0008 == 0x0014 (20)
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}Physical Memory Chip0x00004 bytes0x00080x000C0xFFFF0x000A (10)0x0014 (20)0x0002 (2)0x0004
#include int main() {int i = 0;int things[] = {10, 20};for (; i < 3; i++) {printf("%d\n", things[i]);}return 0;}Physical Memory Chip0x00004 bytes0x00080x000C0xFFFF0x000A (10)0x0014 (20)0x0002 (2)0x00040x0004 + (2 * 4) == 0x000C&0x000C == ????????
JavaScript isespecially hard.
sentry $ find node_modules -type f | wc -l36882sentry $ du -hs node_modules308M node_modules
function multiply() {var rv = 1;for (var i = 0; i < arguments.length; i++)rv += arguments[i];return rv;}> multiply(2, 2)
test('multiply 2 * 2 to equal 4', () => {expect(multiply(2, 2)).toBe(4);});100% test coverage btw
> multiply(2, 2)
> multiply(2, 2)> multiply()
> multiply(2, 2)> multiply()> multiply(1, 1)
> multiply(2, 2)> multiply()> multiply(1, 1)> multiply(1, {})
Shipping code isthe worst.
window.Notification.requestPermission().then(function() {new Notification("I see you.");});
Yas, I did it!
I think mycomputer is broken.
Step 1:
Step 1: Acceptance
This is hard.But that’s ok.
Step 2:
Step 2: Self-awareness
You won’t know everything.You will make mistakes.But that’s OK.
Step 3:
Step 3: Do your best
Learn from mistakes.assume the worst.
How to deal withproduction.
Bug-free code isvery rare.
Respond quickly whenthings are broken.
Monitoring is good.
Meet Sentry.
Error reporting
Context is good.
Questions?I may or may not have answers.@mattrobenoltgithub.com/mattrobenoltsentry.iogithub.com/getsentry/sentry