At one outfit where I was a programmer we did a peer review on any major projects. This had two objectives - to familiarize the other programmers with the code and to sort out any glaring deficiencies.
As a programmer, I tended to be creative - but not always efficient. My stuff worked, but in a couple of cases is was made to work better with some suggestion. Talk to your friend. Tell him you looked over the code. Ask why he prefers this method over that method. Don't come off as judgmental but instead as interested in the approach to the solution.