4 ms·
OK, some fair comments there. For me the article's negative was that it focused on one edge case reason to not use IDs, when there are others. While everyone
by dominicr 8y ago
OK, some fair comments there.
For me the article's negative was that it focused on one edge case reason to not use IDs, when there are others.
While everyone makes mistakes I'd hope that using an array's size instead of its value is nigh on impossible to end up committed, let alone deployed to production.
As everyone makes mistakes for me the main reason for not using numeric user ids is because you're much more likely to accidentally expose an API or query string param that can be used to look up other user ids. When that happens being able to enumerate ids makes for a massive data breach, whereas a GUID stops that.
(There may be some reason why you'd be forced to use numeric IDs in a data store for performance at scale reasons but I imagine that's relatively rare.)