It's been a while since I tried to write an end-user facing program. I'm realizing my pain point is error-handling. Not that I'm bad at it; rather, I'm *really* good at thinking about *all* the things that can go wrong. This is painful to track, painful to code, and not much fun.
Conversation
Notices
-
Embed this notice
Shriram Krishnamurthi (shriramk@mastodon.social)'s status on Tuesday, 06-Jun-2023 12:05:48 JST Shriram Krishnamurthi -
Embed this notice
Paul Cantrell (inthehands@hachyderm.io)'s status on Tuesday, 06-Jun-2023 12:05:46 JST Paul Cantrell @shriramk
Yeah. It’s vexing to switch to UI if you’ve been writing, say, compilers or data-critical back end logic, because so many habits turn on their heads:• Halting may no longer be preferable to proceeding with bad data
• Making a clean retry possible, allowing the process to proceed in a messy state, and offering various “try jiggling it” affordances can all be crucial
• Dev-centric error messages are now useless
• “Correctness” is a red herring half the time (but only half)
-
Embed this notice
Paul Cantrell (inthehands@hachyderm.io)'s status on Monday, 13-Nov-2023 12:08:28 JST Paul Cantrell @pelavarre @shriramk
My thought on this, based on my wanderings in the software industry, is that most developers- have some specific thing crucial to their work that surprised / vexed / eluded them
- grossly overestimate how universal it is, and
- not understanding how unique it is to their lang / problem space / process / org, wonder why they didn’t learn it sooner.
-
Embed this notice
Shriram Krishnamurthi (shriramk@mastodon.social)'s status on Monday, 13-Nov-2023 12:08:29 JST Shriram Krishnamurthi @inthehands All correct. And all far beyond even basic error-*catching*, much less *handling*!
-
Embed this notice
pelavarre (pelavarre@social.vivaldi.net)'s status on Monday, 13-Nov-2023 12:08:29 JST pelavarre > all far beyond even basic error-*catching*, much less *handling*!
should our everyone-learns goals for writing distributed Code include a form of retries?
me, the wheel i reinvented this morning is
r = requests_get_after_some_sleeps(address, sleeps=(0, 0, 60))
for me this says to try for the first time after 0 sleep, quit if happy else try a second time after 0 sleep, quit if happy else sleep for 60s and then try a third time, quit if happy else forget about it, give up, let that last unhandled Exception raise you out of here no matter if it's the same or different than the others
i'm then strongly feeling like i should've been taught this form of speech - but i sure wasn't
got thoughts?
-
Embed this notice
Paul Cantrell (inthehands@hachyderm.io)'s status on Monday, 13-Nov-2023 12:09:19 JST Paul Cantrell @pelavarre @shriramk
I’m of a mind that the best education can do is not to send students out already prepared for everything (which is impossible, a non-goal), but rather to send them out with the tools & confidence to thrive — and believe that they can thrive — despite being unprepared just like everyone else. -
Embed this notice
Shriram Krishnamurthi (shriramk@mastodon.social)'s status on Tuesday, 14-Nov-2023 09:26:43 JST Shriram Krishnamurthi @inthehands @pelavarre Well, sure, in principle that's what we all hope we're doing. Translating that into practice is the hard part.
-
Embed this notice
Paul Cantrell (inthehands@hachyderm.io)'s status on Tuesday, 14-Nov-2023 09:26:43 JST Paul Cantrell @shriramk @pelavarre
Yeah, it turns out teaching is hard. (Teaching well is hard, anyway. Teaching for poorly just comes naturally!) -
Embed this notice
Paul Cantrell (inthehands@hachyderm.io)'s status on Thursday, 16-Nov-2023 07:00:46 JST Paul Cantrell @shriramk @pelavarre
If I do manage to teach well, I’m not sure I’d call it easy — but it’s at least so much fun than I don’t always notice it’s hard! Same could be said of programming. -
Embed this notice
Shriram Krishnamurthi (shriramk@mastodon.social)'s status on Thursday, 16-Nov-2023 07:00:47 JST Shriram Krishnamurthi @inthehands @pelavarre Though once you get past some threshold, I think teaching poorly is not easy and teaching well is not too hard. <-;
-
Embed this notice