The Artima Developer Community
Sponsored Link

Artima Developer Spotlight Forum
Is Messy Code a Technical Debt?

18 replies on 2 pages. Most recent reply: Oct 23, 2009 12:52 PM by John Zabroski

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 18 replies on 2 pages [ « | 1 2 ]
James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: It needs a a better model Posted: Oct 22, 2009 10:03 AM
Reply to this message Reply
Advertisement
> Whether bad code is a cost depends on its situation and
> status regarding evolvability: a simple metric might be:
> how likely the code is to be modified, and what kind of
> modifications will be done. If code is never touched
> again, or is deleted and replaced wholesale, no cost is
> incurred. The rest of the range is probabalistic.

You are ignoring that much of the cost of messy code is in the reading. If a shop does code reviews, the cost of messy code is always greater than zero. There may also be perfectly functional messy code than never needs to be changed but incurs great cost of because the time it takes for people to understand what it is doing in both support and development roles. Often messy code is never changed not because it works properly but because feels they understand what it's doing enough to change it or the cost of changing it is too high.

Messy or sloppy code is one of the worst burdens for a development shop to bear. Combine that with poorly defined requirements and it's devastating. This is something that I've found that many career contractors do not understand. They write some code and leave and never see the impact of their sloppiness.

Harrison Ainsworth

Posts: 57
Nickname: hxa7241
Registered: Apr, 2005

Re: It needs a a better model Posted: Oct 23, 2009 2:30 AM
Reply to this message Reply
> the cost of messy code is in the reading

The same model can cover that just as well. The point is to find a clarified, objective way to understand and so handle the matter -- or verify whether it is worth worrying about at all.

I am not aware there is quite such a model, so it seems there is a potential worth considering.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: It needs a a better model Posted: Oct 23, 2009 7:35 AM
Reply to this message Reply
> > the cost of messy code is in the reading
>
> The same model can cover that just as well. The point is
> to find a clarified, objective way to understand and so
> handle the matter -- or verify whether it is worth
> worrying about at all.
>
> I am not aware there is quite such a model, so it seems
> there is a potential worth considering.

I'd love to have an objective way to measure code quality. But I think we also have to be ready to accept that there may be no way to do that for the foreseeable future. The inability to measure something objectively doesn't mean it doesn't exist or isn't important.

John Zabroski

Posts: 272
Nickname: zbo
Registered: Jan, 2007

Re: It needs a a better model Posted: Oct 23, 2009 12:52 PM
Reply to this message Reply
> A more sophisticated model is needed to evaluate these
> questions in any useful way.
>
> Whether bad code is a cost depends on its situation and
> status regarding evolvability: a simple metric might be:
> how likely the code is to be modified, and what kind of
> modifications will be done. If code is never touched
> again, or is deleted and replaced wholesale, no cost is
> incurred. The rest of the range is probabalistic.


Wrong. Bad code that creates an Abstraction Inversion will create inherent pressure on any interfaces that are built on top of that "code never touched again".

Flat View: This topic has 18 replies on 2 pages [ « | 1  2 ]
Topic: What are Your JUnit Pain Points, Really? Previous Topic   Next Topic Topic: VisualVM 1.2 Released

Sponsored Links



Google
  Web Artima.com   

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