b**r 发帖数: 352 | 1 莫非是传说中失传已久的天罗地网排序法?
for(i=0;i<5;i++)
{
if(school[i].total_score==a[0]) school[i].rank=1;
if(school[i].total_score==a[1]&&a[1]!=a[0]) school[i].rank=2;
if(school[i].total_score==a[1]&&a[1]==a[0]) school[i].rank=1;
if(school[i].total_score==a[2]&&a[2]!=a[1]) school[i].rank=3;
if(school[i].total_score==a[2]&&a[2]==a[1]&&a[1]==a[0]) school[i].rank=1;
if(school[i].total_score==a[2]&&a[2]==a[1]&&a[1]!=a[o]) school[i].rank=2;
if(school[i].total_score==a[3]&&a[3]!=a[2]) school[i].rank=4;
if(school[i].to |
s*****g 发帖数: 5159 | 2 at lease he should use
else if to make it run faster.
【在 b**r 的大作中提到】 : 莫非是传说中失传已久的天罗地网排序法? : for(i=0;i<5;i++) : { : if(school[i].total_score==a[0]) school[i].rank=1; : if(school[i].total_score==a[1]&&a[1]!=a[0]) school[i].rank=2; : if(school[i].total_score==a[1]&&a[1]==a[0]) school[i].rank=1; : if(school[i].total_score==a[2]&&a[2]!=a[1]) school[i].rank=3; : if(school[i].total_score==a[2]&&a[2]==a[1]&&a[1]==a[0]) school[i].rank=1; : if(school[i].total_score==a[2]&&a[2]==a[1]&&a[1]!=a[o]) school[i].rank=2; : if(school[i].total_score==a[3]&&a[3]!=a[2]) school[i].rank=4;
|
S*********g 发帖数: 5298 | 3 I've seen 10 layers of "if" in one excel cell.
【在 b**r 的大作中提到】 : 莫非是传说中失传已久的天罗地网排序法? : for(i=0;i<5;i++) : { : if(school[i].total_score==a[0]) school[i].rank=1; : if(school[i].total_score==a[1]&&a[1]!=a[0]) school[i].rank=2; : if(school[i].total_score==a[1]&&a[1]==a[0]) school[i].rank=1; : if(school[i].total_score==a[2]&&a[2]!=a[1]) school[i].rank=3; : if(school[i].total_score==a[2]&&a[2]==a[1]&&a[1]==a[0]) school[i].rank=1; : if(school[i].total_score==a[2]&&a[2]==a[1]&&a[1]!=a[o]) school[i].rank=2; : if(school[i].total_score==a[3]&&a[3]!=a[2]) school[i].rank=4;
|
g*****g 发帖数: 34805 | 4 Better than a gal I had to work with before. She used
1 month to develop total 2 lines of code, and led to a showstopper
bug that I had to use 2 hours to find out.
【在 b**r 的大作中提到】 : 莫非是传说中失传已久的天罗地网排序法? : for(i=0;i<5;i++) : { : if(school[i].total_score==a[0]) school[i].rank=1; : if(school[i].total_score==a[1]&&a[1]!=a[0]) school[i].rank=2; : if(school[i].total_score==a[1]&&a[1]==a[0]) school[i].rank=1; : if(school[i].total_score==a[2]&&a[2]!=a[1]) school[i].rank=3; : if(school[i].total_score==a[2]&&a[2]==a[1]&&a[1]==a[0]) school[i].rank=1; : if(school[i].total_score==a[2]&&a[2]==a[1]&&a[1]!=a[o]) school[i].rank=2; : if(school[i].total_score==a[3]&&a[3]!=a[2]) school[i].rank=4;
|
t****t 发帖数: 6806 | 5 how did that kind of programmers (i assume she is a programmer) ever get a
job to start with?
or she is super pretty?
【在 g*****g 的大作中提到】 : Better than a gal I had to work with before. She used : 1 month to develop total 2 lines of code, and led to a showstopper : bug that I had to use 2 hours to find out.
|
P********e 发帖数: 2610 | 6 你还真觉的这么简单的事情?2行倾注了感情的代码是不一样的。
【在 t****t 的大作中提到】 : how did that kind of programmers (i assume she is a programmer) ever get a : job to start with? : or she is super pretty?
|
c**t 发帖数: 2744 | 7 贴出来让大家瞻仰下
【在 g*****g 的大作中提到】 : Better than a gal I had to work with before. She used : 1 month to develop total 2 lines of code, and led to a showstopper : bug that I had to use 2 hours to find out.
|
g*****g 发帖数: 34805 | 8 My ex boss was the only one interviewed her. Who knows what's
going on. She's not bad, but 10 yrs too old with 2 kids.
【在 t****t 的大作中提到】 : how did that kind of programmers (i assume she is a programmer) ever get a : job to start with? : or she is super pretty?
|
S*********g 发帖数: 5298 | 9 I guess that was the lady mentioned in bug's posts multiple times before.
【在 t****t 的大作中提到】 : how did that kind of programmers (i assume she is a programmer) ever get a : job to start with? : or she is super pretty?
|
g*****g 发帖数: 34805 | 10 大约就是调了一行API返回一个对象,这个对象对应数据库里一行,
然后调了这个对象某个方法。一共两行。
但是数据库这一行很多情况下是没有的,返回就是空。接下来大家
知道会怎样了。偏偏她把这两行放在某个关键方法里,QA也没有发现。
到产品环境里,我从客户端找到服务器集群的log里再找到这个地方就得两小时了。
【在 c**t 的大作中提到】 : 贴出来让大家瞻仰下
|
|
|
m***i 发帖数: 2480 | 11 Is it a sorting code? I don't see < or >... It does not look like look
unrolling either
【在 b**r 的大作中提到】 : 莫非是传说中失传已久的天罗地网排序法? : for(i=0;i<5;i++) : { : if(school[i].total_score==a[0]) school[i].rank=1; : if(school[i].total_score==a[1]&&a[1]!=a[0]) school[i].rank=2; : if(school[i].total_score==a[1]&&a[1]==a[0]) school[i].rank=1; : if(school[i].total_score==a[2]&&a[2]!=a[1]) school[i].rank=3; : if(school[i].total_score==a[2]&&a[2]==a[1]&&a[1]==a[0]) school[i].rank=1; : if(school[i].total_score==a[2]&&a[2]==a[1]&&a[1]!=a[o]) school[i].rank=2; : if(school[i].total_score==a[3]&&a[3]!=a[2]) school[i].rank=4;
|
f*****Q 发帖数: 1912 | 12 人家倾注了多少心血啊,我可能差不多十年没写过排序代码了。都是
XXXArray.sort();就结束了。 |
b**r 发帖数: 352 | 13 Don't know, didn't bother to verify the functioning correctness.
Just judging by the look it appears the author intend to do some sorting.
【在 m***i 的大作中提到】 : Is it a sorting code? I don't see < or >... It does not look like look : unrolling either
|
s******n 发帖数: 876 | 14 a girl can increase the productivity of boys.
the boss doesn't care how the work is done as long as it's done.
【在 t****t 的大作中提到】 : how did that kind of programmers (i assume she is a programmer) ever get a : job to start with? : or she is super pretty?
|
n******t 发帖数: 4406 | 15 she just needs to be prettier than the other girls in the office.
【在 t****t 的大作中提到】 : how did that kind of programmers (i assume she is a programmer) ever get a : job to start with? : or she is super pretty?
|
X****r 发帖数: 3557 | 16 Now this is the most insightful post I have seen so far in this thread :)
【在 n******t 的大作中提到】 : she just needs to be prettier than the other girls in the office.
|