Why I won't be moving away from WordPress

I've made some time for myself to do some personal projects, and one of the things that's been on my mind for the longest time was to move this blog away from Wordpress and host it statically on S3 instead. Serving a single static html page (plus a few resource files, but not many) from S3 would be so much faster than letting the shared hosting server parse endless lines of php, most of which I don't even want. The benefit in that aspect is clear, but in other areas it's less obvious.

Easy of deployment is one of the issues. I'm not bothered about not being able to post by email or mobile - whenever I have something to write I'll usually have my laptop with me. It doesn't bother me that it won't be WYSIWYG either (which it wouldn't be if I write my own blog software because I don't care about WYSIWYG). The problem is always with the software and the libraries. My software of choice for my would-be static blog is python, but I'll inevitably end up requiring some libraries that will need to be downloaded and/or set up on each machine that I want to publish from. Knowing myself, I will forget to do this before I go on a trip and end up having to download those libraries at ultra-slow speed at some hotel in the middle of nowhere. Or I might be on a public machine, which will be even worse.

Comments are another issue. If the blog is completely static I'd have to go for a javascript-based comment service. I also have old comments that will either have to be converted to the new commenting system or else inserted into the html somehow if I want to preserve them. Again, there are solutions, but they're hardly easier than what I have with WordPress.

Finally there's the issue of dynamic pages: the calendar, archive and search functionality. Calendar and archive pages are pretty easily generated, but I'd either have to remove the search function or rely on an external service for that. Bleh.

The system I had in mind would be a collection of small tools:

  • A converter tool to convert a wordpress database into raw blogpost/page files (the exact format of which I would have to think about).
  • A compiler tool that reads the raw posts and writes usable html
    • Inserts content into a predefined template, I was thinking Django templates. This doesn't have to be fast.
    • Regenerates related pages (front page, archives, calenders, category pages)
    • Converts any markdown text to html
  • <li>An uploader tool that publishes the generated html
    • Would upload to S3, perhaps pluggable so other providers would work too.
    • Would be smart enough to recognize linked images/files and upload those too.

I'd leave the template design and making the javascript commenting system work all up to the user, since that'd be a one-off job (for me, anyway). The goal of all this is to make my life easier, but it's an awful lot of work for an awfully small amount of easiness.. Anyway, if someone else would also be interested in using something like this (or willing to pay for something like this!) then do let me know.


Posted in Tech | Tagged , ,

Blog statistics

Got bored today and played around with SQL and pivottables. I wanted to see if I could find a pattern in the times that I usually post, and the categories that I post in. The first image shows posting times regardless of category. The images after show a comparison between categories.

[jsgallery size="large"]

Note that this information is not entirely correct, because sometimes I schedule a post to be placed in the future at some arbitrary time. I usually schedule stuff late at night or when I've already made a post for that day. I've also excluded a couple of categories that didn't have a lot of posts.

  • The fact that I'm a night person is now scientifically proven.
  • Ideal post time for me is between 20:00 and 01:00
  • During the cycling trip last year (Spirit of Japan category) I rarely posted late at night.
  • Other than that there aren't really a lot of differences between categories.

For code monkeys, here's the wordpress query to get the count of your posts for each category and each hour of day:

SELECT terms.name, HOUR( p.post_date ), count(p.id)

FROM wp_posts p

JOIN wp_term_relationships rel ON p.ID = rel.object_ID

JOIN wp_term_taxonomy ttax ON rel.term_taxonomy_id = ttax.term_taxonomy_id

JOIN wp_terms terms ON ttax.term_id = terms.term_id

WHERE post_type='post'

AND ttax.taxonomy='category'

GROUP BY terms.name, HOUR( p.post_date )

Posted in Daily Life , Tech | Tagged ,

Javascript Image Gallery

I added a Javascript image gallery using jcarousel. I'm not entirely happy with the CSS, but it works, and that's what matters to me. Here it is.


[jsgallery size="thumbnail"]


[jsgallery size="medium"]

The CSS is not cooperating well here. I'd rather have a dynamic height, but I need to spend some time on that to get it to work.


[jsgallery size="large" include="3822,3823,3826,3828"]

These are the photos of the coldest day of the cycling trip I did last year. The location is the west side of Mount Fuji. It was one snowy, icy trip all the way down to sea level from ~1000 meters up. A day I will probably never forget :)


Posted in Photography , Spirit of Japan , Tech | Tagged , ,

Adding tabbed pages to Wordpress

As a side project I've been working on a way to get all my developing experience out of my CV and into a website. I started doing this in Django because that's what I knew best, but I decided to just implement all my desires in Wordpress. I haven't even begun adding content to my online portfolio, but I have been thinking about ways to display it. One of the things on my wishlist is tabbed pages/posts, so that's what I've been working on.

And here is the result.

My implementation uses a plugin for jQuery called idTabs on the client-side. On the server side I registered a new page type for wordpress for tabbed pages. The tabbed pages are hierarchical. The parent page is empty, and all child pages are added to the html as divs, which are converted to tabs by idTabs. Comments are added to the main post, and can be turned off when not needed. I really should open-source this stuff some time..


Posted in Tech | Tagged , ,