Hot n Cold is featured in Perry 's second studio album .
The song was written by Perry , Dr. Luke and Max Martin and produced by Dr. Luke and Benny Blanco for her second studio album , One of the Boys ( 2008 ) .
Hot n Cold