Quantcast
Channel: Errietta's blog ☕
Viewing all articles
Browse latest Browse all 78

base36!

$
0
0

Are you making any piece of software that receives an ID from user input and returns a {post, image, whatever}?
May I suggest: base 36?

Just look at this:

http://example.invalid/?a=1000000

http://example.invalid/?a=lfls

What looks better?
Thought so.

You can convert between bases easily in any language, so you have no excuse not to!
You don’t need to store the base36 value, accept it in URLs and convert it to base 10 for your database operations – then when displaying the URL to the end user convert from base to base 36.


Viewing all articles
Browse latest Browse all 78

Trending Articles