As for the guy's annoying laughter. Talk to him politely about it. I know that sometimes I've gotten a bit loud when I'm on hot on the track of debugging a difficult problem; I've sometimes shouted out "IT WORKS!!!" when I have finally found the solution. Some people politely pointed out to me that I needed to keep it down. I wasn't offended. Now I open my mouth widely as I smile in glee. But I only mouth the words, "It works!!!" so no one can actually hear me.
If he fails to tone it down after a couple of gentle reminders -- he might forget and "relapse" into his loud laughter a few times -- then you can quietly bring it up with his supervisor.
As for having nothing to do. Probably the guy's loud laughter is a lot more noticible when you are sitting there bored out of your mind.
I'm currently going through such a lull in work; our whole department is. We just sent a new release to our Quality Control Validation group and (because we did such a super job on it),

there have been hardly any problem records to fix. And the specs for the new project, which were supposed to be ready for us, aren't yet ready. So we're waiting.
I'm a permanent employee of a very stable government agency, so there's no question about layoffs; it's not going to happen. In fact, our agency has been trying to recruit more programmers. So there will be work coming down the pike, we won't have to worry about that.
My co-workers advised using this slow time to hone up on my skills. One of the things I did was to surf the net. Which we are allowed to do during work hours if what we're surfing for is work-related i.e. no Ebay or fantasy football or whatever. But stuff related to programming is OK, my supervisor told me. One of the things I found while surfing is this forum. I'm subscribed here and also in the forum connected to my main programming language (COBOL).
There are also a lot of other cool sites which involve COBOL and mainframe programming, offering tips. Plus I work on CICS and I discovered a very busy CICS email list to subscribe to.
I'm fairly new to this agency, so I've also used some of the slow time to study the agency's system and architecture.
If you like the company you are currently working for, when you are actually doing some work, then I wouldn't worry, especially if they want to extend your contract. Sooner or later, you'll have so much work, it will make your head spin.
Nina Too