Archive for September, 2008
手机
Saturday, September 27th, 2008 | 有说有笑 | No Comments
诺基亚的手机哪里都好,就是一点不好,太坚固了,怎么折磨它都不坏。没辙,只好旧的没去,准备新的了。老手机用了这些年,再一头扎进现在的手机市场里,有些刘姥姥进大观园,看得眼花。
最头疼的是水货和行货,这一对“宝货”。水货便宜,但售后和质量叫人不敢放心。行货有保障,但是那个价格,在你看了水货的价格之后,就感觉很水,心里别扭。同样的机子,渠道不同,关税一加,价格直线上去。
水货在网上很泛滥,无论价格和图文宣传都非常有诱惑力。很容易叫人心动,但同时也问号多多。我总是怀疑,这样的低价,商家还怎么赚钱?是不是传说的中精仿山寨机?比如这个港版的iphone。
行货很正儿八经地躺在货架上,一副死猪不怕开水烫的样子。老娘就这价,你看着办吧。
是花钱买个安心呢?在中国,买安心是最贵的。还是图个便宜,买一个冒险?多普达的P660不错,只是不支持wifi,其他都满意。S600也挺酷,据说支持wifi,但是欧版和亚太版的价格有些差距,水货这里头还真搞。
金融危机还是金融阴谋?
Thursday, September 25th, 2008 | 有说有笑 | No Comments
先看这里:
官方已披露的数据显示,截至2008年6月底,中国外汇储备总额已达1.81万亿美元,美国债券在其中占据半壁江山,达9220亿美元。而在这些美国债券中,美国国债与“两房”为代表的美国政府相关企业(GSE)债券,各有约5000亿美元和3400亿美元。
再看这里:
9月23日,美联储与美国财政部联手抛出的7000亿美元华尔街拯救方案提交国会审议,在国会山的参议院辩论中,民主党尽管提出反对意见,但已仅限于救助 的对象如何扩大至购房者债务等方面。而作为救助资金的来源,美国财政部已经提请国会批准将美国国债的发行额度上限从10.6万亿美元提升到11.3万亿美 元。
是不是说?
当美元这么一贬值,中国人民这么多年来辛苦积累的这些外汇储备都将成为一张废纸?
面试
Thursday, September 25th, 2008 | 有说有笑 | No Comments
第一次做面试官,坐在桌子的另一边。对面坐着自信满满(至少装得)的应聘者,我走进会议室的那一刻,是否决定着他人生中这一次的选择呢?第一次有主宰者的幻觉。
86年的他已经毕业1年,在一家小网站做过,自己又出来创业半年,做企业营销咨询。来自江西,毕业于东华的他,是年轻而又有活力的。面对漫长的职业生涯,处于起跑阶段的他,脸上写满了期待和热忱。
先是简单的自我介绍,而后就他有限的工作经历做了提问。唯一的缺点是自顾自说得太多,有些话不够关键,离主题太远。我想起当初我面试的经历,人在微微紧张,又想充分表现自己的时候,嘴巴不太容易合拢。
其实问题的关键还在于他对应聘岗位的陌生,有一些小经验就当莫大的收获,谈来虽然畅快,但缺少主心骨和核心竞争力。
他是个专业的面试者,可惜遇到我这个不太热的面试官,不来电,或者说没有交互的对话,让他的这次面试显得有些失败。为了弥补他对岗位的陌生,我最后开导了他对于PM的工作流程,看得出,他很聪明,最后的握手,握得有些用力。
祝他顺利。
魔兽争霸如何让你摆脱脑残?
Tuesday, September 23rd, 2008 | 有说有笑 | No Comments
玩物丧志。加个前提我就基本认同,否则绝不认同。前提就是:对于那些仅供脑残人士娱乐的网游,仅供BT人士玩赏的成人游戏和仅供无聊人士谋杀时间的弱智游戏。
这个前提之外的玩游戏,就不是什么丧志,而是开发大脑的最好锻炼。比如魔兽争霸就是其中出类拔萃的佼佼者。如果将来有儿子,得培养他成为像sky那样的高手。
最近每日工作完毕,都会操两盘魔兽。有时候人兽大战,有时候人妖大战。Nickyhu擅长人类,对付不死基本靠坦克,对付兽族基本靠女妖,对付暗夜基本靠枪手。这么一说,高手就知道遇见菜鸟了。
Nickyhu觉得,魔兽争霸这玩意的好在于:弹指之间把瞬间决策的魅力放大到战场的每个角落,英雄是自我化身,主宰着战场的进程。
发动大家一起玩玩魔兽,开发智力的同时,还能锻炼手指灵活度,对于鼠标和键盘的操作灵敏度极高。更多游戏教程可以看这里:http://www.nickyhu.com/moshouzhenba
国货伴随的一天
Wednesday, September 17th, 2008 | 有说有笑 | No Comments
早晨起床穿上假名牌衣服,用致癌牙膏刷完牙,喝杯过了期的碘超标还被三聚氰胺污染了的牛奶,吃根柴油炸的洗衣粉油条,外加一个苏丹红咸蛋,在票贩子手里买 张车票,准时赶到地下烟厂上班,九点三十分偷偷用山寨手机看股票从6124.04点跌到1240.46点,中午用地沟油炒盘避孕药喂的黄膳,再加一盘敌敌 畏喷过的白菜,喝上两杯甲醇白酒,再整两瓶甲醛啤酒漱口,下午的班没上成,一觉醒来饿的慌,赶紧来份苏丹红鸡翅,到赌场玩了两把输了钱,找个小姐出了气, 趁天黑撬了两个保险柜,回家兴奋睡不着,电视上说长生不老药、真钻手表什么的,明天就去买。唉……这日子过的真是那个爽!!!
更多转贴:
日来,一些不明真相的群众,被一小撮别有用心的人煽动,对三鹿事件大加炒作,目的是想抹黑中国制造,达到其不可告人的目的。这充分证明,我们要加强对互联 网舆论阵地的保卫力度,舆论阵地我们不占领,敌对势力就要占领,各网站经营管理人员一定要有敏感的政治意识,牢固树立大局观,正确引导舆论方向。
党和人民息息相关,荣辱与共,党和国家领导人高度重视人民的饮食安全,曾多次莅临三鹿乳业参观视察,对三鹿乳业高度发展民族产业,牢固树立国有品牌,以科技创新引领新农业发展的经营理念作出了高度评价。
各级党委,各单位,各部门,一定要深刻领会上级指示精神,踊跃购买三鹿乳业产品,以实际行动支持国产品牌。为国产品牌的茁壮成长,国家和平崛起战略的顺利实现,贡献出自己的力量。
————————————–
如果你有一个铜肺,
如果你有一个铁胃,
如果你祖上是喝毒奶粉长大的,
如果你神经粗大麻木,
欢迎你到这里来。
这里有河蟹的的空气、水、动物食品、植物食品;但是对不起,娇嫩敏感普通的个体在这里不具个体竞争力。这里是人类进化的前沿阵地,只有那些坚强、百毒不侵的生命体才能不被淘汰屹立不倒。
—————————————————-
【黑通社2008年9月13日电】日前,婴儿喝牛奶造成肾结石事件造成了大量家长的狂怒。国家质检部门联合公安机关快速行动,对奶粉生产厂家进行了 认真排查,初步排除了厂家生产工业环节上可能存在的问题。随后,有证据表明有不法奶农为了增加收入而在牛奶中添加了三聚氰胺。经过仔细调查,联合检查组认 为奶农由于知识结构问题,不足以了解三聚氰胺的一般行常识,因此排除了奶农的嫌疑。
最后,通过科学分析、认真取证,联合检查组初步锁定了犯罪嫌疑人。据了解,从今年三月份开始,一小撮奶牛由于受到西方腐朽没落生活作风的影响,背弃 了为人民服务的基本价值观,采用口服、鼻吸和静脉注射等方式摄取三聚氰胺,以此让自己进入一种被称之为“High”的状态。听到这个消息,广大奶牛深表震 惊。一位被挤出乳腺炎还坚持带病工作的奶牛表示:“这是一种极不负责任的态度,如果任其发展后果不堪设想。”
联合检查组果断采取措施,迅速抓捕了三聚氰胺嫌疑奶牛457头,并已经着手进行教育转化工作。同时,对全国奶牛进行了一次安全警示教育:即便牛市过 去了,大家也不能随便乱吃草。据悉,几头带头奶牛在做完三次俯卧撑之后畏罪潜逃,有关部门已经发布全国A级通缉令进行抓捕。目前,全国奶牛基本恢复了正常 工作,乳房饱满,情绪稳定。
日本电影
Tuesday, September 16th, 2008 | 有说有笑 | No Comments
其实很久以前就倾心于日本电影,应该从《情书》开始,到岩井俊二,日本电影就以非常本色的淳厚吸引着我。
昨天看了《死亡的精度》(nickyhu写的影评),这个心底的小钩子再度被吊起,搜索豆瓣上的“日本电影”,果然很黄很暴力。我喜欢:)
下面纯属凑字数,关于死亡的精度的一点想法而已:
都是小人物的故事,自然很贴近生活,从死神的角度看待这个人生的世界,有点日式幽默,有点日本哲学,但似乎温暖多于现实的考量,有点违背日本一贯的对于死的极端理解。
在小摊发现这张碟的时候,很惊艳,封面很酷,因为之前看过它的官方网站,金城武的黑色职业装很黑色帅气。不过,还是想深入看看在日本语境下,金城武会演成什么样子。结果是没得深入,只是一部轻松消解死亡的片子。
最后一个画面很唯美。
如何加速CodeIgniter?
Friday, September 12th, 2008 | 建站攻略 | No Comments
Scaling and Optimizing your CodeIgniter Application, with Benchmarks
There’s been a few discussions recently about optimizing CodeIgniter applications to make them faster, more reliable, and scalable.
So, let’s look at some methods of doing this, with ‘real’ numbers and benchmarks.
‘Baseline’ - The Bog Standard
First of all, we need to build a little controller that does ’stuff’.
It’s not extremely intensive, but it gives us a good base to test these optimization techniques.
function index() { $query = $this->db->get('module_pages'); $links = ''; if ( $query->num_rows > 0) { foreach ($query->result_array() as $page): $links .= '<a href="'.site_url($page['uri']).'">'; $links .= ucwords($page['title']).'</a><br />'; endforeach; $data['links'] = $links; } for ($i=0; $i < 10; $i++) { $this->db->like('title', 'London'); $query = $this->db->get('module_pages', 1); if ( $query->num_rows == 1 ) { $row = $query->row_array(); $row['body'] = str_replace('Getting', 'booya', $row['body']); $data['body'] = $row['body']; } } $this->load->view('welcome2', $data); }
And our view file is like this:
<?=$links?> <?=str_replace('booya', 'Getting', ucwords($body))?>
So, now let’s benchmark this little app… with the default CodeIgniter settings… no caching, active record debug on.
Concurrency Level: 10 Time taken for tests: 22.206642 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 857000 bytes HTML transferred: 665000 bytes Requests per second: 45.03 [#/sec] (mean) Time per request: 222.066 [ms] (mean) Time per request: 22.207 [ms] (mean, across all concurrent requests) Transfer rate: 37.65 [Kbytes/sec] received
So, 45.03 Requests per second, not bad… but I think we can make some changes and see that number improve.
Result Looping
First off, let’s change:
foreach ($query->result_array() as $page):
to:
$pages = $query->result_array(); foreach ($pages as $page):
Let’s have a look at the performance difference:
Concurrency Level: 10 Time taken for tests: 21.391068 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 857000 bytes HTML transferred: 665000 bytes Requests per second: 46.75 [#/sec] (mean) Time per request: 213.911 [ms] (mean) Time per request: 21.391 [ms] (mean, across all concurrent requests) Transfer rate: 39.08 [Kbytes/sec] received
So, as we can see… the improvement is very small, just 1.75 request/second quicker…
But they do all add up, so make sure you take a note of this optimization and use it from now on.
Memcache
Now, onto Memcache, the ‘king’ of caching objects, arrays, you-name-it, in PHP
I start up the memcache service, then change the controller code accordingly:
$memcache = new Memcache; $memcache->connect('localhost', 11211) or die ("Could not connect"); $data = $memcache->get('view_data'); if ( !$data ) { $query = $this->db->get('module_pages'); $links = ''; if ( $query->num_rows > 0) { $pages = $query->result_array(); foreach ($pages as $page): $links .= '<a href="'.site_url($page['uri']).'">'; $links .= ucwords($page['title']).'</a><br />'; endforeach; $data['links'] = $links; } for ($i=0; $i < 10; $i++) { $this->db->like('title', 'London'); $query = $this->db->get('module_pages', 1); if ( $query->num_rows == 1 ) { $row = $query->row_array(); $row['body'] = str_replace('Getting', 'booya', $row['body']); $data['body'] = $row['body']; } } $memcache->set('view_data', $data, false, 3600) or die ("Failed to save data at the server"); } $this->load->view('welcome2', $data);
Now, let’s run the benchmark to see how this improves things.
Concurrency Level: 10 Time taken for tests: 17.124866 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 857000 bytes HTML transferred: 665000 bytes Requests per second: 58.39 [#/sec] (mean) Time per request: 171.249 [ms] (mean) Time per request: 17.125 [ms] (mean, across all concurrent requests) Transfer rate: 48.82 [Kbytes/sec] received
Well, it’s faster, but not by much… I wonder how an opcode cache could improve things?
eAccelerator
eAccelerator is an opcode cache extension for php… basically, the way that it works in ’stupid’ terms is like this:
- We write our application in code (almost english)
- We ‘execute’ the code (by running the request)
- PHP converts our code into another language (machine-code… let’s call it matrix-esque)
- PHP the executes the matrix-esque code
eAccelerator interrupts just after PHP converts our code to its machine code and ‘caches’ it, so next time, it can skip the whole translation phase of execution.
Pretty simple huh?
Lets try the baseline code, with eaccelerator on the top of it.
Concurrency Level: 10 Time taken for tests: 10.122468 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 857000 bytes HTML transferred: 665000 bytes Requests per second: 98.79 [#/sec] (mean) Time per request: 101.225 [ms] (mean) Time per request: 10.122 [ms] (mean, across all concurrent requests) Transfer rate: 82.59 [Kbytes/sec] received
Now, that’s more like it… here we’re still doing our SQL queries, and rendering all the data dynamically, but just caching the machine code, with a drastic improvement.
CodeIgniter Output Cachining
My main reason for doing this test was just to show off one of the features that I love most in CI, output caching.
Let’s see how well full-output caching works in CodeIgniter…
Some people believe that the overhead involved in writing the cache file outweighs the speed increase of actually rendering from a cache file.
$this->output->cache(3600);
Now we run our benchmark again, (baseline code, with the output caching on) and see if there’s a difference.
Concurrency Level: 10 Time taken for tests: 6.221538 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 857000 bytes HTML transferred: 665000 bytes Requests per second: 160.73 [#/sec] (mean) Time per request: 62.215 [ms] (mean) Time per request: 6.222 [ms] (mean, across all concurrent requests) Transfer rate: 134.37 [Kbytes/sec] received
So, the difference huge, serving 160.73 requests per second, that’s a massive improvement… but I’m not going to stop there!
Output Caching + eAccelerator
How about the ultimate? - Output caching, and opcode caching! - eAccelerator with CI Output caching:
Concurrency Level: 10 Time taken for tests: 2.565136 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 857000 bytes HTML transferred: 665000 bytes Requests per second: 389.84 [#/sec] (mean) Time per request: 25.651 [ms] (mean) Time per request: 2.565 [ms] (mean, across all concurrent requests) Transfer rate: 325.91 [Kbytes/sec] received
Who’s the daddy then?
CodeIgniter!
For those of you struggling to digest those numbers… here’s a pretty little graph (made with codeigniter… yeah, I’m hardcore!)

Further Notes
As requested, here’s the results from a couple of other tests.
First off, serving the exact same output as static index.html:
1834.95 Requests per second… Amazingly fast.
And, replacing:
foreach ($query->result_array() as $page): $links .= '<a href="'.site_url($page['uri']).'">'; $links .= ucwords($page['title']).'</a><br />'; endforeach;
with:
foreach ($query->result() as $page): $links .= '<a href="'.site_url($page->uri).'">'; $links .= ucwords($page->title).'</a><br />'; endforeach;
Produces 46.19 [#/sec] (mean)…. again, a slight improvement over using arrays..
But hell, I love arrays!
Elliot
Nickyhu已报名参加
Thursday, September 11th, 2008 | 搜索引擎优化, 网络营销 | No Comments
06年岁末,刚成立的点石 互动在北京发起了点石大会,参会多达200余人,让业界见证了草根的力量。2007年10月21日,点石大会在北京再次举行,吸引了300多名SEO技术 爱好者和从业人员参会。听取中文SEO界最精锐的声音,体验最具草根精神的搜索Party,你绝对不能错过2008年点石大会,我们相约亚洲金融中心上 海!
2008年上海点石大会信息
会议名称:2008年上海点石大会
会议主题:探讨搜索营销发展趋势,SEO和PPC实战经验分享,B2C网站推广之道。
涉及领域:搜索引擎优化、搜索付费广告管理、新型网络推广等。
举办日期:2008-11-29 AM 9:00 至 PM 17:30 (星期六)
参会费用:待定(如无赞助商或者赞助费用过少,则参会人员需缴纳一定费用)
举办地点:待定(会议举行前15天通告)
会议主持:付必鹏(点石联合创始人)
主办单位:点石互动
参与对象:SEO技术爱好者和从业人员、搜索付费广告管理专员,市场销售经理、技术部经理、企业网站技术支持人员和个人站长。
点石大会议程详细介绍
点石访谈 点石访谈将根据每次将访谈当年度重要点石人,通过访谈,回顾点石当年度历程、重要事件,也展示点石人在SEO上的努力和经验。
我爱点石 我爱点石主要由点石当年最活跃几个话题的版主介绍该版动态与心得。本次上海大会将介绍点石所有版主,并请全体到场版主上台亮相致辞。
主题演讲 每次大会将安排一定数量主题演讲,根据当年搜索引擎营销行业本身或者SEO和PPC在特定垂直行业的应用设定主题,由点石成员演讲。大会将根据当年全球热点,邀请一位非点石成员作为特邀嘉宾进行演讲。
互动问答 互动问答是一种形式很自由的交流形式,参会的点石论坛版主和演讲嘉宾将会在会议现场为到会人员解答疑问。
点石之夜 这是一个拓展人脉关系的绝佳机会,届时您将会与点石创始人、演讲嘉宾、点石版主们面对面交流。试想,我们聚集于某一酒吧,谈着我们感兴趣的话题,岂不乐哉?
了解大会更多详情,请关注2008年上海点石大会官方网站。
Dunsh Seo Conference in Shanghai
Wednesday, September 10th, 2008 | Seo in China | No Comments
One of the best seo organization in China, Dunsh will take a conference in Shanghai as its yearly meeting.
Follow is the Participants Guiderline:(you need dunsh account to join)
Participants are required reading: Conference participants-point guide
November 2006, point-to be held in Beijing the first stone at the General Assembly. After the meeting, the members of a stone post in the Forum participants complained that no receipts, such as speakers too little, too many people led to the participants the opportunity to exchange smaller, and so on.
The General Assembly, it is estimated that many members is the first time participants. In this, Robin feel the need to tell you how to let everyone in the conference get the most value.
Point-the General Assembly can do what »
Many of you feel that the Internet is very often the older cattle and experts, they usually are not sufficient time with you on-line exchanges, and through the General Assembly, we can invite them over with you face-to-face exchanges. Be made is that these predecessors, and experts in a particular subject can share their experiences on the experience.
Many of you in very speculative Internet chat friends, you can go on-line under this beautiful exchange. If not this session, you will personally Mai Jipiao or air tickets to his city and they exchange Mody »
Many companies need to recruit search engine marketing and technical personnel, many people tried to post information online without result. The so many search engine optimization technology enthusiasts gathered in one, the individual is very difficult to move things Mody »
Participants will be members of the business to others projects and companies interested in the background, in private exchanges, here contains many public relations opportunities, whether individuals or companies.
And we have to admit the fact that
The only time the General Assembly one day, the agenda of each session will have time limits. Therefore, the speakers will be less, and speakers have the time limit, leading to the content of his speech will be very concise.
In fact, we are also very frank to many participants that want to learn something from the part of speech, almost impossible.
Speakers less, but also many technical problems will not be part of his speech at the meeting referred to, so some people inevitably disappointed.
Participants should have what kind of mentality »
First, you should have a positive exchanges between the desire to meet the hearts of the doubt you have to admire the older generation to boldly put forward, do not shy!
The real exchange is not in the venue, only to exchange part, because time is limited. And you should be fully combat your interpersonal skills, so that some people will remember you, then you maintain contact, the online exchange. Or will be, you can pull some of my friends to find a quiet coffee shop talk about.
Finally, the stone structures such a platform, you Why not enjoy the display of their own » Perhaps you can be a promising company chose. Of course, you are the participants on behalf of the company and see whether or not to find a good staff.
Frankly speaking, if you poor communication, it is very difficult to be proceeds from the meeting. From this perspective, the meeting is the ability to exercise your communication an excellent opportunity.
To the speaker’s proposal
It is clear that the General Assembly with the other point-the commercial nature of the meeting have many differences, the participants are grass-roots groups. So, really share their experience of the actual project experience of our personnel will be respected, too much publicity can only AD let everyone have a question for you.
Therefore, I suggest that the speaker can really share the open-minded and impartial. Always remember that remark, sharing is the best marketing.
发链接了
Monday, September 8th, 2008 | Uncategorized | No Comments
发3个比较雷的链接:
链接1(适合小白领)
链接2(适合互联网人士)
链接3(适合所有中国人)