The people behind the trick
On a film set the script supervisor keeps a notebook of every take: which hand held the cup, how full the glass was, which way the scarf was tied, so the shots match when they are cut together. Editors still catch the slips they miss.