En hållbar länkekonomisk strategi

Den senaste månaden har det varit ovanligt högt tempo här på bloggen. Vilket med mina mått innebär strax under ett inlägg om dagen. Jag är själv lite osäker på varför det är så kul att skriva här just nu, men det är lika bra att köra på så länge lusten finns kvar.

Billy Rimgard på BASS skriver jättebra om kulturyttringar som är bra och smala. Nu är väl BASS inte den allra smalaste bloggen, men den uppmärksammas definitivt mindre än den förtjänar. Av de ca 150 bloggar jag följer är den definitivt på tio-i-topp-listan, kanske för att han arbetar med de ämnen han skriver om så att han kan tillföra något nytt. Alla har väl läst ”Akten om min pappa – perspektiv på övervakning”?

I en passage i den aktuella postningen skriver Billy att han märker hur besökssiffrorna stiger varje gång han ger sig in i en aktuell debatt, och får trackbacklänkar från mer trafikerade ställen på nätet. Jag har märkt av det där varje gång jag länkat till en aktuell DN- eller SvD-artikel, eller någon mer högprofilbloggare och sett hur besökare bara väller in (nåja, relativt sett) från twingly och trackbacks.

Och det är ju kul. I perioder lägger jag ner en hel del tid på de resonemang jag för här i bloggen, så det är ju bra om nån läser dem. Så det är kanske inte så dumt att försöka knyta an till aktuella artiklar, pinga några inlägg på intressant.se, och så vidare. Tänker jag ibland, när jag går igenom min skrala statistik (ca 200 besökare om dagen enligt awstats).

Fast det är ju inte så jag själv hittar intressanta röster att följa. Den vanliga gången är att jag genom någon blogginläggslänk (en sådan där länkandet sker med nån sorts baktanke, inga trackbacks eller liknande automatiska länkar) hamnar på ett inlägg som ger någon ny vinkel, impuls eller insikt. Jag klickar vidare till bloggens förstasida, och om den är fylld med inlägg som i genomsnitt är läsvärda hamnar bloggen i min prenumerationslista. Är den väl där stannar den kvar tills författaren hamnar i en kvalitetssvacka och börjar skriva massvis med ointressant dravel — exempelvis då bloggen börjar jaga klick genom att kommentera var och varannan DN/SvD-nyhet.

Så de enda metrics jag egentligen bryr mig om är antalet prenumeranter på flödet — samt antalet läsvärda kommentarer. Det bästa sättet att öka dem på ett hållbart sätt är nog att fortsätta med lite mer långsiktiga länkekonomiska investeringar.

Flödesfestival 2009

En uppdatering av det här gamla inlägget

Om du inte får nog av mig finns det nu fem ytterligare sätt, förutom den här bloggen, att följa mina förehavanden.

Allt utom de två sistnämnda finns i högerspalten här på bloggen, men som de moderna och intelligenta människor ni är använder ni förstås RSS/Atom-flödena i första hand.

Blogguppgradering

Om du ser det här betyder det att DNS-förändringarna slagit igenom och att den nya versionen av bloggen är live. Här följer en redogörelse, främst av intresse för andra webbloggtekniknördar.

Så vad är nytt? För dig som läser det här genom RSS-flödet i stort sett ingenting, men ni som lever kvar på nittonhundratalet och fortfarande manuellt besöker webbsajter du vill läsa kanske noterar att siten bytt utseende och numera har det trista default-wordpress-utseendet. Den främsta anledningen är att jag ville slippa mecka så mycket med konfigurering och templateeditering — nu kör jag en relativt standardmässig WordPress 2.2 med extra default på allt, och använder widgetssystemet för att pimpa min sida.

Fast helt ut gick det ju inte. Jag har varit tvungen att hacka runt i php-filerna litegrann för att integrera taggar och slipa bort de värsta irritationsmomenten med Kubrik-temat. Kanske fortsätter jag och översätter den engelska text som förekommer till svenska.

I övrigt har jag hållt mängen plugins till ett minimum. Just nu använder jag:

  • Spam Karma 2 för att hålla spamrobotarna i schack
  • Disable wpautop för att hålla WordPress ifrån att lägga in okynnesradbrytningar i mina fint HTML-formatterade postningar
  • Simple Tagging för att kategorisera mina postningar lite mer kaotiskt, tillsammans med en widget för att visa ett taggmoln.
  • Permalink redirect för att hantera övergången från den gamla permalänkstrukturen (/kategori/bloggrubrik.html, ursprungligen ett arv från tiden jag körde blosxom) till den nya (/2007/06/26/bloggrubrik)

