Jump to the navigation menu

More code, more problems

An interesting exercise is to run a tool like cloc to count the number of lines in your application.

It counts the number of files and lines within them, as well as how many lines are blank, comments or code.

It's a metric that I like to check occasionally as I like to keep codebases lean and with the minimum amount of code.

I don't like to have features that aren't used or pre-optimised code for use cases that may not happen.

The more code there is in your application, the problems you could encounter.

There are more places for bugs and issues to hide.

Keeping the amount of code to a minimum makes it quicker and easier to write, review and release as well as fix any bugs that are found in the future.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an certified Drupal Triple Expert with 18 years of experience, a Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.