First I understand they created a program that allows to list directories and output them in a format easily reused in other programs.
But I have questions : 1) What is sham ? 2) Is LSD better than ls ? 3) What is afind ? 4) How is LSD related to code-generation ? 5) Why are we compiling search directives instead of using find directly ? Only for a programming challenge ? If only the output format of LSD is what we want, why not piping find result into LSD ?
All in all, it's not uninteresting but it's missing some key informations to ease the understanding.