• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Identifying Code smells.

 
Ranch Hand
Posts: 238
1
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the book cover areas of Code smells and how to identify them ,Any best practices?
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In general, I think the ability to recognize code smells boils down to Knowledge, Understanding, and Practice. You have to know what you are looking for and understand the implications of what you see when it's there. Only practice, and lots of it, will allow you to effectively deal with problems that you detect though.

Still, it's a good question. If the book has any specific discussion around code smells and how to deal with them, I'd be interested to know what they are.
 
Author
Posts: 63
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

meenakshi sundar wrote:Does the book cover areas of Code smells and how to identify them ,Any best practices?



For smells, you may take a look at this book: "Refactoring for Software Design Smells: Managing Technical Debt"

For best practices, take a look at resources page here. There are many presentations, papers, and documents that may interest you.

[Disclaimer: I am one of the co-authors of the above-cited book.]
 
meenakshi sundar
Ranch Hand
Posts: 238
1
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nice explanation T. Sharma and Junilu ,Hope the books throws some light on this ,In my experience tools like sonar with its cyclomatic complexity metrics report can identify some form of code smells.
 
Author
Posts: 18
5
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My book doesn't really focus on code smells specifically.

I didn't know about the book that Tushar linked to, but it looks really good. My recommendation: buy that!
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Chris mentions in another post reply - running sonarqube on your code base will tell you a lot -
give a starting point...
Very long methods always disturb me ;-) Especially when I need to scroll up/down while reading it...
Also another thing that usually stands is the violation of compose method
Duplication is also an ever present evil - Almost every code base I have worked with (including mine too at times ;-)
- this duplication beast kind of creeps in so stealthily... But the easiest to attack IMHO...
 
reply
    Bookmark Topic Watch Topic
  • New Topic