The author modifies this short code to implement various shading techniques with code that is as pithy and understandable as any.
You have to recall that 40 years ago even texture mapping was a scientific publication quality material.
This code makes several non-obvious things obvious - and simple! I don't think that's a light achievement.
https://github.com/ssloy/tinyrenderer/wiki/Lesson-6:-Shaders...
"Recall that all my source code here is meant to be compared with yours. Do not use my code, write your own. I am a bad programmer."
If you want to improve the text, the wiki is open. If you want to improve the source code, fork -> code -> pull request