Urgent.News

What's breaking now, across thousands of outlets.

Tech

Modeling BC property transfer tax and Canadian mortgage payments in Python

Most mortgage calculators you find online are quietly wrong for Canada, and most property tax snippets ignore the edge cases that matter. I needed both for a side project about British Columbia housing costs, so I wrote them from scratch in plain Python. Here's the code, the two gotchas that trip people up, and the output. The rules we're modelling BC property transfer tax (PTT) is charged on a…

The article discusses creating accurate Python code to model British Columbia property transfer tax (PTT) and Canadian mortgage payments. Property transfer tax rates depend on the home's fair market value, with specific brackets. First-time home buyers registered after April 1, 2024, receive exemptions and tax reductions. The code accounts for these rules and calculates the tax amount.

For mortgage payments, the article explains that Canadian fixed-rate mortgages compound semi-annually, not monthly. This differs from common online calculators that use monthly compounding. The article provides a formula to convert an annual interest rate to a Canadian monthly rate for fixed mortgages. Using the incorrect monthly rate can lead to overestimating mortgage payments, potentially costing borrowers thousands of dollars over the life of the loan.

The code demonstrates how to calculate mortgage payments using the correct semi-annual compounding rate.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Checking a Four-Direction Sprite Sheet Before Importing It

Disclosure: This article was drafted with AI writing assistance. The images come from an existing SpriteSheetTool demonstration, a product I am associated with.

  • Verify grid geometry and cell arrangement before importing
  • Map each direction (North, East, South, West) with four frames each
  • Test character consistency and loop transitions after setup

A 15-minute nap alarm, one tap away

https://play.google.com/store/apps/details?id=com.droidactor.alarm A short rest after lunch should not need another alarm's hour and minute. Open Quick nap in Dotori Alarm Clock.

  • Quick nap feature in Dotori Alarm Clock app
  • 15-minute nap alarm scheduled with one tap
  • Nap alarm uses default settings and snooze limit

DPO vs RLHF: which should you use to align a model?

Use DPO first: it learns from the same preference labels as RLHF but drops the reward model and the online sampling loop, so it is cheaper, faster and easier to debug.

  • DPO is cheaper, faster, and easier to debug than RLHF
  • RLHF requires a reward model and PPO loop, making it more expensive and time-consuming
  • DPO often matches or improves response quality in summarization and single-turn dialogue

Contributing to open source isn't just code: an SRE's journey at BrasilAPI

Contributing to open source isn't just code: an SRE's journey at BrasilAPI A few weeks ago, I decided to do something I'd always put off: choose a real open source project, clone it, understand it inside out, and try to contribute something that mattered.

  • Contribuir com open source vai além de apenas código
  • SRE pode aprender lições valiosas em projetos como BrasilAPI
  • BrasilAPI possui quase 30 domínios e mais de 90 rotas

More from Saturday 14 November →