When I was teaching math in college, it was easy enough to give tests that (i) really tested knowledge of the material and (ii) were not hackable. Here's how I did that: Just announce at the beginning of the class that (i) the homework assignments were just to work enough of the exercises in the book to be good at working the exercises and (ii) the tests would be just some of the exercises in the book with just minor or no modifications. Worked fine.

In D. Knuth's The TeXBook is:

"The traditional way is to put off all
creative aspects until the last part of
graduate school. For seventeen or more
years, a student is taught examsmanship,
then suddenly after passing enough exams
in graduate school he's told to do
something original."

In particular, there can be some comeuppance to too much course hacking and not enough learning: Without enough actual learning, may have too much trouble doing "something original".

On the course hacking Paul describes:

(1) Dad had his Master's in education and to me emphasized just learning and never grades. So, I emphasized learning. He was a bit extreme in ignoring my grades: A few times my neglect of grades cost me, never much but a little.

And for Paul's remarks on studying for tests, that's what I did: I never studied for tests. Essentially as Paul explained, all along in the course I'd been trying to learn the material so no way would just cramming and losing sleep help me.

Broadly Dad was correct: Most of what I got out of education that actually helped me was just the learning. And one of the best things I did learn was how to learn, i.e., pick good subjects, topics, and sources and learn independently from the sources.

E.g., the college I went to as a freshman was selected because it was nearly for free and I could walk to it. But the college was so much like just a grade 13 that they didn't let me start with calculus. But I'd been a math major at a relatively good college prep high school, e.g., that the year before me had sent three students to Princeton and my year sent one to MIT. And in my year, of #1, #2, #3 on the Math SAT, the MIT guy was #3 and I was #2. Similarly on the CEEB Math knowledge test. Sooooo, I SHOULD have been in calculus, and the course they had me in was 90% lower than what I'd already learned in high school and for the other 10% I just taught that to myself in a few days. But I wanted to be a college math major and not fall behind so got a good calculus book and dug in and did okay. The next year I went to a college with a quite good math department, continued with their sophomore calculus from the same text Harvard was using, pretty good text, made As, and did fine. So, I never took freshman calculus; my ability to teach myself saved my tail feathers.

On Paul's remarks on grades, there was a cute story: When the SAT scores came back, one of the teachers, I'd had in the sixth grade, was appointed the counselor for giving the scores to the students; so, she knew me well and knew my reputation among the teachers. She read my Verbal SAT score and had a nice smile, said it was "Very good". It wasn't so good, but she was happy because the score was MUCH better than my reputation! Then she read my Math SAT score and became afraid, upset, confused, speechless. When she recovered she said "There must be some mistake." Yup, there had been, hers and the other teachers for 12 painful years.

E.g., there was one really good day for learning: In plane geometry, my favorite subject, the teacher was competent but really nasty. No way did I want her to have any credit for my learning; so no way would I ever admit to doing any homework. Each day she assigned three not very difficult exercises. I outlined solutions in the margin of the book for the most difficult exercises, maybe some of hers, and then turned to the more difficult exercises in the back and did them ALL, never once missing one. One of them took me from Friday afternoon to Sunday evening. In class on Monday, she worked at the board an easy exercise with the same figure I'd worked on all weekend. So, I woke up from having my head down resting as usual and for the first and last time spoke in class: "There's an exercise in the back with the same figure." She took the bait! About 15 minutes later, with frustration, she was exhorting the class "Think, class, think. Think about the given ....". Heck, I didn't know that I was the only one doing ALL the homework and that even the teacher had not done all the homework! I didn't want to be accused of ruining the class so blurted out "Why don't we ..." and in a few more words, with great anger, she interrupted me. NO WAY did she want my solution! With anger she said "You knew how to do it all along!". Of COURSE I did: No way would I ask HER for help in math! This story might make a good scene in a movie!

There was one more with her: On the state test, the last problem was how to inscribe a square in a semi-circle. After the test I kept thinking about a good solution so asked to see her after school. She didn't like that. I mentioned the problem, and she asked "Why are you working on that?". Well, it was curious, and I'd already solved everything else in sight! So, I went off on the side and constructed a square, circumscribed the semi-circle, constructed a fourth proportional, so had the crucial length in the original figure and did that construction. She said it was not legal to construct the other figure. In college, a student in a geometry for teachers class showed me, given triangle ABC, construct D on AB and E on BC so that the lengths of AD = DE = EC. So, off on the side I started with the angle BAC, picked any length for the AD for that figure, finished constructing the figure on the side similar to the given figure, found the crucial fourth proportional, and completed the construction in the original figure. She said, "How'd you know to do that? That is smilimitude, an advanced technique we are studying." I said "I rediscovered it in high school, and the teacher said can't do that.".

(2) I started my career in applied math, computing, and physics for mostly problems in US national security near DC. There no one cared what course grades I'd made but cared a LOT what I could DO that was important and based on what I'd learned or could learn quickly. And I was learning like drinking from a fire hose. Net, what I knew and learned got me a good career, at one time an annual salary six times what a new high end Camaro cost.

(3) I did well in freshman physics, led the class. One of the guys I'd beaten got some respect for me so contacted me when FedEx was struggling with scheduling the fleet. I'd been teaching computer science at Georgetown University (had never taken a course in computing but had been learning from that fire hose) so joined FedEx, typed software furiously, got a schedule for the fleet, thrilled the Founder Smith, pleased the BoD, enabled some crucial funding, and saved the company, all based on what I'd learned, in physics class and in computing. Later did a little calculus for some revenue projections, pleased two crucial BoD Members, and saved the company again.

(4) In grad school, what I'd learned before entering helped a LOT: On the five Ph.D. qualifying exams, I did the best in the class on four of the exams, and for three of them what I did was all from what I'd learned in class or taught myself before entering. Later my interest in learning and neglect of formalities torqued off my department Chair. So, in a course in optimization, I saw a question with no answer in the course. I found no answer in the library. I got some rough ideas for how to get an answer so signed up for a reading course to address the problem, not necessarily solve it. In two weeks I had a nice solution with a nice new general theorem and also a nice solution to a related problem stated but not solved in the famous paper of Arrow, Hurwicz, and Uzawa in mathematical economics. My work looked publishable (it was; I did publish it later in JOTA). Word of my solution spread in the department. Then I had a halo: No one cared about formalities and let me just LEARN and, then, do my Ph.D. research, with no faculty direction. Again, what I had LEARNED saved my tail feathers. And for Knuth's remark about something "original", the learning let me do that. I did find that the thinking techniques I'd used to do the more difficult exercises in Rudin, Royden, Neveu, Loeve, Halmos, Fleming, etc. were sufficient to do publishable original research.

So, net, just learn and do that by doing the more difficult exercises! E.g., back to high school a challenging test question got me to reinvent similitude!