金融应用程序编程
我已经看过两次了,但我只是不明白。在计算固定利率贷款的“财务费用”时,应用程序要求用户输入所有可能的贷款金额和相关的财务费用。尽管这些利率是可以计算的 (30%),但它们的应用程序会让用户填写这样的表格:
Loan Amount Finance Charge
100 30
105 31.5
等等,贷款金额从 5 美元到 1500 美元不等,增量为 5 美元。
我们正在启动一项新举措来重建这个系统。以这种方式制作费率表是否有正当理由?我想我们应该保留一个单利字段,并在每次需要时计算它。
我真的不明白为什么有人会硬编码这样的表格而不是计算......我的意思是,计算机就是为了做这样的事情而设计的。正确的?
I've seen this twice now, and I just don't understand it. When calculating a "Finance Charge" for a fixed rate loan, applications make the user enter in all possible loan amounts and associated finance charges. Even though these rates are calculable (30%), they application makes the user fill out a table like this:
Loan Amount Finance Charge
100 30
105 31.5
etc, with the loan amounts being provided from $5 to $1500 in $5 increments.
We are starting a new initiative to rebuild this system. Is there a valid reason for doing a rate table this way? I would imagine that we should keep a simple interest field, and calculate it every time we need it.
I'm really at a loss as to why anyone would hardcode a table like that instead of calculating...I mean, computers are kind of designed to do stuff like this. Right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来就像是你慷慨地四舍五入的复利。 100个案例+1是相当无聊的。但105案例+1很有趣。
136.5 是 135 还是 140? 140 美元时,您额外赚了 1.05 美元。
或者...如果费率无法计算,这将是实施此实施的原因之一。
或者......另一个原因(如果足够恼火的话我会这样做)是这些费率不断变化,开发人员厌倦了它,他给了他们一个界面,最终用户可以在其中自行设置它们。 5 美元的桶看起来很离谱,但也许它们是真正的混蛋......
It looks like compound interest where you're generously rounding up. The 100 case + 1 is pretty boring. But the 105 case + 1 is interesting.
Where does 136.5 hit -- 135 or 140? At 140, you've made an extra $1.05.
Or... If the rates were ever not calculable, that would be one reason for this implementation.
Or... The other reason (and one I would do if annoyed enough) would be that these rates were constantly changing, the developer got fed up with it, and he gave them an interface where the end users could set them on their own. The $5 buckets seem outrageous but maybe they were real jerks...