50mm f1.8 or 35mm f1.8?

I have a nikon d3100 with kit lens, i want to buy a lens with large aperture but i'm stuck between 50mn f1.8 or 35mm f1.8, i don't shoot anything in particular and can you explain what these 2 lences are good for shooting?

35mm f1.8

A 50mm lens is standard and considered 1x zoom, and has no depth distortion. A 35mm lens is slightly wider, giving a 0.7x zoom, with basically minimal depth distortion. It would allow you to fit more in a shot where you can't step back.

For generic low light and shallow depth of field use, the 35mm/1.8 lens is a good choice. It's too short for portraits though, that's where one would use a 50mm or longer one.
Be aware that the 50mm/1.8D lens will not autofocus on your D3100!
For a lens to autofocus, you need a AF-S one, or a third party counterpart thereof (such as HSM in case of Sigma). The 35mm/1.8G is a AF-S lens. The 50mm/1.8D is not, it's only an AF lens. You'd have to get the much more expensive 50mm/1.4G AF-S to have a 50mm one that autofocuses on your camera. Be careful, there's also a 50mm/1.4D AF that won't autofocus.
Edit:
Unfrozen caveman is correct and yet mistaken. 50mm would be considered normal view on full frame or film cameras, but not on crop frame ones as yours is. There 35mm is considered "normal" view, due to the crop factor of 1.5.

On a 35mm film camera or full frame DSLR a 50mm lens is considered a "normal" lens since its angle of view approximates that of the human eye. For portraits when using a 35mm film camera or full frame DSLR a focal length of between 85mm to 105mm is considered a good portrait lens. On a 1.5x "cropped sensor" DSLR like your D3100 the 50mm lens has the angle of view that a 75mm lens would on a 35mm film camera or full frame DSLR which makes the 50mm lens a good choice for portraits. The 50mm f1.8 is also useful in low-light situations where you don't want to use the flash.
On a 35mm film camera or full frame DSLR a 35mm lens is a moderate wide angle. On your D3100 with its 1.5x "cropped sensor" a 35mm lens has the angle of view that a 52.5mm lens would have on a 35mm film camera or full frame DSLR which makes the 35mm a "normal" lens on your D3100 just as the 50mm lens was considered a "normal" lens on the 35mm film camera or full frame DSLR. The 35mm f1.8 is also useful in low-light situations where you don't want to use the flash.
Unfortunately, because Nikon didn't put a focusing motor in the body of your D3100 and since the Nikon AF 50mm f1.8 lens doesn't have a focusing motor the AF 50mm f1.8 won't auto focus on your D3100. If you want a 50mm lens that will auto focus on your D3100 instead of paying a mere $120.00 for the AF 50mm f1.8 you'll have to pay $435.00 and buy the Nikon AF-S 50mm f1.4 lens.
The Nikon AF-S 35mm f1.8 lens will auto focus on your D3100 since the lens has a focusing motor.

Because you have a cropped sensor on your d3100, I would suggest the 35mm. This is because a 35mm lens on a cropped sensor is more like a 50mm lens on a full frame dslr. A 50mm lens on your camera is like a 70mm lens on a full frame dslr. The 35mm is more of a general purpose lens. Your best bet is yto go to a camera store and try out both lenses on your camera and see which oneyou like best.
- Nikkor 50mm AF-S 50mm f/1.4G or AF 50mm f/1.8G?
- Why would I choose Nikon 17-35mm over the Nikon 16-35mm, or vice-versa?
- Why is the Nikkor 35mm f/1.4 way, way bigger than the Nikkor 35mm f/1.8 (DX)?
- Why is the Nikkor 35mm f/1.4 Way more expensive than the Nikkor 35mm f/1.8?
- Why is the nikkor 35mm f/2D more expensive than the nikkor 35mm f/1.8G?