Day 030: Bridges in No Man's Land
What happens when the compiler guesses wrong and the CPU doesn't know it.
Learning C the hard way, through K&R, one day at a time, with a security eye on every chapter.
What happens when the compiler guesses wrong and the CPU doesn't know it.
K&R 4.1: what happens when the compiler builds a bridge without a blueprint.
Chapter 3 closes. The stack frame opens. Logic lives in a physical place, and that place has gravity.
K&R 3.7 and 3.8. break, continue, and the one place K&R says goto is okay.
I came back after 17 days off expecting to be rusty. The Feynman test said otherwise. Turns out the concepts stuck. What didn’t stick was the habit of showing …
Section 3.3 and 3.4. Every formula I trusted had a hole in it.
Chapter 3 opens. The code looks right. The compiler disagrees.
Chapter 2 closes. Not with new material but with a live audit that forced application of everything the chapter built.
Chapter 2 closes. The compiler caught my UB live. Six operators, two exercises, sixteen notebook entries.
K&R 2.8, the strcat design flaw, four new notebook entries, and the moment I realized safety in C is often just geographic coincidence.
Section 2.7, bitwise operators, and why the same 8 bits mean different things depending on who's reading them.
Closed the overnight question on why character constants are int, worked through sections 2.3 through 2.5, and wrote exercise 2-2, the one where short-circuit evaluation turns out to be a security guarantee.
Took a day off from K&R and spent it getting a dead 3D printing lab alive. Turns out debugging firmware and tracing undocumented wiring is just hacking with different stakes.
Chapter 2 opens and the type system immediately starts lying to you.
Testing everything from Chapter 1. Feynman gauntlet, code tracing, security connections, and closing gaps I did not know I had.
Finishing Chapter 1 with the two hardest exercises. Comment stripping, bracket matching, and why parsers that don't understand context create entire vulnerability classes.
K&R exercises 1-20 through 1-22. Tab expansion, tab compression, line folding. A bug that hid in plain sight.
Exercises 1-16 through 1-18. Dual counters, GDB investigations, and what happens when zero means two things.
K&R 1.8 and 1.9. Call by value, character arrays, and the single byte that holds all of C together.
K&R 1.6 and 1.7. Arrays, character arithmetic, functions. And the first time I watched a bug disappear into memory that wasn't mine.
Rebuilding ten exercises from scratch on a different machine. No peeking. No shortcuts. Proof of ownership.
There is a difference between having tools and having a workshop. I have four machines. A personal laptop. Two Linux boxes. A work computer. Until today each …
Day 007.5: The Exploit Lab Seven days of K&R on my primary workstation. Seven days of learning how C thinks. But learning C was never the point. The point is …
Rebuilding exercise 1-10 from scratch, word counting with state machines, and threat modeling a 20-line program.
Line counting, state tracking, and the cost of reaching for someone else's answer.
C stops printing and starts listening. getchar, putchar, and the precedence trap that has ruined code for fifty years.
K&R section 1.4. Symbolic constants. The preprocessor. And the realization that every layer was built by people who could not see what was coming.
Day 003: The For Statement Today I opened K&R section 1.3 and met the for statement. Then I went back and knocked out three exercises from 1.2 that I had …
Day 002: The Type System Today I opened K&R section 1.2: Variables and Arithmetic Expressions. A Fahrenheit-to-Celsius conversion table. Fourteen lines of code. …
Day 001: The Foundation I made a commitment today. One hour a day. Every day. No excuses. The goal is not to become a better tool user. I am already good at …
First post. What this is about.