I am building a recommendation engine and trying to overcome the new user problem. I want to ask new users to rate a select number of items then find out what other users they are most similar to. Then by use the data from the similar users to generate the initial recommendations.

I am not certain how to do this as I have previously worked on item-to-item recommendations. Does anyone have an example of this? Either some pseudo-code or an implementation in any language (preferably not a functional language). 

I think I am looking for a user based nearest neighbour algorithm but not sure.

Thanks in advance