Software inventory

A while ago, I had a meetup with Woody Zuill, after the Software Teaming session, he has stated that "most companies are bad at Software Inventory".

He explained that: Software Inventory is the list of all the code which is not "in touch" with users.

I thought it was a Lean practice, but the only related topic I have found is inventory management in the original which consist of shrinking down the stock to the minimum level without impacting clients. If I transpose it to the software engineering field: you should aim pushing code as soon as possible, reducing feedbacks loop time (as emphasized in Kent Beck's Extreme Programming Explained).

Over the years I have set up several ways to have a snapshot of it:

  • Adding a protected endpoint which responds the commit hashes of all services
  • Include commit hash in the built artifacts

Each time I also built a CLI, to perform a scan and compare the different environments to the repositories.

It's only a beginning and there are many drawbacks:

  • Even following Trunk Based Development, without CI/CD, you will have some stock, which is an issue since you can deploy more (or less) than you intend to
  • (Feature) flags hide a part of it (it's tempting to push a lot of code, hiding it behind a flag, and never enabling it)

I had negative experiences with both of them:

  • A piece of code which hadn't been deployed to the users for weeks, got deployed after a typo fix, blocking the usage and was impossible to roll back
  • A feature was started and protected by a compilation flag for months, in the end, it was not compiling anymore