Hide Your Sins: You're Setting an Example
Others follow your actions, realize it or not. When you chatter in class, your friends will feel like talking and ignoring the boring teacher. When you study hard and get high marks, these same friends will feel like becoming serious too.
So keep your sins under wraps. No human is an angel, but don't show off your mistakes either. A bad reputation doesn't only hurt you- it influences those around you to follow your mistakes too.
Allah covers your sins up to a point. There's the story of a thief who was caught and brought to Umar RA. The thief claimed this was his first time and should be forgiven, but Umar RA didn't believe him and said Allah doesn't expose first-time sinners. And he was right- the thief admitted later he had already stolen 20 times. So when we sin occasionally, worry about repenting more than being exposed.
Things are different, however, if you expose your sin when Allah has already covered it for you. With social media and our innate desire for attention, disclosing our sins is tempting indeed. Maybe you post on Facebook or Instagram: "I went to this cool nightclub in Kizilay". If your Muslim friends see this, forget what they think of you; upon seeing your significant sin, their own vices might call them a little stronger. "Hey, compared to night clubbing like Umar, looking at some pictures of women isn't so bad right?" Congratulations, you just inadvertently justified someone's sin.
If even peers can slip after you showed them your sins, think of those who look up to you! Think of their moral discipline after they've seen your vices! By exposing your sins, you might have dragged them to the pits and incurred the corresponding punishment on the Day of Judgment.
Moreover, a public sin is more difficult to get rid of than a private sin, first and foremost with Allah. Firstly, there's the matter of social feedback: by going clubbing, your fellow clubbers will befriend and likely invite you again while on the other hand, fellow Muslims will feel troubled to invite you to goodness. But if you had exposed the sin yourself, you betrayed Allah's Mercy. That will make repentance more difficult.
To conclude, don't tell the world when you sin, for usually Allah covers your mistakes. Of course, being troubled and confiding in someone trustworthy is very much acceptable. Just keep in mind how your public sins may influence others and potentially damn your eternal life.