How I Turned Exam Panic into a Constraint Satisfaction Problem
Eighteen hours until my mechanical engineering exam. One semester of MATLAB scripts, lecture notes, and project reports spread across my desk. The constraint: compress everything from external flows to fatigue strength analysis onto a single sheet of paper.
The traditional approachâmanually copying equations while squinting at subscriptsâfelt like the wrong tool for the job. So I asked Claude Code to help.
Twenty Topics, One Page
The exam covered a sprawling list of concepts: angle of attack and relative velocity, coefficient of drag and lift calculations, power and torque from distributed forces, numerical integration methods, beam bending and stress analysis, wind turbine aerodynamics. The Betz limit alone has enough subscripts to fill half a page.
This is fundamentally a constraint satisfaction problem. Maximize information density. Maintain readability. Fit on one page. Keep font size above âneeds a magnifying glass.â These constraints compete with each other, and balancing them manually is tedious.
Claude, it turns out, is good at holding multiple constraints in mind simultaneously.
Extracting Equations from My Own Work
Rather than copying from textbooks, I pointed Claude at the project files Iâd actually used during the semesterâMATLAB scripts from a wind turbine analysis, stress calculation spreadsheets, lab reports. The AI extracted equations Iâd already worked with, which meant they were equations I had some intuition about.
Hereâs what it pulled for the aerodynamics section:
### Relative Velocity (V_rel)
V_rel = â[(V_â(1-a))² + (Ďr(1+a'))²]
Where:
- V_â = freestream wind speed [m/s]
- a = axial induction factor [-]
- Ď = angular velocity [rad/s]
- r = radial position [m]
- a' = tangential induction factor [-]
The organization wasnât alphabeticalâit was pedagogical. Force coefficients appeared near the equations that used them. Integration methods sat adjacent to where theyâd be applied. Claude had inferred the logical groupings from context.
When Preparation Becomes Learning
The most valuable moments came when I questioned what Claude generated. Take this Reynolds-dependent drag coefficient formula it extracted:
Re < 2Ă10âľ:
Cd = 11ĂRe^(-0.75) + 0.9Ă(1 - exp(-1000/Re)) + 1.2Ă(1 - exp(-(Re/4500)^0.7))
I stopped. âWhy are there three separate terms here? Whatâs each one modeling?â
Claude explained: the first term dominates at very low Reynolds numbers where viscous effects control drag. The second captures the wake formation regime. The third handles the transition region approaching the critical Reynolds number where the boundary layer becomes turbulent.
âSo the âdrag crisisââwhere drag suddenly drops on spheresâhappens becauseâŚâ
âBecause turbulent boundary layers stay attached longer. The wake narrows. Golf balls have dimples specifically to trigger this transition at lower speeds.â
That exchange taught me more than re-reading my notes would have. The AI became a tutor who happened to also be a typesetter.
Why HTML Instead of Word
You might wonder why I bothered with an HTML-to-PDF pipeline for a cheat sheet. Hereâs what goes wrong with Word or Google Docs: you spend twenty minutes adjusting margins, the equations render inconsistently, and when you add one more line, everything reflows unpredictably. Youâre fighting the tool instead of focusing on content.
HTML with CSS gives sub-millimeter control. What renders on screen matches what prints. When Claude adjusts the layout, I can verify immediately that everything still fits. No surprises at the exam.
The Iteration That Almost Broke It
Not everything worked smoothly. Claudeâs first pass extracted equations from my MATLAB comments, but some of those comments were wrongâearlier attempts Iâd corrected in the actual code but never updated in the documentation. The cheat sheet briefly contained a torque formula with the radius squared instead of cubed.
I caught it because the units didnât balance. When I pointed this out, Claude re-scanned the functional code (not just comments) and corrected the extraction. This became a useful habit: always check units, even on AI-generated content. Especially on AI-generated content.
The Final Sheet
The output was dense but navigable. Six sections covered fluid dynamics fundamentals, distributed forces, wind turbine theory, numerical methods, stress analysis, and unit conversions. Each used a consistent format: equation first, variable definitions below, one-line usage note where helpful. The font was 8ptâsmall but legible.
Every formula was something Iâd actually used during the semester, which meant I had at least one concrete memory of applying it.
Constraint Satisfaction Everywhere
What struck me afterward was how similar this process felt to another project Iâd been working on: optimizing a six-bar linkage mechanism using genetic algorithms. That problem also involves satisfying multiple competing constraintsâfind ground pivot locations where a door mechanism stays entirely inside a boundary when closed while tracing a specific path when open.
âMake this fit on one pageâ really means âminimize whitespace while maintaining readability while including all required topics while keeping font size legible.â Thatâs multi-objective optimization. Whether the output is a PDF or a set of coordinates, the process rhymes.
What Worked, What Iâd Change
What worked:
- Extracting equations from my own coursework meant I recognized every formula
- Questioning the generated content turned preparation into active review
- The HTML pipeline eliminated formatting frustration
- Treating the cheat sheet as a constraint problem clarified what âgoodâ meant
What Iâd change:
- Verify equations against functional code immediately, not just comments
- Start earlierâthe tutoring conversations were valuable, but I rushed the last hour
- Include more worked examples; equations alone donât jog memory as well as seeing them applied
The Exam
I sat down with my single-sided page, dense with the semesterâs content. More importantly, Iâd spent the preparation process explaining to Claude what I needed and whyâwhich meant Iâd spent it engaging with the concepts themselves.
When I hit a problem on distributed forces over a curved surface, I didnât just look up the formula. I remembered the conversation about why the integral bounds mattered, and that memory carried the context I needed.
The cheat sheet was useful. The process of making it was better.