frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
510•klaussilveira•8h ago•141 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
848•xnx•14h ago•507 comments

How we made geo joins 400× faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
61•matheusalmeida•1d ago•12 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
168•isitcontent•9h ago•20 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
171•dmpetrov•9h ago•77 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
282•vecti•11h ago•127 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
64•quibono•4d ago•11 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
340•aktau•15h ago•165 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
228•eljojo•11h ago•142 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
333•ostacke•14h ago•90 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
425•todsacerdoti•16h ago•221 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
4•videotopia•3d ago•0 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
365•lstoll•15h ago•253 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
35•kmm•4d ago•2 comments

Delimited Continuations vs. Lwt for Threads

https://mirageos.org/blog/delimcc-vs-lwt
11•romes•4d ago•1 comments

Show HN: ARM64 Android Dev Kit

https://github.com/denuoweb/ARM64-ADK
12•denuoweb•1d ago•1 comments

Why I Joined OpenAI

https://www.brendangregg.com/blog/2026-02-07/why-i-joined-openai.html
85•SerCe•4h ago•66 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
214•i5heu•11h ago•160 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
59•phreda4•8h ago•11 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
35•gfortaine•6h ago•9 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
16•gmays•4h ago•2 comments

I spent 5 years in DevOps – Solutions engineering gave me what I was missing

https://infisical.com/blog/devops-to-solutions-engineering
123•vmatsiiako•13h ago•51 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
160•limoce•3d ago•80 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
258•surprisetalk•3d ago•34 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
1022•cdrnsf•18h ago•425 comments

FORTH? Really!?

https://rescrv.net/w/2026/02/06/associative
53•rescrv•16h ago•17 comments

Evaluating and mitigating the growing risk of LLM-discovered 0-days

https://red.anthropic.com/2026/zero-days/
44•lebovic•1d ago•13 comments

WebView performance significantly slower than PWA

https://issues.chromium.org/issues/40817676
14•denysonique•5h ago•1 comments

I'm going to cure my girlfriend's brain tumor

https://andrewjrod.substack.com/p/im-going-to-cure-my-girlfriends-brain
98•ray__•5h ago•49 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
81•antves•1d ago•59 comments
Open in hackernews

Use singular nouns for database table names

https://www.teamten.com/lawrence/programming/use-singular-nouns-for-database-table-names.html
44•Bogdanp•5mo ago

Comments

chasil•5mo ago
SQLite has specific naming advice:

"For most SQL code, your safest bet is to never use any English language word as the name of a user-defined object...

"SQLite adds new keywords from time to time when it takes on new features. So to prevent your code from being broken by future enhancements, you should normally quote any identifier that is an English language word, even if you do not have to."

https://sqlite.org/lang_keywords.html

