Used-up GUIDs

GUIDs are generally considered unique across the known programmatic universe. It's not mathematically true, but good enough to be relied upon to be that way. This site is poking fun at a conversation with a fellow developer that you shouldn't waste GUIDs. The banter went something like this - "if you generate a GUID its taken out of circulation because you keep on generating unique GUIDs". Hence the idea that generating them is somehow using them up permanently.

In playing on the OCD'ed-ness of software developers this site is made to just poke fun at that idea.

What is a GUID

To further explain what a GUID or Globally Unique Identifier you could think of it like an ISBN number on a book. Our world revolves around numbers and we have a need to be able to uniquely identify things to each other. With an ISBN number you're able to give someone a 10-digit or longer number and know that you're talking about 1 very specific book (edition, etc). A GUID is a lot like that but helps uniquely identify things in the software world.

In software we have the need to identify everything from individuals to applications as a whole. As such, GUIDs are quite a bit larger than ISBN numbers or social security numbers. A GUID is a 128-bit integer (16 bytes) that can be used across computers and networks wherever a unique identifier is required. A Guid is normally expressed as "{30a7e1b3-e763-4789-a54d-fcc53dcf973a}" or without the curly braces. Now since you're looking to provide something with a unique number just copying that GUID to your application isn't going to do you much good. If two people did it then it wouldn't be very unique now would it?

To generate GUIDs most software applications and databases already have built-in methods to do so.

For example, in C# you would do something like: var unique = System.Guid.NewGuid();
or
For SQL Server you'd do something like: SELECT NEWID();.


Go to the home page     What is a Used-up GUID