Ep 110: Contextify!

Ep 110: Contextify!

Update: 2024-02-08
Share

Description

Each week, we discuss a different topic about Clojure and functional programming.


If you have a question or topic you'd like us to discuss, tweet @clojuredesign, send an email to feedback@clojuredesign.club, or join the #clojuredesign-podcast channel on the Clojurians Slack.


This week, the topic is: "gathering debugging context". Our downloads fail at random, but our dead program won't give us any answers.


Our discussion includes:



  • Sportify! Now, with even more exceptions!

  • How do you know the state of the application after it has already died?

  • Where do you catch the exception?

  • What do you log and where?

  • How do you get the context to where you need it?

  • What place has all the important context?

  • Where does the pure logic belong?

  • How can you keep I/O functions ruthlessly simple?

  • The beauty of fully described operations.


Selected quotes




  • We just need to fill out our support ticket and say, "Hey! Fix your service!" It couldn't possibly be our code!




  • So there is an error happening, but what happened just before that error?




  • It is dead. There's no way to ask it any questions. It will not give us any answers.




  • The only way to know what the program was doing, is to know what the program was doing. If you're trying to figure out what the program was doing by reverse engineeringing it, you're going to get it wrong.




  • I love hiding side effects with macros! That's one of my favorite things to do in Clojure! It makes me feel like I'm using Scala again!




  • We don't want the I/O function to do any thinking of any kind. It's a grunt. We fully specify the bits it needs to know. It's 100% a boring outcome of what we passed into it.




  • Those I/O functions end up being ruthlessly simple. They're often just one line!




  • We remove the thinking, so we remove the information. It's not because we don't like pure functions. We put them in a place where we can have all the information in one place.




  • We're getting to the point where our let block is getting really long really—maybe too long. We're really letting ourself go!




Links


Comments 
In Channel
Ep 118: Pure Parts

Ep 118: Pure Parts

2024-06-2728:28

Ep 116: The Main Focus

Ep 116: The Main Focus

2024-05-1622:44

Ep 115: The Main Event

Ep 115: The Main Event

2024-05-0928:42

Ep 113: Highlightify!

Ep 113: Highlightify!

2024-02-2927:13

Ep 112: Purify!

Ep 112: Purify!

2024-02-2233:20

Ep 111: Loopify!

Ep 111: Loopify!

2024-02-1528:54

Ep 110: Contextify!

Ep 110: Contextify!

2024-02-0823:22

Ep 109: Extractify!

Ep 109: Extractify!

2024-02-0126:35

Ep 108: Testify!

Ep 108: Testify!

2024-01-2522:42

Ep 107: Idempotify!

Ep 107: Idempotify!

2024-01-1831:53

Ep 106: Robustify!

Ep 106: Robustify!

2024-01-1130:37

Ep 105: Codify!

Ep 105: Codify!

2024-01-0425:42

Ep 104: Assembleify!

Ep 104: Assembleify!

2023-12-2135:03

Ep 103: Explorify!

Ep 103: Explorify!

2023-12-1432:15

Ep 102: REPLify!

Ep 102: REPLify!

2023-12-0728:11

Ep 101: Sportify!

Ep 101: Sportify!

2023-11-3017:03

loading
00:00
00:00
x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

Ep 110: Contextify!

Ep 110: Contextify!

Christoph Neumann and Nate Jones