473,651 Members | 3,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C++ equivalent to spaghetti code

Hello all,

I would like to bring to your attention a concept
and a term for it that I think is long overdue.

But first: In the bad old days of programming,
before subroutines were even available,
people used to write "spaghetti code", which
was an unreadable, unmaintainable mess of
"goto" statements.

With the increased availability of more
languages such as Pascal and C, and the
focus in programming courses on the importance
of modularity and abstract data types,
one might have thought that the days of
commonplace incomprehensibl e code were over,
or at least that the worst case scenario
in average code was improved.

In the case of C++, this is not so.
C++, with its multiple inheritance,
templates, and vastly bloated class libraries
such as STL and Boost, which permit and
seem even to require illegible coding practices
in which 5-deep derived classes are not
unlikely, has led to the C++ equivalent
of spaghetti code.

But how to describe it? Commonly people
simply call it "bad coding practices" but this
is too general. It's like calling a traffic accident
"bad driving practices". What then is the
term for an "accident" in C++? To describe this
build-up of tangled incomprehensibl e bloat,
I shall propose a new term:
C++ plaque.

It is similar to the plaque build-up in
Alzheimer's insofar as it impairs memory,
makes the programmer confused about
what is located where and what day it is.
In addition, when C++ plaque accumulates,
it decreases the programmer's ability
to function in his/her daily work life, ergo
anything (s)he produces will be much more
likely to crash, e.g. KDE.

Fight code pollution by not polluting.

C++ plaque: The cure is within you.

Thank you for your attention.
Jul 15 '08 #1
40 2660
Campy Happer <ca*********@ya hoo.comwrites:
Hello all,

I would like to bring to your attention a concept
and a term for it that I think is long overdue.
[snip]

I would like to bring to your attention the fact that C and C++ are
two different languages. This may be appropriate in comp.lang.c++;
it's not appropriate in comp.lang.c or gnu.misc.discus s. Please
restrict any followups to comp.lang.c++. (I doubt that this will do
any good, but it's worth a try.)

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jul 15 '08 #2
Campy Happer wrote:
In the case of C++, this is not so.
C++, with its multiple inheritance,
templates, and vastly bloated class libraries
such as STL and Boost, which permit and
seem even to require illegible coding practices
in which 5-deep derived classes are not
unlikely, has led to the C++ equivalent
of spaghetti code.
Go troll somewhere else, Linus Torvalds.
Jul 15 '08 #3
On Tue, 15 Jul 2008 08:03:29 -0700, Campy Happer wrote:

<some nonsense>

Can we phuleeeze not feed the troll.

<plonk>

--
Lionel B
Jul 15 '08 #4
Campy Happer <ca*********@ya hoo.comwrote:
.... In the bad old days of programming,
>before subroutines were even available,
people used to write "spaghetti code", which
was an unreadable, unmaintainable mess of
"goto" statements.
...
C++, with its multiple inheritance,
templates, and vastly bloated class libraries
such as STL and Boost, which permit and
seem even to require illegible coding practices
in which 5-deep derived classes are not
unlikely, has led to the C++ equivalent
of spaghetti code.

But how to describe it?
In the one and only true way. The object-oriented version of
"Spaghetti code" is, of course, "Lasagna code". (Too many layers.)

I have used that expression for years, but so far failed to obtain ISO
certification for it, or have it included in Webster's dictionary...

It goes without saying that any good chef can cook both Spaghetti and
Lasagna codes in either C or C++. (If using the later I would
recommend inheriting from the Pasta abstract base class.)
--
Roberto Waltman

[ Please reply to the group,
return address is invalid ]
Jul 15 '08 #5

Can we phuleeeze not feed the troll.

Imagine a troll post and no responses for a week. I think he's gonna
explode.

Jul 16 '08 #6
On Jul 15, 10:24 am, Juha Nieminen <nos...@thanks. invalidwrote:
Campy Happer wrote:
In the case of C++, this is not so.
C++, with its multiple inheritance,
templates, and vastly bloated class libraries
such as STL and Boost, which permit and
seem even to require illegible coding practices
in which 5-deep derived classes are not
unlikely, has led to the C++ equivalent
of spaghetti code.

Go troll somewhere else, Linus Torvalds.
Does Linus Torvalds not like C++?

Jul 17 '08 #7
On Jul 17, 7:22*am, s0s...@gmail.co m wrote:
On Jul 15, 10:24 am, Juha Nieminen <nos...@thanks. invalidwrote:
Campy Happer wrote:
In the case of C++, this is not so.
C++, with its multiple inheritance,
templates, and vastly bloated class libraries
such as STL and Boost, which permit and
seem even to require illegible coding practices
in which 5-deep derived classes are not
unlikely, has led to the C++ equivalent
of spaghetti code.
* Go troll somewhere else, Linus Torvalds.

Does Linus Torvalds not like C++?
No, he does not :-)
Jul 17 '08 #8
On Jul 15, 11:16 am, gaze...@xmissio n.xmission.com (Kenny McCormack)
wrote:
In article <3ce476c4-3248-4a00-aaf1-a670c07b3...@l4 2g2000hsc.googl egroups.com>,
Campy Happer <campyhap...@ya hoo.comwrote:
...
I shall propose a new term:
C++ plaque.
[snip]
1) I always associated plaque with dental problems, not
Alzheimer's. Is the Alzheimer's reference about the same as
the dental one?
Sort of. It refers to the buildup of amyloid plaques (sheets of
protein, IIUC) in the brain tissue of Alzheimer's sufferers. I think
this is closer to the meaning the OP is going for.
Jul 17 '08 #9
"John Bode" <jf********@gma il.comwrote in message
>
Sort of. It refers to the buildup of amyloid plaques (sheets of
protein, IIUC) in the brain tissue of Alzheimer's sufferers. I think
this is closer to the meaning the OP is going for.
If you are interested in computer models of amyloid, see my website. It's
the major focus of my work.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
Jul 17 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1753
by: Brent Mondoux | last post by:
Hey everyone, I'm trying to find the best non-spaghetti code way to do the equivalent of a ColdFusion CFQUERY GROUP command so that I can display a FAQ with categories as follows: -- Example: Begin -- General
7
2044
by: CoreyWhite | last post by:
You know what I have to say to the giant spaghetti monster? Do you want to know? Do you? Well I'm tired of sucking on your spaghetti and chewing on your fresh meat balls! It isn't only about writing open source code that's free. That's obviously nice. But the Open Source code just facillitates all of this negative energy in the world, the same as the Windows Operating system and the Giant
0
1276
by: CoreyWhite | last post by:
In any kind of communication and language, even in computer programming. We can see a difference between total spaghetti and celtic knot work. But it is easy to confuse the two, because sometimes a ball of spaghetti still makes sense and sometimes celtic knot work is total nonsense. I don't look at religion as spaghetti, and I don't look at my own writting as spaghetti. The philosophers, thinkers, and intellectuals who create beautiful...
20
6666
by: Victor Smootbank | last post by:
I did program in BASIC for more than 20 years and for me it's still the ultimate programming language. Unfortunately, I was forced to upgrade to C++ and now I'm confused. While programming in BASIC, my favourites were GOTOs and sometimes GOSUBs and spaghetti code was my trademark. How can I write spaghetti code in C++???
35
247
by: Campy Happer | last post by:
Hello all, I would like to bring to your attention a concept and a term for it that I think is long overdue. But first: In the bad old days of programming, before subroutines were even available, people used to write "spaghetti code", which was an unreadable, unmaintainable mess of "goto" statements.
0
8357
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8277
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8581
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4285
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.