Let's look at a few chapters from Matthew (specifically 5-7). This is sometimes referred to as the Sermon on the Mount, from what I understand. In it, Jesus talks about many things, and to name a few of those things, prayer, giving to the poor, and doing works. Prayer, Jesus says, is to be done in a personal place, away from others. Not on street corners, because if you do it there, you get recognition from people. God recognizes what is done in secret as well as in public. Jesus says that giving to the poor should not be proclaimed, but done so secretly that one hand will not even know what the other hand is doing. When it comes to doing works/deeds, Jesus says that we (Christians/those who follow God and do His will) are the light of the earth, and to not hide our deeds. By letting others see our deeds, that will bring praise to God, which is a very good thing. Later on, Jesus talks about how you can recognize who is a false/true prophet by the things that that person does. He says you know a tree is an apple tree because you see apples on it. Likewise, you can see that a person is serving God if they do things that are in line with God's character. However, just after that, Jesus says that there will be people who, on the day of judgement, will proclaim the things they did 'in God's name' but who will be denied by Jesus because, "[He] never knew [them.]"
So I am sensing something of a tension...or at least something that I have not been taught before. Praying and giving are not deeds that should be seen by others. They should be done for God's glory, not public recognition. Yet Jesus still said that we are to show others who we serve. This is something I am still learning how to do.