SShortSingh.
Back to feed

Nations League final round: Greece lead Germany on head-to-head despite equal points

0
·2 views

Germany and the Netherlands meet in Berlin in the last round of the Nations League group stage. Before kickoff, Germany sit third on 8 points with a goal difference of +3, while Greece are level on points but second with a -5 goal difference. Because UEFA competitions apply head-to-head results before overall goal difference, a simple points-then-goal-difference sort gives the wrong order. The author, working on the Xpect football statistics app, built a Python module that derives the groups from the fixture data and applies the tiebreak rules. Using that method, Greece rank above Germany in Group A2, on the strength of four head-to-head points to Germany's one.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

FSCSS 1.2.3 Adds Derived Arrays for Reusing Method Output as Collections

FSCSS array methods such as .reverse, .list, and .length return strings rather than array objects, and they cannot be chained. Version 1.2.3 introduces derived arrays, where a new @arr declaration takes a method's output and resolves it into a proper array that can be indexed, looped over, and derived from again. The approach is illustrated with examples such as reversing a color list, building 1-based index sequences sized to a source array, and appending items with the mutation operator. The guidance recommends declaring a new array step whenever a result needs to be reused, since chaining is unsupported. The author notes that derived arrays add no new runtime type but make method results dependable for practical module patterns.

0
ProgrammingDEV Community ·

Hardening Local Reverse Proxies for AI Agent Sidecars and MCP Tools

Developers running MCP servers, local vector databases, and AI coding agents often expose many localhost services through reverse proxies such as Nginx, Caddy, or Traefik. A common docker-compose mistake maps ports to 0.0.0.0, which lets any device on the same local network reach internal agent tooling. Binding explicitly to 127.0.0.1 closes that exposure. The article also warns of DNS rebinding attacks, where a malicious site can use a rebound DNS record to make a browser send requests to local endpoints, and recommends strict Host header whitelisting as a defense. Blocking path traversal and access to sensitive dotfiles at the proxy layer is also advised.

0
ProgrammingDEV Community ·

Storing Money in Code: Integer Cents Versus Decimal Types

This lecture is aimed at developers who need to store prices, total carts, split bills, or convert currencies without losing a cent. It demonstrates that binary floating-point errors corrupt amounts: int(19.99 * 100) yields 1998 instead of 1999, and the same flaw appears in JavaScript and SQLite. The recommended approach is to store amounts as integer counts of each currency's minor unit, such as 1999 for 19.99 USD, which keeps arithmetic exact across languages and databases. Because minor-unit counts differ by currency (JPY and KRW have none, USD and EUR have two, BHD has three), the author found that locale formatters and runtime libraries disagree, so developers should maintain their own currency table. A small Python converter is provided that parses text with Decimal and rejects input with more decimal places than the currency allows.

0
ProgrammingDEV Community ·

AI-Suggested npm Package Didn't Exist, Exposing 'Slopsquatting' Risk

AI assistants sometimes recommend installable packages that do not exist, and attackers can exploit this by registering those names and publishing malicious code. This practice, called slopsquatting, was seen with a fabricated package named react-codeshift, which appeared in over 200 GitHub files after AI-generated instructions cited it. Security researcher Charlie Eriksen of Aikido registered the name first on January 14, 2026, as a harmless placeholder, though it still draws dozens of downloads weekly. The article demonstrates that npm lifecycle scripts like postinstall can execute automatically during installation, even without importing the package. It recommends checking a package's existence, age, and download count in the registry before installing anything an AI suggests.