转载须知:个人博客随意,记得署名.商用及大中型网站联系我先sodya#qq.com,否则小心"上榜"


加精博文?

昨晚的火柴人最后踩到了LOL的图标,LOL是国外的游戏,腾讯代理,这类注重鼠标的游戏我是玩不来了,亏我前些天还发现的冰封王座,游戏什么的还是在xp下玩好了,linux有方块,扫雷,坦克

PHP Objects, Patterns and Practice, Third Edition.pdf

That’s what this book is really about. It’s about taking an idea and shaping it, and the pleasure to be found in the process. It’s about the shapes of a system in your imagination, and the satisfaction when these shapes are expressed in code. And then again when the system actually works. It’s about the freedom that tests give you to take risks, and the risks that your imagination inspires you to take. It’s the moment that something you wrote becomes real in the eyes of another

Exception 为什么要内置一个Exception:

  1. 出错的难免也是常有的事
  2. 既然出错的就要处理,直接让程序狗带是粗暴的(我喜欢)
  3. 是出错的地方的代码处理呢还是请求的代码处理:我调用一个有可能出错的方法,是我还是那个方法来处理错误,当然是我啦,那个方法只要把相关出错信息给我,让我决定就行了.比如我调用”求美女”的方法,我要求”1女的2漂亮的”,它给我返回”女的有漂亮呢就不保证,还要不要”,我决定”只要能陪我打坦克大战,不太漂亮的也行!”,”颜值75,没钱没背景有爱好爱学习没人要”,”好,就这个我要了!”

php late binding(static)

类的静态方法返回此类的实例(比如单例模式),return self();如果类是继承的,那这个父类的self在子类继承后,self是指向父类还是子类,答:父类, 这样不是我们通常希望的,不然子类继承没有扩展的空间啊,所以要用到后期绑定(late binding),return static();这样就绑定到子类了

这句话从此贯穿了Ross的剩下部分。“Why don’t you put it on your answering machine?”哈哈哈



There are no comments on this post.