After reading a lot of comments in this thread, I’m not sure I know what spaghetti code is. I thought spaghetti code was when the order of execution was obfuscated due to excessive jumps and GOTOs. But a lot of people are citing languages without those as examples of spaghetti code. Is this just a classic “I don’t like this programming language, and I don’t know much about it.” Or is there something I’m missing?
It’s more incredibly tangled and highly coupled code. It’s the kinda code where you can’t change anything because it causes a catastrophic cascade of issues. Basically where software engineers throw design out the window and just starting coding random bullshit that “works”
I work in a company that has a old codebse in c with tons of realtime intime stuff that is acessed via a shared memory from the realtime to the non realtime system. Tons of strucs get copied around then typecast to other structs and global variables all over the place. You never know where a variable is written to and where it is also acessed from or if it is just a copy. No assembly but still super obscure.
After reading a lot of comments in this thread, I’m not sure I know what spaghetti code is. I thought spaghetti code was when the order of execution was obfuscated due to excessive jumps and GOTOs. But a lot of people are citing languages without those as examples of spaghetti code. Is this just a classic “I don’t like this programming language, and I don’t know much about it.” Or is there something I’m missing?
It’s more incredibly tangled and highly coupled code. It’s the kinda code where you can’t change anything because it causes a catastrophic cascade of issues. Basically where software engineers throw design out the window and just starting coding random bullshit that “works”
Spaghetti is all messy and tangled up; spaghetti code is the same.
That’s one way to make your code messy and thus achieve spaghetti code.
In general, when some code is very poorly written, it becomes spaghetti code.
I work in a company that has a old codebse in c with tons of realtime intime stuff that is acessed via a shared memory from the realtime to the non realtime system. Tons of strucs get copied around then typecast to other structs and global variables all over the place. You never know where a variable is written to and where it is also acessed from or if it is just a copy. No assembly but still super obscure.
tbh nor am i, this is becoming vim vs emacs 2.0 isnt it