作者hh81tw (hh81tw)
看板Soft_Job
标题[闲聊] 你会如何写一个getRandomName
时间Mon Feb 15 02:38:09 2010
public static function getRandomName($gender)
{
return 'Mary';
}
Mike writes, "Oh, the things that I find in our codebase."
"I have no idea who put this in, or why it was put in. But it's there, and
it's somehow called in a few places. As tempted as I was to investigate how
it was used, I figured I'd spare my sanity."
Mike adds, "should there come a day that I need an actually random name,
perhaps I'll look for getReallyRandomName."
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 123.195.16.113
1F:推 Ting1024:XD 满温馨的 02/15 03:08
2F:推 leicheong:然後TRWTF(TM)是即使$gender设成男性, 仍然会回传Mary.. 02/15 09:14
3F:→ leicheong:或者要hardcode的话, 选一个男女皆可用的名字会比较好.. 02/15 09:15
4F:推 luciferii:玛莉有够衰 02/16 21:43
5F:推 salagadoola:在里面加一行 //FIXME 然後置之不理~ 02/16 22:11
6F:推 rshadow:楼上XDDDD 02/16 22:24
7F:推 antory:我遇过原厂的code过来内容有 //fix me,火都喷出来 02/16 23:19
8F:推 Sany:不懂,为什麽写fix me? 02/17 15:15
9F:→ dingyuchi:有bug吧 02/17 15:35
10F:→ Sany:就是只是说改掉他,然後什麽原因都没说的意思吗? 02/17 15:51
11F:→ chengcti:就是他那时没时间改.希望後面review时要记得改 02/17 15:56
12F:→ chengcti:久而久之没人 review 就... 放在那边 release 出去了 02/17 15:56
13F:推 Sany:原来如此 02/17 16:04