Coffeehouse Post

Single Post Permalink

View Thread: Instructions...
  • User profile image
    Rossj

    asqui wrote:

    Plug in the sandwich maker and observe the green light once it has reached a steady-state. Wait until the state of the green light changes (approx. 4-5 minutes). The machine has now reached the correct temperature.

    Here:

    sandwichMaker.plugIn(ringMains.getNearestFreeSocket(sandwichMaker.location));
    assert(sandwichMaker.redLight.state == true);
    bool greenLightState = sandwichMaker.greenLight.state;
    while (sandwichMaker.greenLight.state == greenLightState) {};

    // the machine has now reached the correct temperature.



    Reminds me of the joke :  How do you keep a programmer busy in the bath? Give him some shampoo - lather, rinse, repeat.  At least I thought it was funny.