News for hackers. Stuff that matters.
Re:Paul Graham on Spaghetti Code by michaelochurch on Thursday April 18, 2013 @11:41PM (#5574649)
I wrote about this last summer: http://michaelochurch.wordpress.com/2012/08/15/what-is-spagh...

Inheritance (typically assumed to be part of OO, but not a requirement) is a big part of it. It gets nasty pretty quickly. Inheritance is the 21st-century goto, although it shares features with the even wonkier "comefrom" of INTERCAL.

Spaghetti code isn't just "bad code" but a specific kind of bad code where understanding a piece in isolation requires pinging about an ungodly number of places. There are a lot of causes of that, but usually it's poor software management and bad development practices.

Re:Paul Graham on Spaghetti Code by rhizome on Friday April 19, 2013 @12:07AM (#5574751)
"Inheritance breaks encapsulation," the elders said, and as with all extremes, they each have their problems. Language is a lossy codec for math/logic/thoughts, computer languages no less so.
Re:Paul Graham on Spaghetti Code by timr on Friday April 19, 2013 @12:25AM (#5574811)
The "elders" never said that. They invented inheritance because there was a need for it.

Inheritance is a great way to maintain encapsulation in the face of a messy world. Unchecked composition quickly gets you to a world where everything has to be public anyway.

Re:Paul Graham on Spaghetti Code by rhizome on Friday April 19, 2013 @02:00AM (#5575133)
It's just a figure of speech.
Re:Paul Graham on Spaghetti Code by brudgers on Friday April 19, 2013 @08:33AM (#5576248)
My understanding is that it originates with plugboards. See the third image in this recent article:

http://www.pcworld.com/article/249951/if_it_aint_broke_dont_...

Re:Paul Graham on Spaghetti Code by ank286 on Friday April 19, 2013 @02:15AM (#5575162)
This is a case of coherence vs coupling, which is lost by OO developers. Everything is so tightly coupled that more spaghetti code is written up to not break the coupling, making the code more incoherent overall.