Earlier quoted context omitted.
You mean he could read it or he could write a parser or he could use a dependency?
Use a dependency. It was a wild pattern that still confuses me years later. Literal interview: concurrently hit these endpoints that returns json and sum the total of values returned. Handle any 400 or 500 level http errors. Literal former Googlers and flubbing the interview. They would spend too much time setting up an IDE and project, not be sure how to handle errors, and unable to parse the json. We eventually add…
UUID package coming to Go standard library
201–210 of 260 posts
Re: UUID package coming to Go standard library
#202Earlier quoted context omitted.
Sure. Now generate your random ID. Did you use a CSPRNG, or were your devs lazy and just used a PRNG? Are you doing that every time you're generating one of these IDs in any system that might need to communicate with your API? Or maybe they just generated one random number, and now they're adding 1 every time. Now transfer it over a wire. Are you sure the way you're serializing it is how the remote system will deseri…
You are really making it seem like a huge problem. Generate random bytes, serialize to a string and store in a db. Done A downvote tells me nothing. Please tell me what I'm missing, maybe I could learn something
(Downvote wasn't me)
Re: UUID package coming to Go standard library
#203Earlier quoted context omitted.
It hasn’t been a draft RFC for a couple of years: https://datatracker.ietf.org/doc/rfc9562/ The problem is not that it is a draft RFC, the problem is that the library is unmaintained with an unresponsive developer who is squatting the uuid7 package name. It’s the top hit for Python developers who want to use UUIDv7 for Python 3.13 and below.
The problem here is a lack of namespaces. A problem the cargo bozos decided to duplicate
Re: UUID package coming to Go standard library
#204Re: UUID package coming to Go standard library
#205Earlier quoted context omitted.
Sure. Now generate your random ID. Did you use a CSPRNG, or were your devs lazy and just used a PRNG? Are you doing that every time you're generating one of these IDs in any system that might need to communicate with your API? Or maybe they just generated one random number, and now they're adding 1 every time. Now transfer it over a wire. Are you sure the way you're serializing it is how the remote system will deseri…
None of these are rocket-science problems, they're just standardization issues. You build a library with your generate_id/serialize_id/deserialize_id functions that work with a wrapper type, and tell your devs to use that library. UUID libraries are exactly that, except backed by an RFC.
But, using UUIDv4 shouldn't be rocket science, either. UUID support should be built in to a language intended for web applications, database applications, or business applications. That's why you're using Go or C# instead of C. And Go is somewhat focused on micro-service architectures. It's going to need to serialize and deserialize objects regularly.
Re: UUID package coming to Go standard library
#206Earlier quoted context omitted.
I just write my own code and then ask AI to find any issues and correct them if I feel it is good advice. What AI is amazing at is writing most of my test cases. Saves me a lot of time.
I've seen tests doing: a = 1 assert a == 1 // many lines here where a is never used assert a == 1 Yes AI test cases are awesome until you read what it's doing.
Re: UUID package coming to Go standard library
#207Earlier quoted context omitted.
I think the downvotes are because you did not answer the question you replied to, and instead gave a pretty unrelated rant.
I'm explaining that yes, code does break every new python version? Mostly because they touch the stdlib instead of just leaving it be.
And then you answered about downstream code breakage totally outside the std lib.
Re: UUID package coming to Go standard library
#208Earlier quoted context omitted.
Sure. Now generate your random ID. Did you use a CSPRNG, or were your devs lazy and just used a PRNG? Are you doing that every time you're generating one of these IDs in any system that might need to communicate with your API? Or maybe they just generated one random number, and now they're adding 1 every time. Now transfer it over a wire. Are you sure the way you're serializing it is how the remote system will deseri…
How's your UUIDv4 generated? > Are you sure the way you're serializing it is how the remote system will deserialize it? It's 16 bytes. There's no serialization.
Hex encoding with hyphens in the right spot isn't serialization?
Re: UUID package coming to Go standard library
#209Re: UUID package coming to Go standard library
#210Earlier quoted context omitted.
How's your UUIDv4 generated? > Are you sure the way you're serializing it is how the remote system will deserialize it? It's 16 bytes. There's no serialization.
> There's no serialization. Hex encoding with hyphens in the right spot isn't serialization?