Thiemo Mättig

Thiemo Mättig

I did it. I updated my very own hand-crafted blog software to support custom URLs for the individual entries.

The oldest blog entry in this series dates back to the year 2000 – more than 16 years ago. The PHP scripts are more or less the same since then, even if I tweaked and updated them constantly. But I started running into a few problems and wanted to do something about them:

  1. All the blog entries are stored in a tabular separated text file (TSV). This file reached about one megabyte recently, but is still loaded in it's entirety every time, even if only a single entry is requested. I got more and more worried this may become an actual performance issue one day, even if my web hoster is so nice to constantly update the CPU this weblog is running on. My original plans to switch to a MySQL backend never happened. So what did I do instead? I'm now cutting of long entries at the (custom) point where the »read more« link is shown. The snippets you see when listing blog entries are still loaded from the TSV file. When you read a full blog entry, it is loaded from a separate HTML file. The two are linked with a file name that is stored in a new column in the TSV file.
  2. This new file name column is also used to build the URLs of the individual blog entries. Previously I was exclusively using Unix timestamps (number of seconds since 1970) for these URLs. They are short and almost guaranteed to be unique (I will never write two entries the exact same second), but do not look nice. To not break anything this is, of course, still the default.
mehr schreiben


(Links wie gewohnt formatieren.)

[ < Zurück zur Übersicht ]