Pyramid Of Doom

In software programming, Pyramid Of Doom is a slang term used to describe and unwieldy number of nested "if" statements or functions. Code statements are nested to represent the statement's context within other statements. It is all too easy to keep nesting logic, however this can quickly make your code difficult to read and maintain. Instead of infinitely nesting logic, programming languages provide us with tools such as methods, breaks, continues, etc. Unnecessary nesting can be minimized by writing short reusable methods that encapsulate a single action or concept, and then used in conjunction to preform a larger operation. So instead of writing spaghetti code, break up your logic into meaningful classes and granular method, and use breaks and continues to keep your logic flat and readable.
Pyramid Of Doom

Comment