hvenev•5mo ago
English also changes, so the only way to be safe is to quote all identifiers.
01HNNWZ0MV43FF•5mo ago
I'll just stop upgrading SQLite if they ever add "rizz" as a keyword
phoyd•5mo ago
I want to drop here the not very well known fact, that the SQL Standard grammar distinguishes between "SQL language identifier" and "regular identifier". According to the rules, a SQL language identifier can not end with an underscore (copied from ISO/IEC 9075-2:1999 "5.4 Names and identifiers":

<SQL language identifier> ::=<SQL language identifier start> [ { <underscore> | <SQL language identifier part> }... ]

<SQL language identifier start> ::= <simple Latin letter> <SQL language identifier part> ::= <simple Latin letter> | <digit>

So, using names with trailing underscore should always be safe.

majewsky•5mo ago
It_ might_ be_ safe_, but_ it_ is_ definitely_ annoying_.
isoprophlex•5mo ago
French table and column names, here I come! La vache query!
SQLite•5mo ago
I think (I hope!) we are probably done adding keywords to SQLite. Furthermore, all of the more recently added keywords (ex: WITHIN, RETURNING, MATERIALIZED) make use of special capabilities in SQLite's parser that allows keywords to be used as identifiers as long as the identifier usage does not occur in a context where the keyword is allowed.

So, for example, you can used MATERIALIZED as a keyword in a common-table expression ("WITH xyzzy(a,b) AS MATERIALIZED (...)") but MATERIALIZED can also be used as a column or table name. Hence, the following SQL actually works in SQLite:

   WITH xyz(MATERIALIZED) AS MATERIALIZED(
     VALUES(1),(2),(3)
   )
   SELECT * FROM xyz;
metadat•5mo ago
Does this qualify as bike shedding? What is the business impact either way? If someone prefers one or the other, so what!

All arguments seem pretty frail, always reduced to some form of "well this way makes it easier for ME to reason about!". I used to have opinions on this crap, and nowadays I've got way bigger fish to fry than worrying about table name plurality. As long as it's human-legible and consistent, who cares?

000ooo000•5mo ago
>As long as it's [..] consistent, who cares?

That's what the article is about..

aakkaakk•5mo ago
+1000

Use whatever convention (per app/db/team), as long as it is consistent. Developers who use mixed singular and plural in the same db should be fired (into the sun).

orphea•5mo ago
It is clearly not, and that's the whole reason people have an issue with it.

The only mention of the word "consistency" was used to support the plural approach.

leoff•5mo ago
Seriously? I don't care what you call your tables, as long as it's consistent and it's nothing egregious.
Joel_Mckay•5mo ago
Sure, unless most the team is international, and the referenced "quote" was actually meant to function as "quota"... you just haven't earned your grey beard till you spent days chasing down a developer to explain their code.

Nice guy, but a conditional recursively defined polymorphic class on a transaction server should be a crime. lol =3

danbruc•5mo ago
1. Strictly speaking, we’re not naming a table, we’re naming a relation.

And a relation is a set, hence plural.

2. It reads well everywhere else in the SQL query:

   SELECT Employee.Name
        , Manager.Name
     FROM Users AS Employee
        , Users AS Manager
    WHERE Employee.ManagerID = Manager.ID
      AND Employee.DateOfBirth IS NULL;
3. The name of the class you’ll store the data into is singular (User). You therefore have a mismatch, and in ORMs (e.g., Rails) they often automatically pluralize, with the predictable result of seeing tables with names like addresss.

The class User represents a single row, not the entire table, hence singular. If the O/R mapper or some other tooling has issues with singular and plural, then I agree, it might not be worth fighting the tools.

4. Some relations are already plural. Say you have a class called UserFacts that store miscellaneous information about a user, like age and favorite color. What will you call the database table?

I think having the table and the class name both in plural would be fine. That also seems rare enough in practice that I would not let this dictate the decision. In the given example I would also tend to record the user facts as a list of them. A user fact is a key value pair associated with an user, the keys living in their own table. Having the keys implicit as column names will also make some queries unnecessarily complicated and as the number of facts grows, the table will become increasingly wide.

Also sometimes we have singular names for collections of things, then it is fine to have a singular table name, you can name your Trees table Forrest if that makes sense in the domain.

dan-robertson•5mo ago
A relation is a set in the same way that a function is a set. I don’t think that’s a useful fact when thinking about naming.
DougBTX•5mo ago
> they often automatically pluralize, with the predictable result of seeing tables with names like addresss.

This is a very poor example, that case is literally in their unit tests file:

https://github.com/rails/rails/blob/b0c813bc7b61c71dd21ee3a6...

That test has been there over 18 years!

gorgoiler•5mo ago
Are you advocating for using “select … from plural as singular” in all schema and queries?

  select sum(cat.length)
  from cats as cat
That’s an interesting approach I haven’t seen before.

(For me, I’m very much a singular it’s-a-datatype-not-a-collection person, but selecting from cat has always felt a bit awkward with that pattern.)

danbruc•5mo ago
I think that is the correct way to do it, you iterate over all the cats picking one cat at a time and it becomes quite obvious when you join a table to itself forcing you to do this. I am not writing that many SQL queries and I am certainly too lazy to always do that, especially if I am writing not too complicated ad hoc queries, but if I want the code to be as good as I can make it, then I always do this. Sure, it makes things a bit more verbose but you can also make the query more readable by picking a descriptive alias, FROM Users AS Manager, FROM Users AS NewEmployee, and so on.
orphea•5mo ago
Whether you alias your plural tables to singular nouns would probably be one of the very last things I would check out if I would need to assess your code.
danbruc•5mo ago
And you should not but I think it is still useful. You will probably not even become consciously aware of the difference but Cat.Name will be ever so slightly easier to read than Cats.Name and maybe that difference in cognitive load is what makes you spot some issue that you would have missed if your brain got repeatedly slightly tripped up by incorrect grammatical numbers.
Glyptodon•5mo ago
I don't like plural table names as a convention, but not enough to not use Rails or change its default behaviors.

For me, it's in the same category as preferring generated primary keys were named <table-name>_id over just "id" - you may have a preference, but it's not got that much big picture importance.

ambentzen•5mo ago
If you have self-referential columns you are going to have to name them something else, like `parent_id` and tell your model code about the discrepancy.
shrikant•5mo ago
Funnily enough, the blog post itself has a counterexample in their singular noun example: the table^Wrelation name is `user` which is highlighted by the syntax highlighter as being a keyword. I'd wager the same thing would happen for a table named, say, `transaction`.

Some DB engines won't let you use a keyword as identifiers for anything unless it's quoted, and then you either have to quote everything, or end up in a weird situation where some things are quoted and some aren't.

veltas•5mo ago
I agree with the article on the basis it's easier to not bother trying to use a convention of plural names as there's a lot of time-wasting edge cases, and generally it's less weird seeing no plural than seeing a plural in the middle of an expression where it doesn't work.
presentation•5mo ago
Sounds like bike shedding to me
jaapz•5mo ago
Naming things is one of the hardest things in software engineering
arnaudsm•5mo ago
My other favorite best practice with SQL is to have unique ID column names, so you never mix up IDs, and can use JOIN with the USING syntax:

  SELECT *
  FROM customer
  JOIN order USING (customer_id)
jiggawatts•5mo ago
My reason for doing this is that there can be multiple foreign key columns pointing at the same table, each with a distinct purpose and name.

The general case is a named key.

vbezhenar•5mo ago
I've never heard of `using` syntax. And now you might make me reconsider my identifier naming usage :) It certainly makes sense.
5123121•5mo ago
The downside of this is GORM ( or new developer ) often just default to "id". Fighting against it will take away bits of your attention and effort.
arnaudsm•5mo ago
Yep, it's unfortunately the industry standard, but in my career I've seen it lead to mixing up ids and painful debugging.
cynicalsecurity•5mo ago
No.
adrianmsmith•5mo ago
Having table names plural e.g. "customers" and object names in your programming language e.g. "customer" is one extra piece of complexity that's not necessary.

For example we have a table "customer_data" at work and in our generated ORM code it's called "customer_datum".

The open-source singularization library is doing its job, but it sure made it difficult for me to global-search for that object name when I joined the company and didn't know the object was called that.

5123121•5mo ago
data is basically the singular word at this point in English language history :). "Datum" now remains as a fun quiz for the people who don't know.
adrianmsmith•5mo ago
Join tables are a bit more difficult if you pluralize tables. For example at work we have table names like:

    customers
    customer_attributes
    customers_labels
