It feels odd because I find I'm writing code to detect anti-bot tools even though I'm trying my best to follow conventions.
Since I was a kid, I've thought I was "prone to migraines", and ascribed various triggers to them - sun exposure, heat, physical exertion, mental exertion, etc. I'd get a migraine sometimes after a long hike on a weekend - and also a long business meeting entirely indoors in an air-conditioned space.
Only when I was around 35, did I figure something out. All these situations lead to me getting dehydrated without any obvious accompanying feeling of thirst. Hiking all day will do it - walking around an outdoor shopping mall on a hot afternoon - or sitting in an all-day business meeting focused on the work at hand and forgetting to drink. And all these situations lead to a migraine - my only "migraine" trigger is simple dehydration, nothing more complicated.
The weird thing is, it took me a long time (decades) to put this together, because I just figured that I couldn't be dehydrated if I wasn't thirsty, and I had no association between "feeling thirsty" and getting a migraine.
I get what I consider normally thirsty in other circumstances, but somehow there's a failure mode where my body doesn't warn me. So now I just remember to chug lots of water (and electrolytes) if I'm exerting myself even if I don't really feel thirsty, and I can systematically avoid triggering migraines.
Now that I understand it the association is quite clear and obvious in retrospect.
I stumbled with some f up stuff that i still remember to this day. But somehow I'm grateful that it wasn't the current brainrot
IMO rewriting happens mostly because going to lower-level of the needed proficiency/understanding - once the product why-what-how is more-or-less discovered, its code can be commoditized and hardened, kind-a. Dynamic stuff is very powerful == becomes too powerful (and "magic").
There is quite some wishful thinking around what so-called static-typing (which is actually static type-hinting) in dynamic languages, hoping and believing that declaring something Float, guarantees it being Float at runtime.. which is nonsense. In Ada, and few other runtime type-and-range-etc-checking languages - yes. But in plain ones.. nope. C++, Java, whatever - noone checks things at runtime. Most of those do not have a way to know what some n-bytes represent, hoping it matches the expected layout (i.e. type). While, say, python very well knows what each and every object is. If asked.
Of course, one can build such real-runtime checkers, and apply them where/when it is needed and makes sense - instead of blanket policy everywhere, but noone bothers. (Funny thing is, when i made one such library 15y ago, i was spit at and told to go code in java. And, even i haven't since then stumbled on pressing need to use it myself. Having 10 asserts (or constraint checks) in some 10kLoc does not justify whole library)
That said, i think something like language-verticals might be useful. And/Or gradual hardening, on piece-meal basis. At least a standartized way for going up/down or stricter/relaxed, from wherever one is.
But then my question is, what are you doing that you need to manually check for types ? I mean i get it at some point, usually at the time of user input usually you need to run checks to actually convert some input into a valid type. But once it is inside your program you don't need to check anymore because well... static typing and all that, you should know what you have in every step just at a glance
It took me hours to debug why it was faulty in my app, until i asked for help on a discord server and someone answered me saying that the same mistake happened to them a few months back...
It seems small, but it really does help.