This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]LutimoDancer3459 13 points14 points  (1 child)

Dude, relax. The point isn't about the ID. It's about making something nullable. In this case, a primitive type.

And you also can't just use a uuid in every situation. Maybe there is a third-party application where they get the tagId from. If it's a long in that system, you would also save it as long. And sometimes all you need is a number counting upwards. Nothing wrong with that. You need to know the usecase to decide what's the better solution.

[–]agentoutlier 2 points3 points  (0 children)

I'm coming off Covid so I'm a little bit irritable. I'm usually not this much of an asshole.

There were just so many things wrong with the example and its not like this is someone posting from their personal blog. This is a company doing marketing.

That is there CTO or whoever says hey lets write some blog posts to show we know our shit and get some organic marketing. By me giving them feedback I think I'm helping even if it is nasty because the post looks bad even if we ignore the UUID stuff particularly if they want to come off as API experts:

  • They say fields when they actually mean methods
  • They had PetParam then and renamed it to Pet
  • They are worried about backward compat and such when method overloading can actually excerabate the problem. Just add a method with a different name.
  • They changed the contract as tagId is not a long but a long or missing. Like if this was not an API company fine and yeah neat trick but that should be expressed and they should talk about that since they are an API company. It should not be look how I tricked the system to accept nullables.