On blogging

I am becoming dissatisfied with wordpress.com as a place to keep my blog.  There are a few significant problems with it:

  1. I cannot put whatever I like on here – for instance I wanted to add html iframe tags to my post about h.nomzit.com, and wordpress.com disallows that.
  2. It’s very slow.  I can’t use the gears-enabled ‘Turbo’ version because this is an AMD64 Linux machine.
  3. It’s nigh-on impossible to read-from let alone publish-to the web interface on an iPhone.  The application is good, but it has significant limitations.
  4. I keep forgetting my password.

So I am going to write my own blogging software.

As usual, I’m planning to write it in C.  While I was at University Mark (FrF) Rob (MaxRabbit) and I wrote a web-based game called Project BanBan entirely in C.  We had a request-to-rendered-page latency of about 100ms, which compared rather favourably with the 500ms the PHP/Perl mob were getting (we got bored trying to measure JSP/Servlets).  Anyway, I digress: the relevance of this is that I’m going to use a fairly similar architecture for my blogging system and it would be bad form to pretend I came up with it alone.

But I am getting ahead of myself.  One should always start any programming project by looking at the requirements, or as the current trend has it ‘user stories’.  I want:

  • The most recent 10 posts to be presented on the front page in reverse chronological order.
  • Preceding posts in batches of 10 to be presented on continuation pages.
  • If using a desktop browser, the front page and continuation pages to contain the title and abstract of each post.
  • If using a mobile browser, the front page and continuation pages to contain the title of each post, and reveal the abstract if the user asks for it.
  • The front page and continuation pages to link to the full version of each post.
  • Posting new content to be done over an SSL mutually-authenticated link so I don’t have to type in usernames/passwords.
  • Only I shall be authorised to post new content.
  • People I trust shall be authorised to post comments without delay.
  • People I do not trust shall be authorised to post comments for me to moderate.
  • Posting comments to be done over an SSL mutually-authenticated link so I don’t have to maintain some authentication mechanism of my own.
  • ‘Publish’ an atom feed of titles/abstracts.
  • ‘Publish’ an atom feed of titles/full articles.
  • ‘Publish’ an atom feed of moderated comments.
  • ‘Publish’ an atom feed of unmoderated comments (may as well make my life easy).
  • Titles, abstracts, articles and comments to consist of well-formed xhtml.
  • All complete pages to be valid, well-formed xhtml.
  • Do as much as possible in CSS to reduce the per-page download time.
  • Pages to load rapidly.

But what do you want?  You, as a reader of this blog, have a stake in this too.  If there is something you want which is not listed above (or something you don’t want which is) please let me know.


Similarly to Project BanBan I have written a library to handle production of valid xhtml and a library to understand CGI requests.  The xhtml library is going to be a little more complex – Project BanBan only allowed plain text to be entered; we had functionality to escape all the html magic codes – whereas I need to be able to enter xhtml magic into my abstracts and articles.  I still need an escaping routine to handle comments, but I need an additional routine to verify that the xhtml I have uploaded is well-formed.

I shall deviate from the Project BanBan architecture in another key area.  Project BanBan generated every page on-the-fly, because each page was specific to the user viewing it and to the time at which they were viewing it.  My blog, however, does not have those sensitivities.  I shall therefore generate static html pages as I change things and let Apache hand them out.  This should be faster for everyone.  I shall still store the content in a relational database (PostgreSQL in fact) but it will not be referenced on every page load.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>