Urgent.News

What's breaking now, across thousands of outlets.

Tech

We built a data grid for technical data. Here is what a column type has to know.

Most data grids know at least four kinds of value: text, number, date, boolean. That is fine for an order list. It falls apart the moment the data is a link budget, a pressure log, a register dump or a fleet of IP addresses, because every one of those has rules that a plain number does not know. A gigabyte column that shows 0.5 is wrong. A temperature column with a footer total is wrong. An…

The Lattice Grid data grid system was created to handle technical data with precision. It recognizes four basic value types: text, number, date, and boolean. However, it quickly becomes inadequate when dealing with more complex data like link budgets, pressure logs, register dumps, or IP addresses. These require specific rules that a simple number cannot accommodate.

For instance, a gigabyte column showing 0.5 is incorrect, and an average bearing of 359° and 1° that reads 180° appears right but is flawed. To address these issues, Lattice Grid was developed to carry type knowledge rather than leave it to individual screens.

In Lattice Grid, setting a column's type configures multiple aspects at once. This includes formatting how values are displayed, parsing typed text back into a value, comparing two values during sorting, storing the column in the columnar backing, what appears in Excel, and what is copied onto the clipboard. The grid supports seven core types (text, number, boolean, date, dateString, object, lookup) and 88 technical types organized by domain such as temporal, network, computing units, physical and engineering units, electrical and scientific units, temperature, currency, structured, and units.

All unit types follow a consistent design rule. The column stores a number in a specific base unit, while display and input handle units. For example, a gigabyte column with a value of 0.5 will display 512 MB and accept 512M as input, storing the value as 0.5 throughout. The backing data structure remains a typed array, enabling ordinary arithmetic for sorting, filtering, grouping, and totals without affecting the rendered text.

The display function automatically selects the largest unit that fits the value on the coherent SI ladder. Significant figures round to a fixed precision, and rounding occurs before choosing the unit, ensuring accurate representation. For instance, 999,999 bytes rounded to three figures is displayed as 1.00 MB, not 1,000 kB.

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

Responsive Web Design Best Practices 2024: The Ultimate Guide

Introduction: The Multi-Device Landscape Gone are the days when you could design a website for a desktop monitor and call it a day.

  • Fluid grids replace fixed pixel widths with percentage-based layouts.
  • Mobile-first approach prioritizes essential content for both mobile and desktop experiences.
  • Fluid typography with CSS clamp() ensures smooth text scaling across devices.

How to Pick a Programming Language for Beginners: The Ultimate Guide

Introduction: The Paradox of Choice So, you’ve decided to learn how to code. Congratulations! You are about to embark on a journey that can change your career, your creative output, and your…

  • Beginner motivation guides language choice
  • Python recommended for English-like syntax
  • High-level languages recommended for quick learning

How to Learn Git Version Control: The Ultimate Beginner’s Guide

Introduction: Why Every Developer Needs Git If you have ever spent hours manually renaming files like project_final_v2_real.js , you have already experienced the pain that version control solves.

  • Git is a distributed version control system
  • Repository tracks project history in Git
  • Commit snapshots files at particular points

More from Thursday 24 September →