You have to pick your battles in life. Assuming the person is your friend and you have nothing to gain by belitting them/their brew (which many brewers consider to be the same), just pick out something very noticeable about the beer and focus on that.
"Wow, I'm really getting a malty character from this!"
"You can sure taste the hops!"
Or take a sip and just ask a question.
"What was your mash schedule?"
"What was the timing of your hop additions?"
There is generally nothing to be gained by insulting others' homebrew, especially your friends', and a lot to be gained by being gracious. If a person asks you directly what you think of it, follow the advice above and pick out something you like or at least that is noticeable about it. If they press you just say "I'm no beer judge."