Print

Print


I use Python and Django extensively, and think they're both great. That said, also great is the very funny keynote by former flickr engineer Cal Henderson at DjangoCon 2008, titled "Why I Hate Django," which is on YouTube:

http://www.youtube.com/watch?v=i6Fr65PFqfk

When he showed the slide I had to admit that the statement

"-".join(array) 

is kind of a goofy way to do that, though maybe not "unforgivable." Whenever I use join() now I chuckle a little in my mind.

It's good to step back and re-evaluate your favorite tools from time-to-time. If nothing else, the ability to analyze a platform for its suitability to a need is key.

Will


On Oct 28, 2010, at 9:38 AM, Thomas Bennett wrote:

> Having used Zope (python based) as our WEB server of choice since 1998 I am 
> urged to express my opinion that if you do choose to use python in your 
> projects then use a service designed for python use such as Zope, Django, et 
> al.  Zope is normally run in front of Apache as a virtual host.
> 
> If you are going to use python then Zope is an excellent choice for 
> interacting with databases and using python to massage/manipulate results if 
> you need complex results from the database data.  I like that you can write 
> sql queries  just like you might use on the command line and save it as an 
> individual object for use by any number of other objects.
> 
> What may be a simple example to some is a tutorial quiz I wrote for the WEB.  
> There are categories and each category has any number of questions along with 
> the answers in the database.  In the management portion, the administrator can 
> choose which categories are active and how many questions out of the total 
> available to pull from each category individually.  When the quiz page is 
> generated the correct number of questions are pulled randomly from the total 
> active questions for each category, some questions can be set as inactive.
> 
> There are "database connectors" for PostgreSQL, MySQL, Oracle, odbc, and 
> others so you can choose any popular db or write your own connector.  And 
> there are python libraries written for these databases which prove very 
> useful.
> 
> The main thing I like about python is that the syntax pretty much forces your 
> code to be readable by others because indention is part of the syntax rather 
> than semicolons, parens, etc.
> 
> I don't know PHP in detail but am learning more quickly because the University 
> is "forcing" all departments to move to Drupal and we will be running our site 
> on Drupal within a year probably although some administrative tasks will still 
> be running on our Zope server.
> 
> Thomas
> 
> ps: remember my point is that "IF" you choose to use python this supports its 
> use with databases and scripting.
> 
> 
> 
> 
> 
> On Wednesday 27 October 2010 20:49:06 you wrote:
>> Olá, como vai?
>> 
>> Luciano Ramalho <[log in to unmask]> wrote:
>>> Actually, Python is a general purpose programming language. It was not
>>> created specifically for server side scripting like PHP was. But it is
>>> very suitable to that task.
>> 
>> I'm not sure talking about what something used to be is as interesting
>> as talking about what it is. Both Pyhton and PHP can share whatever
>> moniker we choose (scripting-language, programming language,
>> real-time, half-time, bytecoded, virtual, etc.).
>> 
>>>> Not seen any scientific packages, but I've seen a few ray-tracers,
>>>> although they're all demo apps and fun toys (although I think that
>>>> applies to Python, too).
>>> 
>>> No, that does not apply to Python. Python is widely used for hardcore
>>> scientific computing.
>> 
>> I was referring to the ray-tracing part.
>> 
>>> It is also the most important scripting language in large scale CGI
>>> settings
>> 
>> Yes, Python is widely used for scripting up interfaces into other more
>> complex systems. But rarely is the core of the thing written entirely
>> in Python.
>> 
>>>> Maybe your Google-foo is weak. :)
>>> 
>>> Or maybe he's just realizing that outside of server side web
>>> scripting, PHP is just not so widely used.
>> 
>> Absolutely, and fair enough.
>> 
>>> Having used both languages, I discovered that Python is easier for
>>> most tasks, and one reason is that the libraries that come with Python
>>> are extremely robust, well tested and consistent.
>> 
>> Hmm. PHP is extremely robust and well-tested, but yes, it's not all
>> that consistent, especially not before version 5.2+. However, things
>> have moved on, and with release 6 around the corner things will be
>> tighter still. Just like the first versions of Python were
>> interesting, so was PHP's, but where the biggest problem with the
>> evolution of PHP was the very fact that it was the most popular
>> language for rapid web development by far.
>> 
>>> PHP is very
>>> practical for server-side web scripting, but it's libraries are
>>> unfortunately full of gotchas, traps and unexpected behaviour.
>> 
>> There's gotchas in every language, even Python.
>> 
>>> A key reason for that is the fact that Python has always had an
>>> exception-handling mechanism while PHP has grown something like that
>>> only a few years ago
>> 
>> True enough. But earlier versions of any language are less desirable
>> than the latest versions, so I'm not sure this is a prevailing
>> argument for the horribleness of PHP or any language. These things
>> evolve. PHP 5.3+ and soon 6 are looking very good, indeed, but yes, we
>> will just have to live with a poor reputation brought on by the big
>> number of users and the pre 5.2+ era.
>> 
>>> So, I my opinion, PHP is great at what it does best: enabling quick
>>> server-side Web scripting on almost any hosting service on Earth.
>> 
>> I'm fairly sure you can say that because you haven't done much other
>> kind of PHP work. :)
>> 
>>> For everything else, it is very worthwhile to learn and use a general
>>> purpose dynamic language such as Python, Ruby or Perl.
>> 
>> Of course. Developers should learn many of languages, and choose
>> wisely the language best suited to the problem at hand.
>> 
>>> Sorry for the rant. I must confess I am a founder of the Brazilian
>>> Python Association and was its first president, so you can call me a
>>> Python advocate.
>> 
>> No bias at all, really. :)
>> 
>> 
>> Kind regards,
>> 
>> Alex
>> 
> 
> -- 
> ==========================================
> Thomas McMillan Grant Bennett           Appalachian State University
> Operations & Systems Analyst            P O Box 32026
> University Library                                Boone, North Carolina 28608
> (828) 262 6587
> 
> Library Systems Help Desk: https://www.library.appstate.edu/help/
> ==========================================