Tough question to frame ;) .. but I have a situation that plays out often: firing up the laptop (latest MacBook 15") at Starbucks will often never connect unless I restart the entire box. This tells me there is something amiss somewhere, to which I have no clue. I run nothing out of the ordinary and see no pattern.
I wondered if there was a terminal command that could somehow "reset" network settings. The Wi-Fi is seen properly, and attempts the connection but sits and sits and sits. It eventually connects but it is far faster to restart.
Tough one perhaps, just thought to ask.. thx..