iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
💸

[Shitty App Advent Calendar] Technical Debt Revolving Payment Simulator

に公開

This is an article for December 15th of the Kuso-app Advent Calendar.

What should I do about repaying technical debt...

"Technical debt is piling up because of tight deadlines and skill gaps... What should I do?"
"Let me introduce you to revolving payments for technical debt."
"Revolving payments for technical debt? What's that?"
"It's a method where you pay back a fixed number of lines every month. Since the line count is constant, it's easy to plan."
"Sounds convenient! But isn't there a catch...?"
"Of course, interest is charged on the monthly balance, but that's the same for installment payments, right? With installment payments, the number of repayments is fixed, so if you have a lot of debt, the monthly burden becomes heavy. But with revolving payments, you pay back a fixed number of lines, so monthly repayments are a breeze!"
"That sounds pretty good..."

Few months later

"Oh no, the debt isn't decreasing at all! In fact, interest is just piling up and development is grinding to a halt!"

Use it responsibly

To prevent such a situation, I created the Technical Debt Revolving Payment Simulator.

https://crayfisher-zari.github.io/revolving-simulator/

I believe the revolving payment method for technical debt is not necessarily a wrong choice. Reducing technical debt requires man-hours, and in environments where debt must be reduced while development continues, it is not easy to carve out those man-hours. In such situations, I believe that an approach of reducing technical debt within a fixed allocation of man-hours is a valid option.

However, as shown in the short story above, technical debt cannot be reduced without a solid repayment plan. Therefore, I have created a simulator that makes it easy to visualize how long it will take to repay the debt by entering the current debt, monthly repayment lines, and the interest rate.

In addition to seeing the monthly balance in a graph, there is a table showing how much of the monthly payment is applied to the principal and how much to interest. Another feature is the ability to calculate what happens if new debt is generated along the way.


It’s not decreasing at all...

Using this should make it easier to set the necessary monthly repayment man-hours. Note that if you read the line counts as currency, it can also be used as a standard revolving payment simulator.

Digression: Why Revolving Payments Are So Scary

The danger of revolving payments lies in the repayment period. If the repayment is set to 1/10 of the debt with a 15% interest rate, it takes 11 installments, and the total interest relative to the principal is only about 7.5% (assuming no new debt is incurred). However, at 1/20, it takes 24 installments with 15% interest, and at 1/40, it takes 56 installments with 39% interest, ballooning rapidly.

As the repayment period extends, interest compounds, causing the total interest to swell. Since interest is calculated based on the principal, if monthly payments are low, a large portion of the payment is consumed by interest, and the principal remains stagnant. Consequently, even though you are paying every month, the principal doesn't decrease, and the situation becomes difficult. This is all assuming no additional debt is incurred; if new debt is added, the repayment period extends even further... you can imagine the rest.

Technologies Used and Reflections

The technology used is a simple Vue.js SPA. Even the graphs are expressed using the DOM without any libraries. There are no other particularly noteworthy technologies.

For the overall design, I tried to lean towards dashboard designs often seen on sites like Dribbble. One point of regret is the horizontal scrolling part of the bar chart. The graph size changed depending on the presence of the scrollbar, which made it a bit difficult to handle, so I tried using scrollbar-gutter, but it didn't seem to apply well to horizontal scrolling. I ended up reluctantly hiding the scrollbar.

Even so, I enjoyed being able to design and implement everything freely.

Discussion