News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Timothy Boronczyk's Blog:
Spaghetti Code Considered Harmful
May 20, 2011 @ 10:50:46

Timothy Boronczyk has a new post to his blog proposing something that any veteran developer already knows - "spaghetti code" is harmful to the health of your application. He's done a little research, though, and tried to explore what this "bad code" really is.

The phrase "spaghetti code" is an all-too-common pejorative we programmers use to describe horrible code, whether it's difficult to understand, poorly organized, or just plain long-winded. And there-in lays the problem. What really constitutes spaghetti code is subjective; I've yet to hear a concrete definition or standard metric that measures it. [...] Everyone has his or her own opinion as to what aspects would make them label it spaghetti.

Suggested definitions include: quickly written, non-standardized, beginner-level quality and any code that makes use of "goto". He suggests that applying the term to someone's code is less about the real quality of the code and more about social aspects of not wanting to upset the other developer over its quality.

But besides negatively affecting others, our complaining about spaghetti code hurts ourselves too. It's easier to motivate ourselves when tasked with fixing a bug when we're not dreading having to trudge through spaghetti. When we label code as spaghetti code, we are actually creating roadblocks that hamper ourselves and artificially increase the difficulty of the task at hand.
0 comments voice your opinion now!
spaghetti code harmful social standards quality


blog comments powered by Disqus

Similar Posts

Patrick Allaert's Blog: Coding standards: converts PHP4 style constructors to PHP5 one

Community News: Del.icio.us Switches to Symfony

Reddit.com: Can anyone suggest a php ecommerce solution that isn't terrible?

Echolibre Blog: Recommended PHP Standards Group

Evert Pot's Blog: Taking advantage of PHP namespaces with older code


Community Events











Don't see your event here?
Let us know!


symfony2 package facebook hack framework podcast component release language security opinion unittest application hhvm install code composer introduction example overview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework