Hacker News new | ask | show | jobs
by klodolph 1722 days ago
That’s not what people mean when they say “spaghetti code”. When people are complaining about spaghetti code, they're complaining that the code is difficult to follow. Perhaps the control flow goes all over the place, for example.

That’s how the spaghetti code conjecture got its name. It’s a conjecture about the control flow structure of busy beaver machines. In this conjecture, you’re comparing different programs with the same size (if we think of size as number of states), but where the control structure is connected in different ways.

1 comments

Maybe but at some point, at least in my country, anything that wasn't a rigid bunch of classes, interfaces and what not following all that Java EE / Designer pattern/ Solid / OOP stuff was deemed "spaghetti code" and it made you "a bad developer", regardless of the language used. Granted this was in the mid 2000 before people "rediscovering" the merits of functional programming. Today, procedural C style coding or functional programming is more accepted in dev shops. I don't think I've heard about UML in the last 5 years anywhere I worked for instance. Young programmers are lucky they avoided that era...