Det där med gamla permalänkar kan utvecklas — jag har bytt blogpubliceringssystem ett gäng gånger sedan jag började blogga nån gång 2003, och jag har alltid försökt att se till att gamla länkar till enskilda inlägg fortsätter att fungera, trots att den underliggande tekniken ändrat på sig. Ni vet, Cool URIs don’t change och allt det där. Mängen magiska mod_rewrite-instruktioner i min serverkonfigurering börjar bli skrämmande. Dessutom verkar mina tidigare konfigureringar drabbats av bitröta – redirect-regler som funkade förut hade gått sönder till höger och vänster. Jag vill särskilt rekommendera mod_rewrite-direktivet RewriteMap — ett superkraftfullt verktyg för att lösa ungefär allt med (och/eller skjuta sig i foten på spektakulära nya sätt).

Switched over

After some general fiddling on and off for a few days, I’ve finally moved the blog over from Blosxom to WordPress. As part of the switch, the site is now running on my new and oh-so-cute mac mini, which, piece by piece, is taking over duties from my old trusty P-166. The Mac mini has enough processing power to run a dynamic php/mysql-driven app like wordpress. Still, things are not quite as zippy as I would have hoped, but they will have to do for now.

This also means that all my trusty readers can comment on my insightfullness once again (unless they get caught in the shiny new spam filters, that is).

The main part of the import was done using Mark Nozell’s instructions, then semi-manually importing comments, both those that stemmed from my blosxom-with-writeback-plugin, as well as older comments from back when I was running dasBlog.

For some nice layout, I used the theme ”Journalized Sand” from Mike Little with some minor tweaks. One particularly nice touch with this theme is that even though it has a left-hand navigation bar thing, it places the main content first in the HTML file, which means the interesting stuff comes first when browsing with lynx, on a cell phone, etc. Good stuff.

I’m using WordPress’ url-rewriting features to make old permalink URL’s still point to the right place, even the oldest BlogX-based permalink URL’s should still work — I hope. I’ll be scanning my server logs for 404’s. If you’re reading this through a RSS/Atom reader, at least some of it must have worked.

So, this is the fourth blog engine in a year (BlogX->dasBlog->blosxom->WordPress). Wonder if I’ll be happy with this one? At least it has a healthy userbase, which is always good.

Comments disabled (for now)

A month or two ago, I was the number one search result at google
for ”staffan”. Today, it seems I have been blacklisted entirely; A
search for ”Staffan Malmgren’s blog” brings up a bunch of trackbacks
and other references to me, but not this very page.

Most likely, this is punishment for my lack of comment-spam
housekeeping – I just went through the comments data files, and there
were maybe 5-10 legitimate comments among hundreds of spam messages,
most of them advertising the same few sites. Serves me right for
neither implementing spam controls or the nofollow
attribute.

(The other possible explaination is that someone at Google, in the
recent controversy about IDN
and browser security
, dug up some reference to my old Google
cracked?
post, didn’t think it was funny, and did something like
DELETE * FROM pages WHERE url LIKE
'http://blog.tomtebo.org/%'
. But that is not very likely.)

Anyway, the result is that comments are disabled for now, as I
haven’t bothered with tweaking the Blosxom writeback plugin to have
some sort of spam control. Comments will return when I move this thing
over to WordPress, which has way better spam control features out of
the box, which should happen shortly after my new server is delivered,
which should be in around two weeks.

Time to change the blog engine (again)

Not much has been published here recently; my mind has been
occupied with other stuff. Lots of large and small things that I want
to blog about will have to wait until I’m in the mood for blogging
again.

One thing that has to go is my blosxom setup. Over time, this blog
has attracted way too many comment spammers, and since it seems to be
no use to block their IP adresses (they just pop up from other
addresses — I guess these people use botnets), it might be a
good time to switch to a solution which has better built-in spam
controls.

There probably exists a better blosxom plugin than writeback
that enables commenting and handles spam (maybe one that doesn’t have
a XSS exploit,
even), but I’m done wrestling with it’s ”everything is a plugin”
philosopy, even if it means giving up my ”no mysql dependency”
criteria. I’ll probably switch to WordPress, since Erik switched to that (also
from Blosxom) and seems to be happy about it.

I just need to write a import script for blosxom-to-wordpress
migration (preferably with writeback comments and URL rewriting
configuration). Or maybe there exists one already?

Now with linkblog!

After hearing about them all over the place, I finally checked out
del.icio.us, and liked it so much that I
started a linkblog: here!. I’ll probably
post interesting links over there, instead of rounding them up in
”quickies of the day” style posts, at least as long as I don’t have
anything significant to say about them.

The links should be auto-included on my front page through some blosxom
plugin, but it will have to wait.

Of course, it’s much more preferable just to subscribe to the RSS feed.

Blogging engines revisited (again)

