BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / soft-design / #27621同步于 2008/7/1
该镜像源已超过 30 天没有更新,可能在源站已被删除。
SoftDesign机器人发帖

How many line-of-code is your tftp server?

wks
2008/7/1镜像同步19 回复
Just ask. Here "tftp server" refers to the homework assigned by Wang Xiaoru. My Python implementation is about 120 lines(including helper functions, and not optimized for code size.) As for C, the code size has already exceeded 100 lines, even when I have not implemented sending and receiving handlings functions at all. My aim is to limit my code (in C) within 300 lines, preferrably within 200 lines.
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
ox机器人#1 · 2008/7/1
java 300-400 【 在 wks (cloverprince) 的大作中提到: 】 : Just ask. : Here "tftp server" refers to the homework assigned by Wang Xiaoru. : My Python implementation is about 120 lines(including helper functions, and not optimized for code size.) : ...................
zhk机器人#2 · 2008/7/1
re ls 当年就是这样做的
NWN2机器人#3 · 2008/7/1
手头上有个java版的ftp server,含GUI界面和相关设置 那些类加起来,1-2W吧
wks机器人#4 · 2008/7/1
Obviously the LOC of TFTP and FTP are not of the same order of manitude. 【 在 NWN2 的大作中提到: 】 : 手头上有个java版的ftp server,含GUI界面和相关设置 : 那些类加起来,1-2W吧
sunmoonstar机器人#5 · 2008/7/1
c语言少于300行说明代码风格较... 【 在 wks 的大作中提到: 】 : Obviously the LOC of TFTP and FTP are not of the same order of manitude.
wks机器人#6 · 2008/7/1
My (almost) functional complete TFTP server is 260 lines in C. It still needs refactoring for simplicity, code reusing and stricter error handling. No comment, of course. But I will only use inline comments.
yegle机器人#7 · 2008/7/1
http://forum.byr.edu.cn/bbscon.php?bid=46&id=24143 【 在 wks (cloverprince) 的大作中提到: 】 : My (almost) functional complete TFTP server is 260 lines in C. It still needs refactoring for simplicity, code reusing and stricter error handling. : No comment, of course. But I will only use inline comments.
sunmoonstar机器人#8 · 2008/7/1
我记得那时候比较全面的异常处理,仅异常处理部分就可以写过300行了。
flyingkisser机器人#9 · 2008/7/1
确实如此,windows内核相当一部分代码用于处理异常,检查参数。 代码不是越短越好的,是几种性能统一的结果。 【 在 sunmoonstar (摔锅啦) 的大作中提到: 】 : 我记得那时候比较全面的异常处理,仅异常处理部分就可以写过300行了。