On PHP, Python, blogging, and learning

A question from comp.lang.php:

So, here’s my delimna: I want to start a blog. Yeah, who doesn’t. Yet, I want learn the guts of it instead of just booting up some wordwank or whatever.

Here’s a simple computation to consider… WordPress’ codebase is approximately a megabyte of PHP code and megabyte of JavaScript code. Assuming that the average line of that code is 50 characters long, you are looking at 20,000 lines of code in PHP and as many in JavaScript. Based on the notion that the average developer out there writes 100 lines a day, either you’re in for a two-year project or your product is going to have seriously reduced functionality compared to something that’s been freely available for years. What’s your choice?

Then I run across that blog, Coding Horror, and start reading articles like this:


You should read what some computer scientists write about SQL… 🙂

Now what?

Nothing. Everyone is entitled to their opinion. You are free to form your own.

I’ve taken basic basic and basic C, but am barely literate in html.

Maybe that (and some JavaScript) is something to work on first before delving into server-side programming?

Well, that’s my actual question, then. Is php really so bad I’m just wasting my time? Or is it really the quickest way to blog functionality?

The quickest way to blog functionality is an account on a blogging service… 🙂

Would I be better served in the long run learning python, which claims to be easy as pie to learn/program (still looks hard to me). I admit I’m no code geek. But, I’m not completely brain dead, either, and I need something to keep my geezer brain sparking. What say ye?

If the purpose is to keep the brain sparking, it doesn’t matter what you learn as long as you’re enjoying the process. You might as well take up Japanese while you’re at it…

* * * * *

Another poster interjects:

If the OP wants to learn the guts of the blog or to implement the blog from scratch, Python/Django would be a better choice than PHP. The reason is that he can reuse and customize existing high quality components for all these auth/auth, admin, comments, etc, etc, etc.

You are comparing apples to oranges… There are application frameworks for PHP as well (CakePHP and Symfony come to mind). CakePHP, if memory serves, actually has development of a blog described in its tutorial…

Another reason is that Python and Django encourage very clean design while PHP is too often ends up in “spaghetti SQL wrapped in spaghetti PHP wrapped in spaghetti HTML”.

It’s absolutely the same thing with PHP frameworks…

2 man/year in PHP == 2 man/week in Python/Django.

This, I daresay, is an exaggeration… Let’s take your own example:

And there are Python/Django blog applications that already do almost everything (and maybe more) that WordPress does. http://byteflow.su/ is one of them (IMHO the most promising).

A quick look at the revision log reveals that the initial commit of 60 or so files has been done on 08/14/07 (10 months ago), a second developer came on board on 12/01/07 (seven+ months ago), a third one, on 01/04/08 (six+ months ago), a fourth one, on 01/16/08 (also six+ months ago). There are at least nine discernible contributors overall. Say what you will, but it still looks an awful lot like like two man-years, Django or no Django…

Leave a Reply

Your email address will not be published. Required fields are marked *