SegmentFault 2014 年招聘第一季:后端开发工程师

2014-02-20 10:35:31 +08:00
 segmentfault
SegmentFault.php 欢迎投递~ :)

https://gist.github.com/buerld/9106052
6555 次点击
所在节点    酷工作
47 条回复
Fteng328
2014-02-20 14:57:49 +08:00
才勉强70出头
zhujinliang
2014-02-20 15:14:34 +08:00
$rank范围是多少啊?

另外指出一处代码错误:

case 'lol': $score += $rank * 0;

多了个加号
zhf1978
2014-02-20 15:17:01 +08:00
<?php

/**
* SF后端开发者招聘函数
*
* @param array $conditions 条件列表
* @return integer 分数
*/
function wanted_developer(array $conditions) {
$score = 0;

foreach ($conditions as $key => $condition) {
switch ($key) {
case 'skills':
foreach ($condition as $name => $rank) {
switch ($name) {
case 'linux':
case 'nginx':
case 'apache':
$score += $rank * 1;
break;
case 'html':
case 'php':
case 'java':
case 'mysql':
$score += $rank * 2;
break;
case 'c/c++':
case 'redis':
case 'scala':
case 'nodejs':
case 'mongodb':
$score += $rank * 3;
break;
case 'dota':
case 'dota2':
$score += $rank * 4;
break;
case 'lol':
$score += $rank * 0;
break;
default:
break;
}
}
break;
case 'networks':
foreach ($condition as $name) {
switch ($name) {
case 'weibo':
case 'qq':
case 'weixin':
case 'douban':
$score += 1;
break;
case 'v2ex':
case 'zhihu':
case 'github':
case 'gmail':
case 'facebook':
case 'twitter':
case 'wordpress':
$score += 2;
break;
case 'aws':
case 'gae':
case 'openshift':
case 'linode':
case 'azure':
$score += 3;
break;
case 'cl':
case 'segmentfault':
case 'typecho':
$score += 4;
break;
default:
break;
}
}
break;
case 'softwares':
foreach ($condition as $name) {
switch ($name) {
case 'linux':
case 'macosx':
case 'git':
case 'chrome':
case 'firefox':
case 'opera':
$score += 1;
break;
case 'vim':
case 'emacs':
case 'sublime':
$score += 2;
break;
case 'brew':
case 'vagrant':
case 'shadowsocks':
$score += 3;
break;
case 'ie':
$score -= 1;
break;
case 'windows':
$score += 0;
break;
default:
break;
}
}
break;
case 'equipments':
foreach ($condition as $name) {
switch ($name) {
case 'mac':
case 'chromebook':
case 'iphone':
case 'nexus':
$score += 1;
break;
case 'hhkb':
case 'cherry':
case 'filco':
case 'kindle':
$score += 2;
break;
case 'miwifi':
case 'g-glass':
case 'raspberry-pi':
case 'leap-motion':
$score += 3;
break;
default:
break;
}
}
break;
default:
break;
}
}

return $score;
}

/**
* SF后端开发者薪资计算
*
* @param intger $yourscore 得分
* @return integer 月薪
*/
function salaryband($score) {
//RMB元
$salary = 0;
switch ($score){
case $score >= 70 && $score <= 75:
$salary = 5000;
break;
case $score > 75 && $score <= 80:
$salary = 10000;
break;
case $score > 80 && $score <= 90:
$salary = 15000;
break;
case $score > 90 && $score <= 100:
$salary = 20000;
break;
default:
break;
}
return $salary;
}

$yourscore = wanted_developer($your_conditions);
$yoursalary = salaryband($yourscore);

if ($yourscore > 70 && $expectedsalary = $yoursalary) {
mail('jobs@segmentfault.com', '0day', $your_resume);
}
captain234
2014-02-20 15:18:48 +08:00
equipment选项严重鄙视了穷屌丝一把
zhujinliang
2014-02-20 15:21:58 +08:00
if ($yourscore > 70 && $expectedsalary = $yoursalary) {
mail('jobs@segmentfault.com', '0day', $your_resume);
}

单等号是槽点么。。。
lvye
2014-02-20 15:30:19 +08:00
@captain234 因为 @joyqi是高富帅,他也会带你成为高富帅。
lvye
2014-02-20 15:31:22 +08:00
@moondark 因为 joyqi喜欢打dota,他需要一个伴,公司其他人都不怎么玩游戏。
sogood
2014-02-20 15:35:24 +08:00
switch 不是这么用的。
有创意但有 bug。
captain234
2014-02-20 15:37:43 +08:00
@zhujinliang 从skills选项可以目测应该是rank为10分
kojp
2014-02-20 15:57:39 +08:00
Mark
zhf1978
2014-02-20 17:30:25 +08:00
@zhujinliang I‘m sorry,应该是($expectedsalary == $yoursalary),(期望的薪资 == 你技能得分后的薪资级别),哈哈,我不是SF的人哈,觉着看这样的招聘简章有意思,跟着参与回复了一下下 ^_^
weakish
2014-02-20 19:46:00 +08:00
@zhujinliang 你太狠了……
sopho
2014-02-20 20:21:19 +08:00
@zhujinliang 首先加号用不用都一样 后面分数不够的 意思就是你玩lol不要;第二点在php中string 单引号的效率高于双引号原因自己去查。
zhujinliang
2014-02-20 23:28:21 +08:00
@zhf1978 其实我想吐槽的是,写出单等号,实际成了赋值操作,有点“被期望”的意味
lazybios
2014-02-21 00:00:29 +08:00
唉。。。不谈salary 选择性Geek
sopho
2014-02-21 00:17:10 +08:00
@zhujinliang sf在dota中是影魔这个英雄的简称 sf团队应该跟dota有渊源 比较鄙视抄袭者lol
laputaprince
2014-02-21 07:08:16 +08:00
* @param array $conditions 条件列表
* @return boolean 是否合格

这样比较舒服。。。
zhshhere
2014-02-21 10:57:49 +08:00
帮转
cloudqq
2014-02-21 12:49:30 +08:00
不错,最好能直接跑起来。
fuxkcsdn
2014-02-21 17:30:54 +08:00
$rank是根据自己的熟练程度填写的吗??是的话范围??
如果是固定数值,数值是??

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/101033

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX