KBD

Keith Devens .com

Friday, December 5, 2008 Flag waving
Anything is possible if you don't know what you're talking about. – unknown
← The Spirit parser frameworkRegular expression tools →

Daily link icon Tuesday, January 6, 2004

Possible permalinks

I think weblog URLs should all have a date and a slug to identify their content. For instance, the URL for this post is http://keithdevens.com/weblog/archive/2004/Jan/06/permalinks

Now, weblog URLs should always have the date in the URL. But in the absence of a slug, what's are good ways to uniquely identify a post? Possibilities include:

  • A timestamp of the creation time, in hour/minute/second format
  • A timestamp of the creation time, in Unix timestamp format
  • An arbitrary unique ID for the post (usually just the primary key of whatever table stores your weblog entries)
  • A GUID (some news sites use this for article IDs)
  • A number indicating the order the post was posted in the day (first post is 1, etc.) I suppose you could do a textual representation of this as well ("one","two","forty-seven")
  • Some serialization of the title, if one exists
  • What else?
← The Spirit parser frameworkRegular expression tools →

Comments XML gif

pete (http://rasterweb.net/raster/) wrote:

In my home grown system we decided to go with year/month/date originally (hey, it was back in the 1990's) and we later updated to doing year/month/date/hour/min/secs, so a month gets this '200401.html' and a day gets this '200401.html#01072004' and an entry gets this '200401.html#01072004072340'

It's not the cleanest, but I do prefer to use the date/time than some arbitrary id number assigned by a system I might migrate away from someday...

∴ pete | 7-Jan-2004 12:53pm est | http://rasterweb.net/raster/ | #3719

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

December 2008
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 4 posts

Recent comments XML

Girls, please don't get breast implants

I have 34 A breast but at 22 years​old they seem to be growing again​which ...

76.64.120.153: Dec 3, 10:00am

Perl 6 1.0 in March?

Doh, my mistake. I'm aware of the​relation between Parrot and Rakudo​but I'...

Keith: Dec 2, 1:03am

Free image hosting sites

Well, TinyPic has this in its​FAQ:

> Images and videos is in​your accoun...

Keith: Dec 1, 1:13am

Join a NameValueCollection into a querystring in C#

Well with a lamba expression, this​is what I came up​with:

?!code:csharp...

Gustaf Lindqvist: Nov 30, 4:38pm

Generated in about 0.196s.

(Used 8 db queries)

mobile phone