查看: 1578|回复: 20
|
修改别人写的program
[复制链接]
|
|
想问如果现有一个program 是别人写的, 老板要求debug 或改一些funciton 和加一些新的function, 各位是会自己写个新的program还是修改之前的呢?
我现在就是要debug 之前的人写的program, 看他的code 看的我头晕 |
|
|
|
|
|
|
|
发表于 28-9-2007 02:28 PM
|
显示全部楼层
什么 PROGRAM来的呢 |
|
|
|
|
|
|
|
楼主 |
发表于 28-9-2007 02:51 PM
|
显示全部楼层
C programming 用在 KEIL C51的
[ 本帖最后由 ctkhai 于 28-9-2007 07:41 PM 编辑 ] |
|
|
|
|
|
|
|
发表于 28-9-2007 02:59 PM
|
显示全部楼层
|
|
|
|
|
|
|
楼主 |
发表于 28-9-2007 03:42 PM
|
显示全部楼层
哦。。 我得意思是有时要看人家的code蛮花时间的, 倒不如自己写 |
|
|
|
|
|
|
|
发表于 28-9-2007 04:26 PM
|
显示全部楼层
原帖由 ctkhai 于 28-9-2007 02:21 PM 发表
想问如果现有一个program 是别人写的, 老板要求debug 或改一些funciton 和加一些新的function, 各位是会自己写个新的program还是修改之前的呢?
我现在就是要debug 之前的人写的program, 看他的code 看的我 ...
如果是我,我会先看别人的program。。是否很多地方需要改进?
然后再estimate从新build一个program比较快,比较effective还是改别人的project。。
try to reused the code如果可以的话。。这样会比较省时省力。。。 |
|
|
|
|
|
|
|
发表于 28-9-2007 04:32 PM
|
显示全部楼层
通常老闆是會要求修改多點,但是如果要重寫,就要有很多的point 跟老闆fight了 |
|
|
|
|
|
|
|
发表于 28-9-2007 04:49 PM
|
显示全部楼层
|
|
|
|
|
|
|
楼主 |
发表于 28-9-2007 06:27 PM
|
显示全部楼层
hmm.. 看来programmer 的想法都差不多 |
|
|
|
|
|
|
|
发表于 28-9-2007 07:20 PM
|
显示全部楼层
我会重写,身为软件开发商,在商言商,因为开发费较修改费高。
我初入行时就是一直修改前人的手尾,累计一年经验后比刚入行的 Degree holder 同事都给我比下去了。
以我现今的水准,给我看一眼界面已知道它怎样编写,通常我开发一套系统前一定先参考别的同类型系统怎样工作,集思广益。 |
|
|
|
|
|
|
|
发表于 4-10-2007 01:25 AM
|
显示全部楼层
原帖由 <i>ctkhai</i> 于 28-9-2007 02:51 PM 发表 <a href="http://chinese.cari.com.my/myforum/redirect.php?goto=findpost&pid=33265255&ptid=989591" target="_blank"><img src="http://chinese.cari.com.my/myforum/images/common/back.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" /></a><br />
C programming 用在 KEIL C51的 <br />
firmware 来的, 用在于 embeded system吗? then 我maybe 会 修改。 |
|
|
|
|
|
|
|
发表于 4-10-2007 08:55 AM
|
显示全部楼层
如果原有的程式的可维护性不强(或没),把虫抓走和再添加新功能,也许会造成更多的虫,或是,也许,会有performance issue。
-寄生会重写。 |
|
|
|
|
|
|
|
发表于 5-10-2007 01:08 AM
|
显示全部楼层
programmer most hate
其中之一个就是 read other's code
良好的风格,习惯,易读,不是每个人都做得到。
看看哪一个比较麻烦,就放弃那个念头吧。。。
有时候,部分重写,部分保留,也是折中的选择。。。 |
|
|
|
|
|
|
|
发表于 5-10-2007 08:46 AM
|
显示全部楼层
如果他的code 写到ioccc般艺术水准。。
我想我会从写。。。 |
|
|
|
|
|
|
|
发表于 5-10-2007 04:15 PM
|
显示全部楼层
原帖由 tensaix2j 于 5-10-2007 08:46 AM 发表
如果他的code 写到ioccc般艺术水准。。
我想我会从写。。。
什么是ioccc???? stand???? |
|
|
|
|
|
|
|
楼主 |
发表于 5-10-2007 06:17 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 6-10-2007 12:04 AM
|
显示全部楼层
原帖由 程家伟 于 5-10-2007 04:15 PM 发表
什么是ioccc???? stand????:sweat3:
ioccc就是。。那些。。。。拿code当艺术来玩的。。。
The International Obfuscated C Code Contest
例如。。。
这样子写hello world 的。。。
main(i){for(;i["]<i;++i){--i;}"];read('-'-'-',i+++"-hell\o, world!\n",'/'/'/'));}read(j,i,p){write(j/p+p,i---j,i/i);} |
|
|
|
|
|
|
|
发表于 12-10-2007 10:35 AM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 12-10-2007 11:33 AM
|
显示全部楼层
aiya, 搞编程的男生都会有股莫名的自毫心。尤其是年轻的。。。。。。 |
|
|
|
|
|
|
|
发表于 12-10-2007 01:22 PM
|
显示全部楼层
回复 #19 tensaix2j 的帖子
那。。。你呢? |
|
|
|
|
|
|
| |
本周最热论坛帖子
|