Friday, November 22, 2013

Web 2.0 or Web 0.9?

It is hard to find time to read books there days, but I try to keep an inspirational book nearby. That way I can read a little to relax and switch from daily operational activities. I rotate these books to keep the one that inspires me at the moment on top of the pile.

This week, the book on top is Weaving the Web by Tim Berners-Lee.


A fascinating story of the Web early days. How it was conceived and how it was shaped into the phenomenon we know it today.

In that book you can find a very interesting fact - the first web browser, implemented on NeXT, was an editor as well. Tim Berners-Lee considered back then, that a WWW user would not only view information, but will participate in editing.

Once GUI browsers got implemented for other platforms, developers made them as viewers. Partly because it was so much harder to implement editing features on other platforms. But mostly because users in general didn't mind to work directly with html.

The history made an unexpected turn after all. Browsers haven't became web-editors as Tim Berners-Lee initially envisioned. But they became powerful application platforms instead and now they can support such an editor running inside them.

When the Web 2.0 term was coined, the main idea was that from now on a web site is not relying only on the content created by a centralised publisher, but rather on the content generated by users - e.g. blogs, wikis, social networks... So fresh and innovative!

In fact, the system, where users are responsible for generating the content, was the initial idea of WWW. That is why the first web browser was an editor as well. And that is why the Web 2.0 could be called the Web 0.9.

The point is that marketers could take an idea and proclaim it as totally new and revolutionary. When in fact it was the original idea envisioned by the genius. And I'm not talking about AJAX or minor technological improvements here - I mean the concept of WWW.

Another point is that even geniuses could be wrong in prediction how their idea would evolve. But in case of Web, the unexpected evolution gave us the world originally envisioned by Tim Berners-Lee - where users use browsers to universally access and edit information.

So I create this content and put it on the Web 0.9 :)







Thursday, October 10, 2013

WordPress and 404

Today I've been working on WordPress deployment. I enabled named permalinks (when posts are addressed by the /topic-name and not by cryptic /?p=21) and my site gone crazy with 404 Page Not Found appearing for every transition from the home page.

I considered the bbPress plugin to be responsible for that, since I'd just installed it. Google Search showed a lot of discussions on the problem and some pieces of solution, but not the actual steps to fix it.

The real reason turned out to be the apache server configuration. Following are the step by step instructions for a stand-alone WordPress installation on the LAMP stack:

1. mod_rewrite MUST be enabled, so run 

sudo a2enmod rewrite

2. Virtual Host configuration for WordPress should have FollowSymLinks specified and AllowOverride option set to All. Open virtual host configuration - it should be a configuration file placed in /etc/apache2/sites-enabled/ and named like *default.

Now, directory configuration with deployed WordPress should look like this:

<Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
</Directory>


In my case, all I had to do was to change None to All.

3. Restart apache web server:

sudo service apache2 restart

4. Check, that Apache has the permission to write in WordPress root folder (/var/www/ by default).

ls -l /var/www/

owner and group should be www-data. If that is not the case, execute:

sudo chown -R www-data:www-data /var/www/

5. Now check, that WordPress generates .htaccess file. Open Settings -> Permalinks in the WordPress admin console. Make some changes to these settings (say from Default to Post name) and click Save Changes. Now list the root of your WordPress deployment (this would contain folders like wp-admin and wp-content).

ls -a /var/www/

.htaccess file should be present and its content should look like:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress


At this point there shouldn't be any 404 errors and post links should look the way you've configured it.

=========
Conclusion
========= 

Now I've done with technical description and start the emotional one.

The famous WordPress installation instructions  I've used to deploy my instance don't mention any apache virtual host configuration (they mention mod_rewrite though). But I have my Permalinks settings available in my default installation and I can easily bring down the site by changing these options.

That should not be possible. I can imagine broking down the blog engine by manually editing some pages and layouts. But not by changing an innocent looking option box.

So first, the apache virtual host configuration should be included in the installation instructions. That would make the instructions less accessible and more complicated, but will eventually bring more robust site installation.

