php vs python
Lie
Lie.1296 at gmail.com
Sun May 25 14:09:28 EDT 2008
On May 22, 3:10 am, notbob <not... at nothome.com> wrote:
> I'm not posting this just to initiate some religious flame war, though it's
> the perfect subject to do so. No, I actaully want some serious advice about
> these two languages and since I think usenet is the best arena to find it,
> here ya' go.
>
> 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. I started to learn python, but heard php was easier or faster or
> more like shell scripting or... fill in the blank. Anyway, so I change over
> to learning php. Then I run across that blog, Coding Horror, and start
> reading articles like this:
>
> http://www.codinghorror.com/blog/archives/001119.html
>
> Now what? Go back to python. Soldier on with php? What do I know? Not
> much. I can setup mysql and apache,, but don't know how to use 'em, really.
> I use emacs and run slackware and can fumble my way through bash scripts,
> but I can't really write them or do lisp. I've taken basic basic and basic
> C, but am barely literate in html. Sometimes it seems overwhelming, but I
> persevere because it's more fun/challenging than video games, which bore me
> to tears.
>
> 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?
> 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?
>
> nb
My advice? Mix a bit of both. PHP's pros is it's tight integration
with HTML, it's really easy to slip small, short PHP snippets here and
there. Server side includes for example, is a short one-liner, in
python it would involve reading the original file, finding where and
what to slip, then reading the include file then concatenates the
files then send it to the requester, or you could setup an engine for
you which might take some time and patience.
On the other hand, python is a general-purpose language, and is a
better designed language. Writing the blog back-end in Python is
probably easier than in PHP while writing the interface-related codes
is probably easier in PHP. You might also consider calling python code
from the PHP.
More information about the Python-list
mailing list