Messed up a bgp.tools deploy and ended up triggering a panic() on every single HTTP request (sorry if you were caught up in that!) Anyway I now know that my panic() reporter that sends a blob to my XMPP clients buffers enough data that my phone will trigger enough push notifications that even if the standard paging stuff fails, my phone will quite literally vibrate off the desk (as I am slowly watching it do while I type this out)
benjojo
replied 04 Sep 2026 14:13 +0000
in reply to: https://benjojo.co.uk/u/benjojo/h/Y2w62RT4zHDnVn95kl
🫠 Yeah that will do it (guess what was set in my test env so it didnt show up...) [rust evangelism strike force members need not reply]
tef@mastodon.social
replied 04 Sep 2026 14:16 +0000
in reply to: https://benjojo.co.uk/u/benjojo/h/1Ym83rxP8PyC2jh49p
@benjojo in my last go project at my last job, i banned "if err == nil" from the codebase made everyone write if err != nil { // pass } else { ....}
benjojo
replied 04 Sep 2026 14:17 +0000
in reply to: https://mastodon.social/users/tef/statuses/117213193637116882
tef@mastodon.social
replied 04 Sep 2026 14:29 +0000
in reply to: https://benjojo.co.uk/u/benjojo/h/2wJD2z734Z2Ljr1F8R
@benjojo see also, i used to mandate "if timestamp < timesamp" and always check older < newer in python, for exactly the same reason
mdione@en.osm.town
replied 04 Sep 2026 15:30 +0000
in reply to: https://mastodon.social/users/tef/statuses/117213244444569448
aljaxus@toot.tux.si
replied 04 Sep 2026 17:28 +0000
in reply to: https://mastodon.social/users/tef/statuses/117213193637116882
tef@mastodon.social
replied 04 Sep 2026 17:47 +0000
in reply to: https://toot.tux.si/users/aljaxus/statuses/117213946272424600
aljaxus@toot.tux.si
replied 04 Sep 2026 18:34 +0000
in reply to: https://mastodon.social/users/tef/statuses/117214023570390044
@tef @benjojo I understand that, but one could argue the same to always enforce `if err != nil {} else {}` I would argue that, at least in my exp. you much more often need to catch error, handle it and return. compared to other way around where you would quickly get multiple levels of nested `if`s. What I am asking is why specifically `if err == nil` and not other way around. 'Because I feel like it' is always a good enough answer too, dont feel the need to defend yourself.
benjojo
replied 04 Sep 2026 19:42 +0000
in reply to: https://toot.tux.si/users/aljaxus/statuses/117214207316315567
Because 99.95% of err comparisons in go are
What I am asking is why specifically
if err == nil and not other way around.if err != nil, doing if err == nil is extremely prone to someone mentally going on autopilot and typing what they "always" type instead. This is what I did, and it caused a mini outage
aljaxus@toot.tux.si
replied 04 Sep 2026 20:07 +0000
in reply to: https://benjojo.co.uk/u/benjojo/h/GkssX6CjVRjm78cFs2
tef@mastodon.social
replied 04 Sep 2026 22:31 +0000
in reply to: https://toot.tux.si/users/aljaxus/statuses/117214573854658918
famfo@frogs.lgbt
replied 04 Sep 2026 14:16 +0000
in reply to: https://benjojo.co.uk/u/benjojo/h/1Ym83rxP8PyC2jh49p
hailey@hails.org
replied 04 Sep 2026 22:29 +0000
in reply to: https://benjojo.co.uk/u/benjojo/h/1Ym83rxP8PyC2jh49p
spaceinvader@social...
replied 05 Sep 2026 05:01 +0000
in reply to: https://benjojo.co.uk/u/benjojo/h/Y2w62RT4zHDnVn95kl
@benjojo at my very first internship I was tasked with setting up Nagios. Nobody ever bothered to teach me alert tuning. Or testing, really. So I got it running and thought “gee, I bet my boss would like to be notified if there’s a problem!” So anyway I sent well over 15,000 emails to his Blackberry, which he had to pull the battery out of to get it to stop vibrating.
