- Hands-On Dependency Injection in Go
- Corey Scott
- 144字
- 2021-06-10 19:17:44
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
推薦閱讀
- Learn ECMAScript(Second Edition)
- Linux核心技術(shù)從小白到大牛
- TestNG Beginner's Guide
- 實戰(zhàn)低代碼
- IBM Cognos Business Intelligence 10.1 Dashboarding cookbook
- Mastering Python Design Patterns
- Developing SSRS Reports for Dynamics AX
- Java Web應(yīng)用開發(fā)項目教程
- R語言:邁向大數(shù)據(jù)之路(加強版)
- Scala Functional Programming Patterns
- Python+Office:輕松實現(xiàn)Python辦公自動化
- UML軟件建模
- 軟件測試分析與實踐
- C/C++代碼調(diào)試的藝術(shù)(第2版)
- JavaScript語法簡明手冊