I agree it is a poor design, but I think it is clever. Probably "gud enuf" to secure an interior door from casual attack if used in conjunction with an alarm that detects unauthorized access attempts. Everyone knows that locks only keep honest people out. A dishonest person with determination can breach virtually any lock, unless apprehended while attempting to do so.
As for switch bounce, the first "legal" transition that results in a valid clock pulse will advance the counter and remove the voltage to the switch. Who cares if the switch contacts bounce after that? As far as programming different "passwords" is concerned, this could be easily accommodated by using a patch board with movable jumper wires. Yeah, a PITA, but doable. For a DIY lock, this one definitely wins for simplicity. For security... not so much.
In the Department of Defense there are multiple levels of entrance security, ranging from a keyed lock and a
cipher lock with mechanical push-buttons that can be programmed to require the same button to be pressed more than once, or two buttons to be pressed simultaneously, typically with only five buttons on the lock. A step up from that is a shielded from easy "peek viewing" box with five bi-directional rocker switches. You place your hand in the box and operate the switches with your fingers, usually by "feel" since these are usually interior entrance lock with high traffic. And it goes on up in complexity from there.
At one facility I visited (a jet engine test cell) one internal entrance door had a 3 x 4 square array of illuminated characters that you looked at to determine which of twelve unlabeled push-button switches to push. The characters, digits
0 through
9 and
# and
*, were presented at random positions in the array for each entry attempt. To operate the lock, you looked at the display and found the positions of your "password" characters, then entered those on the blank keypad in the same positions. Anyone looking over your shoulder wouldn't have a clue as to which characters you were looking for on the visible display, so when you pressed those character positions on the keypad they wouldn't learn anything, even if they memorized the exact position and sequence of key presses. The characters were scrambled on the display with each new attempt.
Of course a very capable person could memorize both the character positions on the display AND the blank keyboard button press sequence to reconstruct the passcode. To prevent this from happening the characters were "hidden" behind an array of boxes that required close viewing through the depth of the boxes to see the characters. It was impossible to see the characters unless your head was positioned right up against the head of whomever was operating the lock. Good luck getting away with that!
What I liked about this system was its versatility. Everyone who was authorized entry would have their own separate pass code, so the PC controlling this contraption could log who and when they entered. And of course the pass codes could be changed as often as necessary. An excellent example of an embedded PC by someone with waaay too much time on their hands. Our tax dollars at work. Of course they may have purchased this system off-the-shelf, but it would be easy to replicate it at home for better than average entrance security.
All good entrance security systems use a challenge/response system. The best put a human being in this loop. The very best require the person seeking entry to be personally known to the human being challenging them. In one facility for which I was granted access, the challenge occurred after I entered a vestibule with two glass doors. The first door I entered opened easily and locked behind me. Using either door to exit the vestibule required an unseen observer to press a button to unlock one of the doors. I presented my credentials through a slot for scanning, all while being observed by closed-circuit TV cameras. If everything checked out, the credentials were returned to me and the second door was unlocked. I never had to find out what would happen if I failed this entry authorization test, but the corridors outside the first entrance door had numerous armed personnel responsible for building security. Whoever designed this system was really serious about keeping interlopers out.
So, yeah, go ahead and build this thing and play with it, but don't for one minute believe it will "secure" anything. It's a clever toy designed for amusement only. No gambling permitted.