On one side you want to be consistent with the "customers" table you're joining to. On the other hand it reads weirdly to have an extra "s" in the middle of the table name.

After you've got three or so words in a table name it really becomes inconsistent and you can't really guess what they're called when writing code.

There are solutions of course: whether to use the "s" on join tables could be a policy documented somewhere and everyone, including new employees, could be made aware of it. But it's a problem you don't have if you use singular table names.

FearNotDaniel•5mo ago
This is the tabs vs spaces of SQL. Pick one and stick with it. If you join a project that has already chosen the “other” option that is not your favourite, just grow up and deal with it. Once decided, try to apply it consistently, unlike the final example given here which really ought to be “UserFactsCollection”, or List or Bag or whatever singular object they are actually saving per table row… and if you absolutely must write a blog post like this, don’t forget to preface the title with “I prefer to…”
c048•5mo ago
I agree.

It is better to be consistent but wrong, than inconsistent but correct.

Consistent and correct might seem ideal, but merely the fact that what is 'correct' is in the eye of the beholder most of the time, making it basically unobtainable.

But being consistent is at least something that is far less subjective.

stcg•5mo ago
I don't see consistent and correct as separate. Consistent is correct, and correct is consistent.
dwattttt•5mo ago
Be sure to be consistent with each of the edge cases in order to be correct!
out_of_protocol•5mo ago
> than inconsistent but correct.

than inconsistent but sometimes correct.

cwisecarver•5mo ago
An old boss of mine used to say "Consistent is better than better" and it's always stuck with me.
bob1029•5mo ago
> which really ought to be “UserFactsCollection”, or List or Bag or whatever singular object they are actually saving per table row

I try to avoid putting nouns on things when they could otherwise be inferred from their context of use. In this case we know it's a table. The possibility of multiple items being included is implied.

Singular/plural debate is driving us to name stuff in weird ways. This is why you should just go with the flow. Consider what a non technical person somewhere else in the business might call it. Aligning with this language has tremendous benefits. Trying to force purity into a natural language and communications context is how we make type systems and schemas that are indecipherable to the business.

jacknews•5mo ago
It's really not, when you have an ORM, eg with Rails (point #3).

Automatic conversion between singular and plural can be a real problem, so just eliminate the problem and stick with singular throughout, so your object names match table names. Unless your object names are plural too, though that seems unintuitive. And then you'd still have problem #4.

camgunz•5mo ago
Strong disagree; there are multiple "things" in the "things" table. Also lead with your strongest argument, also `UserInfo` works, also it's probably not a good table (why isn't it just on `User`, why isn't it a many-to-many of user IDs to fact IDs w/ a value, etc. etc. etc.)
vbezhenar•5mo ago
Not really related, but I hate that postgres have keyword `user` which makes it cumbersome to name table like that (you technically can do it, but you would need to quote it everywhere). This table is present in 99% projects, so it's PITA. I'm usually using "account" table because of that, but "user" feels more natural.
adrianmsmith•5mo ago
The database vendors themselves don't seem to be consistent on this issue.

* PostgreSQL system table names are singular e.g. "pg_class"

* Oracle system tables are plural e.g. "ALL_TABLES"

* MySQL is also plural e.g. "schemata".

mediumsmart•5mo ago
Good point. I am going to make a local form that will check a name I want to use for being a poor choice in rails.
vbezhenar•5mo ago
Also related:

I skimmed classic Codd paper "A relational model of data for large shared data banks" which gave birth to RDMS.

Codd uses singular nouns for example relation names: PART, PROJECT, COMMIT, supply, component, employee, jobhistory, salaryhistory. The only exception is "children" relation.

So that's one small argument in favour of singular approach :)

huksley•5mo ago
user is a resevered word in Postgres so it will be actually

> select * from "user"

which is ugly

rejschaap•5mo ago
I like singular, most pick plural

I like tabs, most pick spaces

I like mercurial, most pick git

But no one’s taking my vim!