I have a problem with yelling, or at least using a very, very harsh voice, with my daughter in certain situations. She's almost 3, but as young as 2 when I'd spoken to her very harshly. I've felt very bad afterwards, and occasionally I find myself speaking with a harsher tone than I'd like. I know my father would used to yell very very harshly growing up, and (not using it as an excuse) I think I've picked up that trait. I'm trying to drop it, as it takes much effort since I seem to do it automatically without thinking.
I do give her a hug after any type of punishment, and make sure she understands why she went on time out (for example). Then I tell her I love her, and that I know she's a good girl, but if she wants to stay a good girl she needs to listen to mommy and daddy (for example).
They forgot to give me the parenting book when my children were born lol jk jk