手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表全部文章

第一次打屁股

其实也不算是什么大事,但还是狠狠的打了几下屁股
先是在娱乐的时候抽了他老妈一巴掌,和他说了,请道歉。结果死不认错,因为不涉及我,而且挨打的人也没有强烈要求,所以先忍着了。
然后要求妈妈陪睡、外婆陪睡,告诉他需要一个人睡(以前也有一个人睡的情况),不听。
在床上翻来覆去,不睡,然后突然从床上站起来,在床上直接开门,差点摔下床。经教育不听。。
最后说了几句很纠结的话:我一定要XXX,我就是要XXX。屡次教育不听,好说歹说不听,最终忍无可忍,抽了几屁股。

外婆看不下去了。然后就过来陪他睡了。这点非常不爽,以前每次都是这样。一旦说教开始了,他总会拉上外公外婆。
------
这是第一次打,实在不想打的。没办法,现在越来越放肆了。出去的时候,看到长辈不叫人;到人家家里玩的时候,如果对方有阻止的行为,居然还敢用脚踢;等等等等。虽然都不是大毛病,但终究不是好事。所以,偶尔打一下还是必须的。
------
顺便说一下,前天看电影的事情
手机上买了三张电影票,我爱灰太狼。。。我晶啊。海报上都是动画片,结果一看居然是真人版的。。。
电影院这玩意,还真不能深究啊。影院外面看上去不错,结果,因为找不到位置,打开电筒,靠,这个位子上。。全是斑斑点点。好象是以前的装修污渍。。。。实在受不了

这个要转:酒精能让IT公司更富有创造力吗?

这个文章一定要转啊,难得说有推荐喝酒的文章。当然也只是说说了,毕竟真的在公司里喝酒,恐怕是任何公司都不能接受的吧?
不过。我还是要转一下下哦。我总认为写程序的时候喝少量的酒,可以使得人从单核 变双核。哈哈。在非IT公司,是坚决不能接受喝酒的吧?
原文这么说:

在硅谷这个云集了各大IT公司和IT精英的地方,似乎对酗酒这一行为不会表现出特别反感的情绪。虽然的确是有一小群人认为酒精就是将人拖入 黑暗边缘的邪恶之液。《经济学家》杂志就指出也许我们会在周末喝醉,但那完全没关系。但是现在似乎这样的情况越来越多都是发生在我们的商务时间。另外, 《消费者心理学》也曾指出如果一位政要候选人如果在一个晚宴采访中喝酒,那么人们就会认为他没有另外一个候选人睿智。
不过,有些人认为适度饮酒可以舒缓精神上的压力。对于笔者我来说,一点Saracina的黑皮诺或者是一小杯Idle Cellars的2008解百纳可以让我能够清除掉一些障碍,从而重新理清我的思路。

不过,这种情况还是需要科学理论来支持。

近日,一篇来自《意识与认知》的一篇论文中解释了为什么酒精可以让人们的精神可以得到舒缓的原因。在文中,研究人员将研究对象对位中毒酒精中毒的人群-- 酒精在血液中的含量0.075mg/mL/h。在研究过程中,被研究对象接受了远程合作测试,从而检测出他们是否能够在解决问题的时候表现出一定的创造 性。而研究最终得出的结论是醉酒程度越轻的人则在同样的时间内解决的问题越多、越快。当被问及他们是怎么想到问题解决方法的时候,他们纷纷表示当时就是有 一种灵光乍现的感觉。

也许,在硅谷的产生的好想法也都是在这样的情况下产生的。
---EOF---
原文来自:http://www.cnbeta.com/articles/201130.htm,你如果是老板,你会怎么样?偶尔可以还是一直可以?你会提供酒吗?黑黑

儿童博物馆

昨天带小朋友去逛儿童博物馆了。本以为是一个相对较大的地方,结果,原来只有很小的两层楼。在这两层楼里有三四个方面的知识点:航海、航空、信息、视听(娱乐例外)

航海,介绍了一些船只,还有一个小潜艇可以爬,嗯,还有一个造浪机+一个灯塔+吊着的几条鱼的模型。
造浪机就是让你拼命的转一个小转轮来形成大浪,将船打翻。其他就没啥了。在船只介绍的地方有一个电视机不停的在详解各种船只,只是小孩子们都没有兴趣 坐下来看,反而是和我老婆两个人在那里看了半天。。。

