My situation is a little different than most on here as I cross the border as a commercial vehicle. I am a Canadian citizen. In 2013 I crossed around 60 times at 9 different crossings. Alyways have you passport and paperwork (for the trailer i'm importing) ready, sounds silly but I never wear sunglasses or a hat. I always have my window down when I pull up to the booth with passport in hand. Never pass them your passport until they ask for it. While they are checking my documentation I keep my body pointed out the window with my hands where they can see them. Answer all questions politely with yes / no. The Canadian side has xrayed my truck 3 0r 4 times. The USA have xrayed me once and given me a complete vehicle search once.
98% of my crossings are problem free and under 30 seconds.