Click here to Skip to main content
15,887,135 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Eusebiu Marcu18-May-23 8:38
Eusebiu Marcu18-May-23 8:38 
GeneralRe: In defense of spaghetti code. *ducks* Pin
honey the codewitch18-May-23 8:53
mvahoney the codewitch18-May-23 8:53 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Eusebiu Marcu18-May-23 9:12
Eusebiu Marcu18-May-23 9:12 
GeneralRe: In defense of spaghetti code. *ducks* Pin
honey the codewitch18-May-23 9:17
mvahoney the codewitch18-May-23 9:17 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Eusebiu Marcu18-May-23 9:23
Eusebiu Marcu18-May-23 9:23 
GeneralRe: In defense of spaghetti code. *ducks* Pin
honey the codewitch18-May-23 9:26
mvahoney the codewitch18-May-23 9:26 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Eusebiu Marcu18-May-23 9:29
Eusebiu Marcu18-May-23 9:29 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Greg Utas17-May-23 2:46
professionalGreg Utas17-May-23 2:46 
I'd only have a problem with spaghetti code if there was a fairly straightforward way to simplify it (maybe with a table of state transitions) or if it would have to evolve to support a stream of new capabilities in subsequent releases.

I worked on telecom call servers for many years, where spaghetti code made it a pain to work on various products. The problem is hundreds of supplementary services that modify the behavior of basic calls. If some of their logic is inserted into the basic call code, it soon becomes spaghetti. More services were implemented every release, so you also got a bunch of developers all needing to add more spaghetti to that code.

When I was tasked with rewriting one of these products, the design eliminated the spaghetti by separating all of the services' state machines. It used static and dynamic chains of responsibility with observer capabilities, which allowed state machines to be triggered, after which they could override or reuse basic call behavior. I'd write an article about it, but I think the design is overkill for most domains. However, it would likely be very useful when developing software that supports a lot of bidding conventions for contract bridge.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.

GeneralRe: In defense of spaghetti code. *ducks* Pin
honey the codewitch17-May-23 2:48
mvahoney the codewitch17-May-23 2:48 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Gary R. Wheeler17-May-23 3:05
Gary R. Wheeler17-May-23 3:05 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Jeremy Falcon17-May-23 4:59
professionalJeremy Falcon17-May-23 4:59 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Gary Wheeler18-May-23 2:32
Gary Wheeler18-May-23 2:32 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Mircea Neacsu17-May-23 3:19
Mircea Neacsu17-May-23 3:19 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Single Step Debugger17-May-23 3:24
Single Step Debugger17-May-23 3:24 
GeneralRe: In defense of spaghetti code. *ducks* Pin
obermd17-May-23 4:09
obermd17-May-23 4:09 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Gerry Schmitz17-May-23 5:36
mveGerry Schmitz17-May-23 5:36 
GeneralRe: In defense of spaghetti code. *ducks* Pin
honey the codewitch17-May-23 5:51
mvahoney the codewitch17-May-23 5:51 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Gerry Schmitz17-May-23 18:10
mveGerry Schmitz17-May-23 18:10 
GeneralRe: In defense of spaghetti code. *ducks* Pin
honey the codewitch17-May-23 20:10
mvahoney the codewitch17-May-23 20:10 
GeneralRe: In defense of spaghetti code. *ducks* Pin
MikeCO1018-May-23 3:27
MikeCO1018-May-23 3:27 
GeneralRe: In defense of spaghetti code. *ducks* Pin
jschell17-May-23 7:37
jschell17-May-23 7:37 
GeneralRe: In defense of spaghetti code. *ducks* Pin
honey the codewitch17-May-23 9:10
mvahoney the codewitch17-May-23 9:10 
GeneralRe: In defense of spaghetti code. *ducks* Pin
Eusebiu Marcu18-May-23 0:38
Eusebiu Marcu18-May-23 0:38 
GeneralRe: In defense of spaghetti code. *ducks* Pin
MikeCO1018-May-23 3:36
MikeCO1018-May-23 3:36 
GeneralRe: In defense of spaghetti code. *ducks* Pin
jschell18-May-23 5:43
jschell18-May-23 5:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.