No reconnection to the cloud after sleep

One of the attractions of programming is that it’s not like baking a souffle - sometimes it rises and sometimes it flops and you don’t know why. I cannot believe that programming the Spark Core should be as flaky as you experience. Oh, and you’re not alone, of course. But I am not having to program in quite the round-the-houses style you seem to need to.

So, as a first step, how is it supposed to work? That’s when I refer to the documentation. Others, of course, refer to the underlying code.

How about, instead of the definitive docs, some sample programs written by those in the know, that do simple stuff tasks which just work and which, should they not work, would demonstrate a bug? E.g. (a) how is one supposed to bring up the Cloud in MANUAL mode? (b) How is one supposed to turn off the WiFi? © And resurrect it? More generally (d) Is one supposed to wait a while or test after these calls, or do the provided calls do what they say they do, blocking until the task is complete?

I am hoping the answers are (a) Spark.connect(), (b) WiFi.off() and © Wifi.connect(). And (d) something definitive.