Urgent.News

What's breaking now, across thousands of outlets.

Tech

A school discount with no code, because the discount is the email domain

We used to give schools a discount code. A teacher asked for one, we minted it, and then we maintained the parts that follow from a code existing: an admin CRUD for the codes, a redemption table so per-user and per-year limits could be enforced, a validate endpoint, and a support thread every time somebody pasted a code with a smart quote in it. The replacement is that a school is registered by…

Schools now receive a discount based on their email domain rather than a manual discount code. This change simplifies the process by eliminating the need for users to remember or type in a code. The discount is automatically applied based on the school's email domain, with the matching rule being the longest suffix, not an exact match.

To determine the applicable discount, the system first checks if the email domain exists in the registration database. If multiple domains are involved (e.g., a trust with subdomains), the most specific domain takes precedence. For example, jane@pupils.beaumont.school would match "pupils.beaumont.school" before "beaumont.school".

The implementation involves a function that takes an email address as input and returns an array of candidate domains. The function handles various edge cases, such as invalid email formats, domains without mailboxes, and common consumer mailbox providers. The resulting candidate domains are then used to identify the applicable discount.

This change affects the user experience by streamlining the discount application process and reducing the potential for errors caused by mistyping or losing discount codes. The system also ensures that the discount is applied consistently across all pages and interactions within the platform.

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

Pricing page vs terms: six mismatches I keep finding on launch day

Originally published on shipclarity.app . For the last month I've been reading the pricing pages of freshly launched products the way a person about to pay would: the plan card, the toggle, the FAQ…

  • Unlimited or lifetime promises on pricing page contrast with strict limits in terms
  • One-time purchase advertised as non-renewing, but terms state recurring billing
  • Refund policy contradicts claim of refund on pricing page

The First Fifteen Minutes: One Preflight, One Fix

The thing that decides whether a new AI coding setup survives contact with a real repo is almost never the model — it is whether the first fifteen minutes end in something you can verify.

  • First fifteen minutes crucial for AI coding setup's success
  • Tracking time reveals friction points in setup process
  • Preflight script fixes configuration issues before editor opens

Your Free Tier Has a Concurrency Knee. Go Find It.

The free endpoint didn't fail me with a wrong answer. It failed me with a right answer, eleven seconds late, and that is a much harder bug to notice.

  • MonkeyCode's free tier has a concurrency knee
  • Delays in response occur after the knee
  • Knee marks point where response shape changes

More from Monday 19 October →