Jacques Mattheij

Technology, Coding and Business

Those that can do, those that can't blog

There is an old proverb that says that “Those that can do, those that can’t teach.”. Now, I don’t really agree with that proverb at all. In fact, some of the people that had the most profound impact on my life were my teachers, from my school days and then later those that took time out from their professional life to spend it on me to transfer some of their wealth of knowledge.

But there is a grain of truth in there somewhere. I’ve noticed that when I am not actively busy with projects to the point that they eat up my hours, be it consultancy jobs or working on my own stuff that my blogging frequency goes up tremendously.

Right now we’re holidaying in Romania and having not much else to do than to hide from the hot fluid that passes for air around here (and that they have an infinite supply of in summer) I find myself sitting indoors with not much to do. So I end up going through my list of ideas of what to blog about and writing pieces.

And that’s not all bad, but when you see me blogging a lot during non-holiday times you can take it for granted that there is no high pay contract on my desk.

For many people at the CEO level ‘having a blog’ seems to be mandatory these days, I’ve seen start-ups that spent more time on their blogs than on their products. Where do these people find the time? Do they eventually fail because they spent so much time on their blogs? In the hey-days of ww.com I had barely enough time to sleep, keeping a blog would have been simply impossible.

If you’re a high ranking official in some company and you find that you have time left over to write then you should try to make that writing time count. Make sure it works for you, that it moves your company forward and that it helps you achieve your goals. (of course what you do in your time off is completely your own business).

Teaching is great, and without teachers the world would be a very poor place to live in. But just like in that proverb, if you find yourself blogging more than working you’re probably doing something wrong and you may find that at some point in time you can write one of those ‘why my company failed’ blog posts. Better avoid that.

In the interest of teaching, here is a bit of maybe useful info about migrating this blog from drupal to octopress:

Because of some long standing dis-satisfactions with the drupal platform I finally bit the bullet to move my blog out of there to a more viewer friendly environment. All these are are static pages, I really didn’t see why uncountable lines of php would have to be interpreted in order to serve up some simple files. And keeping drupal up-to-date and secure is a small nightmare. I wanted something simpler, more suitable to using from a command line environment and a regular text editor as well as version control (svn or git) rather than some version control built into the cms. Hence the choice for octopress.

Migrating a blog from drupal to octopress is relatively straightforward, but there are a couple of catches.

The first thing I ran into was that octopress is horribly slow. The ‘generation’ process for a blog with only about 250 entries or so takes a whopping minute and a half. So your edit-generate-review cycle takes long enough that it can be very irritating. I will look at this later to see if I can figure out what the bottle neck is, processing a little bit of data shouldn’t take that long.

The second thing I noticed was that drupal will use a url like ‘abc+def’ and that octopress will generate ‘abc+def/index.html’ in order to get the web server to set the mime type right. Also, any ‘+’ characters will end up as spaces in the filenames, but the webserver will then not be able to find your file ‘abc+def’.

This screws up all your backlinks, will cause a flurry of 301’s, and more importantly, locks you in to the new url structure (because once you’ve 301’d those old ones you can’t undo that with a new 301, the old one will remain cached for a long long time in many clients). My fix for this is a bit of a kludge, in the .htaccess file I use the following mod_rewrite rules:

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME}     !-d
RewriteRule ^([^+]*)\+(.*)$ $1\ $2 

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/ [L] 

php_flag apc.cache_by_default Off
php_flag engine off

The first set of rules converts incoming requests with ‘+’ characters into their equivalent with spaces, the secnd will silently append the ‘/’ character which will result in the index.html being served up with the right content type.

The php flags are to make sure that apache doesn’t try to run any static content through the php processor which would slow things down tremendously.

In the ‘Directory’ section for this vhost I added:

DirectorySlash off

To make sure apache does not do its 301 redirect thing with appended slash on requests before the mod_rewrite rules run their course.

One user - in another thread - remarked that the background was flickering on his browser. I’m not 100% sure about this but there was a weird transparent png overlaying the backgrounds called ‘line-tile.png’ and another one called ‘noise’. I removed both of those from the style sheet, hopefully those users will now be able to click on links leading here without the risk of inducing seizures.

Another thing that keeps tripping me up is the markdown format for links, I’m sure I’ll get used to that over time but right now it seems that no matter what I do I mis-remember the bracketing/ordering of the text and the link components (they’re out of order compared to an anchor tag in html).

All in all I’m pretty happy with the octopress setup, and it definitely was worth the switch.

HN Submission/Discussion
If you read this far you should probably follow me on twitter: