Today's Question:  What does your personal desk look like?        GIVE A SHOUT

Programmer's Mother's Day

  sonic0002        2013-05-12 01:10:15       3,737        1    

Mother's Day is a celebration honoring mothers and motherhood, maternal bonds, and the influence of mothers in society. It is celebrated on various days in many parts of the world, most commonly in March or May.

Mothers usually receive gifts on this day.Carnation is dedicated to be mother's flower. As a special group of people - programmers, our way of expression will naturally have our own characteristics. We can write programs to express our love to our mothers. Here is a Chinese programmer wrote to his mother:

 public class MothersDayFromCodeMonkeyView
  {
    public MothersDayFromCodeMonkeyView()
    {
        int age=0; //When we were born
        saying="crying"; //The first thing we did was crying. You might not.:)
         while(true)
        {
           try
           {
              Thread.sleep(365*24*60*60*1000L);
           }
           catch (InterruptedException e)
           {
              break; //You knew this, right?
           }
           age++; //While we grow up
           switch(age)
           {
              case 3:
                saying = "Mom,I love you";
                break;
              case 10:
                 saying = "Mom, you are right";
                 break;
              case 16:
                 saying = "My mom is annoying";
                 break;
              case 18:
                 saying = "I want to leave home";
                 break;
              case 25:
                 saying = "Mom, you were right";
                 break;
              case 30:
                 saying = "I want to go back to my Mom's house";
                 break;
              case 50:
                 saying = "I don't want to lose my Mom";
                 break;
              case unknownAge:
                 saying = "I can give up everything if my Mom is still alive";
                 break;
              default:
                 saying = youDefineIt();
                 break;
           }
        }
         new Thread(){public void run()
        {
          while(isPeopleStillLive())
          {
             saying = "Every one has only one Mom. Please cherish the time spent with your Mom!";
          }
       } }.start();
   }
    public boolean isPeopleStillLive()
   {
      return true || false; 
   }
    public String youDefineIt()
   {
    StringBuffer result = new StringBuffer();
    result.append("......");
    result.append("......");
    result.append("......");
    result.append("......");
   return result.toString();
   }
    private static final int unknownAge = 70; //The average is 70, hope it is 100
   private String saying ="";
    public static void main(String[] args)
   {
       new MothersDayFromCodeMonkeyView();
   }
}

What gift have you prepared for your mom?

Source : http://blog.jobbole.com/762/

Share on Facebook  Share on Twitter  Share on Weibo  Share on Reddit 

  RELATED


No related articles

  1 COMMENT


Anonymous [Reply]@ 2016-05-06 17:59:55

This one is kind of too depressing for Mother's Day though. A lot of stuff about death and dying :/