公司走了一个人,留下了几万行程序`!(200分)

把源代码在大富翁上发布 [8D]
 
同意CatFox的意见。
拿上来大家一个人看上一段,应该比你自己看好多了。
不过要建立在你们公司不会因此炒掉你^_^
如果愿意,算我一份。
Derun@deruntex.com
 
to xieha:
老兄,我看如果你们公司的待遇不是很好的话,
或者如果你不在乎那几个钱的话,你还是走的好!
几万行的程序,在两个星期看完
是不可能的。除非你是天才,过目不忘。象现在面向对象编程写出来的代码,又多又
杂,技术性不强,但要对整个程序有一个全面的了解,不花一个月以上是不可能的。
特别是没有文档,我个人觉得世界上最无聊的事,最头疼的事,最痛苦的事,莫过于
看别人没有注释,资料的程序。那简直是在受罪。
我来公司时,接手了一个大约10万行以上的程序,而且光数据库的表就有100多个。
看了3个月,头都大了一寸。因为没有资料,现在还只是个大概。嘿嘿!
后来差点为此事走了人。
你看着办吧,我是过来人,感受过的。不骗你。
不过:Hecules兄讲的有点道理,代码写得好,技术性强,没有注释,也流下来看看。
学东西很要紧的。
祝你好运!
 
建议自已写,看别人的程序烦人
 
呵呵,类似于一些公开源代码的源程序!
给你也很难看懂,自已写又费力,真是难舍难分啊,呵呵
试着看看它的思路和做法,自己写也可以参考
 
我喜欢干这样的活,况且是delphi的更好看
 
几万行?还好我还没碰上。
 
好晕哟~~
 
搜集他的文档,让他临走前帮你介绍一下系统的大模块功能。
 
好,我就贴一个过程:sgd是stringgrid
procedure tfrmMdiChild.UnDo;
var
id,operation:string;
i,j,k:integer;
value:array of variant;
begin
if onlyread then
exit;
if lbxoperation.Items.Count<>0 then
begin
operation:=copy(lbxoperation.Items[lbxoperation.Items.Count-1],1,1);
if operation<>'-' then
begin
sgd.Row:=strtoint(copy(LbxOperation.Items[lbxoperation.Items.Count-1],2,pos(';',LbxOperation.Items[lbxoperation.Items.Count-1])-2));
if operation='@' then
begin
id:=copy(trim(LbxOperation.Items[lbxoperation.Items.Count-1]),pos(';',trim(LbxOperation.Items[lbxoperation.Items.Count-1]))+1,length(trim(LbxOperation.Items[lbxoperation.Items.Count-1]))-pos(';',trim(LbxOperation.Items[lbxoperation.Items.Count-1])));
k:=getsubstrnum(',',GetPrimaryKey);
setlength(value,k);
for i:=1 to kdo
value[i-1]:=StrToOther(getstring(',',GetPrimaryKey,i),getstring(chr(compart),id,i));
if cds.Locate(SubstrReplace(GetPrimaryKey,',',';'),vararrayof(value),[]) then
begin
for i:=1 to sgd.ColCount-1do
sgd.Cells[i,sgd.row]:=(VarToStr(cds[lbxfieldname.Items[i-1]]));

end;
end;
if operation='+' then
deleterow;
end
else
begin
ID:=copy(trim(LbxOperation.Items[lbxoperation.Items.Count-1]),2,length(trim(LbxOperation.Items[lbxoperation.Items.Count-1]))-1);
lbxid.items.add(id);
k:=getsubstrnum(',',GetPrimaryKey);
setlength(value,k);
for i:=1 to kdo
value[i-1]:=StrToOther(getstring(',',GetPrimaryKey,i),getstring(chr(compart),id,i));
if cds.Locate(SubstrReplace(GetPrimaryKey,',',';'),vararrayof(value),[]) then
begin
sgd.rowcount:=sgd.rowcount+1;
sgd.Rows[sgd.rowcount-1].Add(inttostr(sgd.RowCount-1));
for i:=1 to sgd.ColCount-1do
sgd.Cells[i,sgd.RowCount-1]:=(VarToStr(cds[lbxfieldname.Items[i-1]]));

sgd.Row:=sgd.rowcount-1;
end;
// lbxid.items.add(id);
end;
if operation<>'+' then
lbxoperation.Items.Delete(lbxoperation.Items.Count-1);
sgd.Refresh;
end;
if Assigned(OnCell) then
OnCell(SGD);
changememolist(sgd.Selection.Bottom);

end;
 
不写注释的垃圾代码, 谁看了谁烦
 
看不懂。
 
晕,不知道他到底要做什么
不过这个家伙对DELPHI的函数和一些控件的属性到是使用的很熟
 
靠,晕!
我晕,我晕,我晕晕
 
晕,够呛......
 
要找对路子才能看的好!你要知道很多代码都是一些华里糊壳的东西,比如修饰界面用的,或者的是一些其他的。
象上面的一位仁兄所说: 你要完全熟悉软件的功能, 从功能的角度来看代码,就比较容易。
用UML的建模语言的分析问题的角度,去看别人的软件的或者是“代码”也是很有帮助的。
问题并不是代码难懂,而是我们不知道目的。
就象上面的那个过程,你要先懂得这个过程的目的是什么,然后再来看代码。
从目的的角度上来看过程,好象比较容易吧。
这只是我考虑问题的一个方法。尤其是看代码,能了解思路或者是一些主要的东西就ok,不用去背。
 
我觉得你看别人程序,不要先看具体的代码,要知道他的思想和程序的框架结构。具体要
修改时再去看相应的功能就行了。
 
看来你们公司要招人了
我可以作兼职
 
to xieha:
你贴出这段代码其实不太难懂,我大概用了5分钟就知道大概。
这段代码虽然没有注解,但是方法及变量命名较规范,你从方法及变量的英文含义去理解
应当有所帮助。
我觉得要作一个好的软件工程师,学好英文也是很重要的。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部