The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: 肖海彤 <red...@gmail.com>
Date: Mon, 21 Sep 2009 21:07:08 -0700 (PDT)
Local: Tues, Sep 22 2009 12:07 am
Subject: Re: {技术}代码的坏味道——你们的项目有这些问题吗?
除了rename 重构在这个项目中远远不够之外, 其他几个方面, 我都同意你的看法.
这个项目中, 面临的问题是, 程序结构太复杂, 已经理解不了了, 不但新功能很难加, 旧 bug 也很难调试了. 所以不得不大动干戈. 我的方法是分步走, 全局变量先弄成类静态变量, ok 了, 再转成普通成员变量, ok 了, 再看看要不要加访问控制. 改一点就编译跑一 On Sep 22, 11:50 am, up duan <fixo...@gmail.com> wrote: > 就我的经验,简简单单的rename重构,就能极大地改善很多代码的质量,尤其是有一个良好的命名规范的时候。而且风险奇小。
> 重复代码的合并风险还是挺大的,反倒是长函数分拆风险很小。 > 取消全局变量一般来说都是个大动作,很有可能导致内部接口连锁式修改。 > 2009/9/22 肖海彤 <red...@gmail.com> > > 问题是, 原来有一半的代码是通过全局变量来耦合的, 这些 .cpp 几乎引用所有的 .h; 完成同样的功能的代码, 每个地方各写一份; 超 > > 我只能当所有的 .cpp 是一个单元, 所有的上层脚本是我的测试代码了. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||