Settings

Theme

Show HN: Display primary keys the way humans and developers prefer

github.com

3 points by tttp 2 years ago · 3 comments

Reader

tttpOP 2 years ago

Hi,

It's solving a tiny problem that annoyed me for many years: find a way to have unique keys for entities that don't have an obvious one without displaying their primary key as a number.

base 10 is not the best representation here.

feedback welcome!

  • stulentsev 2 years ago

    I'm glad that it works better for you, but I have literally none of the problems you list.

    I have never in my life typed out a URL (with an id, google.com and stackoverflow.com don't count).

    I don't put naked ids alone in spreadsheets. If, once a year, I do need to make a spreadsheet, I put full URLs there.

    Length of these ids is comparable to that of base-10 numbers and neither are "very long".

    And so on.

    • tttpOP 2 years ago

      thanks for the feedback, you're right, the "url safe" isn't the main focus (well, shouldn't, it's just that it's the last issue I had ;)

      For further context, we are working on online campaigns (petitions, sending emails to elected representative...) and everything has either ids (numbers) that we generate (a campaign, a action, a supporter...) or given externally (eg. the elected representatives or vote reference).

      Most of these ids are in the 1k to 100k range, that happen to often be the same range as the number of actions taken or emails sent) and mixing these KPIs and ids on the same lists happen to be confusing for users.

      It might be that we shouldn't try to put these ids in lists and summaries, but they are super convenient there sometimes and unavoidable when exporting to excel, so dxid was my solution to work around our potentially poor ux design ;)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection