Remix.run Logo
inlined 4 hours ago

That used to be my thing: wherever our ops manager declared something was impossible, I’d put my mind to proving her wrong. Even though we both knew she might declare something impossible prematurely to motivate me.

My favorite was “it’s impossible to know which DB is failing from a stack trace”. I created STAIN (stack traces and instance names): a ruby library that would wrap an object in a viral proxy (all returns from all methods are themselves proxies) that would intercept all exceptions and annotate the call stack with the “stain”ed tag.

Groxx 3 hours ago | parent | next [-]

I've seen more than one half-joke-half-serious chunk of code that would "encode" arbitrary info into stack traces simply by recursively calling `fn_a`, then `fn_s`, `fn_d`, and `fn_f` before continuing with the actual intended call, giving you a stack trace with (effectively) "asdf" in it.

They've also been useful more than once, e.g. you can do that to know what iteration of a loop failed. There are of course other ways to do this, but it's hard to beat "stupid, simple, and works everywhere" when normal options (e.g. logs) stop working.

0x70dd 3 hours ago | parent [-]

Reminds me of https://github.com/jtolio/gls which implement a "thread local storage" in golang

glenstein 4 hours ago | parent | prev | next [-]

Well you're doing gods work as far as I'm concerned. Conflating difficulty in practice with impossibility in principle is, to my mind, a source of so much unnecessary cognitive error.

xattt 3 hours ago | parent [-]

The declaration of an impossibility of a given task or goal is a reflection of the perceived barrier by the individual, rather than the task itself.

itsamario 2 hours ago | parent [-]

Wise men speak when needed; fools because they want

btown 2 hours ago | parent | prev | next [-]

Similarly, one of the great things about Python (less so JS with the ecosystem's habit of shipping minified bundles) is that you can just edit source files in your site_packages once you know where they are. I've done things like add print statements around obscure Django errors as a poor imitation of instrumentation. Gets the job done!

alexchantavy 2 hours ago | parent | prev | next [-]

The solution to every software problem is another layer of indirection :-)

prpl 3 hours ago | parent | prev [-]

Adversarial software development is also when I do my best work

whycome 28 minutes ago | parent [-]

Adversarial personal development is definitely a thing too.