Why does Holmes thump his stick on the pavement in front of the pawnbrokers shop?
At the end of the story after the criminals have been arrested in the nick of time, Holmes explains to Watson why he tapped his stick on the pavement in front of the pawnbroker's shop:
"I [Sherlock Holmes] was ascertaining whether the cellar stretched out in front or behind."
John Clay alias Vincent Spaulding "the fourth smartest man in London" and a seasoned criminal - "murderer, thief, smasher and forger" - along with his accomplice plan to rob the Coburg Branch of the City and Suburban Bank which has in its cellars 30,000 napoleons or gold coins recently borrowed from France. John Clay's ingenious plan is to rob the gold by digging a tunnel starting from Jabez Wilson's pawn broker's shop to the cellar under the bank where the gold has been kept. All this is deduced correctly by Sherlock Holmes during his conversation with Jabez Wilson. Holmes deduces correctly that John Clay's plan was to dig the tunnel from Jabez Wilson's cellar to the bank's cellar, and so when he first visits Jabez Wilson's pawn broker's shop
"he walked slowly up the street, and then down again to the corner, still looking keenly at the houses. Finally he returned to the pawnbroker's, [Jabez Wilson's] and, having thumped vigorously upon the pavement with his stick two or three times, he went up to the door and knocked."
By doing so, Holmes discovers that the ground beneath is solid and that the tunnel cannot be located in front of the house because a hollow sound would have indicated the presence of a tunnel. He then goes behind the house and sees the bank across the street and realises that it is the target of John Clay's intended robbery. Thus Holmes taps vigorously the pavement in front of Jabez Wilson's shop to ascertain whether the tunnel stretched from behind or from front of the shop.