class Candidate {
private static $point = 0;
public function isSufficient() {
self::hasPHPKnowledge();
self::hasMyDatabaseKnowledge();
self::hasCacheKnowledge();
self::hasExpWithSomeFrameworks();
self::hasExpWithHighLoad();
self::hasContributeToCommunity();
self::hasPassion();
reutrn self::$point > 16;
}
public function hasPHPKnowledge() {
你能读懂这段代码 && self::$point++;
你知道单例和工厂模式 && self::$point += 2;
}
public function hasDatabaseKnowledge() {
if (你会使用mysql) {
你知道怎么用 select/update/delete/insert)&& self::$point++;
你知道怎么设计表结构 && self::$point++;
你知道隔离级别,理解事务 && self::$poin++;
你知道怎么能hold住2亿行数据 && self::$point += 2;
你熟读mysql手册,知道引介词 && self::$point += 3;
}
if (你知道如何使用redis) {
用过hash && self::$point++;
用过list && self::$point++;
用过zset && self::$point++;
用过pub/sub && self::$point+=2;
}
用过mongoDB && self::$point++;
能设计HBase的rowkey && self::$point+=2;
}
public function hasExpWithSomeFrameworks() {
用过Yii/QeePHP/Cake/symfony && self::$point++;
自己写过框架 && self::$point+=2;
}
public function hasExpWithHighLoad() {
了解负载均衡(LVS/HA) && self::$point++;
高并发 && self::$point++;
多点高可用 && self::$point++;
}
public function hasContributeToCommunity() {
有github/google code/bitbucket账号,并有开源项目 && self::$point++;
有stackoverflow账号,并回答过问题 && self::$point++;
}
public function hasPassion() {
热爱编程 && self::$point++;
写过objc-c/java/c/c++/python的项目 && self::$point++;
自学过lisp/haskell/erlang/perl/bash && self::$point+=2;
}
}
$someOne = new Candidate();
if ($someOne->isSufficient()) {
mail('shuoshi#staff.sina.com.cn', 'xxx的个人简历', 'cv.pdf');
}