航空,有一些拼图,能够拼出卫星、地球等,还有一些火箭的模型等。最后还看了一下模拟卫星发射,以及月球表面的体验,月球那个屋里好象有荧光哦。所以我的 裤子就会发光了。哈,有意思,不过小朋友还是觉得没劲。不过在下午看了360度的屋顶投影的电影。只有20分钟。。反而他倒是过瘾了

大小: 156.35 K
尺寸: 282 x 376
浏览: 2019 次
点击打开新窗口浏览全图
大小: 115.55 K
尺寸: 282 x 376
浏览: 2037 次
点击打开新窗口浏览全图

信息区,这里才是比较有劲的地方,小朋友在一台小电脑里画了画,然后就成为101010到墙壁上。只要挡住这些10101,图片就会显示出来。肖佑阳是玩 的乐此不彼;再走过去就是一些节能的介绍(有小游戏);还有地球 污染的介绍(同样是小游戏);还有捡垃圾的小游戏 。小朋友也是玩的很开心

视听区:有电影可看,上午是飞屋环游记(英文的。。。。),下午是大闹天宫,看了一小会,觉得没劲。。旁边倒是有不少小人书,过去一看,全是200x年出的书,害我激动一下,以为是旧书呢。。
大小: 121.17 K
尺寸: 282 x 376
浏览: 1868 次
点击打开新窗口浏览全图
娱乐区就不玩了,无非就是一些过家家的游戏,小朋友对这几乎没啥兴趣。
大小: 109.13 K
尺寸: 282 x 376
浏览: 2027 次
点击打开新窗口浏览全图

TextMate高端黑引发开源“圣战”????

前两天好象听说。textmate 开源了?不知道是否听错,但传闻是在st(sublime Text2)的压力下开源的。。。(没有亲见,只是听闻而已)
结果又在cnbeta上看到标题所在的新闻了。。。
cnbeta上这么写着:

感谢中国 Linux 公社的投递
最近,一位 ID 为 ieure 的用户在文本编辑器 TextMate 的 GitHub 上提交了一个 patch,号称“修复了许多 bug”。在描述中,他说自己尝试使用 TextMate2,但是遇到了很多不可接受的错误。于是他制作了这个可以解决一切问题的 patch。

但这个 patch 的改动量实在是太大了,大到令人怀疑:算下来这个 patch 一共执行了几百万次代码改动。果然,这是一个来自高端黑 Emaser 的作品:这个 patch 会把 TextMate 删除干净之后安装上 Emacs.

于是这 patch 自然又是引起了一次已经让大家习以为常的“圣战”,Vim 用户也积极插上来一脚责问作者为什么不把它换成 Vim。但亮点根本不在于这场圣战本身,而是在于围观群众。

大量的中文用户观光团(包括但不限于豆瓣、煎蛋)跑到了这页面下面围观并留下脚印。现在,这个页面上绝大多数的留言都是中文的,内容也大多都是“XX观光团”。这还真是一则相当不错的黑色幽默呢。

截至发稿时,这个页面已经基本被中文回复占领,用户大多是来自豆瓣/人人/新浪微博/煎蛋的围观群众。

围观地址:GitHub

---EOF--
果然看到了很多类似“<豆瓣观光团> ”这样的内容。。。。中国人真多,这是我的感慨 .其他没了。

PHPer下一步应该学go?

其实看到现在,很多人都在推荐go语言,理由有很多种,但对于PHPer来说,不一定就是适合的。go是google推出的语言,到现在为止也已经有很长时间了,再加上go又能底层,又能WEB,所以。。。
但是,究竟应该不应该学,还是会有点想法,所以看到这篇全英文的介绍的时候就蛋定不了了。
原文是来自于:Why you PHP guys should learn Golang

Go or Golang, is a open source, community supported, fast, consistent, scalable, productive language, and conceived by Google. More and more applications were build with it. Although Rob Pike has said that “… we expected C++ programmers to see Go as an alternative …”, but I really think of that: You PHP guys should learn Golang! Let’s talk about WHY.

 

Easy to learn

PHP is easy to learn. Golang is as easy as PHP!

The syntax of PHP is similar to C family’s programming languages(C/C++/Java etc.). If you have some experiences with those languages, it is not too hard to write some codes when you first met PHP.

Golang is also a C family’s programming language. Eh… with a litte syntax difference. For example, the keyword “for” is similar with PHP’s, but without the pair of parentheses. And the condition keyword “if” is without the pair of parentheses either. You can read Effective Go for more things.

Golang has only 30 keywords and 47 operators, delimiters or other special tokens. There is no need to work hard for remembering all the literals. The type system is exquisite and easy to use. No huge OO but a practical struct type with methods on it. The interface design is one of my favorate parts of Golang. When you have finished this A Tour of Go, based on your PHP experiences, some jobs could be done with Golang immediately.

