Jump to content

7-Letter GC Codes


Fuzzywhip

Recommended Posts

The characters that are valid in a GC code are the digits zero through nine and all letters of the Roman alphabet, except for the letters in the name "Louis".

 

You know, I think that, for consistency purposes, all GC codes less than 7 characters in length should be completely retired, and replaced with 7-character codes with enough leading zeroes after the "GC" part, so GCAAA, for example, becomes GC00AAA, and GCAAAA becomes GC0AAAA.

 

Edit: Thanks, sTeamTraen! :drama:

Edited by DENelson83
Link to comment

The guys that write the software that needs to understand this arcana (a few of which have piped in on this thread) are comfortable with the whole concept of leading zeros being insignificant and don't see a reason to burn elements from a well defined namespace every time a bump is in order. The change from hexadecimal to base [whatever it is now] was pretty well communicated to the external developers and is pretty clear.

 

Lil Devil's answer was the correct one to the OP. When the extra digit was added, the four character codes (and they were four digits with implied leading zeros, base 16) were well defined and shoved into a known space with the full knowledge that there was some dead space between GCFFFF and GC10000.

Link to comment

Well, some database developers and programmers are more comfortable with fields that use data types providing a fixed number of characters, or simply a straight numerical value. Using a variable-length mixed alphanumerical ID can require, to them, some very complex work to define the data type properly.

Link to comment
Using a variable-length mixed alphanumerical ID can require, to them, some very complex work to define the data type properly.

True. But that work is already done. Years ago. Why go back and change it now? What would it really accomplish?

 

Especially when there are much more important things to work on today.

Link to comment

Well, some database developers and programmers are more comfortable with fields that use data types providing a fixed number of characters, or simply a straight numerical value. Using a variable-length mixed alphanumerical ID can require, to them, some very complex work to define the data type properly.

The GC Code isn't really fundamental at all - in fact, I'm guessing that it may not even be stored in the database in its GCxxxxx form.

 

A cache is represented first and foremost by the GUID (32 hex digits, so there's your fixed-length field) of its top-level database element. The easiest way to represent the GC code is with an auto-incrementing sequence number in a 32-bit INT field (so when we have 2**31-1 or 2**32-1 caches, we might have a problem).

 

If that's the case, the GC Code can be derived in all cases from the cache sequence number. For sequence numbers above 65535, you do some base-31 (!) arithmetic on the number, then map the resulting base-31 values onto letters (minus, as someone nearly pointed out above, those which make up the word "LOUIS" :lol:) and numbers. Below 65535, a straightforward hex mapping is used (GC1 through GCFFFF). Perhaps, way back when, leading zeroes should have been introduced, but it would have looked rather pretentious to publish cache "GC0000000F" as the 15th ever.

Edited by sTeamTraen
Link to comment

A cache is represented first and foremost by the GUID (32 hex digits, so there's your fixed-length field) of its top-level database element. The easiest way to represent the GC code is with an auto-incrementing sequence number in a 32-bit INT field (so when we have 2**31-1 or 2**32-1 caches, we might have a problem).

Except that the GUID is not even remotely used by humans as much as the GC code.

 

Just add a regex that allows any number of leading zeroes (within reason) to be put in between the "GC" and the rest of the code, and yet still resolve to the same GUID.

Edited by DENelson83
Link to comment

 

When the extra digit was added, the four character codes (and they were four digits with implied leading zeros, base 16) were well defined and shoved into a known space with the full knowledge that there was some dead space between GCFFFF and GC10000.

 

GCFFFF (the last hex code) was followed by GCG000 (the first "base 31" code, but still 6 characters)

 

then, much later, GCZZZZ was followed by GC10000 (the transisition point from 6 characters to 7 characters, both "base 31" code)

Link to comment

A cache is represented first and foremost by the GUID (32 hex digits, so there's your fixed-length field) of its top-level database element. The easiest way to represent the GC code is with an auto-incrementing sequence number in a 32-bit INT field (so when we have 2**31-1 or 2**32-1 caches, we might have a problem).

Except that the GUID is not even remotely used by humans as much as the GC code.

 

Just add a regex that allows any number of leading zeroes (within reason) to be put in between the "GC" and the rest of the code, and yet still resolve to the same GUID.

It's a poor programmer who can't adapt to the situation at hand.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...