Redian新闻
>
有人在黄山上挂过同心锁吗?哥就挂过一次,差点吓尿了
avatar
有人在黄山上挂过同心锁吗?哥就挂过一次,差点吓尿了# Living
b*n
1
leetcode也刷过两遍了,但前两天找人帮忙mock interview,人家上来就说你这code太
academic style了,一看就是没什么经验的人写的.就是说算法都对,但有些coding习惯
在有经验的人看来很刺眼.请问这应该怎么提高呢?去哪里可以看比较规范的code?还有
如果想增加一些现在比较热门技术的经验像hardoop或big data,有没有什么open
source之类的project可以参加?谢谢!
avatar
j*i
2
刚才去一家中国店,看到卖同心锁的,忽然想起以前的一次恐怖经历。
出国前跟一个女孩游黄山,在那个著名的卖锁的地方买了把黄铜锁,刻上名字,准备到
地方挂上。哥比较抠门儿,买了把最便宜的。铜倒是铜的,只是没浇铸好,背面有个气
孔。
选了个位置,正要挂上,却发现旁边一尺远的地方有把一模一样的次品铜锁。气孔的大
小、形状、位置都跟我手里这把一模一样。凑近了一看,赫然发现上面也刻着我的名字
。一抹一样,明显是同一个工人刻的,最后一勾都刻漏了。旁边却是另一个女孩的名字。
哥这辈子唯一的一次黄山之行就被这把破锁给毁了
avatar
z*8
3
你不妨把你的academic code贴给大家看看?
avatar
C*e
4
你叫啥大俗名字?我就没见过和我同名字的。

字。

【在 j****i 的大作中提到】
: 刚才去一家中国店,看到卖同心锁的,忽然想起以前的一次恐怖经历。
: 出国前跟一个女孩游黄山,在那个著名的卖锁的地方买了把黄铜锁,刻上名字,准备到
: 地方挂上。哥比较抠门儿,买了把最便宜的。铜倒是铜的,只是没浇铸好,背面有个气
: 孔。
: 选了个位置,正要挂上,却发现旁边一尺远的地方有把一模一样的次品铜锁。气孔的大
: 小、形状、位置都跟我手里这把一模一样。凑近了一看,赫然发现上面也刻着我的名字
: 。一抹一样,明显是同一个工人刻的,最后一勾都刻漏了。旁边却是另一个女孩的名字。
: 哥这辈子唯一的一次黄山之行就被这把破锁给毁了

avatar
l*n
5
贴出sample来大家看看是不是真觉得有问题。也许大家都给你一样academic也说不定,
哈哈。

【在 b*******n 的大作中提到】
: leetcode也刷过两遍了,但前两天找人帮忙mock interview,人家上来就说你这code太
: academic style了,一看就是没什么经验的人写的.就是说算法都对,但有些coding习惯
: 在有经验的人看来很刺眼.请问这应该怎么提高呢?去哪里可以看比较规范的code?还有
: 如果想增加一些现在比较热门技术的经验像hardoop或big data,有没有什么open
: source之类的project可以参加?谢谢!

avatar
j*i
6
习遽雸

【在 C******e 的大作中提到】
: 你叫啥大俗名字?我就没见过和我同名字的。
:
: 字。

avatar
w*z
7
刷了两遍还找不到工作?

【在 b*******n 的大作中提到】
: leetcode也刷过两遍了,但前两天找人帮忙mock interview,人家上来就说你这code太
: academic style了,一看就是没什么经验的人写的.就是说算法都对,但有些coding习惯
: 在有经验的人看来很刺眼.请问这应该怎么提高呢?去哪里可以看比较规范的code?还有
: 如果想增加一些现在比较热门技术的经验像hardoop或big data,有没有什么open
: source之类的project可以参加?谢谢!

avatar
s*s
8
同去的女孩看见没?没把你一脚踹下黄山?

字。

【在 j****i 的大作中提到】
: 刚才去一家中国店,看到卖同心锁的,忽然想起以前的一次恐怖经历。
: 出国前跟一个女孩游黄山,在那个著名的卖锁的地方买了把黄铜锁,刻上名字,准备到
: 地方挂上。哥比较抠门儿,买了把最便宜的。铜倒是铜的,只是没浇铸好,背面有个气
: 孔。
: 选了个位置,正要挂上,却发现旁边一尺远的地方有把一模一样的次品铜锁。气孔的大
: 小、形状、位置都跟我手里这把一模一样。凑近了一看,赫然发现上面也刻着我的名字
: 。一抹一样,明显是同一个工人刻的,最后一勾都刻漏了。旁边却是另一个女孩的名字。
: 哥这辈子唯一的一次黄山之行就被这把破锁给毁了

