— 2 min read

Why Fewer Lines of Code Generally Leads to Better Software Development


While a large codebase may feel impressive, as tech matures as a field, it’s becoming more efficient to stay lean and try to accomplish software development tasks with as few lines of code as possible.

While this isn’t a hard requirement, oftentimes having a lot of lines of code come in can be a signal that your codebase (or developer) is not making their code as concise and clean as it can be.

Here are a few reasons for why less code may be better:

  1. It’s like reading a book, the fewer pages, the easier it is to understand the book and what’s going on
  2. Using an API or service like sending emails for example means you don’t have to code it = less lines, makes it easier to manage and interface with the rest of the code you are writing and managing
  3. Duplicated lines of code means having to change the color of a button in multiple locations rather than just in 1 location.
  4. Concise code is a sign that the developer is straightforward and minimalistic in their thinking, leading to less bloat / unnecessary functions and operations
  5. Concise code requires abstracting repetitive tasks within a codebase which makes it easier to add new features without having to write more code.
  6. Bonus! Less files also makes it easier to manage a codebase!

Think: TailwindCSS came out which reduces the number of CSS files in a codebase and developers generally love tailwind for how fast it feels to code a design using it!