|
Never too old to program
Ease-of-use and portability with different operating
systems have made Python one of the most popular programming languages for people
of all ages, says ANIL SETH
One of the problems of growing older in
the IT profession is that one’s knowledge seems dated. One’s programming skills
may date back to the Stone Age of Cobol and Fortran. One normally does not get
enough time or is not able to concentrate long enough to, say, learn Java. It
is possible that I am incorrectly extrapolating my own failures, offering excuses
for my own laziness. Even so, it is well worth the effort for us, senior citizens,
to learn Python.
Python is an interpreted, object-oriented
programming language similar to Perl, that has gained popularity because of
its clear syntax and readability. One of the beauties of Python is that it is
a ‘glue’ language. It is easily extended with modules/packages from C and C++.
It was much easier for me to explore wxWindows using wxPython instead. A quick
understanding of the feasibility of what we wanted to do was possible. The surprising
thing for me was that I could do it myself without the help of my younger colleagues
and without any experience of GUI programming. The major gain was that it is
often easier to try and show the code rather than explain a nebulous idea floating
in one’s head. Not to mention that trying out an idea is frequently useful for
discarding the silly or needlessly complicated brainwaves.
Python was immensely useful for me in exploring
object-oriented programming ideas, clarifying my doubts, and clearing up the
misconceptions. I became sufficiently sold on the language to be convinced that
the first programming language that is taught to engineers and programmers should
be Python.
Bifocal problem
Before we start impressing our younger
colleagues, let us discuss a solution to the bifocal problem faced by us elderly
people. Mouse and eye coordination starts becoming harder. We play a game of
solitaire and our hand starts to ache. We have a PC on our table and search
for a calculator. It is surprisingly difficult to move the cursor to the right
square. A slight distraction and we are wondering, "Where on earth is the
mouse cursor?" We can simplify this problem by using the Python interpreter
as a pretty smart calculator. We bypass the mouse and use the keyboard. A nice
side effect is that we can use complex numbers as well, useful for helping our
children with school work, if not to solve managerial problems.
Among the biggest and most challenging
technical/ managerial problems these days is e-mail. The problem is how to organise
and search messages. I do not mean just for an individual but for a corporate
entity as well.
Managing e-mail
XML is hot and, as we just mentioned, managing
e-mail is a big headache. I read a sample chapter from a book on Python by Sean
McGrath talking about combining the two. This chapter explained how one could
use the rfc822 module and with a simple program easily convert an e-mail into
an XML document, which can then be invaluable for further processing. Python
documentation led to the discovery of the e-mail module which supersedes rfc822.
Experimenting interactively with these modules in Python may be the best approach
to explore ideas about how e-mails should be stored, retrieved, protected, etc.
How do we handle the issues of some e-mails
being a corporate resource and some being personal, even if related to company
work? These are not technical concerns, but we need to clarify them and understand
the implication for data management, so that technical solutions can be implemented.
Before anyone misunderstands, this is not
to imply that what is described above is somehow unique to Python. What is remarkable
about Python is hard to describe—it is an overall quality that seems to make
it easy to do complex programming in Python. As Eric Raymond has written "...
I was generating code nearly as fast as I could type. ... This was my first
clue that in Python, I was actually dealing with an exceptionally good design."
First steps
Okay, so you’re convinced by now, I hope.
But where does one start?
It is easy to find a lot of information
about Python and the wealth of library modules now available—the obvious place
to start is www.python.org. After that, before being overwhelmed by the volume
of choices, look at the following tutorial—Non-Programmers Tutorial For Python
(www.honors.montana.edu/~jjc/easytut/easytut) by Josh Cogliati.
|
Python is an interpreted, object-oriented
programming language similar to Perl, which has gained popularity because
of its clear syntax and readability. Python is said to be relatively easy
to learn and portable, meaning its statements can be interpreted in a
number of operating systems, including Unix-based systems, Mac OS, MS-DOS,
OS/2, and various versions of Microsoft Windows. Python was created by
Guido van Rossum, a former resident of the Netherlands, whose favourite
comedy group at the time was Monty Pythons Flying Circus. The source
code is freely available and open for modification and reuse. Python has
a significant number of users. A notable feature of Python is its indenting
of source statements to make the code easier to read. Python offers dynamic
data type, ready-made class, and interfaces to many system calls and libraries.
It can be extended, using the C or C++ language.
Python can be used as the script in Microsofts
Active Server Page (ASP) technology. The scoreboard system for the Melbourne
(Australia) Cricket Ground is written in Python.
Z Object Publishing Environment, a popular
Web application server, is also written in the Python language.
Source: Whatis.com
|
|