Fw: NICHOLAS PETRELEY: "The Open Source" from InfoWorld.com, Wednesday, May 23, 2001
![](https://secure.gravatar.com/avatar/b2a5bf0d108292e18cd8afa7d92abc3b.jpg?s=120&d=mm&r=g)
Hope this is appropriate to post. Dave Craig ----- Original Message ----- From: <OpenSource@bdcimail.com> To: <dcraig@cris.com> Sent: Wednesday, May 23, 2001 9:09 AM Subject: NICHOLAS PETRELEY: "The Open Source" from InfoWorld.com, Wednesday, May 23, 2001
======================================================== NICHOLAS PETRELEY: "The Open Source" InfoWorld.com ========================================================
Wednesday, May 23, 2001
Advertising Sponsor - - - - - - - - - - - - - - - - - - The I's Have It For Net Prophet Jessica Davis, the I in I-commerce stands for insight and irreverence. There's plenty of Internet news. Jessica's interested in what it all means - and that doesn't mean ponderous punditry. She passes on business tips and belly laughs along with some big ideas. Net Prophet: prophecy to profit by, e-mailed to you every Tuesday. To subscribe, go to http://www.iwsubscribe.com/newsletters
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
CAUGHT IN PYTHON'S GRIP
Posted at May 18, 2001 01:01 PM PST Pacific
I'M A BIG FAN of the open-source programming language called Python. In case you're wondering, Python is indeed named after the British Broadcasting Corp. comedy group Monty Python. It was created in about 1990 by Guido van Rossum, a fan of Monty Python. Since then it has matured at a phenomenal rate, thanks to its open-source nature.
In its current state, Python miraculously manages to combine simplicity with incredible depth and breadth. On the one hand, Python is very similar to Java in how one might apply it to build solutions and the kind of features it supports. Like Java, it is object-oriented, runs byte code, and works well for server-side Web applications. Like Java, you can use Python to build client-side applets. Netscape has a plug-in for this, but nobody seems to use it and it's not supported anymore. Why does nobody use it? Because you can write applets in Python and compile them into Java byte code for use with any Java 1.1-enabled browser. These are but a few examples of Python's depth.
Unlike Java, Python is ideal for tossing together a quick script to do mundane work. If you're a casual Linux user, you have probably executed many Python scripts and applets without knowing it. People use Python this way because it is even easier to use for mundane tasks than Unix shell script languages and infinitely more powerful. That demonstrates its breadth.
I don't mean to rekindle the Python versus Java wars that raged a few years back. Both languages have their place. Neither is perfect for every need, although Python is closer to being a one-size-fits-all language than Java. But I happen to be as big a fan of Java as I am Python.
I draw the comparison because you would do well to consider both Python and Java if you're about to embark on a new Web application project. You just might find that Python is more appropriate for your particular task than Java.
One of the first things you'll notice about Python is its unique way of grouping statements. Python uses indentation to parse its code. Most C programmers tend to use indentation to make their code readable. You type an "if" statement, go to the next line, indent farther than the "if" statement, and then type the code that is executed if the condition is true.
Although C programmers don't have to use indentation, you do it simply because it makes it easier to understand the programming logic when you come back to the code later. In contrast, if you don't indent Python statements properly your program won't run. You can use tabs, spaces, or a mix of the two, but you have to be consistent.
That feels rather odd when you first start programming in Python, but it only takes a few minutes before you realize that it is not only an intuitive way to program, it pushes you to create code that is more readable, and therefore easier to maintain.
The other thing you'll notice is that it is as easy to create Python classes (objects) as it is to toss together a procedural script. So much so that you often end up using objects in Python even when you don't have to. This makes your code more reusable, which is always a good thing.
I've barely scratched the surface of what Python is and what it can do. If I've piqued your interest, visit www.python.org for more information. Once you learn your way around Python and are ready to start programming I recommend you pick up Programming Python by Mark Lutz, from the O'Reilly series, now in its 2nd Edition.Next week I'll discuss options available for server-side Web applications programming with Python.
Nicholas Petreley is the founding editor of VarLinux.org (www.varlinux.org) and LinuxWorld. Reach him at nicholas@petreley.com.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - THE LATEST IN LINUX FROM INFOWORLD:
* New worm tries to fix infected Linux systems - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http://www.infoworld.com/articles/hn/xml/01/05/17/010517hncheese.xml?0522tul i
* IBM unveils Linux resource portal - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http://www.infoworld.com/articles/hn/xml/01/05/11/010511hnibmlinux.xml?0522t uli
* TO THE EDITOR - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http://www.infoworld.com/articles/op/xml/01/05/14/010514opletters.xml?0522tu li
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
QUOTE OF THE DAY:
"In a little more than a month, AOL will be able to disclaim all the warranties it wants and will be able to rely on the law to back it up."
--The Gripe Line's Ed Foster continues to warn readers about the impact of the Uniform Computer Information Transactions Act.
http://www.infoworld.com/articles/op/xml/01/05/21/010521opfoster.xml?0523wel i
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
SUBSCRIBE To subscribe to any of InfoWorld's e-mail newsletters, tell your friends and colleagues to go to: http://www.iwsubscribe.com/newsletters/
To subscribe to InfoWorld.com, or InfoWorld Print, or both, go to http://www.iwsubscribe.com
UNSUBSCRIBE If you want to unsubscribe from InfoWorld's Newsletters, go to http://iwsubscribe.com/newsletters/unsubscribe/
CHANGE E-MAIL If you want to change the e-mail address where you are receiving InfoWorld newsletters, go to http://iwsubscribe.com/newsletters/adchange/
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sign up for hands-on, highly interactive courses covering topics such as HTML, DHTML, FrontPage, Java, Visual InterDev, and more. Even gain the latest tips on E-Commerce and E-Business, from getting started to marketing your E-Business. Package: Web Development Cost:$96.00, # of Courses: 60+, Subscription: One Year Sign up now for InfoWorld's web-based training. http://webtraining.infoworld.com?0523wedopensrc
Advertising Sponsor - - - - - - - - - - - - - - - - - - The I's Have It For Net Prophet Jessica Davis, the I in I-commerce stands for insight and irreverence. There's plenty of Internet news. Jessica's interested in what it all means - and that doesn't mean ponderous punditry. She passes on business tips and belly laughs along with some big ideas. Net Prophet: prophecy to profit by, e-mailed to you every Tuesday. To subscribe, go to http://www.iwsubscribe.com/newsletters
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Copyright 2001 InfoWorld Media Group Inc.
This message was sent to: dcraig@cris.com
participants (1)
-
dcraig