The Perfect Logic

Three days of super sunny weather and two following rainy days;

A super cold morning and a sunny, shiny evening;

One normal morning and snow in the afternoon.

I was wondering what algorithm does the Washington-Weather-Lady use to determine what she is going to do next. Must be something crappy like this.

public JustVoid DetermineWeather(bool useCrappyWeather)
{

 //Lets do something different once in blue moon.
 bool onceInBlueMoon = false;
 
 int today = GetTodaysDate();

 //Set some defaults
 string morning = “Bad”;
 string afternoon = “Worse”;
 string evening = “Better than worse”;
 string night = “Worst”;

 string yesterday = “You Know it rained”;
 string today = “Only this logic knows”;
 string tomorrow = “You Never Know”;

 while(UntilDinosaursTakeOver)
 {

 if(!useCrappyWeather)
 {
         Print(“What were you thinking? This is Washington.”) 

        //Never mind what’s requested, it’s always crappy.
       useCrappyWeather = true;
 }

 //Lets fix blue moon
 //Some logic that almost always returns negative
 if(today == “End of the world”
       || today != “start of the year”
       || today == “Alien sighting day”
       || today == “Belongs to Cretaceous period?”
       || today != “holiday”)
 {
   onceInBlueMoon = true;   
 }

 //We never want the weather to be the same as yesterday’s.
 //Just pretend to reverse the weather (Business/Marketing idea to get more people live here)
 //Read Environmental (literally) variable
 yesterday = ReadEnvVar(“YESTERDAY”);//Worst average of yesterday’s

 switch(yesterday.ToDisgusting())
 {
            case “DISGUSTING”:
                    morning = “Just the same”;
                    break;

            case “CLOUDY”:
                    morning = “Keep it Rolling”;
                    break;

           case “Raining”:
                    morning = “Can we make it worse?”;
                    break;

          case “Sunny”:
                   morning = “You are just lying”;

  //Double check weather was good
  MessageBox.Show (“Was weather yesterday Sunny? Select an option”, “No”,”No”)
  
  if(LoadNewResponse() == “No”)
  {   
     morning = “I told you..”; 
  }
  else
  {
     //Something is really odd here.
     //Anyway, check for blue moon
       if(onceInBlueMoon)
      {
        morning = “OKAY. FINE. Enjoy while it lasts.. Grrrrr..”   
      }
     else
     {
      morning = “(Grinning)..Sorry folks…”;
     } 

  break;   

 case “Really Cant Say”:
          morning = “What makes you think you will have stable weather today?”;
        break;

 }

 //Alright, lets set the rest of the day

 if(morning ! = Sunny)
 {
        afternoon = Aggravate(morning);
        evening = MakeWorse(afternoon);
        night = JustGoToBedWhyDoYouCare(“never mind”);
 }
 {
    for (today = 0; today < next 10 days; today ++)
    {
          Apply(“Its pay back time”);         
    }
 }

 //we are almost done. Lets calculate the average of today and set the environmental variable
 yesterday = GetWorseOfToday();
 
 //There is nothing fair in this world my dear..Just reset
 yesterday = “Super crappy”; //enjoy….          
 }

}

Advertisements

6 thoughts on “The Perfect Logic

  1. Haha 🙂 🙂

    That was really geeeky!! Do you not do enough coding at work to get bored of this stuff.. or are you one of those who actually enjoy what they do 😛

    1. Thanks Piyu..I guess I have to say its the second one..Just got so used to it. that expressing in the syntax seems easier than in words…omg…what has this s/w done to me? 🙂

  2. Hilarious and ingenious! Loved it 🙂 And you work in MS! I bow to thee. It’s a dream to me. Oh and the header image is awesome!
    PS: why don’t you leave a link? It’d be easier to get to your space 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s