avatar
l*m
9
写个app, 搞个web

【在 b*******n 的大作中提到】
: leetcode也刷过两遍了,但前两天找人帮忙mock interview,人家上来就说你这code太
: academic style了,一看就是没什么经验的人写的.就是说算法都对,但有些coding习惯
: 在有经验的人看来很刺眼.请问这应该怎么提高呢?去哪里可以看比较规范的code?还有
: 如果想增加一些现在比较热门技术的经验像hardoop或big data,有没有什么open
: source之类的project可以参加?谢谢!

avatar
b*e
10
最后不是一勾

【在 j****i 的大作中提到】
: 习遽雸
avatar
f*4
11
找人给你做code review啊
avatar
j*i
12
习字最后那一勾图省事,刻成了一竖

【在 b******e 的大作中提到】
: 最后不是一勾
avatar
g*e
13
leetcode刷半遍 大部分工作都拿下了吧?general码工的话
avatar
C*e
14
原来是皇亲国戚,失敬失敬!

【在 j****i 的大作中提到】
: 习遽雸
avatar
z*e
15
代码贴出来看看
avatar
j*i
16
看到了

【在 s********s 的大作中提到】
: 同去的女孩看见没?没把你一脚踹下黄山?
:
: 字。

avatar
b*5
17
... 我leetcode看了刷了二年了, 一个工作都找不到

【在 g*********e 的大作中提到】
: leetcode刷半遍 大部分工作都拿下了吧?general码工的话
avatar
t*Q
18
其实,前一把锁刚挂完,他就被那个女孩给踹下去了。

【在 s********s 的大作中提到】
: 同去的女孩看见没?没把你一脚踹下黄山?
:
: 字。

avatar
s*r
19
蛋不能这么扯,能写好quicksort而且bug-free,大多数公司都qualify了。

【在 g*********e 的大作中提到】
: leetcode刷半遍 大部分工作都拿下了吧?general码工的话
avatar
s*s
20
结果在山下找到这个女孩,又爬上来了?忒快了吧。

【在 t*Q 的大作中提到】
: 其实,前一把锁刚挂完,他就被那个女孩给踹下去了。
avatar
b*5
21
我能写quicksort啊, 没一个公司要我的

【在 s*****r 的大作中提到】
: 蛋不能这么扯,能写好quicksort而且bug-free,大多数公司都qualify了。
avatar
t*e
22
你应该去找那个女孩。
也许她才是你命中注定的人。

字。

【在 j****i 的大作中提到】
: 刚才去一家中国店,看到卖同心锁的,忽然想起以前的一次恐怖经历。
: 出国前跟一个女孩游黄山,在那个著名的卖锁的地方买了把黄铜锁,刻上名字,准备到
: 地方挂上。哥比较抠门儿,买了把最便宜的。铜倒是铜的,只是没浇铸好,背面有个气
: 孔。
: 选了个位置,正要挂上,却发现旁边一尺远的地方有把一模一样的次品铜锁。气孔的大
: 小、形状、位置都跟我手里这把一模一样。凑近了一看,赫然发现上面也刻着我的名字
: 。一抹一样,明显是同一个工人刻的,最后一勾都刻漏了。旁边却是另一个女孩的名字。
: 哥这辈子唯一的一次黄山之行就被这把破锁给毁了

avatar
z*e
23
定义“大多数公司”

【在 s*****r 的大作中提到】
: 蛋不能这么扯,能写好quicksort而且bug-free,大多数公司都qualify了。
avatar
C*e
24
同意俭妹的。

【在 t*****e 的大作中提到】
: 你应该去找那个女孩。
: 也许她才是你命中注定的人。
:
: 字。

avatar
s*n
25
你的coding style是可以出卖你的,如果你的代码量不大,仅仅刷题刷出来的。
去GITHUB做一些开源的项目能提高一些。

【在 b*******n 的大作中提到】
: leetcode也刷过两遍了,但前两天找人帮忙mock interview,人家上来就说你这code太
: academic style了,一看就是没什么经验的人写的.就是说算法都对,但有些coding习惯
: 在有经验的人看来很刺眼.请问这应该怎么提高呢?去哪里可以看比较规范的code?还有
: 如果想增加一些现在比较热门技术的经验像hardoop或big data,有没有什么open
: source之类的project可以参加?谢谢!