Easy to Use

Your PHP scripts will be evaluated by SAPI components: web server module, PHP-fpm or CLI. All needed for PHP deploying is a SAPI environment. Deployment of the environment is the most difficult part to understand for a PHP beginner.

All the Golang’s codes will be compiled and linked into native code. So there is no need to deploy a environment for it executing but a build environment. Compaire with deployment of the PHP environment, it is not so much complex. Do you really think of the deployment of the PHP environment is really complex? I don’t think so. Really!

To deploy the build environment, just need 3 steps:

  • Download Golang‘s source code.
  • Setup the environment variables. Here’s a great blog post: Go environment setup
  • Run the ‘all.bash’ in the ‘src’ directory.

Or only one step: Use the binary package to setup.

Then a toolset called “go” can be used. Using the go tool is as easy as using PHP’s CLI tool. “The Go Tool” has already explained it.

A myth of PHP

If a programming language is easy to learn and use, shall we learn and use it? Lots of programming languages are easy to learning and use. Shall we learn and use all of them? The answer is straightforward: NO!

But why you PHP guys should learn Golang? Just because it is cool! Ja, I’m kidding, but it is true. Anyway, let’s talk about PHP itself first.

PHP is “a general-purpose server-side scripting language originally designed for Web development to produce dynamic Web pages.(Wikipedia)”. The most important feature of PHP is embedding with HTML. PHP code write in “<?php … ?>” tag; HTML write outside. It also has a powerful extension system. The extension can be writen by C with Zend API. Data processing was actually done by those extensions. IMO, PHP must be the best template programming language.

But if you have years experiences with PHP and began face to some complex web application. You must have already felt some powerlessness to PHP. It dosen’t have concurrent mechanism build-in, no threads, multiprocessing or X-routines. A slow data source will be blocked entire page’s processing. A powerful web server in the front of PHP is always needed. Backend programes were writen to process data. Message Queue, Cache, Proxy … The system is not only about PHP, but also about a lot of services and system components. This time, PHP is really be a template language with few logical jobs.

PHPers are always looking for solutions, like “PHP multithread” or a concurrent RPC framework for PHP. I could not say witch one is better. But I’m sure that you must choose an other programming language for the backend job. In my own case, I tried C(struggle with malloc/free)/Java(stumble in the jar hell)/Python(never be pythonic but type lost)..If I get profermance, I must struggle with the memory management; If I use GC, I must deploy and turning VM; If I get convenient, careless would kill me….Eche has advantages, each also has a problem.

OK! Let’s back to Golang now!

Golang has GC, there is no need to care about memory management(or could pay less attention to it). And the code are compiled into native machine code. So, “cp” and “mv” are all needed for deploying the application writen by Golang. Oh, as I just said, Golang is a compiled language with a static type system. You have no chance to confuse veriable types. Of course, one of the most important thing is PHPer who moves to Golang “don’t have to surrender much expressiveness, but gain performance and get to play with concurrency(by Rob Pike)”. “Why Not Go?” talked about this deeply.

I would show parts of my own experience: a Gearman worker works for us to process backend data. PHP connected to the worker though Gearman Job Server with its Gearman API. The original worker was writen by python. There are lots of problems with that version(They are our own problems, but python’s). But it works for us. Then we rewrite the worker with Golang. It was amazing. I wrote a Gearman API for Golang, and a Golang package using Zend API(cgo is another amazing thing) for evaluating the PHP script in Golang. Then combined them together – A Gearman worker witch can execute PHP scripts. It works about 3 mounth in our production enverionment and looks great! Oh, I also wrote a RPC-combinator for combining the RPC call in PHP script. It will be used in our next product.

Everything goes right. Thanks Golang!

In any case, most of PHPers alwasy need to learn other languages for the backend development. If you have began looking for, or already tasted some of other languages. Why don’t you try Golang? It would make your life happy and easy. You could spend more time with your family and friends, eat your favorite foods and visit the places you love.

That’s why you PHP guys should learn Golang! Is it enough? I think so!

This is my writing exercise. If you find any grammatical or spelling error, plz tell me!

---EOF---

其实我也挺纠结的,要知道当时我刚跟着tour做了30多篇的时候,突然golang的网页就再也打不开了。再苦了,墙就是我们学习的最大障碍。想想这些年我们遇到了什么。。
sf.net被墙
groups.google.com被墙
python.org被墙
很多。。。。。这些都是我们的障碍啊