frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Should IDs be strings or numbers in your codebase?

2•viviansolide•1h ago
At work we're debating whether entity IDs should be typed as strings or numbers throughout our stack (API contracts, frontend, etc.).

Database auto-increments happen to be integers, but we never perform arithmetic on IDs – they're opaque identifiers.

My take: IDs are identifiers, not numbers. Typing them as strings makes this explici and makes migrating to UUIDs or other formats painless.

Am I missing a good reason to keep them as numbers?

Comments

jghn•1h ago
Unless you're doing math with them for some reason, they're strings.
Rotundo•59m ago
Consider storage requirements. Strings (ASCII? UTF-8?) are not as efficient as integers or UUIDs. You're not storing UUIDs as strings, are you? They are binary, only converted to the string expansion for display and/or export.

Cartly: An iOS Receipt Tracking Demo Built on Mnexium

1•Mnexium•16s ago•0 comments

Show HN: Memgraph-agent – NER+PageRank memory for AI agents, $0 LLM cost

https://github.com/yangyihe0305-droid/memgraph-agent
1•yangyihe0305•33s ago•0 comments

Show HN: Know Your SMD Footprints

https://www.pikkoloassembly.com/footprints/
1•pikkoloassembly•1m ago•0 comments

Microgpt Lab

https://ko-microgpt.vercel.app/
1•tmsln•1m ago•0 comments

On-Policy Prediction with Approximation

https://chizkidd.github.io//2026/02/27/rl-sutton-barto-notes-ch009/
1•ibobev•1m ago•0 comments

What Crystals Older Than the Sun Reveal About the Start of the Solar System

https://www.quantamagazine.org/what-crystals-older-than-the-sun-reveal-about-the-start-of-the-sol...
1•ibobev•2m ago•0 comments

Show HN: 58% cost by replacing file reads with a dependency graph on AI Coding

1•nicola_alessi•2m ago•1 comments

What makes a game tick? Part 9 – Data Driven Multi-Threading Scheduler

https://mropert.github.io/2026/02/27/making_games_tick_part9/
1•ibobev•2m ago•0 comments

Completing the formal proof of higher-dimensional sphere packing

https://www.math.inc/sphere-packing
1•salkahfi•2m ago•0 comments

Show HN: license checker for npm projects

https://github.com/Chrilleweb/licop
3•chrillemn•4m ago•0 comments

Treasury terminates Anthropic AI use after Trump's order

https://www.axios.com/2026/03/02/treasury-trump-ai-anthropic-pentagon
3•biffles•5m ago•0 comments

Show HN: Gapless.js – gapless web audio playback

https://github.com/RelistenNet/gapless.js
1•switz•5m ago•0 comments

Go is the best language for agents

https://getbruin.com/blog/go-is-the-best-language-for-agents/
2•karakanb•5m ago•0 comments

KGet 1.6.0

https://github.com/davimf721/kget
2•Ghoulmf7221•6m ago•1 comments

"Poisoned Wells," the largest study of website blocking in India to date

https://twitter.com/Squeal/status/2028317140605100499
2•madmanweb•6m ago•1 comments

In The Pentagon Battle with Anthropic, We All Lose

https://www.thefp.com/p/in-the-pentagon-battle-with-anthropic
3•speckx•7m ago•0 comments

"That Shape Had None" – A Horror of Substrate Independence (Short Fiction)

https://starlightconvenience.net/#that-shape-had-none
2•casmalia•9m ago•0 comments

Anonymous Credentials: An Illustrated Primer

https://blog.cryptographyengineering.com/2026/03/02/anonymous-credentials-an-illustrated-primer/
2•sedatk•9m ago•0 comments

Show HN: Smart-commit-rs – A zero-dependency Git commit tool in Rust

https://github.com/gtkacz/smart-commit-rs
1•gtkacz•10m ago•0 comments

Ask HN: Self Sustaining Codebases

1•rs545837•11m ago•0 comments

Home of Astrophotography

https://app.astrobin.com/
2•manulins•11m ago•0 comments

Show HN: Ccbridge – A CLI to Orchestrate Claude Code and Codex

https://github.com/marko3190/ccbridge
1•marko3190•13m ago•0 comments

Show HN: War.direct – Real-time conflict intelligence dashboard for the Iran war

https://war.direct
1•Urbaneye•13m ago•0 comments

Show HN: Self-hosted AI agent observability (OTel, Grafana, bash hooks)

https://github.com/shepard-system/shepard-obs-stack
1•digitalshepard•15m ago•1 comments

New Best Friend Is a Chatbot

https://tapestry.news/tech/ai-companions/
1•sonalidee•16m ago•0 comments

OpenAI Just Got Anthropic's Pentagon Deal

https://tapestry.news/tech/openai-pentagon/
1•sonalidee•16m ago•0 comments

Patience Toys

https://patience.toys/
1•Towaway69•17m ago•0 comments

My weird ADHD to-do app, Do-dono

https://good.afternoonrobot.co.uk/my-weird-adhd-to-do-app-do-dono/
2•robotmay•18m ago•0 comments

Show HN: Independent monitoring of AI API reliability

https://ai-api-monitor-production.up.railway.app
1•techsearcher•18m ago•0 comments

Rig for Turbulence

https://davegriffith.substack.com/p/rig-for-turbulence
1•dxs•18m ago•0 comments