Placing a comma after a conditional statement

I've always had difficulties in figuring out where commas should be placed. For example, in a phrase containing a conditional statement, how should I write...

  • If they don't arrive by noon, she'll be worried.
  • If they don't arrive by noon she'll be worried.

Solution 1:

So far as I understand it: if you are putting the conditional statement first, you should put the comma at the end of it. You don't need a comma if the conditional statement comes afterwards.

Treat the condition as the independent clause and the result as the dependent as Wikipedia describes.