程序员眼中的人生旅途

  人生的旅途像一个树模型, 我们时时刻刻都面临着选择, 即每个选择点都有n个分支;但是人生的旅途更像一个有着拓扑结构的图模型,起点是我们诞生的时刻,而终点就是我们离开之时。旅途之中,我们都有着自己的算法思想,去计算自己的得失;古往今来,有些人致力于寻找到达终点的最长路径(他们想着长寿,甚至长身不老。。。很可惜,寻找最长路径是NP难问题);有些人致力于寻找到达某个点的最短路径(寻求成功的捷径,也许有吧。。。但一般是有经验的老者,在回首往事之时发现的东东)。在面临人生的各种选择时,更多的人乐意(或许是自觉不自觉的)选择了贪心思想, 贪婪的选择目前给自己带来最大的名与利的路径,而忽略了以后的得与失;但是也有很多人有着动态规划的思想,他们能动态的规划自己的人生,做出正确的选择。然而,人生不是一道算法题,人生的旅途也不是一个拓扑结构图,无法预先知道任何一条路径的得与失。有时也许贪心更适合我们,这种思想单纯直接,即便是凸显了人性的弱点,但是我们能很快的明确自己的目标,有的放矢;然而,有时我们真应该静下心来冥想,去审视自己目前所追逐的目标,衡量一个得与失,动态的去选择正确的目标,以免到最后把自己伤的体无完肤。这里添上一首经典的英文诗歌,朴实的词句道出了人生的真谛

                     The  Road  Not   Taken

    Two roads diverged in a yellow wood,

           And sorry I could not travel both

           And be one traveler, long I stood

           And looked down one as far as I could

           To where it bent in the undergrowth;

 

           Then took the other, as just as fair,

           And having perhaps the better claim,

           Because it was grassy and wanted wear;

           Though as for that the passing there

           Had worn them really about the same,

 

           And both that morning equally lay

           In leaves no step had trodden black.

           Oh, I kept the first for another day!

           Yet knowing how way leads on to way,

           I doubt if I should ever come back.

 

           I shall be telling this with a sigh

           Somewhere ages and ages hence:

           Two roads diverged in a wood, and I—

           I took the ones less traveled by,

          And that has made all the difference.

       尤其是最后一句,I took the ones less traveled by,And that has made all the difference,坚信自己的选择能使自己与众不同。

原文地址:https://www.cnblogs.com/Happyhe/p/3107095.html