The ß / ss in German follows a comperatively simple rule nowadays:
ß is written after a long vowel. Example: Straße
ss is written after a short vowel or vowel-combi. Example: Fluss
The old rule was more complicated:
ß if pronounced really sharp and always when a consonant follows. Examples: naß, häßlich.
ss if pronounced softer and when a vowel follows. Examples: Nuss, Flüsse. (exception: when a long vowel goes before the ß it stays: Straße, Muße)
How new is this rule? In my German class in high school, we used ss and ß interchangeably, but mostly ss because most of the kids didn't know how to access other characters on their computers (same in French class, print it out and write the accents on in pen). In retrospect I have some doubts about the competence of that particular teacher. She's pretty much driven the program into the ground the last 15 years.