Module 16 · Undefined Behaviour, Debugging and Reading Real C
Reading Real C: a Walk Through Code From SQLite
ProReading
Amara wants to know how a real database compares names. In SQL, SELECT and select are the same word. So she downloads SQLite, the database inside your phone and your browser (Module 0 lesson 5). Its src folder holds 125 .c files, about 209,000 lines.
Checking what this lesson needs for you…
What is inside Reading Real C: a Walk Through Code From SQLite
- Four steps, always in this order
- Fetching the code, and pinning the version
- Step 1: the header comment is the contract
- Step 2: the types say what goes in and out
- Step 3: one function and its callers
- Step 4: the body, read last
- The second walk: strncasecmp in the Linux kernel
- Finding your way in a big tree
- Licences: whose code you are reading