HNHacker News
TopNewBestAskShowJobs

peterejhamilton

39 karma · joined December 29, 2012

submissionscomments
peterejhamilton··on Software Company HashiCorp Is Weighing a Potential Sale
Hey there - co-founder here, thanks for the kind words, glad you like the look of it :)

Could you elaborate on what you're trying to do with SSO? To clarify, you can SSO via Slack on any of our pricing plans (which in turn often SSO's with other providers). Essentially, whatever you SSO with on Slack, will work with incident.io.

If you'd like to use SAML, you can do that too, on our Pro plan and above. The only thing offered exclusively behind our Enterprise plan is SCIM.

peterejhamilton··on Postgres sequences can skip 32 unexpectedly
Hey, author here :)

I don't think they're always a bad idea, but when talking about external IDs many folks would agree with you, in a few ways, actually.

Relying on exposed primary IDs being ordered, and/or exposing them, is often a bit of a can of worms.

A common case is that you leak information about your company because people can see how quickly you're growing. I've seen this in a few products I use and it's always interesting when you take an action a few days apart and can see how much volume they're doing.

TIL: German Tank Problem, thanks @teddyh! I first came across it with a good story about someone buying Donuts/Coffee in a shop and using the receipt numbers to estimate yesterday's sales, can't find the link, though :(

In this instance it's not our primary ID field - those are internal, and are long and random. They holds no meaning other than being a reference, so aren't used for sorting or exposed to the customer, and even if it was, it wouldn't mean anything or confer any information.

The IDs I refer to the in the article are more like external references. References we _explicitly_ want to increment by 1 each time.

For those referencing invoices as a parallel, it's a good equivalent. I'm not familiar with the details in the comments below, but if I created two invoices and they were referenced #1 and #33, I'd be quite confused (which is a version of what our customers felt/experienced here).

IMO It's also often a good idea to use different external IDs to your internal ones in APIs too, and ideally have no meaning attached to them, either. That way users don't do things like assume "record 99" was created before "record 100", and you can also move data around and migrate things, so long as you honour those external references (i.e., you can change the type/format of your internal IDs at will).

peterejhamilton··on Postgres sequences can skip 32 unexpectedly
Hey - author here! I'm not totally sure I follow on this one. Happy to chat more if there's any context missing from the article that you'd find interesting :)
peterejhamilton··on Postgres sequences can skip 32 unexpectedly
Super interesting, and that makes a lot of sense!

Luckily our _internal_ IDs don't rely on sequences at all, and for ordering I'd always use a field specifically for that purpose like `created_at` timestamps etc (vs inferring ordering from IDs). Best if IDs just remain references!

This could have been another interesting bug though, in a way glad we hit this one instead and that it's now fixed so we don't hit this one in future!

peterejhamilton··on Postgres sequences can skip 32 unexpectedly
Nice - we're using a very similar approach now (procedure that runs just before creation) which I think will last us a good while. Glad to know it's worked out well for you :)
peterejhamilton··on Postgres sequences can skip 32 unexpectedly
Author here - thanks for the kind words. You're right, this was a case of pragmatic decisions revisited at a later date, something I'm a big fan of (although it would have been nice to not fall foul of the issue at all!)

We were very open, and our customers in this case were really understanding - just one of the reasons we love working with them!

peterejhamilton··on Postgres sequences can skip 32 unexpectedly
Hey, author here :)

Normally I'd agree with you, but in this case we're explicitly dealing with external IDs that we want to be incrementing.

Our internal IDs and API IDs actually follow a totally different approach, and hold no meaning other than as a reference :)

peterejhamilton··on New Gmail ads looking a lot more like emails
Turns out naming images "google-ad-email-zoom.png" is a bad idea. AdBlock understandably doesn't like images with "ad" in the name...
peterejhamilton··on New Gmail ads looking a lot more like emails
Wow. How the hell did that happen :S
peterejhamilton··on New Gmail ads looking a lot more like emails
True. I can't imagine them ever doing that though! Where would you go instead? They're still the best web based email provider IMO.
peterejhamilton··on How to listen to your customers - using Rails and Javascript
I've had a few emails about Open sourcing the stuff we've done. We're considering adding a few features and releasing it into the wild, I'd love to hear what people would add?
peterejhamilton··on How we use BitTorrent to improve our design sharing workflow
How does this handle a situation where multiple designers edit large files at roughly the same time?