Always Try to Refactoring Rather Than Rewriting Codes

原创 2004年07月12日 09:47:00
Rewriting codes is something of work while refactoring codes will be something of art. Do not always try to rewrite codes. Refactoring codes helps you working efficiently if you get the spirit of the refactor art.

Read more about refactoring.

Quote:
http://www-106.ibm.com/developerworks/library/j-jtp06294.html
Of course, the best time to ensure high-quality code is at the moment the code is being written, as this is the time you best understand how it is put together. Plenty of advice can be had (just read this column!) on how to write quality code, but you don't always have the luxury of writing everything from scratch or taking as much time as you'd like to write it. So what do you do in that case? Developers often lobby for rewriting (after all, writing new code is more fun than fixing someone else's, or even our own, buggy code), but that, too, is a luxury, and often simply trades today's known problems for tomorrow's unknown ones. What is needed are better tools for analyzing and auditing existing codebases to assist developers in code audits and bug hunting.

TypeError: context must be a dict rather than Context.

1 TypeError: context must be a dict rather than Context. 解释:模板渲染中传入的内容只能是字典,不能是Context对象类型。(1...
  • sinat_36772813
  • sinat_36772813
  • 2017年09月05日 10:51
  • 786

Django 中遇到的问题(1)TypeError: context must be a dict rather than Context.

1 . TypeError: context must be a dict rather than Context.翻译:上下文必须是一个字段,而不是一个Context实例对象 Django版本 1...
  • u014770372
  • u014770372
  • 2017年07月24日 21:29
  • 4038

解决used as the name of the previous parameter rather than as part of the selector(⚠️)方法

这是IOS 4.6 更新之后出现的警告 可以在.pch 中加上  #pragma clang diagnostic ignored "-Wmissing-selector-name"  就可以解...
  • yuanpeng1014
  • yuanpeng1014
  • 2016年08月19日 14:18
  • 319

Python异常:Django1.11--context must be a dict rather than RequestContext.

使用Django1.11,在views.py中如果这样写 def index(request): # return HttpResponse("欢迎来到 Django首页!") book...
  • fly910905
  • fly910905
  • 2017年09月12日 09:10
  • 1317

Please login as the ec2-user user rather than root user.

今天折腾了一下AWS的Free Usage Tire,在创建实例时发现没有ubuntu的选项,为了方便,就选择了Amazon的linux-32bit,在使用putty连接,用root登录时,出现了这个...
  • jubincn
  • jubincn
  • 2011年02月12日 13:38
  • 5045

解决used as the name of the previous parameter rather than as part of the selector方法

这是IOS 4.6 更新之后出现的警告,可以在.pch 中加上 #pragma clang diagnostic ignored "-Wmissing-selector-name" 就可以解决...
  • Man_OC
  • Man_OC
  • 2014年10月28日 20:35
  • 3209

maven:Perhaps you are running on a JRE rather than a JDK

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-c...
  • HaiPaner
  • HaiPaner
  • 2015年01月31日 19:01
  • 1365

IOS警告imgName' used as the name of the previous parameter rather than as part of the selector

多为传入多个变量没有空格引起,在第二变量的冒号前面加个空格既可以解决。...
  • z2340868
  • z2340868
  • 2016年07月19日 17:22
  • 1080

3. No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK

在使用maven对项目进行打包的时候,出现了JDK错误,导致编包报错,错误信息如下: 如何解决呢?解决方案如下: 以下内容转载于:http://www.kriblog.com/ide/sts/...
  • LINABC123000
  • LINABC123000
  • 2017年04月03日 12:13
  • 884

Maven项目出现Perhaps you are running on a JRE rather than a JDK?

1、今天在使用springboot进行clean和package出现了错误,maven的错误如下:Failed to execute goal org.apache.maven.plugins:mav...
  • two_people
  • two_people
  • 2017年04月20日 11:30
  • 1321
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Always Try to Refactoring Rather Than Rewriting Codes
举报原因:
原因补充:

(最多只允许输入30个字)