I did a good bit when I was younger for kicking in some assholes door and beating him senseless. (He smacked my fiance in the face.)
I learned 3 things in prison, and if you remember them, it will save your ass.
1) Keep your fucking mouth shut. Speak when spoken too, and never be disrespectful. The only person you should be talking to about ANYTHING is your attorney, in a private room.
2) Never, ever gamble, on anything, even if its a SURE bet.
3) Never ever borrow anything, or buy anything on credit. EVER.
Best advice ever: Stay to yourself, dont make friends, Definatly dont make enemies, and try to read as much as possible. Reading keeps you educated, and its very nature tends to promote sitting down quietly somewhere and minding ones own buisness.
These 3 rules saved my life and my asshole on more than 1 occasion. These 3 rules apply from your initial bust all the way to your release date 5 years later.