TPRM stands for Type, Predict, Run, Modify. It is the cycle every example in these books is built around, and it is the reason the books ask you to type the code rather than read it.
I developed the TPRM approach while teaching my son to program. Type the code, predict what it will do, run it, then modify it until the logic truly makes sense. It worked for him, and I have used it ever since.
I want you to run every major concept in these books through that same active-learning cycle:
| Step | What you do |
|---|---|
| 1. TYPE | Type the example yourself. Do not copy and paste while learning the syntax. |
| 2. PREDICT | Before you run it, write down what you think will happen. |
| 3. RUN | Execute the program and compare reality with your prediction. |
| 4. EXPLAIN | Say in plain language why the program behaved that way. Read the book’s EXPLAIN box only after you have run the code. |
| 5. MODIFY | Change at least one value, condition, or line and predict again. |
| 6. TEST | Try a normal case, a boundary case, and an awkward or invalid case when appropriate. |
Here is why I ask for this. Reading code can create the illusion of understanding. Predicting exposes what you actually understand. Modifying shows whether you can carry an idea across to a new case. Testing teaches you to think like a programmer instead of a typist.