Urgent.News

What's breaking now, across thousands of outlets.

Tech

A Squarified Treemap by Hand, Because Charting Packages Cannot Drill Down

Helm's storage tool shows your disk as a treemap: every folder a rectangle, every rectangle sized by how much space it takes. Click one and you are inside it, looking at its children, with a breadcrumb trail back out. It goes from a 494 GB volume down to a single file. I drew it by hand. Not because the packages are bad, but because the thing that makes a treemap useful for disk space is the part…

The author describes creating a treemap visualization of disk space manually, as charting packages do not support the necessary features for a disk browser. These features include hit-testing to determine which folder is being interacted with, navigation as a first-class state, adaptive label sizing, and layout over a subtree rather than a flat list of values.

The author explains why the squarified algorithm for treemap layout is preferred over simpler methods that slice the rectangle along a single axis, as it produces more readable and visually appealing rectangles. The algorithm works by sorting children in descending order and greedily adding them to the current row while maintaining the smallest possible worst aspect ratio in that row.

The author notes that the treemap layout is only one part of creating a disk browser, as other features like hit-testing, navigation, adaptive labels, and reconciling file sizes with the operating system are necessary to provide an accurate and usable interface.

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

The DNS Field That Could Run Anything as Root

Sonar has a Control tab. One of the things it does is switch the DNS resolver for your Mac — tap Cloudflare, tap Quad9, or paste in the address of your own Pi-hole.

  • DNS field in Sonar app allows users to set preferred DNS server
  • Command-injection vulnerability enables code execution with root privileges
  • Input validation and secure storage needed to prevent unauthorized access

Your Flutter 404 Page Is Probably Crashing, and Your Server Is Probably Lying About It

Someone sent me a screenshot of my own 404 page. Washed-out grey text on a light background, barely readable, nothing like the dark theme every other page uses. My first thought was a styling bug.

  • Flutter 404 page crashes due to status code bug
  • Firebase Hosting serves 200 status for unmatched URLs
  • Soft 404 occurs when non-existent URLs are indexed as real pages

What It Actually Takes to Run a Cross-Border Marketplace: Six Years of Shpper

Shpper is a cross-border personal-shopping marketplace. A buyer wants something they cannot get where they live. A traveller is already flying that route with unused luggage space.

  • Shpper connects buyers with travellers sharing empty luggage space on flights
  • Platform holds funds in escrow until item confirmed delivered, ensuring trust
  • CTO oversees engineering and business aspects, managing state machine and policies

More from Sunday 6 September →