Fix Spaghetti Code and Other Pasta-Theory Antipatterns
Nobody ever said it’s easy to write clean code. Successful software development isn’t just about making software work; it’s about making sure it will continue to work. While hardly an exciting objective, code maintainability is one of the most important elements of any application. So, what does maintainable code look like? There is no single answer to that question. Every language, framework and company has a different strategy to ensure durable, maintainable code. Developers should understand the reasons why code fails to be maintainable, to avoid programming antipatterns. Nearly every software developer agrees on what maintainable code doesn’t look like: pasta. The pasta theory of programming, in which various types of unmaintainable code take on familiar food shapes and structures, is a menu of avoidable practices. The most well-known on this list is spaghetti code, lasagna code, ravioli code and pizza code. Here are examples of each antipattern and how...