← Daily LogFIELD LOG No. 035 — 08 Jul 2026
Two chapters closed — one went smoothly, one didn't
Static inline functions, variadics, and compound literals went fine. C standards and undefined behaviour did not — I failed that chapter test on the first try and had to retake it. Started Ring Buffer right at the end.
What I got through
- Finished static inline functions, variadic functions, compound literals, and designated initializers. Passed the chapter test 4/5 (80%) — missed the one about duplicate designated initializers actually being valid C (last one wins, which I didn't know).
- Finished the C standards overview, _Bool/<stdbool.h>, _Static_assert, and the full undefined-behaviour inventory. Failed the chapter test on the first attempt, 2/5 (40%). Retook it and passed 4/5 (80%).
- Started Ring Buffer: got through G1 (wraparound mechanics) clean, no help needed. Traced through G2 fine but ran out of steam before actually writing the code for it, so I pushed it to next session — and I'm opening next time with a full re-study of ring buffers from scratch, because I want to actually nail this one.
Mistakes I made
- Reversed the argument order on va_start and misspelled va_arg as va_args — not the first time I've done that one.
- Wrote a function that ignored its own parameters and just returned a hardcoded value on my first attempt.
- The three misses on my failed UB test: mixed up implementation-defined behaviour with undefined behaviour, got an unsigned wraparound off by one, and knew type punning was wrong but couldn't name it "strict aliasing violation."
- Argued to myself that pointer arithmetic out-of-bounds couldn't really be UB if I never dereference it — I was wrong, and needed a second pass at the reasoning before I accepted it as an actual rule.
- Caught myself using bitwise-AND when the exercise actually wanted modulo, before anyone had to point it out to me.
What's next
Anki deck's up to 384 cards now, from 345. Next session: full ring buffer re-study, finish G2, then move into G3.
Notes from readers
Comments — via GitHub