@modernserf @steveklabnik tapl is the best I know for this (though it does require learning to read inference rules). the reason it's pretty good is because (roughly) every second chapter implements the one before it so you can see the inference rules map to code and work it out that way if you prefer.
@__anp__ yes the other lock pictured definitely was. it was funny because this is just a random fence in the rose garden, not a bridge or anything. those locks will not last lol