官术网_书友最值得收藏!

Code smells that indicate you might need DI

The saying to a man with only a hammer, every problem looks like a nail is old and yet is never truer than in programming. As professionals, we should be continually striving to acquire more tools to be better equipped for whatever our job throws at us. DI, while a highly useful tool, is useful only for particular nails. In our case, these nails are code smells. Code smells are indications in the code of a potentially deeper problem.

There are many different types of code smell; in this section, we will examine only those that can be alleviated by DI. In later chapters, we will reference these smells as we attempt to remove them from our code.

Code smells generally fall into four different categories:

  • Code bloat
  • Resistance to change
  • Wasted effort
  • Tight coupling
主站蜘蛛池模板: 四川省| 方城县| 凭祥市| 海阳市| 收藏| 忻城县| 房产| 寻乌县| 张家川| 义马市| 介休市| 柳州市| 北票市| 马龙县| 巨鹿县| 抚远县| 秭归县| 横山县| 永春县| 谷城县| 黎城县| 无锡市| 女性| 安陆市| 桦甸市| 汝州市| 商洛市| 阜平县| 汕尾市| 杭州市| 衡南县| 额敏县| 龙门县| 中西区| 德阳市| 新疆| 晴隆县| 金华市| 乐亭县| 吉木萨尔县| 新蔡县|