Knowledge

Code smell

Source 📝

105:
Factors such as the understandability of code, how easy it is to be modified, the ease in which it can be enhanced to support functional changes, the code's ability to be reused in different settings, how testable the code is, and code reliability are factors that can be used to identify code smells.
75:; they are not technically incorrect and do not prevent the program from functioning. Instead, they indicate weaknesses in design that may slow down development or increase the risk of bugs or failures in the future. Bad code smells can be an indicator of factors that contribute to 97:
in small, controlled steps, and the resulting design is examined to see if there are any further code smells that in turn indicate the need for more refactoring. From the point of view of a programmer charged with performing refactoring, code smells are
420:
Suryanarayana, Girish, Ganesh Samarthyam, and Tushar Sharma. Refactoring for Software Design Smells : Managing Technical Debt / Girish Suryanarayana, Ganesh Samarthyam, Tushar Sharma. 1st edition. Waltham, Massachusetts ; Morgan Kaufmann, 2015.
70:
One way to look at smells is with respect to principles and quality: "Smells are certain structures in the code that indicate violation of fundamental design principles and negatively impact design quality". Code smells are usually not
86:
Contrary to these severe interpretations, Cunningham's original definition was that a smell is a suggestion that something may be wrong, not evidence that there is already a problem.
132:
Common wisdom suggests that urgent maintenance activities and pressure to deliver features while prioritizing time-to-market over code quality are often the causes of such smells.
200:
Tufano, Michele; Palomba, Fabio; Bavota, Gabriele; Oliveto, Rocco; Di Penta, Massimiliano; De Lucia, Andrea; Poshyvanyk, Denys (2015).
534: 529: 171: 102:
to indicate when to refactor, and what specific refactoring techniques to use. Thus, a code smell is a driver for refactoring.
405: 330: 234: 516:, ACM SIGSOFT Software Engineering Notes, Vol. 18 No. 2 (April 1993), Association for Computing Machinery, New York, NY, USA 117:
There exists empirical evidence for the consequences of "technical debt", but there exists only anecdotal evidence as to
377: 434:
Garousi, Vahid; Küçük, Barış (2018). "Smells in software test code: A survey of knowledge in industry and academia".
347: 314: 55: 35:
that possibly indicates a deeper problem. Determining what is and is not a code smell is subjective, and varies by
513: 99: 89:
Often the deeper problem hinted at by a code smell can be uncovered when the code is subjected to a short
59: 217: 110: 201: 212: 113:
and the manual examination of 9,164 commits determined to exhibit "code smells" found that:
36: 20: 8: 456: 240: 50:
in the late 1990s. Usage of the term increased after it was featured in the 1999 book
401: 373: 326: 230: 244: 472: 443: 393: 222: 94: 80: 32: 319: 491: 259: 141: 76: 476: 447: 539: 523: 509: 176: 166: 161: 72: 226: 109:
A 2015 study utilizing automated analysis for half a million source code
83:
calls a list of code smells a "value system" for software craftsmanship.
28: 209:
2015 IEEE/ACM 37th IEEE International Conference on Software Engineering
137: 149: 47: 43: 460: 145: 90: 288: 199: 398:
Clean Code: A Handbook of Agile Software Craftsmanship
339: 321:Refactoring. Improving the Design of Existing Code 318: 52:Refactoring: Improving the Design of Existing Code 521: 454: 510:Software cancer: the seven early warning signs 367: 433: 282: 280: 202:"When and Why Your Code Starts to Smell Bad" 195: 193: 191: 39:, developer, and development methodology. 277: 216: 188: 345: 152:can automatically identify code smells. 368:Suryanarayana, Girish (November 2014). 522: 392: 370:Refactoring for Software Design Smells 313: 172:List of tools for static code analysis 396:(2009). "17: Smells and Heuristics". 16:Computer programming characteristic 13: 427: 257: 14: 551: 484: 372:. Morgan Kaufmann. p. 258. 286: 465:Journal of Systems and Software 436:Journal of Systems and Software 346:Binstock, Andrew (2011-06-27). 414: 386: 361: 307: 251: 1: 535:Software engineering folklore 530:Computer programming folklore 461:"A survey on software smells" 182: 65: 27:is any characteristic in the 58:. It is also a term used by 42:The term was popularized by 7: 155: 10: 556: 477:10.1016/j.jss.2017.12.034 448:10.1016/j.jss.2017.12.013 348:"In Praise Of Small Code" 227:10.1109/ICSE.2015.59 211:. pp. 403–414. 21:computer programming 457:Spinellis, Diomidis 350:. Information Week 325:. Addison-Wesley. 407:978-0-13-235088-4 400:. Prentice Hall. 394:Martin, Robert C. 332:978-0-201-48567-7 295:. Ward Cunningham 264:martinfowler.com/ 236:978-1-4799-1934-5 547: 505: 503: 502: 496:martinfowler.com 480: 455:Sharma, Tushar; 451: 422: 418: 412: 411: 390: 384: 383: 365: 359: 358: 356: 355: 343: 337: 336: 324: 311: 305: 304: 302: 300: 284: 275: 274: 272: 270: 258:Fowler, Martin. 255: 249: 248: 220: 206: 197: 81:Robert C. Martin 555: 554: 550: 549: 548: 546: 545: 544: 520: 519: 508:Boundy, David, 500: 498: 490: 487: 430: 428:Further reading 425: 419: 415: 408: 391: 387: 380: 366: 362: 353: 351: 344: 340: 333: 312: 308: 298: 296: 285: 278: 268: 266: 256: 252: 237: 218:10.1.1.709.6783 204: 198: 189: 185: 158: 68: 17: 12: 11: 5: 553: 543: 542: 537: 532: 518: 517: 506: 486: 485:External links 483: 482: 481: 452: 429: 426: 424: 423: 413: 406: 385: 379:978-0128013977 378: 360: 338: 331: 315:Fowler, Martin 306: 276: 250: 235: 186: 184: 181: 180: 179: 174: 169: 164: 157: 154: 136:Tools such as 134: 133: 130: 93:, where it is 91:feedback cycle 77:technical debt 67: 64: 15: 9: 6: 4: 3: 2: 552: 541: 538: 536: 533: 531: 528: 527: 525: 515: 511: 507: 497: 493: 489: 488: 478: 474: 470: 466: 462: 458: 453: 449: 445: 441: 437: 432: 431: 417: 409: 403: 399: 395: 389: 381: 375: 371: 364: 349: 342: 334: 328: 323: 322: 316: 310: 294: 290: 289:"Code Smells" 283: 281: 265: 261: 254: 246: 242: 238: 232: 228: 224: 219: 214: 210: 203: 196: 194: 192: 187: 178: 175: 173: 170: 168: 165: 163: 160: 159: 153: 151: 147: 143: 139: 131: 128: 124: 120: 116: 115: 114: 112: 107: 103: 101: 96: 92: 87: 84: 82: 78: 74: 63: 62:programmers. 61: 57: 56:Martin Fowler 53: 49: 45: 40: 38: 34: 30: 26: 22: 499:. Retrieved 495: 468: 464: 439: 435: 416: 397: 388: 369: 363: 352:. Retrieved 341: 320: 309: 297:. Retrieved 292: 287:Beck, Kent. 267:. Retrieved 263: 253: 208: 177:Software rot 167:Design smell 162:Anti-pattern 135: 129:this occurs. 126: 122: 118: 108: 104: 88: 85: 69: 51: 41: 24: 18: 492:"CodeSmell" 471:: 158–173. 293:WikiWikiWeb 269:19 November 260:"CodeSmell" 29:source code 524:Categories 501:2022-03-01 354:2011-06-27 183:References 138:Checkstyle 100:heuristics 95:refactored 66:Definition 25:code smell 442:: 52–81. 213:CiteSeerX 150:SonarQube 48:WardsWiki 44:Kent Beck 459:(2018). 317:(1999). 245:59100195 156:See also 146:FindBugs 37:language 299:8 April 111:commits 33:program 421:Print. 404:  376:  329:  243:  233:  215:  148:, and 241:S2CID 205:(PDF) 125:, or 60:agile 31:of a 540:Odor 514:here 402:ISBN 374:ISBN 327:ISBN 301:2020 271:2014 231:ISBN 123:when 73:bugs 23:, a 512:or 473:doi 469:138 444:doi 440:138 223:doi 142:PMD 127:why 119:how 54:by 46:on 19:In 526:: 494:. 467:. 463:. 438:. 291:. 279:^ 262:. 239:. 229:. 221:. 207:. 190:^ 144:, 140:, 121:, 79:. 504:. 479:. 475:: 450:. 446:: 410:. 382:. 357:. 335:. 303:. 273:. 247:. 225::

Index

computer programming
source code
program
language
Kent Beck
WardsWiki
Martin Fowler
agile
bugs
technical debt
Robert C. Martin
feedback cycle
refactored
heuristics
commits
Checkstyle
PMD
FindBugs
SonarQube
Anti-pattern
Design smell
List of tools for static code analysis
Software rot



"When and Why Your Code Starts to Smell Bad"
CiteSeerX
10.1.1.709.6783
doi

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.