629
submitted 11 months ago by qaz@lemmy.world to c/memes@lemmy.ml
  • ISO 8601 is paywalled
  • RFC allows a space instead of a T (e.g. 2020-12-09 16:09:...) which is nicer to read.
you are viewing a single comment's thread
view the rest of the comments
[-] praise_idleness@sh.itjust.works 56 points 11 months ago

allows a space instead of a T

That's a bug not a feature

[-] CallumWells@lemmy.ml 4 points 11 months ago

allows, not requires. It basically means you can use space instead of T when showing it to end users and any technical person can just use T

[-] praise_idleness@sh.itjust.works 3 points 11 months ago

Development wise, It'd be better if it's required not allowed. Best case scenario, it's just another redundant if statement.

[-] CallumWells@lemmy.ml 2 points 11 months ago

The amount of things allowed by ISO 8601 is even more than what's allowed by RFC 3339, if you take the time to look at https://ijmacd.github.io/rfc3339-iso8601/

[-] TheyCallMeHacked@discuss.tchncs.de 1 points 11 months ago

It's really a skill issue if replacing T by [T ] in your regexp is hard

[-] hyperhopper@lemmy.world 12 points 11 months ago

This is the most junior developer comment I've seen in a while.

Nobody that's competent thinks that's shit is hard. That's not the point.

The point is, it makes it easy to make mistakes. Somebody might see all of one type of strings, assume that's the format, and forget to enclose the thing in quotes, causing mysterious bugs years later when a differently created date filters into the system. You might have a regex error, you might split incorrectly, you might make a query that works the wrong way and gives an incorrect aggregate, and none of that is due to lack of skill. It's due to not knowing it's the rfc standard, not the iso. It could be due to not even realizing the rfc allows for that or is different.

Software engineering in practice is not about making sure there is at least some way for people to use your library/standard/pattern. It's about making sure the way to do it that's most intuitive/obvious is also foolproof, easy, and efficient. Adding the space makes debugging harder and adds footguns which is exactly what good software engineers want to stay away from. Otherwise we'd all be writing in assembly. But since you aren't, maybe you are the one with a skill issue. Either that or you really misunderstand this field.

this post was submitted on 12 Dec 2023
629 points (95.1% liked)

Memes

45584 readers
1343 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 5 years ago
MODERATORS