The Lava flow anti-pattern

For the last few weeks I am thinking writing some blog posts about anti-patterns in software engineering but I did not get around to it. Then last Tuesday our software architect mentioned an anti-pattern called Lava flow. He said that lava flow means the constant search and implementation of developers for new solutions to a problem and not using and/or improving existing solutions. This is of course not Lava flow but Not-Invented-Here-syndrome. Maybe he meant Not-Invented-Here-syndrome. I do not know.

What is Lava flow? Lava flow is lava pouring out of a volcano. It runs down a hill and when it stops it becomes ugly and very hard. It cannot be removed any more. In software engineering it means that the code is a relic of earlier stage of a software design. Ancient code, usually dead code and forgotten design information, which nobody dares to touch. It has been solidified into the architecture. Almost immovable. New solutions are built upon it. Making it hard to remove.

Possible problems with Lava flows are:

  • They are hard to analyze,
  • They are hard to test,
  • They are hard to maintain,
  • They can have a negative influence on performance and resource usage.

What are a few the symptoms?

  • There are a lot of TODO’s in the code,
  • No documentation of the code,
  • Lots of code that has been commented out without explanation,
  • Important looking methods or classes,
  • Complex methods or classes,
  • Long methods or classes.