In one of the recentish Mac updates they added the feature from iOS where if you hit the spacebar twice in a row it will automatically add a period. On iOS I really like this feature, but on my Mac with a real keyboard it drives me crazy. I decided to do what all developers do and rant about it on Twitter and someone told me it’s in the settings. Doh!
To remove this open system preferences -> keyboard and just uncheck the option.
Love a nice and easy fix like this.