If not, it should at least show warning on the Permalinks Settings page about possible problems due to http server configuration.

But the best solution for WordPress is to detect these problems, disable the settings and provide the information on what should be configured first to unlock them. However, while it is possible to test local write permissions, the same is problematic for the apache configuration.

The similar situation appears when you are installing themes/plugins for WordPress. If you don't have a write access to the installation root it just offers you the FTP options. But it should show another disabled option - possibility of automatic HTTP install. And mention, that write access should be configured in order to enable that option.

When I see that kind of "user-friendly" interaction with the most popular blogging platform, it makes me wonder how experience differs on less popular alternatives.

Tuesday, September 24, 2013

Secret Platforms of DOOM

I'm back in blogosphere. It's been crazy 2 years - a new job, a new car, move to a new apartment. But the most fascinating news is a newborn baby boy. He is 9 month now and we are trying to eat, to crawl and to bash in UNIX.

But even in these turbulent times there are a lot of thoughts I just need to extract from my brain and put them on paper somewhere. And today I want to talk about platforms.

In computerised society you often hear about platforms. It is an environment you can build your software upon. Intel x86 is a platform, Java is a platform, MS Windows is a platform. But Spring or Ruby on Rails, for example, are just frameworks - they don't provide the ecosystem closed enough to be called a platform.

Recently I've been looking for convenient ways to prototype. And I discovered the hidden world of platforms. It is not, that I found some new products, rather looked at the old ones from a new perspective. I started to evaluate everything as a platform.

Sometimes, it turns out to be surprisingly unexpected. After all, there are a lot of software products you can use as a platform.

DOOM from id Software is one of them.

doom load screen
Just think about it. DOOM keeps the content in a single WAD file. By modifying it you can change the game significantly - add new sounds, weapons, monsters, levels. It provides enclosed ecosystem build on top of that. There are a lot of tools to modify the content. And you can create a DOOM mod comparatively easy.

Maybe the possibilities are strictly limited by the capacity and restrictions of the engine. But it doesn't matter. What matters is that it gives you an enclosed little universe to play with. Now you are a little god capable to shape that universe. And these so called restrictions are actually vectors for creativity. Just look at some of the total conversions.

So DOOM is a platform and not a small one. Shipped in 1993, at the end of 1995 it was installed on more PCs, than the newest platform from Microsoft - Windows 95. That is given a billion $$$ marketing campaign to support Windows 95 release. At the same time all the marketing campaign for DOOM was a shareware version uploaded to ftp (in today's social media terms I think it would be called viral).

To the date, it is more than 16000 WADs available for download - beating the number of titles for the most of gaming consoles and some operating systems (387 titles for Nintendo 64, 312 titles for 3DO). You can say, that WADs are the hobby mods and you probably can't compare these to commercial titles. But that exactly what makes DOOM a viable platform for prototyping.

eureka doom level editor
I need tools to prototype and I find that kind of small platforms are ideal for prototyping. That is why best game engines attract massive modding communities and have produced high-quality titles - look at Dystopia. You don't need a lot of time to start and you can use already created content as a starting point - and that is crucial for prototyping.

As an app developer you need to think about your product in terms of a platform. Wolfenstein 3D wasn't a platform despite the fact, that potential was there. But there was no WAD and content modification was too hard.

With DOOM, John Carmack realized the true value of modding community and created the game as a platform. There was a lot of concern about that approach. Legal and financial ones. Business-minded people reasonably argued, that freely available content from modding community will reduce the sales of the commercial episodes and the upcoming DOOM II. But Carmack was a hacker-minded person first, so he stick to the original idea of modifiable content and even released the source of DOOM level editor (written in Objective-C for NeXT workstation). In retrospective, it was a smart move. It created a strong fun base and in fact prolonged the lifespan of the game.

doom wad editor

I think, the WAD concept was crucial for the born of the legend. You can still get the open sourced version of DOOM with one of freely available WADs, download some level editing tools and start prototyping. It is really a great platform for that.

DOOM long and prosper.