Well, I’m officially Not Happy with blosxom anymore. The biggest problem is
that the posting process when using static mode becomes very
convoluted. At least for me:

  1. ssh in to the server
  2. Write the entry as a text file (and think of a filename that would
    look good in the URL
  3. Add HTML as neccessary, without any real way of checking if I got
    every tag right
  4. Change all non-ascii characters such as å,ä and ö
    to their HTML entity counterparts (å,
    ä and ö) to get around the issue of
    storing files in Latin-1 and the RSS output being in UTF-8.
  5. Generate static pages by running blosxom from the command line. As
    I use a list of archive links, I need to regenerate each and every
    page to get the numbers right, which takes a while when having 100+
    entries and running stuff on a 166 Mhz Pentium.

Clearly, this is too much work for quick postings, and so I tend
only to write when I have something longer to say. But there are other
aspects of blosxom that I’m not so fond of either:

  • The reliance on filesystem timestamps. I just know that I’m
    someday going to copy all the blog posting files from one filesystem
    to another, and forget to use the -p
    option, thus removing this valuable metadata
  • The lack of any (mature) blog posting API implementation. I’d love
    to use a tool like w.bloggar or any
    of the blogging
    extensions
    available for Mozilla, but neither of the two
    implementations available at the
    plugin registry
    look very mature to me.
  • In general, the extreme spartanity (spartanness?) of the base
    blosxom install. I know this is the zen of blosxom, but I’d really
    like to have basic stuff like:

    • a posting API
    • comments/trackback/pingback recieving
    • a posting webform with trackback/pingback sending
    • a blogroll
    • archive links
    • and a search function

    built into the base install.

So, what am I looking for? The thing that drove me to bloxom was
that it did not rely on MySQL or any other ”big” RDBMS for data
storage. Using a RDBMS for anything less than 10000 items is overkill, and I just really don’t
want to have to worry about having to keep both apache and a RDBMS
running on my tiny little box

But I no longer think that using static pages are the way to
go. Having to regenerate 300+ files takes too long time(blosxom
generates a .rss and .atom file for every blog posting, which
works nice with it’s ”flavor” concept, but not with anything
else).

The data I have to deal with is so ridicously small (right now,
less than half a megabyte) that it would make sense to just load all
the blog postings into memory at startup and just keep them
there. However, this requires a execution model where the program
doesn’t exit after the page is loaded, a la classic CGI
scripts
. Particularly on my really slow box.

So, I think I’m looking for something that uses flat files or an
embedded database like SQLite or
Berkely DB, together with a
continously-running process model like PHP or mod_perl. I’d also love for it to
have a good security record (which I guess rules out most PHP
solutions…), and a easier way of posting images than manually
scp’ing them to my image/ directory.

I’ve been looking at the Blog software
breakdown
chart, but I can’t find anything that matches all of my
requirements/wishes. Pontus is using COREBlog (not listed in the above breakdown), which is built upon Zope. It looks good, supports
Blogger/MetaWeblog APIs (as well as plain ol’ email), and has much of
the other basic stuff that I want. I guess it uses Zope’s embedded
database, which is good enough for me. Maybe I’ll try that next.

The other solution would be to just use a blog host and forget
about running a blog at home. This solution is looking more attractive
by the day, but I can’t really let go of the control that is hosting
things myself.

Old entries restored

I finally made good on my promise to
restore the old entries from when this blog was running on dasBlog. I tried my best to make sure
you people reading this through RSS didn’t get a bunch of duplicated
posts, but if your reader refreshed at the wrong time you might
have. This operation is not yet big enough to warrant a separate test
server, and besides, we’ve already established that I’m a lazy lazy
man.

The job ended up being more than 15 minutes of quick-and-dirty
scripting, mostly because the old data was full of small gotchas (one
example: in blosxom everything is
files, so it’s a good idea to have descriptive file names. The most
descriptive thing in my old entries was, naturally, the
title. However, that wasn’t unique (I made a lot of posts titled
”Quickies of the day”, for examples), and so I had to implement
”Windows-style” name un-collision code (e.g
quickies_of_the_day_2.txt)

If someone wants the code, it’s here.
Run it like "dasblog2blosxom.pl *.dayentry.xml >
redirect.map"
. The redirect.map file is for making sure
that old dasBlog URLs still work with Apache’s mod_rewrite and the
following rule set:

    RewriteEngine On
    RewriteMap testmap txt:/path/to/redirect.map
    RewriteCond %{QUERY_STRING} ^guid=(.*)
    RewriteRule /PermaLink\.aspx ${testmap:%1} [R=301,NE]
    RewriteCond %{QUERY_STRING} ^guid=(.*)
    RewriteRule /Trackback\.aspx ${testmap:%1} [R=301,NE]
    RewriteCond %{QUERY_STRING} ^guid=(.*)
    RewriteRule /CommentView\.aspx ${testmap:%1} [R=301,NE]

(big up to has for helping me with the mod_rewrite magic)

There are probably bugs that weren’t exposed by my blog data. Also,
I’m stil new to Python programming, and things might not be done in
the most pytonish way. Do not use the code as a guideline on how to do
stuff.

The comments that people wrote in on the old setup are not yet
restored. That is a project for another late night.