Is "Data class" really a code smell?
“数据类”真的是一个代码味道吗?
Show the tool that measures the code smell.
展示可以度量代码味道的工具。
Fowler also identifies the Large Class as a code smell.
Fowler还将庞大的类也看作一种代码气味。
I'll use the following general format as we examine each code smell.
我将使用如下的通用格式来检查每一种代码味道。
Present the refactoring and, in some cases, the patterns to fix the code smell.
提供用于修复代码味道的重构和模式(在某些情况下)。
This is always a code smell: it's a cry for help for refactoring into their own methods.
这永远是代码的一部分:希望重构为自己的方法。
This kind of structure is an example of a bad "code smell" in that it relies upon duplication.
这种结构是坏“代码味道”的一个例子,原因在于它依赖于复制。
What this tells us about code smell as a mechanism for evaluating code is that it's subjective.
这告诉我们,代码味道是一种评估代码的机制,它具有主观性。
The highlighted section in Listing 7 shows a small portion of an example of a long method code smell.
清单7中高亮显示的部分展示了一个长方法代码味道示例的一小部分。
While anyone would identify the repetition as a "code smell," most of us have learned to live with it.
虽然所有人都将这种重复标识为“代码味道”,但我们大多数都已经学会忍受它。
This represents a code smell because you have essentially copied-and-pasted code throughout your application with minor variations.
这代表着一种代码味道,因为应用程序中前后出现实际上可以复制-粘贴的代码,这些代码差别很小。
If you're writing similar DAOs, managers, and actions or controllers and you're not generating the code for them, that's a code smell.
如果我们正在编写类似的DAO、管理器、操作或控件,并且不想为它们生成代码,那么这就需要根据代码的气味来生成代码。
This article provides a pattern of correlating a code smell to a measure that can be configured to be flagged from an automated static analysis tool.
本文提供了一种使代码味道与一种度量方法相关的模式,这种度量方法可以配置为通过自动静态分析工具标记。
In his book, Refactoring, Martin Fowler describes the issue with the long Method code smell quite nicely as "the longer a procedure is, the more difficult it is to understand."
MartinFowler在他撰写的Refactoring这本书中,对代码中存在冗长方法的气味这个问题做了精妙的描述——过程越长,越难理解。
It's not that the word "smell" doesn't accurately reflect a symptom that indicates that code may be wrong, it just sounds funny to me.
并不是说“气味”这个词不能准确地反映出某种表明代码可能有错误的症状,只是我觉得这样听起来很滑稽。
They know how to code, but they're also familiar with the smell of axle grease.
他们知道如何写代码,但是他们也非常熟悉车轴机油的气味。
That is, code, like rotting fish, begins to smell over time.
也就是说,代码像腐烂的鱼一样开始随着时间发臭。
Describe the smell that can indicate a problem in the code.
描述可以指示出代码里面的问题的味道。
People vary greatly when it comes to smell, largely due to chance mutations in the genes that code for the smell receptors rather than for adaptive reasons.
说到嗅觉,各人大不相同,主要是由于嗅觉感受器的基因代码偶然发生变异,而不是由于适应。
People vary greatly when it comes to smell, largely due to chance mutations in the genes that code for the smell receptors rather than for adaptive reasons.
说到嗅觉,各人大不相同,主要是由于嗅觉感受器的基因代码偶然发生变异,而不是由于适应。
应用推荐