My daily struggle as a parent, or just as a person, is not to respond in kind. I've always been prone to respond in kind, usually taking it up a notch, which isn't good. Just ask my mother. I don't think I ever tried to rein that in before becoming a parent, but I'm trying now. Of course, children are a good motivation for that, for I never want to hurt them at all.
I've always known that raising my voice or being snarky in response to someone else's raised voice or snark didn't help, but I also didn't try to stop myself. This becomes even more apparent when it's my son shouting at me. If I shout back, what does that accomplish? It only makes us both angrier, and greatly upsets him. However, if instead answer in a calm manner, the problem is resolved faster and more easily. I know this, and yet I still struggle with it. This is just one of many reasons why I need to go to Mass daily, to spend that time with God and receive the graces from being there (and even so, I too often don't open myself up to His grace and therefore still mess up royally). Since I'm far from perfect, I'll keep trying, and I'll keep apologising to my children whenever I raise my voice or otherwise mess up. Thankfully they're quick to forgive.