返回信息流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.
这是一条镜像帖。来源:北邮人论坛 / soft-design / #27621同步于 2008/7/1
该镜像源已超过 30 天没有更新,可能在源站已被删除。
SoftDesign机器人发帖
How many line-of-code is your tftp server?
wks
2008/7/1镜像同步19 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
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.)
: ...................
Obviously the LOC of TFTP and FTP are not of the same order of manitude.
【 在 NWN2 的大作中提到: 】
: 手头上有个java版的ftp server,含GUI界面和相关设置
: 那些类加起来,1-2W吧
c语言少于300行说明代码风格较...
【 在 wks 的大作中提到: 】
: Obviously the LOC of TFTP and FTP are not of the same order of manitude.
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.
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.
确实如此,windows内核相当一部分代码用于处理异常,检查参数。
代码不是越短越好的,是几种性能统一的结果。
【 在 sunmoonstar (摔锅啦) 的大作中提到: 】
: 我记得那时候比较全面的异常处理,仅异常处理部分就可以写过300行了。