Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Spaghetti code
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Meaning == Code that overuses [[Goto|GOTO]] statements rather than [[structured programming]] constructs, resulting in convoluted and unmaintainable programs, is often called spaghetti code.<ref name="Cram5">{{cite journal|last1=Cram|first1=David|last2=Hedley|first2=Paul|title=Pronouns and procedural meaning: The relevance of spaghetti code and paranoid delusion|journal=Oxford University Working Papers in Linguistics, Philology and Phonetics|date=2005|volume=10|pages=187β210|url=http://mostlyharmless.org.uk/wp-content/uploads/2010/12/cramhedley-web.pdf|access-date=5 March 2018|archive-date=6 March 2018|archive-url=https://web.archive.org/web/20180306022905/http://mostlyharmless.org.uk/wp-content/uploads/2010/12/cramhedley-web.pdf|url-status=dead}}</ref> Such code has a complex and tangled [[control structure]], resulting in a program flow that is conceptually like a [[Spaghetti#Serving|bowl of spaghetti]], twisted and tangled<!-- pages 235β236 -->.<ref>{{cite book|last1=Horstmann|first1=Cay|title=Java Concepts for AP Computer Science|date=2008|publisher=J. Wiley & Sons|location=Hoboken, NJ|isbn=978-0-470-18160-7|pages=235β236|edition=5th ed. [i.e. 2nd ed.].|chapter-url=http://horstmann.com/bigjava3.html|access-date=2 January 2017|language=en|chapter=Chapter 6 - Iteration}}</ref> In a 1980 publication by the [[National Institute of Standards and Technology|United States National Bureau of Standards]], the phrase '''''spaghetti program''''' was used to describe older programs having "fragmented and scattered files".<ref>{{cite book|title=ASTM special technical publication|issue=500β565|author=United States National Bureau of Standards|publisher=United States Government Printing Office|year=1980}}</ref><!-- page 15 --> Spaghetti code can also describe an [[anti-pattern]] in which [[Object-oriented programming|object-oriented code]] is written in a procedural style, such as by creating classes whose methods are overly long and messy, or forsaking object-oriented concepts like [[Polymorphism (computer science)|polymorphism]].<ref name="Moha10">{{cite journal|last1=Moha|first1=N.|last2=Gueheneuc|first2=Y. G.|last3=Duchien|first3=L.|last4=Meur|first4=A. F. Le|title=DECOR: A Method for the Specification and Detection of Code and Design Smells|journal=IEEE Transactions on Software Engineering|date=January 2010|volume=36|issue=1|pages=20β36|doi=10.1109/TSE.2009.50|issn=0098-5589|citeseerx=10.1.1.156.1524|s2cid=14767901}}</ref> The presence of this form of spaghetti code can significantly reduce the comprehensibility of a system.<ref name="Abbes11">{{cite book|last1=Abbes|first1=M.|last2=Khomh|first2=F.|last3=Gueheneuc|first3=Y. G.|last4=Antoniol|first4=G.|title=2011 15th European Conference on Software Maintenance and Reengineering |chapter=An Empirical Study of the Impact of Two Antipatterns, Blob and Spaghetti Code, on Program Comprehension |date=2011|pages=181β190|doi=10.1109/CSMR.2011.24|isbn=978-1-61284-259-2|citeseerx=10.1.1.294.1685|s2cid=14152638}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Spaghetti code
(section)
Add topic