avatar
n*e
26
梦游?

字。

【在 j****i 的大作中提到】
: 刚才去一家中国店,看到卖同心锁的,忽然想起以前的一次恐怖经历。
: 出国前跟一个女孩游黄山,在那个著名的卖锁的地方买了把黄铜锁,刻上名字,准备到
: 地方挂上。哥比较抠门儿,买了把最便宜的。铜倒是铜的,只是没浇铸好,背面有个气
: 孔。
: 选了个位置,正要挂上,却发现旁边一尺远的地方有把一模一样的次品铜锁。气孔的大
: 小、形状、位置都跟我手里这把一模一样。凑近了一看,赫然发现上面也刻着我的名字
: 。一抹一样,明显是同一个工人刻的,最后一勾都刻漏了。旁边却是另一个女孩的名字。
: 哥这辈子唯一的一次黄山之行就被这把破锁给毁了

avatar
z*e
27
这样说很没有意思
代码贴出来,别人才能告诉你,怎样写显得professional
avatar
u*q
28
估计踹下去了,然后欢欢一气之下参军7年。Or so he claims,你懂得。

【在 s********s 的大作中提到】
: 同去的女孩看见没?没把你一脚踹下黄山?
:
: 字。

avatar
b*5
29
怎么做github open source?

【在 s*********n 的大作中提到】
: 你的coding style是可以出卖你的,如果你的代码量不大,仅仅刷题刷出来的。
: 去GITHUB做一些开源的项目能提高一些。

avatar
s*l
30
那你最后嫁谁了?

字。

【在 j****i 的大作中提到】
: 刚才去一家中国店,看到卖同心锁的,忽然想起以前的一次恐怖经历。
: 出国前跟一个女孩游黄山,在那个著名的卖锁的地方买了把黄铜锁,刻上名字,准备到
: 地方挂上。哥比较抠门儿,买了把最便宜的。铜倒是铜的,只是没浇铸好,背面有个气
: 孔。
: 选了个位置,正要挂上,却发现旁边一尺远的地方有把一模一样的次品铜锁。气孔的大
: 小、形状、位置都跟我手里这把一模一样。凑近了一看,赫然发现上面也刻着我的名字
: 。一抹一样,明显是同一个工人刻的,最后一勾都刻漏了。旁边却是另一个女孩的名字。
: 哥这辈子唯一的一次黄山之行就被这把破锁给毁了

avatar
p*2
31
膜拜academic style
avatar
t*Q
32
不,是在游梦。

【在 n*****e 的大作中提到】
: 梦游?
:
: 字。

avatar
s*r
33
刷题就能提高代码质量
关键是做完自己有兴趣去思考优化自己的程序,和读别人的好程序
经典的语言书也教你怎么些好程序
像楼主描述的情况 写程序不注意质量 也不读别人的 多半就是不喜欢 CS
avatar
k*6
34
能推荐一下经典的预言书吗?特别是java的?谢谢!

【在 s*****r 的大作中提到】
: 刷题就能提高代码质量
: 关键是做完自己有兴趣去思考优化自己的程序,和读别人的好程序
: 经典的语言书也教你怎么些好程序
: 像楼主描述的情况 写程序不注意质量 也不读别人的 多半就是不喜欢 CS

avatar
l*n
35
感觉好的代码不用读,“扫”就行,逻辑流淌在字里行间了。那种要“读”的代码,就
跟paper draft一样,感觉逻辑都没有理顺。

【在 s*****r 的大作中提到】
: 刷题就能提高代码质量
: 关键是做完自己有兴趣去思考优化自己的程序,和读别人的好程序
: 经典的语言书也教你怎么些好程序
: 像楼主描述的情况 写程序不注意质量 也不读别人的 多半就是不喜欢 CS

avatar
w*z
36
quick sort bug free 不容易吧。人James 写了一个,若干年后,还给人抓了bug

【在 s*****r 的大作中提到】
: 蛋不能这么扯,能写好quicksort而且bug-free,大多数公司都qualify了。
avatar
s*b
37
我来贴一个。
Rocket fule (Software Engineer - Machine Learning Scientist ) 技术电面后code
test. code通过了所有test cases. 人家看过code 后就拒了。问题在哪里呢?请各位
牛人不吝赐教。题目本版以前贴过
You are standing in a rectangular room and are about to fire a laser toward
the east wall. Inside the room a certain number of prisms have been placed.
They will alter the direction of the laser beam if it hits them. There
are north-facing, east-facing, west-facing, and south-facing prisms. If the
laser beam strikes an east-facing prism, its course will be altered to be
East, regardless of what direction it had been going in before. If it hits
a south-facing prism, its course will be altered to be South, and so on. You
want to know how far the laser will travel before it hits a wall.
INPUT
Your program must read the room description from standard input. The room
is represented as a character array. Each line of input from STDIN
represents a row of the array. The width and height of the array are the
width and height of the room. The characters inside the array denote the
placement of the prisms and the laser's starting position.
The number of rows and columns in the array will not be explicitly specified
in the input, so your program will have to keep reading from STDIN until
there are no more lines to read and determine the total number of rows and
columns based on the input. However, the number of lines of input will be
at most 50. Each line will contain the same number of characters.
The resulting character array will contain exactly one '@' character,
representing the laser's position in the room, and any number of characters
from the set {"^", "V", "", "-"}. The first four of these represent
prisms that are guaranteed to direct the laser in the direction in which
they are pointing. The "^" character directs the laser north, "it to the west, and so on. The "-" character represents empty space.
OUTPUT
Your program should print to standard out a single string, terminated by a
newline, representing the distance that the laser will travel before hitting
a wall. For example, if the laser travels a distance of 14 cells before
hitting a wall, then your program should print the string "14" to STDOUT.
Your program should treat the "@'"symbol the same as the "-" character, that
is, as empty space. So the laser will pass through the original location
from which it was fired.
If the laser will get caught in an infinite loop, then your program should
print "-1" to STDOUT.
1 #include
2 #include
3 #include
4 #include
5 using namespace std;
6
7 //read from STDIN to charater array room
8 void read_stdin(vector>& room, int start[2]) {
9 string input_line;
10 int line =0;
11 while(!cin.eof()){
12 getline(cin, input_line);
13 int col =0;
14 while(col15 {
16 if(input_line[col] == '@')
17 {
18 start[0] = line;
19 start[1] = col;
20 }
21 room[line][col] = input_line[col];
22 col++;
23 }
24 if (line>0 && !cin.eof() && col != room[line-1].size())
25 {
26 throw "input data colum numbers are not aligned" ;
27 }
28 room[line].resize(col);
29 line++;
30 };
31 room.resize(line);
32 }
33
34 //find coordinates of the next location
35 void GetNextLocation(int current_location[2], char sign, int next_
location[2])
36 {
37 switch (sign)
38 {
39 case '>':
40 next_location[0] = current_location[0];
41 next_location[1] = current_location[1] +1;
42 break;
43 case '44 next_location[0] = current_location[0];
45 next_location[1] = current_location[1] -1;
46 break;
47 case '^':
48 next_location[0] = current_location[0]-1;
49 next_location[1] = current_location[1];
50 break;
51 case 'V':
52 case 'v':
53 next_location[0] = current_location[0] +1;
54 next_location[1] = current_location[1];
55 break;
56 default: throw "wrong direction sign";
57 break;
58 }
59
60 }
61
62 //determine new travel direction
63 char ChangeDirection(vector>& room, int new_location[2],
char previous_sign)
64 {
65 if (room[new_location[0]][ new_location[1]] == '@' ||room[new_
location[0]][ new_location[1]] == '-' )
66 return(previous_sign);
67 else
68 return(room[new_location[0]][ new_location[1]]);
69 }
70
71 //calculate the length of the path
72 int LaserPathLength(vector>& room, int start[2])
73 {
74 map prism_loc_hitnumber; //key=location, value = number
hits.
75 int m = room.size();
76 int n = room[0].size();
77 char direction = '>';
78 int location[2] = {start[0], start[1]};
79 int next_location[2];
80 int path = 0;
81 do{
82 path++;
83 GetNextLocation( location, direction, next_location);
84 if (next_location[0] >= m || next_location[1] >= n || next_
location[0] < 0 || next_location[1] < 0)
85 return(path);
86 direction = ChangeDirection(room, next_location, direction);
87 location[0] = next_location[0];
88 location[1] = next_location[1];
89 if (room[location[0]][location[1]] != '@' && room[location[0]
][location[1]] != '-' )
90 {
91 if (prism_loc_hitnumber[next_location[0]*n + next_
location[1]] > 0)
92 return(-1);
93 else
94 prism_loc_hitnumber[next_location[0]*n + next_
location[1]]++;
95 }
96 }while(1);
97 }
98
99 //convert interger to string
100 string Int_to_String(int number_input)
101 {
102 string returnvalue;
103 int number = abs(number_input);
104 if (number == 0)
105 return "0";
106 string temp="";
107 if (number_input < 0)
108 returnvalue="-";
109 else
110 returnvalue="";
111 while (number>0)
112 {
113 temp+=number%10+48;
114 number/=10;
115 }
116 for (int i=0;i117 returnvalue+=temp[temp.length()-i-1];
118 return returnvalue;
119 }
120
121 int main() {
122 vector> room(150, vector(150));
123 int start[2];
124 int path_length=0;
125 string out_path;
126 //read from STDIN
127 try {
128 read_stdin( room, start);
129 }
130 catch (const char* msg)
131 {
132 cout << msg << endl;
133 }
134 //calculate path length
135 try
136 {
137 path_length = LaserPathLength(room, start);
138 }
139 catch (const char* msg)
140 {
141 cout << msg <142 }
143 //convert to string and output to stdout
144 out_path = Int_to_String( path_length);
145 cout << out_path << endl;
146 return(0);
147 1}1

【在 z****e 的大作中提到】
: 代码贴出来看看
avatar
f*l
38
界个是电面中写的code?

code
toward
placed.
the
hits

【在 s*****b 的大作中提到】
: 我来贴一个。
: Rocket fule (Software Engineer - Machine Learning Scientist ) 技术电面后code
: test. code通过了所有test cases. 人家看过code 后就拒了。问题在哪里呢?请各位
: 牛人不吝赐教。题目本版以前贴过
: You are standing in a rectangular room and are about to fire a laser toward
: the east wall. Inside the room a certain number of prisms have been placed.
: They will alter the direction of the laser beam if it hits them. There
: are north-facing, east-facing, west-facing, and south-facing prisms. If the
: laser beam strikes an east-facing prism, its course will be altered to be
: East, regardless of what direction it had been going in before. If it hits

avatar
g*o
39
rocket fuel是不是用interview street?
你怎么知道你过了所有test cases而不是只通过了它提供的sample test case?
你把题目的constrain也贴出来看看
interview street会有对算法速度很高的test case,说不定你超时之类

code
toward
placed.
the
hits

【在 s*****b 的大作中提到】
: 我来贴一个。
: Rocket fule (Software Engineer - Machine Learning Scientist ) 技术电面后code
: test. code通过了所有test cases. 人家看过code 后就拒了。问题在哪里呢?请各位
: 牛人不吝赐教。题目本版以前贴过
: You are standing in a rectangular room and are about to fire a laser toward
: the east wall. Inside the room a certain number of prisms have been placed.
: They will alter the direction of the laser beam if it hits them. There
: are north-facing, east-facing, west-facing, and south-facing prisms. If the
: laser beam strikes an east-facing prism, its course will be altered to be
: East, regardless of what direction it had been going in before. If it hits

avatar
l*n
40
老实说,感觉你搞复杂了吧。用个set记录到过的位置(视matrix为array),直接开枪就
是了,反正就四个方向。

code
toward
placed.
the
hits

【在 s*****b 的大作中提到】
: 我来贴一个。
: Rocket fule (Software Engineer - Machine Learning Scientist ) 技术电面后code
: test. code通过了所有test cases. 人家看过code 后就拒了。问题在哪里呢?请各位
: 牛人不吝赐教。题目本版以前贴过
: You are standing in a rectangular room and are about to fire a laser toward
: the east wall. Inside the room a certain number of prisms have been placed.
: They will alter the direction of the laser beam if it hits them. There
: are north-facing, east-facing, west-facing, and south-facing prisms. If the
: laser beam strikes an east-facing prism, its course will be altered to be
: East, regardless of what direction it had been going in before. If it hits

avatar
l*n
41
你怎么还自己搞了个intToString的函数?

code
toward
placed.
the
hits

【在 s*****b 的大作中提到】
: 我来贴一个。
: Rocket fule (Software Engineer - Machine Learning Scientist ) 技术电面后code
: test. code通过了所有test cases. 人家看过code 后就拒了。问题在哪里呢?请各位
: 牛人不吝赐教。题目本版以前贴过
: You are standing in a rectangular room and are about to fire a laser toward
: the east wall. Inside the room a certain number of prisms have been placed.
: They will alter the direction of the laser beam if it hits them. There
: are north-facing, east-facing, west-facing, and south-facing prisms. If the
: laser beam strikes an east-facing prism, its course will be altered to be
: East, regardless of what direction it had been going in before. If it hits

avatar
M*a
42
代码就是语言。
个人认为是找茬。
avatar
s*b
43
谢谢了!面试官可能从这里断定我不熟练。
interviewstreet, 3小时, 没超时。 只有8组测试数据。
要求:
Whichever language you code in, please use best coding practices. We are
looking for clear, concise, well-documented, modular code that reflects good
design, object-oriented principles, and an understanding of appropriate
data structures. It is not enough to write code that is merely correct, or
even code that is merely terse and correct. We want to see code that is as
beautiful as you can make it according to your personal coding aesthetic.

【在 l*n 的大作中提到】
: 你怎么还自己搞了个intToString的函数?
:
: code
: toward
: placed.
: the
: hits

avatar
b*n
44
哪里找人去做code review?

★ 发自iPhone App: ChineseWeb 7.8

【在 f********4 的大作中提到】
: 找人给你做code review啊
avatar
b*n
45
好,回头我贴一下,让大家见见传说中的academic style~

★ 发自iPhone App: ChineseWeb 7.8

【在 z****e 的大作中提到】
: 代码贴出来看看
avatar
h*g
46
坐等
avatar
n*d
47
没事谁去背个quicksort
工作中编程的东西比面试题目简单太多了

【在 s*****r 的大作中提到】
: 蛋不能这么扯,能写好quicksort而且bug-free,大多数公司都qualify了。
avatar
G*l
48
这不是熟练的问题,真正的project跟做题不是一回事,99.9%以上的code,除了不
出错之外,最最重要的是人容易看懂和要添加/修改功能的时候容易不容易。人家都说
了It is not enough to write code that is merely correct。
就提到的这些要求,看看你的code满足了多少?
clear,concise:
你觉得
if (room[new_location[0]][ new_location[1]] == '@' ||room[new_
location[0]][ new_location[1]] == '-' )
66 return(previous_sign);
67 else
68 return(room[new_location[0]][ new_location[1]]);
这样的code clear&concise么?如果你读别人这样的code,会不会觉得烦人?clear&
concise的code不需要看题目一眼看过去就能大概明白是在干嘛。
well documented:
别的不说了,至少你的方法要给个完整的注释吧,每个参数是干嘛的,做什么事情,返
回什么。
modular, design:
你觉得你的code有清晰的模块吗?输入,输出,中间的动作,都有模块没有?如果输入
格式/来源改了,另外一种格式,从数据库读入。如果输出的要求变了,举个例子,不
只是要路程长度,还有别的信息转弯的次数等等。如果激光的动作方式变了,镜子的功
能变了。还有很多如果,你能在尽量不要改变class/method的接口和参数,原先调用现
在的方法的地方都能工作,只是添加一些class/subclass,method来达到目的吗?
oo:
你连一个自定义的class都没有。。。更别提封装组合继承多态这些oo最基本的东西了。
再比如错误的处理,输入格式不对怎么办?激光在房间里死循环了怎么办?等等。
还有很多方面。不可能做到完美,特别是经验少的,勉强做到都很难。但就算没有这个
能力,面试的人至少想看到有这个意识。

are
good
as

【在 s*****b 的大作中提到】
: 谢谢了!面试官可能从这里断定我不熟练。
: interviewstreet, 3小时, 没超时。 只有8组测试数据。
: 要求:
: Whichever language you code in, please use best coding practices. We are
: looking for clear, concise, well-documented, modular code that reflects good
: design, object-oriented principles, and an understanding of appropriate
: data structures. It is not enough to write code that is merely correct, or
: even code that is merely terse and correct. We want to see code that is as
: beautiful as you can make it according to your personal coding aesthetic.

avatar
s*b
49
说得好极了!这样的点评对我等菜鸟太重要了。谢过了。
希望看到更多点评, 也很想看看他人的“学院派”代码。

【在 G***l 的大作中提到】
: 这不是熟练的问题,真正的project跟做题不是一回事,99.9%以上的code,除了不
: 出错之外,最最重要的是人容易看懂和要添加/修改功能的时候容易不容易。人家都说
: 了It is not enough to write code that is merely correct。
: 就提到的这些要求,看看你的code满足了多少?
: clear,concise:
: 你觉得
: if (room[new_location[0]][ new_location[1]] == '@' ||room[new_
: location[0]][ new_location[1]] == '-' )
: 66 return(previous_sign);
: 67 else

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。