One of the books I read this year was Discipline Equals Freedom: Field Manual by Jocko Willink.
The overarching concept in the book is that if you have discipline now, in the present, this will result in greater freedom in the future.
This could be having the discipline to work out/lift weights; in the future this will most likely result in the freedom to move more with less pain/lift heavy things/go trekking/kayaking on holiday, etc.
This could be having the financial discipline to regularly save/invest money rather that spend everything you earn; in the future this will most likely result in having the freedom to (semi)retire early, not have to work in a job you don't like, etc.
I think the reason this book resonated with me personally is that it helped focus the outlook I already had on investing in the future/thinking longer term.
This concept can also be applied to software development. Disciplined software development now, will most probably lead to greater freedom in the future to make changes or add new features.
As an example, having the discipline to create automated tests can help give you the freedom in the future to make changes without having to perform a load of manual testing or worry about what may have broken unknowingly.
Another example: having the discipline to refactor code as you are working on the current feature/bug to keep the code as clean as possible will most probably give you the freedom to change it more easily in the future.
If you are a manager: having the discipline to allocate time for you team to train/learn/get better even when faced with pressure to deliver will most probably result in the freedom to deliver more in the future.
The concept can also be applied to non-coding practices such as having the discipline to hold a stand up meeting every day, engage business/users/stakeholders regularly, etc.
You can also flip this concept on its head and instead ask: in the future, what aspects would I like more freedom in: in one month, in one year, in 10 years? Let the answers to this question guide you when deciding on what it is you need to be more disciplined on today or this week to make manifest those desired freedoms in the future.