Slide 1

Slide 1 text

Life, Liberty, and the Pursuit of APIness The Secret to Happy Code Dylan Beattie @dylanbeattie www.dylanbeattie.net

Slide 2

Slide 2 text

@dylanbeattie • Building websites since 1992 • Microsoft MVP • London .NET User Group • www.dylanbeattie.net • [email protected]

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

http://starnewshq.deviantart.com/art/Comedy-and-Tragedy-325546823

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

http://www.mornota.com/beyninizi-gelistirin/

Slide 7

Slide 7 text

EXPERIENCE EXPERIENCE EXPERTISE EXPERTISE

Slide 8

Slide 8 text

EXPERIENCE EXPERTISE

Slide 9

Slide 9 text

How To Draw An Owl: 1: draw an oval for the head 2: draw an oval for the body 3: draw the rest of the owl

Slide 10

Slide 10 text

EXPERIENCE EXPERTISE

Slide 11

Slide 11 text

Server Error in '/' Application Looks like you forgot to register the http module Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule. To fix this add to the section on your web.config

Slide 12

Slide 12 text

Do you believe in… the users?

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

(image from @DrunkVS via Twitter)

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

By MBlairMartin - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=50244059

Slide 19

Slide 19 text

A>

Slide 20

Slide 20 text

A>hello

Slide 21

Slide 21 text

A>hello Bad command or file name A>

Slide 22

Slide 22 text

A>hello Bad command or file name A>menu

Slide 23

Slide 23 text

A>hello Bad command or file name A>menu Bad command or file name A>

Slide 24

Slide 24 text

A>hello Bad command or file name A>menu Bad command or file name A>help

Slide 25

Slide 25 text

A>hello Bad command or file name A>menu Bad command or file name A>help Bad command or file name A>

Slide 26

Slide 26 text

A>

Slide 27

Slide 27 text

A>if you're happy and you know it, syntax error

Slide 28

Slide 28 text

A>if you're happy and you know it, syntax error Syntax error A>

Slide 29

Slide 29 text

A>if you're happy and you know it, syntax error Syntax error A>if you're happy and you know it, syntax error

Slide 30

Slide 30 text

A>if you're happy and you know it, syntax error Syntax error A>if you're happy and you know it, syntax error Syntax error A>

Slide 31

Slide 31 text

A>if you're happy and you know it, syntax error Syntax error A>if you're happy and you know it, syntax error Syntax error A>if you're happy and you know it and you really want to show it if you're happy and you know it syntax error

Slide 32

Slide 32 text

A>if you're happy and you know it, syntax error Syntax error A>if you're happy and you know it, syntax error Syntax error A>if you're happy and you know it and you really want to show it if you're happy and you know it syntax error Syntax error A>

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Type Your Program Here

Slide 35

Slide 35 text

Microsoft Edge video

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

http://maxpixel.freegreatpicture.com/Heartbeat-Pulse-Healthcare-Heart-Medicine-163709

Slide 39

Slide 39 text

https://www.flickr.com/photos/philliecasablanca/2070476609/in/photostream/

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

Type Your Program Here

Slide 45

Slide 45 text

https://practicalmotoring.com.au/car-advice/common-car-warning-lights-explained/

Slide 46

Slide 46 text

Monty Python Lumberjack.

Slide 47

Slide 47 text

Time CPU Consumption 100% 80% 60% 40% 20% 0%

Slide 48

Slide 48 text

Time CPU Consumption 100% 80% 60% 40% 20% 0%

Slide 49

Slide 49 text

Time CPU Consumption 100% 80% 60% 40% 20% 0%

Slide 50

Slide 50 text

Time CPU Consumption 100% 80% 60% 40% 20% 0%

Slide 51

Slide 51 text

Time CPU Consumption 100% 80% 60% 40% 20% 0%

Slide 52

Slide 52 text

Time CPU Consumption 100% 80% 60% 40% 20% 0% 10:00 11:00 12:00 13:00 14:00 15:00

Slide 53

Slide 53 text

Time CPU Consumption 100% 80% 60% 40% 20% 0% Jan Feb Mar Apr May Jun Jul

Slide 54

Slide 54 text

FATAL ERROR WARN INFO DEBUG

Slide 55

Slide 55 text

FATAL •Application is completely unresponsive •Multiple users affected with immediate effect •Immediate attention. Stop what you’re doing and look into it.

Slide 56

Slide 56 text

ERROR & WARN •They will happen. •ERROR – one person noticed, maybe? •WARN – nobody noticed but it’s still odd. •Individual messages probably aren’t useful

Slide 57

Slide 57 text

https://universitycompare.com/articles/worst-commuters-sit-next-tube/

Slide 58

Slide 58 text

INFO •Everything’s fine •Startup, shutdown, cache recycle •In a perfect world, INFO is all you’ll ever see.

Slide 59

Slide 59 text

DEBUG http://hyperboleandahalf.blogspot.co.uk/

Slide 60

Slide 60 text

http://hyperboleandahalf.blogspot.co.uk/

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

log.Fatal Log.Error log.Warn log.Info log.Debug ――――― Wake_Me_Up_At_4AM_On_A_Sunday() ――――― Apologize_To_User_And_Raise_A_Ticket() ―――― Make_A_Note_In_Case_It_Happens_Again() ―――― Everything_Is_Fine_Just_Checking_In() ――――― Fill_My_C_Drive_With_Stack_Traces() Adapted from a post by Daniel Lebrero / https://labs.ig.com/logging-level-wrong-abstra

Slide 63

Slide 63 text

The Rules of Happy Code

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

Oxfordian Kissuth via Wikimedia Commons : https://commons.wikimedia.org/wiki/File:Hyde_Park_sign_post.jpg

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

Life, Liberty, and the Pursuit of APIness The Secret to Happy Code Dylan Beattie @dylanbeattie www.dylanbeattie.net

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

No content

Slide 73

Slide 73 text

Enterprise Warp Drive http://memory-

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

Request Timed Out

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

Oxfordian Kissuth via Wikimedia Commons : https://commons.wikimedia.org/wiki/File:Hyde_Park_sign_post.jpg

Slide 78

Slide 78 text

No content