Why shouldnt people in glass houses throw stones?

explain this thing to me, I always thought it was because if your in your house of glass, and you throw a stone at someone you see through the glass, the glass will break. Is that it?