2024-11-16 π programmerhumor β RE: kazaika
I always hated the implementation for .toString() of Duration. It gives you a string like that: PT8H6M12.345S (not a hash)
Apparently, itβs an ISO 8601 thing, but what the hell am I supposed to do with that?
Itβs not useful for outputting to end users (which is fair enough), but I donβt even want to write that into a log message.
I got so used to this just being garbage that I would automatically call .toMillis() and write βmsβ after it.
Well, and not to gush about Rust too much, but I recently learned that its debug string representation is actually really good. As in, itβs better than my Java workaround, because itβll even do things like printing 1000ms as 1s.
And thatβs just like, oh right, libraries can actually provide a better implementation than what Iβll slap down offhandedly.
2024-11-24 bleistift2 β 1π¬
I donβt even want to write that into a log message.
[β¦]
ββββ
ββββ