What movie has a protaganist say anyone can find answers the key is asking the right questions

The two leading men are childhood friends who grow up to be a cop and a criminal.

Another memorable statement is that you can only judge someone by the friends they chose you can’t judge them by the one they are attarcted to (fall in love with) (marry) that is like blaming a weathervane for pointing north…

Asked question