this post was submitted on 30 Jun 2024
571 points (98.1% liked)

Programmer Humor

19551 readers
736 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

Meme transcription:

Panel 1: Bilbo Baggins ponders, “After all… why should I care about the difference between int and String?

Panel 2: Bilbo Baggins is revealed to be an API developer. He continues, “JSON is always String, anyways…”

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 18 points 4 months ago (21 children)
[–] [email protected] -1 points 4 months ago (1 children)
[–] [email protected] 1 points 4 months ago (1 children)

For the love of all things pure, holy, and just, please do not use YAML in your APIs...

[–] [email protected] 1 points 4 months ago (1 children)

Fine, and if you don't use json in your API because of the deficiency highlighted in the meme, what format do you use in your API?

[–] [email protected] 1 points 4 months ago

I use JSON. I have used Avro for things in Kafka but I'm not sure the benefits outweigh the negatives. Avro is much more complicated than people think and most folks don't really have a strong desire to learn how it should be used and do stuff incorrectly. Everybody knows JSON and it works with everything though. (Example: so many people just hear that Avro schemas can be backwards compatible but have zero idea that you still need the schema that wrote the message even if you want to read it into a newer one.)

Interestingly, I take the meme as saying a dev is using the wrong types in their serialization format (using strings to store integers) which was my biggest problem with Avro. Mostly from people not using logical types or preferring to use ISO 8601 datetime strings instead of the built-in timestamp-millis type.

load more comments (19 replies)