Our noses are able to discern between a pleasant smell and a stinky smell, because of the spread out of molecules of those substances/smell. Heavier, more spread-out molecules smell stinkier than compact molecules. However, there are always exceptions to the rule but in general, a substance that has spread out molecules with light electron density, smell worse than a compact but lightweight molecule of another substance. The former strongly irritate mucous membranes of our nose, eyes and throat, stimulating pain sensors and making us jerk away from the smell. For example, caustic chemicals like ammonia, chlorine and acid vapours.