The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Five Signs of Code Rot

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Five Signs of Code Rot Posted: Mar 22, 2006 8:58 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Five Signs of Code Rot
Feed Title: David Buck - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/buck-rss.xml
Feed Description: Smalltalk can do that
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From David Buck - Blog

Advertisement

Robert Martin wrote an article called Principles and Patterns in which he lists the 4 signs of code rot - rigidity, fragility, immobility and viscosity. In the past few years, I've been giving a lot of thought to this article and would propose changing these signs of code rot a bit.

Basically, I want to know "What are the underlying problems we would want to fix in a design". Assuming that the code actually works, on what grounds would we justify doing a refactoring? I've come up with five reasons (three of which overlap with Robert Martin's).

  1. Rigidity - A small change to the design requires wide-sweeping changes to the code. I also call this the "Local Change, Local Effect" principle.
  2. Fragility - A small change in one spot causes many things to break
  3. Immobility - Code is difficult to reuse in contexts other than the original one
  4. Obscurity - The code is difficult to read and understand
  5. Dispensability - The code is redundant or not needed at all

The interesting thing I've found is that I can map all of the code smells from Martin Fowler's book on Refactoring to one or more of these 5 signs of code rot. I think they form a good underpinning and justification of object oriented principles and practices.

This observation is one of the main themes of the Refactoring Object Oriented Designs course I'm offering over the spring and summer through XIA Systems.

Read: Five Signs of Code Rot

Topic: Civ IV: Something's not working for me Previous Topic   Next Topic Topic: Dabbling at Under the Radar

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use