Somewhere around 2004-2006 I read a blog post / article that I have been unable to find since that was supposed to be from a CS professor at a relatively prestigious university where they had done a study on entering classes for a number of years, at the beginning of the class they gave some very rudimentary problems focused on if you could handle arbitrary rules - those that could ended up passing at a significant rate those who couldn't ended up failing at a significant rate.
The theory was that programming has many arbitrary rules that you need to be aware of work your way around to make things work, why is the language construct like this instead of this other way etc.
The law in many ways is logical but it is an arbitrary logic.
Students that had an analytical perspective (e.g. from supply chain debugging) typically excelled.
Students from more fuzzy, language-based perspectives (e.g. marketing) had a lot more difficulty.