Which is almost impossible. Exams just measure your aptitude at passing exams, with the hope that they somehow don't generalize too badly. If we had a way to measure "actual" aptitude, job interviews would be very different. But we don't.
The ideal school system is one where students want to learn, as opposed to one where students want to make good grades. Unfortunately that's hard to get, but it should not be forgotten.
That's the trivial part, nobody denies this. The harder part is the reverse: if you ask me a question about the thing I claim aptitude about, and I can answer it, does it prove I have aptitude for that thing, or does it prove I have the aptitude to answer this question?
If I learn by heart the 20 math problems you gave me to practice for the test, and then you test me on a similar problem, then I will be able to "do stuff" that is not completely meaningless by just mimicking the previous problems. Students often do that, and get the average even though they got the wrong answer. Many times, looking at their errors, you can be pretty sure that they just don't know what they are doing. But teachers cannot give none or all the points (or all minus 1 if there was a small mistake), it has to be a gradient. In my school system, students who get just the average grade for math problems have absolutely no clue what they are doing. If they did they would get one of the best grades. Still they pass.
Same goes for tech interviews: people learn algorithms and keywords and problems by heart just for the interview. Doesn't mean they know how to write good software, just that they learnt those things by heart.
For actually hard questions, I think this happens a lot less than is claimed.
I would be astonished if someone without physics knowledge could 'learn by heart' and get anywhere close to a passing score on one of my college physics tests.
Maybe I'm just rabidly pro-test, but I think a lot of the anti-test sentiment comes from... people having negative experiences with testing in their own lives, than an actual indictment on its utility. The obvious explanation for why people hate leetcode is because it gates them from $200k+ jobs, not because of some high-minded moral qualms with tests.
Again, I am not saying specifically that "someone without physics knowledge" can get a passing score on college physics tests. It's a bit more nuanced than that, and it's difficult to compare because I did not study in the US. And passing a test doesn't mean nothing (if anything, it shows that you are capable of passing the test).
But I have the feeling that I myself was pretty good at optimizing for the grades, even if retrospectively, that was not always the most constructive learning experience. As an engineering undergrad, I studied one year abroad, and there I could literally take twice as many classes as "local" students and get the best grades. First I thought "they sucked", and then I realized that the students there did not care so much about the grade: it was easy to pass if you genuinely put the work into it, and it was not uncommon to ask to redo a class on a voluntary basis. They were studying to learn, not to get the best grade. And sometimes it implied going slightly aside from the main course topic out of interest (instead I was doing exactly what was needed to get the best grades and the most classes).
Not to say I'm particularly bad though I had very good grades, or that they were particularly good with bad grades. Of course they had good and bad students, too. It was just interesting to see that it worked completely differently.
Then it made me think about school/high school, were I always had excellent grades: how did it make the other students feel like? Grades give some kind of ranking, which can feel like a competition. And I remember clearly (and saw it again later as a supply teacher) that those struggling to get the average grade would often optimize for that: "I don't have time to understand how to do it, I need to get the average". A bit like software engineers don't have time to "do it right" and write shitty hacks instead: it's not that it doesn't work at all... but that is certainly not the most constructive way. And definitely what I saw as a supply teacher was that some of those students were simply wasting their time in the maths classes, but in a very stressful way because they had to find tricks to get the average without actually understanding the maths.
> The obvious explanation for why people hate leetcode is because it gates them from $200k+ jobs
Admittedly I haven't tried that. But regarding grades, I am most critical of the grading system in school/high school, and I had excellent grades there. Then at university level, this exchange year showed me that excellent engineers came out of a school where grades did not matter so much, so it is possible.
I guess my point about leetcode is that I have seen software engineers who excel at those, but write unreadable and unmaintainable code. Which tells me that leetcode doesn't measure the capacity at being a good software engineer in general.
Or do you mean that the SAT results are really good at telling you who is, say, a good software engineer?