As a consultant I get to enter a lot of codehouses. Like a formulaic horror movie, where although there are dozens of new releases it's the same cliche scares over and over: BIG methods with switch statements or their boring cousin: if else if, else if, else if, if, if.
Why is this happening? When the product was new and shiny it only had a few Switch Case statements and a smattering of "if and else." But year after year, the business asked for more features and the developers respond by simply adding to that cute little function and it got bigger, and although it got harder to understand, well meaning developers still worked with that design. The code got messier and took more time to understand. And although it creaked like a rotting floor, no one did anything different and kept adding more, and more, and more.
Stop being a zombie dev! Snap out of it! Let's realize that the switch is the "Go-to" of the two-thousands. Let's componetize so adding new features means adding new objects.
Stop your code from becoming a house of horrors! Read Complete Abstract