I would place it in the middle somewhere so its organized.
I got the code from the StudioPress code snippets page here – http://my.studiopress.com/snippets/comments/#speak-your-mind …….there are plenty more tutorials, and code snippets under the “Resources” link in the navigation.