python intro for managers

89
1 Python: Python: a Powerful, a Powerful, Easy-to-Use, Easy-to-Use, Open-Source Open-Source Scripting Scripting Language Language Stephen Ferg Stephen Ferg Bureau of Labor Bureau of Labor Statistics Statistics

Upload: atul-shridhar

Post on 12-May-2015

6.171 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Python Intro For Managers

11

Python:Python:a Powerful, a Powerful,

Easy-to-Use, Easy-to-Use, Open-Source Open-Source

Scripting Scripting LanguageLanguage

Stephen FergStephen Ferg

Bureau of Labor Bureau of Labor StatisticsStatistics

Page 2: Python Intro For Managers

22

What we're going to talk about...

Page 3: Python Intro For Managers

33

Open-source applications -- or at least Open-source applications -- or at least some of them -- are good. some of them -- are good.

Scripting languages are good. Scripting languages are good.

Python is the best scripting language.Python is the best scripting language.

Time, money, and innovative energy... Time, money, and innovative energy...

can be saved.can be saved.

Productivity, speed, and quality ... Productivity, speed, and quality ...

can be improved.can be improved.

Executive SummaryExecutive Summary

Page 4: Python Intro For Managers

44

TopicsTopics

Scripting languagesScripting languages Python Python Issues surrounding use of PythonIssues surrounding use of Python

Open-Source SoftwareOpen-Source Software What the experts thinkWhat the experts think Where we might find Python usefulWhere we might find Python useful

Page 5: Python Intro For Managers

55

What is a "scripting" What is a "scripting" language?language?

InterpretedInterpreted requires a run-time interpreter requires a run-time interpreter

or virtual machineor virtual machine

Untyped or dynamically typedUntyped or dynamically typed No data declarationsNo data declarations

No compilation stepNo compilation step

Page 6: Python Intro For Managers

66

In the beginning...In the beginning... System programming languagesSystem programming languages

Assembler, CAssembler, C Fortran, Cobol, AlgolFortran, Cobol, Algol PL/1, Pascal, Basic, C++, Java PL/1, Pascal, Basic, C++, Java

Command languagesCommand languages JCLJCL TSO CLists, CMS "execs"TSO CLists, CMS "execs" Batch filesBatch files

Page 7: Python Intro For Managers

77

"Little Languages" appear..."Little Languages" appear...

awkawk sedsed grepgrep

Page 8: Python Intro For Managers

88

Scripting languages evolveScripting languages evolve

UNIX shell UNIX shell scripting scripting languageslanguages

Rexx Rexx Tcl, TKTcl, TK

PerlPerl PythonPython PHPPHP RubyRuby SASSAS

Many have higher-level object-oriented Many have higher-level object-oriented features that make them powerful features that make them powerful application development languages in application development languages in their own right.their own right.

Page 9: Python Intro For Managers

99

The defining characteristicThe defining characteristicof scripting languages...of scripting languages...

Vastly increased Vastly increased productivity!productivity!

Page 10: Python Intro For Managers

1010

"Scripting: Higher Level Programmingfor the 21st Century" by John K. OusterhoutIEEE Computer magazine, March 1998 -- http://home.pacbell.net/ouster/scripting.html

•Assembly LanguageAssembly Language•One machine instruction per line One machine instruction per line

•System programming languagesSystem programming languages•3-7 machine instructions per line3-7 machine instructions per line

•Scripting languagesScripting languages•Hundreds to thousands of instructions Hundreds to thousands of instructions

per lineper line

Programmers can write roughly the same Programmers can write roughly the same number of lines of code per year regardless number of lines of code per year regardless of language.of language.

Productivity = the number of machine Productivity = the number of machine instructions that a programmer can produce instructions that a programmer can produce per year.per year.

Page 11: Python Intro For Managers

1111

     

None StrongDegree of Typing

AssemblerAssemblerSystem LanguagesSystem Languages

Scripting LanguagesScripting Languages

VBVB

Python, Perl, Python, Perl, Ruby, TCLRuby, TCL

CC

C++C++

JavaJava

Inst

ruct

ion

s/S

tate

me

nt

1000

100

10

1

Language Levels and Productivity

From "Scripting: Higher Level Programming for the 21st Century" by John K. Ousterhout. This version prepared by Dana Moore and updated by Stephen Ferg

Page 12: Python Intro For Managers

1212

This leads to...This leads to...

increasing use of increasing use of scripting languages.scripting languages.

Page 13: Python Intro For Managers

1313

John Ousterhout John Ousterhout

Scripting: Higher Level Programmingfor the 21st Century - IEEE Computer 1998

Scripting languages represent a different set of tradeoffs than system programming languages. They give up execution speed and strong typing but provide significantly higher programmer productivity and software reuse.

This tradeoff makes increasing sense as computers become faster and cheaper compared to programmers.

For the last fifteen years a fundamental change has been occurring in the way people write computer programs. ...from system programming languages to scripting languages. This article explains why scripting languages will handle many of the programming tasks of the next century better than system programming languages.

Page 14: Python Intro For Managers

1414

Robert C. Martin Robert C. Martin

I think there is a trend in language that will become more and more evident as the decade progresses. I think we are seeing an end to the emphasis on statically typed languages like C++, Java, Eiffel, Pascal, and Ada.

I expect to see an ever increasing use of dynamically typed languages, such as Python, Ruby, and even Smalltalk. These languages, and languages of their kind, will be mainstream industrial languages in the coming years.

Page 15: Python Intro For Managers

1515

Tim O'Reilly  Tim O'Reilly 

People are so stuck in the personal computer paradigm that they don't recognize that the nature of applications has undergone a profound change in the last decade, with most of the new killer apps running on what has been called the LAMP platform (Linux-Apache-MySQL-PHP | Perl | Python). People understand the importance of Linux, Apache and MySQL... but they still struggle with understanding the "P" in LAMP.

The reason why dynamic languages like Perl, Python, and PHP are so important is key to understanding the paradigm shift. Unlike applications from the previous paradigm, web applications are not released in one to three year cycles. They are updated every day, sometimes every hour.

Why Scripting Languages Why Scripting Languages MatterMatter

Page 16: Python Intro For Managers

1616

Agile programming Agile programming languageslanguages

We really should stopWe really should stop

calling them calling them

"scripting" languages. "scripting" languages.

"Agile" languages "Agile" languages

would be more accurate.would be more accurate.

Kevin Altis and Ward Cunningham

Page 17: Python Intro For Managers

1717

Python -Python -a great a great agileagile programming programming

language!language! PowerfulPowerful Easy-to-learnEasy-to-learn Easy-to-useEasy-to-use Open-SourceOpen-Source

"Python" from "Python" from

"Monty Python's Flying Circus" "Monty Python's Flying Circus"

Page 18: Python Intro For Managers

1818

Python language featuresPython language features

Derived from ABC, Modula-3, and CDerived from ABC, Modula-3, and C Object-OrientedObject-Oriented Dynamically typedDynamically typed InterpretedInterpreted Cross-platform (Unix, Windows, etc.)Cross-platform (Unix, Windows, etc.) ExtensibleExtensible Flexible Flexible

Page 19: Python Intro For Managers

1919

Python's most obvious Python's most obvious featurefeature

Uses indentation as a control structureUses indentation as a control structure

no DO.. ENDno DO.. END

no BEGIN..ENDno BEGIN..END

no { .. }no { .. }

Page 20: Python Intro For Managers

2020

Indentation as a control-Indentation as a control-structurestructure

for i in range(20):for i in range(20):

if i%3 == 0:if i%3 == 0:

print iprint i

if i%5 == 0:if i%5 == 0:

print "Bingo!"print "Bingo!"

print "---"print "---"

0Bingo!---------3---------6---------9---------12---------15Bingo!---------18------

Page 21: Python Intro For Managers

2121

Sample Python CodeSample Python Code

See the handouts distributed with See the handouts distributed with this presentation.this presentation.

For a quick overview of Python's features:

http://www.ferg.org/python_slides/index.html

Page 22: Python Intro For Managers

2222

Python's advantagesPython's advantages

Productivity and Ease-Of-UseProductivity and Ease-Of-Use MaintainabilityMaintainability Flexibility (OO & functional Flexibility (OO & functional

programming)programming) PowerPower Plays well with other languagesPlays well with other languages

Jython compiles to Java byte codeJython compiles to Java byte code ExtensibleExtensible

Easy to extend with, or call from, C Easy to extend with, or call from, C

Page 23: Python Intro For Managers

2323

Python – some historyPython – some history

Developed by Developed by

Guido van Rossum Guido van Rossum

in 1991. in 1991.

A fan of A fan of Monty Python's Flying Monty Python's Flying CircusCircus

Page 24: Python Intro For Managers

2424

Guido van RossumGuido van Rossum

Python BDFL - Benevolent Dictator for Python BDFL - Benevolent Dictator for LifeLife

1999 - 1999 - Dr. Dobb's Journal Dr. Dobb's Journal Excellence in Excellence in Programming AwardsProgramming Awards

20022002 – Free Software Foundation (FSF) – Free Software Foundation (FSF) Award for the Advancement of Free Award for the Advancement of Free SoftwareSoftware

Page 25: Python Intro For Managers

2525

"Doctor Fun has the dubious distinction of being the first web cartoon. Doctor Fun was not, however, the first cartoon on the Internet." - http://www.ibiblio.org/Dave/index.html

Page 26: Python Intro For Managers

2626

T-shirt Slogan

Python:Python:

Programming the way Guido Programming the way Guido indented itindented it

Page 27: Python Intro For Managers

2727

Who is using Python? Who is using Python? What are they doing with it?What are they doing with it?

Industrial Light & MagicIndustrial Light & Magic, maker of the , maker of the Star Wars films, uses Python Star Wars films, uses Python extensively in the computer graphics extensively in the computer graphics production process. production process.

Disney Feature Length AnimationDisney Feature Length Animation uses Python for its animation uses Python for its animation production applications.production applications.

Page 28: Python Intro For Managers

2828

GoogleGoogle, a leading internet search , a leading internet search engine, is powered by Python. engine, is powered by Python.

YahooYahoo uses Python for its groups site. uses Python for its groups site.

The The InktomiInktomi (formerly Infoseek, now (formerly Infoseek, now part of Yahoo) search engine uses part of Yahoo) search engine uses Python. Python.

IBMIBM and and PhilipsPhilips have used Python to have used Python to create the business practice logic for create the business practice logic for factory tool control applications.factory tool control applications.

Page 29: Python Intro For Managers

2929

NASANASA uses Python in several large uses Python in several large projects, including a CAD/CAM system projects, including a CAD/CAM system and a and a graphical workflow modelergraphical workflow modeler used used in planning space shuttle missions. in planning space shuttle missions.

The The National Institutes of Health National Institutes of Health (USA) (USA) and and Case Western Reserve University Case Western Reserve University are building cutting-edge are building cutting-edge genetic analysis softwaregenetic analysis software with Python. with Python.

Page 30: Python Intro For Managers

3030

The The National Weather ServiceNational Weather Service (USA) (USA) uses Python to prepare weather uses Python to prepare weather forecasts. forecasts.

Python is also used for this purpose at Python is also used for this purpose at the the Swedish Meteorological and HydrologicaSwedish Meteorological and Hydrological Institutel Institute and at and at TV4 SwedenTV4 Sweden..

ChandlerChandler, the new open-source cross-, the new open-source cross-platform Personal Information Manager platform Personal Information Manager being developed by Mitch Kapor, is being developed by Mitch Kapor, is being written in Python and wxWindows.being written in Python and wxWindows.

Page 31: Python Intro For Managers

3131

Lawrence Livermore National LaboratoLawrence Livermore National Laboratoriesries is basing a new numerical is basing a new numerical engineering environment on Python.engineering environment on Python.

The The Theoretical Physics Division at Los AlaTheoretical Physics Division at Los Alamos National Laboratorymos National Laboratory uses Python to control large-scale uses Python to control large-scale physics codes on massively parallel physics codes on massively parallel supercomputers, high-end servers, supercomputers, high-end servers, and clusters. and clusters.

Page 32: Python Intro For Managers

3232

US NavyUS Navy uses Python & Zope for a uses Python & Zope for a web based web based workflow systemworkflow system

US Dept. of AgricultureUS Dept. of Agriculture - Python & - Python & Zope for Zope for massive collaborationmassive collaboration

Should we be using Python? ....

Page 33: Python Intro For Managers

3333

Issues to ConsiderIssues to Considerwhen Evaluating when Evaluating

a Programming Languagea Programming Language

Let's look at some...

Page 34: Python Intro For Managers

3434

Are capabilities an issue?Are capabilities an issue?

"Batteries included" philosophy"Batteries included" philosophy Standard distribution includes extensive Standard distribution includes extensive

module librarymodule library Many other modules availableMany other modules available

Frank Stajano

Page 35: Python Intro For Managers

3535

The Python Standard LibraryThe Python Standard Library

GUI GUI stringsstrings regular expressionsregular expressions database connectivitydatabase connectivity HTTP, CGI, HTML, XMLHTTP, CGI, HTML, XML numeric processingnumeric processing debuggerdebugger object persistenceobject persistence

Page 36: Python Intro For Managers

3636

Is execution speed an issue?Is execution speed an issue?

Modern processors generally make language speed Modern processors generally make language speed

a non-issuea non-issue Many applications are limited by speed of database Many applications are limited by speed of database

or network connection, not programming language or network connection, not programming language Ease-of-use makes implementing optimization Ease-of-use makes implementing optimization

algorithms easier – possible to beat even C algorithms easier – possible to beat even C

programsprograms Easy to write interface to C extension modules for Easy to write interface to C extension modules for

optimizationoptimization

Probably 10 times slower than a system Probably 10 times slower than a system

language, but ...language, but ...

Page 37: Python Intro For Managers

3737

"In terms of run time and memory "In terms of run time and memory consumption, scripting languages consumption, scripting languages often turn out better than Java often turn out better than Java and not much worse than C or C+and not much worse than C or C++."+."

An empirical comparison of C, C++, Java, Perl, Python, An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl for a search/string-processing programRexx, and Tcl for a search/string-processing program

University of Karlsruhe, GermanyUniversity of Karlsruhe, GermanyTechnical Report 2000-5, March 10, 2000Technical Report 2000-5, March 10, 2000http://wwwipd.ira.uka.de/~prechelt/Biblio/jccpprtTR.pdf

Page 38: Python Intro For Managers

3838

"It might seem that the typeless nature of scripting languages could allow errors to go undetected, but in practice scripting languages are just as safe as system programming languages."

"Scripting: Higher Level Programmingfor the 21st Century" by John K. Ousterhout"Scripting: Higher Level Programmingfor the 21st Century" by John K. Ousterhout

IEEE ComputerIEEE Computer magazine, March 1998 -- magazine, March 1998 -- http://home.pacbell.net/ouster/scripting.htmlhttp://home.pacbell.net/ouster/scripting.html

Is dynamic typing an issue?Is dynamic typing an issue?

Page 39: Python Intro For Managers

3939

"I'd been a statically typed bigot for quite a "I'd been a statically typed bigot for quite a few years. Four years ago I got involved with few years. Four years ago I got involved with Extreme Programming. ... I liked the Extreme Programming. ... I liked the emphasis it put on testing.emphasis it put on testing.

About two years ago I noticed I was About two years ago I noticed I was depending less and less on the type system depending less and less on the type system for safety. My unit tests were preventing me for safety. My unit tests were preventing me from making type errors.from making type errors.

So I tried writing some applications in So I tried writing some applications in Python, and then Ruby. I found that type Python, and then Ruby. I found that type issues simply never arose. My unit tests kept issues simply never arose. My unit tests kept my code on the straight and narrow. I simply my code on the straight and narrow. I simply didn't need static type checking."didn't need static type checking."

Robert C. MartinRobert C. Martin

Page 40: Python Intro For Managers

4040

Is productivity an issue?Is productivity an issue?

"5-10 "5-10 times times productivity (really!)"productivity (really!)" Bruce EckelBruce Eckel

""I find that I'm able to program about I find that I'm able to program about three times faster [in Python] than I three times faster [in Python] than I could in Java, and I was able to could in Java, and I was able to program in Java about three times program in Java about three times faster than I could in Cfaster than I could in C."."

Andy HertzfeldAndy Hertzfeld

"The results indicate that, for the given "The results indicate that, for the given programming problem, 'scripting languages' programming problem, 'scripting languages' (Perl, Python, Rexx, Tcl) are more productive (Perl, Python, Rexx, Tcl) are more productive than conventional languages." than conventional languages."

University of Karlsruhe, Germany, Technical Report 2000-5, March 2000University of Karlsruhe, Germany, Technical Report 2000-5, March 2000

Page 41: Python Intro For Managers

4141

When a 20,000 line project went to When a 20,000 line project went to approximately 3,000 lines overnight, approximately 3,000 lines overnight, and came out being more flexible and came out being more flexible and robust ... I realized I was on to and robust ... I realized I was on to something really good.something really good.

-- Matthew "Glyph" Lefkowitz -- Matthew "Glyph" Lefkowitz

...the lines of Python code were 10% ...the lines of Python code were 10% of the equivalent C++ code. of the equivalent C++ code.

-- Greg Stein, eShop -- Greg Stein, eShop

Page 42: Python Intro For Managers

4242

"Programming is fun again!""Programming is fun again!"

Over and over on Over and over on comp.lang.pythoncomp.lang.python there there are messages:are messages: "Now that I've discovered Python, I enjoy "Now that I've discovered Python, I enjoy

programming again!"programming again!"

"Now I am back programming in Java because "Now I am back programming in Java because the projects I'm working on call for it. But I the projects I'm working on call for it. But I wishwish I was programming in Ruby or I was programming in Ruby or Python ..."Python ..."

Robert C. MartinRobert C. Martin

Page 43: Python Intro For Managers

4343

Is maintainability an issue?Is maintainability an issue?

"I realized that the flexibility of "I realized that the flexibility of dynamically typed languages makes dynamically typed languages makes writing code writing code significantlysignificantly easier. easier. Modules are easier to write, and easier Modules are easier to write, and easier to change."to change."

Robert C. Martin -- Robert C. Martin -- http://www.artima.com/weblogs/viewpost.jsp?thread=4639http://www.artima.com/weblogs/viewpost.jsp?thread=4639

"Python excels at rapid creation of "Python excels at rapid creation of maintainablemaintainable code" code"

Bruce EckelBruce Eckel

Page 44: Python Intro For Managers

4444

Is Is weirdnessweirdness an issue? an issue?

"Python's use of whitespace stopped "Python's use of whitespace stopped feeling unnatural after about twenty feeling unnatural after about twenty minutes. minutes.

I just indented code, pretty much as I I just indented code, pretty much as I would have done in a C program would have done in a C program anyway, and it worked."anyway, and it worked."

Eric S. RaymondEric S. Raymond

Page 45: Python Intro For Managers

4545

How weird is it, How weird is it, really?really?"Most people who use Python consider the indentation "Most people who use Python consider the indentation syntax to be an important, if not downright critical, syntax to be an important, if not downright critical, feature of the language. It forces you to write readable feature of the language. It forces you to write readable code, which in turn fosters code maintainability. It's a code, which in turn fosters code maintainability. It's a big win, once you get past the initial shock.big win, once you get past the initial shock.

In any structured programming language, the In any structured programming language, the indentation of blocks really does mean something. indentation of blocks really does mean something. Most Python users think that enforcing consistency in Most Python users think that enforcing consistency in indentation is not only good software engineering, it's indentation is not only good software engineering, it's simple common sense. The end result is code that is so simple common sense. The end result is code that is so well laid out that it resembles something akin to well laid out that it resembles something akin to poetry."poetry."

Mark Lutz, author of Programming Python

Page 46: Python Intro For Managers

4646

Is support an issue?Is support an issue?Python is an "open-source" language. Python is an "open-source" language. It has no vendor. It has no vendor. Does that mean we'll have support Does that mean we'll have support problems? problems? What about...What about...

Vendor longevity?Vendor longevity? Consulting & training support?Consulting & training support? Books and reference materials?Books and reference materials? Tools? IDEs, debuggers, screen-Tools? IDEs, debuggers, screen-

painters? painters?

Page 47: Python Intro For Managers

4747

What is "Open-Source"?What is "Open-Source"?

a distribution license for source codea distribution license for source code source code is available without $$$ chargesource code is available without $$$ charge code may be changed, customized, enhancedcode may be changed, customized, enhanced GPL – Gnu Public LicenseGPL – Gnu Public License Python license – unlike the GPL, you may Python license – unlike the GPL, you may

distribute a modified version without making distribute a modified version without making your changes open source. your changes open source.

a development style and a culture...a development style and a culture...

Page 48: Python Intro For Managers

4848

Page 49: Python Intro For Managers

4949

The Cathedral & the The Cathedral & the BazaarBazaar

Linux is subversive. Who would have thought ... that Linux is subversive. Who would have thought ... that a world-class operating system could coalesce as if a world-class operating system could coalesce as if by magic out of part-time hacking by several by magic out of part-time hacking by several thousand developers scattered all over the planet, thousand developers scattered all over the planet, connected only by the tenuous strands of the connected only by the tenuous strands of the Internet? Internet?

Certainly not I... I believed there was a certain Certainly not I... I believed there was a certain critical complexity above which a more centralized, critical complexity above which a more centralized, a priori approach was required. ... the most a priori approach was required. ... the most important software needed to be built like important software needed to be built like cathedrals, carefully crafted by individual wizards or cathedrals, carefully crafted by individual wizards or small bands of mages working in splendid isolation, small bands of mages working in splendid isolation, with no beta to be released before its time.with no beta to be released before its time.

Page 50: Python Intro For Managers

5050

The Cathedral & the The Cathedral & the BazaarBazaar

The Linux style of development came as a surprise. The Linux style of development came as a surprise. No quiet, reverent cathedral-building here—rather, No quiet, reverent cathedral-building here—rather, the Linux community seemed to resemble a great the Linux community seemed to resemble a great babbling bazaar of differing agendas and babbling bazaar of differing agendas and approaches out of which a coherent and stable approaches out of which a coherent and stable system could seemingly emerge only by a system could seemingly emerge only by a succession of miracles.succession of miracles.

The Linux world not only didn't fly apart in The Linux world not only didn't fly apart in confusion -- it seemed to go from strength to confusion -- it seemed to go from strength to strength at a speed barely imaginable to cathedral-strength at a speed barely imaginable to cathedral-builders.builders.

Page 51: Python Intro For Managers

5151

Some open-source productsSome open-source products LinuxLinux ApacheApache MySqlMySql PHP | Perl | PythonPHP | Perl | Python

Apache has overwhelmingly dominated the Web server market since 1996.

PHP is the most popular Apache module, running on almost 10 million domains (over a million IP addresses).

"MySQL threatens to do for databases what Linux has done for operating systems." – Tim O'Reilly

"LAMP"

Page 52: Python Intro For Managers

5252

Is Open-Source software Is Open-Source software used in the Federal used in the Federal

Government?Government? See earlier list of Python usersSee earlier list of Python users

NIH, NASA, Navy, Agriculture, Weather NIH, NASA, Navy, Agriculture, Weather ServiceService

In 2002, a Mitre study found 115 In 2002, a Mitre study found 115 FOSS products in use in DoDFOSS products in use in DoD

http://egovos.org/pdf/dodfoss.pdfhttp://egovos.org/pdf/dodfoss.pdf

WhyWhy would a Federal agency would a Federal agency use open-source use open-source software? ...software? ...

Page 53: Python Intro For Managers

5353

Government Computer NewsGovernment Computer News November 20, 2000 November 20, 2000

The NASA Acquisition Internet Service (NAIS) development team The NASA Acquisition Internet Service (NAIS) development team adopted open-source software several years ago and we plan to adopted open-source software several years ago and we plan to expand its use in the agency-wide procurement system. expand its use in the agency-wide procurement system.

We were using a proprietary Web development application that We were using a proprietary Web development application that promised interoperability with another vendor’s database software. promised interoperability with another vendor’s database software. It failed to interoperate, however... Then we discovered Perl and It failed to interoperate, however... Then we discovered Perl and have been using it for the last five years to develop and support all have been using it for the last five years to develop and support all NAIS applications. NAIS applications. Recently, price restructuring for a commercial DBMS threatened to Recently, price restructuring for a commercial DBMS threatened to consume most of the NAIS budget. We decided to convert NAIS to consume most of the NAIS budget. We decided to convert NAIS to MySQL. Our tests showed MySQL could perform NAIS functions MySQL. Our tests showed MySQL could perform NAIS functions faster. Cost of the optional technical support was about 1 percent of faster. Cost of the optional technical support was about 1 percent of that for the commercial product.that for the commercial product. Technical support for MySQL has been excellent when we needed it, Technical support for MySQL has been excellent when we needed it, plus there are hundreds of Web sites that offer free help and plus there are hundreds of Web sites that offer free help and support for such open-source products. support for such open-source products. We plan to evaluate the Apache HTTP Server to correct limitations We plan to evaluate the Apache HTTP Server to correct limitations of the commercial Web server we currently use. of the commercial Web server we currently use.

Page 54: Python Intro For Managers

5454

eGov & Open-SourceeGov & Open-Source Center of Open Source & Government   Center of Open Source & Government  

((http://egovos.org/index.htmlhttp://egovos.org/index.html))

EGOVOS - high-level international EGOVOS - high-level international conference on OSS ("Libre Software"), conference on OSS ("Libre Software"), interoperability and open standards in interoperability and open standards in governmentgovernment October 2002 & March 2003 - Washington, DCOctober 2002 & March 2003 - Washington, DC EGOVOS3  - 24-26 November, 2003 at EGOVOS3  - 24-26 November, 2003 at

UNESCO headquarters in ParisUNESCO headquarters in Paris

Page 55: Python Intro For Managers

5555

The Open Source Reference Book 2003 - The Open Source Reference Book 2003 - What Local/National Governments, the What Local/National Governments, the Defense Establishment, and The Global Defense Establishment, and The Global 1000 Need To Know About Open Source 1000 Need To Know About Open Source Software (Software (November 2003)November 2003)

... will provide a Generally Regarded As Safe ... will provide a Generally Regarded As Safe (GRAS) list of Open Source software to identify (GRAS) list of Open Source software to identify mature and useable Open Source projects mature and useable Open Source projects

... will list Open Source software that is NIAP* ... will list Open Source software that is NIAP* or Common Criteria evaluated or Common Criteria evaluated

*NIAP: National Information Assurance Partnership – NIST security certification

Page 56: Python Intro For Managers

5656

So... Is Open-Source So... Is Open-Source SafeSafe??

Vendors and products vary widely in both Vendors and products vary widely in both the commercial and open-source arena.the commercial and open-source arena.

The fact that a piece of software is The fact that a piece of software is commercial is no guarantee of its quality, commercial is no guarantee of its quality, or of its vendor's long-term survival.or of its vendor's long-term survival.

The best open-source software is as good The best open-source software is as good as the best commercial software. as the best commercial software.

Page 57: Python Intro For Managers

5757

Each product and vendor should be Each product and vendor should be evaluated on its own merits, evaluated on its own merits, regardless of whether it is regardless of whether it is commercial or open-source.commercial or open-source.

Python is in the same league as the Python is in the same league as the best software anywhere, commercial best software anywhere, commercial or open-source.or open-source.

The Bottom LineThe Bottom Line

Page 58: Python Intro For Managers

5858

Is vendor longevity an Is vendor longevity an issue?issue?

What if Guido got run over by a bus?What if Guido got run over by a bus?

Page 59: Python Intro For Managers

5959

The Python Software The Python Software FoundationFoundation

A non-profit organization for advancing A non-profit organization for advancing open-source technology related to Pythonopen-source technology related to Python

Holds Python's intellectual property rights.Holds Python's intellectual property rights.

Produces the core Python distribution, Produces the core Python distribution, available to the public free of charge. available to the public free of charge.

Establishes PSF licenses, ensuring the rights Establishes PSF licenses, ensuring the rights of the public to freely obtain, use, of the public to freely obtain, use, redistribute, and modify intellectual redistribute, and modify intellectual property held by the PSF. property held by the PSF.

Page 60: Python Intro For Managers

6060

Is mindshare an issue?Is mindshare an issue?

International Python ConferenceInternational Python Conference IPC - in USA since 1992IPC - in USA since 1992

EuroPython conferenceEuroPython conference in Europe since 2002in Europe since 2002

Python for Scientific Computing Python for Scientific Computing WorkshopWorkshop SciPy - in USA since 2002SciPy - in USA since 2002

The Python community is very The Python community is very active and growing rapidlyactive and growing rapidly

Page 61: Python Intro For Managers

6161

NewsgroupNewsgroupActivityActivity

comp.lang.* comp.lang.* December December

20022002

java 26953java 26953

c++ 19913c++ 19913

c 13874c 13874

perl 10486perl 10486

python 9647python 9647

basic 7909basic 7909

ruby 6466ruby 6466

lisp 6132lisp 6132

tcl 5256tcl 5256

pascal 4229pascal 4229

smalltalk 2398smalltalk 2398

fortran 2355fortran 2355

cobol 1845cobol 1845Statistics compiled by

Aaron K. Johnson.

Page 62: Python Intro For Managers

6262

TIOBETIOBEPopularity of Popularity of Programming Programming

LanguagesLanguagesIndex Index

July 2003 July 2003

based on the based on the number of hits number of hits returned by a returned by a Google searchGoogle search

1 Java1 Java 44.344.3 2 C2 C 36.836.8 3 C++3 C++ 33.233.2 4 Perl4 Perl 18.318.3 5 (Visual) Basic5 (Visual) Basic 15.515.5 6 PHP6 PHP 7.67.6 7 SQL7 SQL 6.06.0 8 C#8 C# 3.53.5 9 JavaScript9 JavaScript 3.33.310 Delphi/Pascal/Kylix10 Delphi/Pascal/Kylix 3.13.111 Python11 Python 2.62.612 COBOL12 COBOL 2.32.313 SAS13 SAS 2.22.214 Fortran14 Fortran 1.91.9

Index is available at http://www.tiobe.com/tpci.htm

Page 63: Python Intro For Managers

6363

Is online Is online supportsupport an issue? an issue?

comp.lang.python -- comp.lang.python -- Outstanding!!Outstanding!!

http://groups.google.com/groups?&group=comp.lang.python

Page 64: Python Intro For Managers

6464

Consulting and Training Consulting and Training Resources?Resources?

Not much!

Python is probably too easy-to-learn and easy-to-use to support much of a training/ consulting industry. You can learn it out of a book!

A couple of useful consulting resources... Zope Corp. Fourthought, Inc. - XML tools for Python and

XML and web-based applications.

Page 65: Python Intro For Managers

6565

Is Ease-of-Learning an Is Ease-of-Learning an issue?issue?

Python is famously easy to use and easy to Python is famously easy to use and easy to learn.learn.

I talked my colleagues into using Python for I talked my colleagues into using Python for our our Computer Science 1Computer Science 1 course this fall. ... course this fall. ... In the past I would be swamped during In the past I would be swamped during office hours with students wanting help office hours with students wanting help deciphering C++ compiler errors. This deciphering C++ compiler errors. This semester almost nobody has stopped by for semester almost nobody has stopped by for syntax issues. syntax issues.

-- Dave Reed on Python In Education mailing list -- Dave Reed on Python In Education mailing list

Page 66: Python Intro For Managers

6666

Books & Reference Books & Reference Materials?Materials?

Page 67: Python Intro For Managers

6767

Online Materials?Online Materials? Python distribution includes:Python distribution includes:

Tutorial, Language ReferenceTutorial, Language Reference Extensive Standard Library documentationExtensive Standard Library documentation

"How to Think Like a Computer Scientist with "How to Think Like a Computer Scientist with Python" http://greenteapress.com/thinkpython/Python" http://greenteapress.com/thinkpython/

"Python Programming – an Introduction to Computer "Python Programming – an Introduction to Computer Science" http://mcsp.wartburg.edu/zelle/python/Science" http://mcsp.wartburg.edu/zelle/python/

"Dive Into Python" "Dive Into Python" http://diveintopython.org/index.htmlhttp://diveintopython.org/index.html

Too many others to list...Too many others to list...

Page 68: Python Intro For Managers

6868

Tools? - IDEsTools? - IDEs

IDLE comes IDLE comes with with PythonPython

WingIDE – WingIDE – excellent excellent IDE with IDE with visual visual debuggerdebugger

$35 and $180 -- http://wingide.com/

Page 69: Python Intro For Managers

6969

Visual Python

• Python plug-in for Visual Studio .NET. • Python-specific features within the familiar Visual Studio environment.• Visual Python integrates seamlessly with Visual Studio .NET, allowing

programmers to leverage features of Microsoft's popular development tool suite.

• http://www.activestate.com/Products/Visual_Python

Page 70: Python Intro For Managers

7070

Tools? – Screen PaintersTools? – Screen Painters

A screenshot of wxDesignerA screenshot of wxDesigner

Page 71: Python Intro For Managers

7171

What Do the Experts Think What Do the Experts Think of Python?of Python?

Page 72: Python Intro For Managers

7272

Bruce EckelBruce Eckel

His book His book Thinking in C++Thinking in C++ was given was given the Software Development Jolt Award the Software Development Jolt Award for best book published in 1995. for best book published in 1995.

Thinking in Java Thinking in Java received received Java World Reader's Choice AwardJava World Reader's Choice Award and Java World Editor's and Java World Editor's Choice Award for best book, the Choice Award for best book, the Java Developer's Journal Editor's Choice AwardJava Developer's Journal Editor's Choice Award for books, for books, the Software Development Productivity Award in 1999, the the Software Development Productivity Award in 1999, the third edition received the third edition received the Software Development MagazineSoftware Development Magazine Jolt award for best technical book, 2002.Jolt award for best technical book, 2002.

One of "the industry's leading lights" (One of "the industry's leading lights" (Windows Tech Windows Tech JournalJournal, September 1996). , September 1996).

Page 73: Python Intro For Managers

7373

Why I Love Python© 2001 Bruce Eckel

MindView, Inc.Training & Consulting5343 Valle VistaLa Mesa, CA [email protected]

www.MindView.nethttp://64.78.49.204/pub/eckel/LovePython.zip

Page 74: Python Intro For Managers

7474

The language you speak affects what The language you speak affects what you can think. "Python fits my you can think. "Python fits my brain." brain."

Python excels at rapid creation of Python excels at rapid creation of maintainablemaintainable code code

Programmer productivity is the most Programmer productivity is the most important thing. 5-10 important thing. 5-10 times times productivity (really!)productivity (really!)

Page 75: Python Intro For Managers

7575

Simplicity really does make a Simplicity really does make a difference.difference.

I can remember many Python idioms I can remember many Python idioms because they’re simpler.because they’re simpler.

One more reason I program faster in One more reason I program faster in Python.Python.

I I stillstill have to look up how to open a file have to look up how to open a file every time I do it in Java. every time I do it in Java.

Page 76: Python Intro For Managers

7676

Python & “The Tipping Python & “The Tipping Point”Point”

It is possible to write It is possible to write programs to programs to automate every automate every task. But you don’t. task. But you don’t.

Python makes it easy Python makes it easy enoughenough

Page 77: Python Intro For Managers

7777

Eric S. Raymond Eric S. Raymond

The Cathedral and the BazaarThe Cathedral and the Bazaar www.catb.org/~esr/writings/cathedral-bazaar/cathedral-www.catb.org/~esr/writings/cathedral-bazaar/cathedral-

bazaar/bazaar/

The New Hacker's DictionaryThe New Hacker's Dictionary http://www.jargon.8hz.com/jargon_toc.html http://www.jargon.8hz.com/jargon_toc.html

Homesteading the NoosphereHomesteading the Noosphere http://www.firstmonday.dk/issues/issue3_10/raymond/http://www.firstmonday.dk/issues/issue3_10/raymond/

Well-known Unix guru, Well-known Unix guru, Linux advocate, and Linux advocate, and authorauthor

Page 78: Python Intro For Managers

7878

This could be an opportunity to get This could be an opportunity to get some hands-on experience with some hands-on experience with Python... Python...

I charged ahead and roughed out some I charged ahead and roughed out some code ...code ...

http://pythonology.org/success&story=esr

Why Python?

Page 79: Python Intro For Managers

7979

I noticed I was generating I noticed I was generating workingworking code code nearly as fast as I could type. When nearly as fast as I could type. When you're writing working code nearly as you're writing working code nearly as fast as you can type, it generally fast as you can type, it generally means you've achieved mastery of the means you've achieved mastery of the language. But that didn't make sense, language. But that didn't make sense, because it was still day one ...because it was still day one ...

This was my first clue that, in Python, I This was my first clue that, in Python, I was actually dealing with an was actually dealing with an exceptionally good design. exceptionally good design.

Page 80: Python Intro For Managers

8080

Not that it took me very long to learn Not that it took me very long to learn the feature set. the feature set.

This reflects another useful property of This reflects another useful property of Python: it is Python: it is compactcompact -- you can hold -- you can hold its entire feature set (and at least a its entire feature set (and at least a concept index of its libraries) in your concept index of its libraries) in your head. head.

Page 81: Python Intro For Managers

8181

The long-term usefulness of a language The long-term usefulness of a language comes from how well and how comes from how well and how unobtrusively it supports the day-to-day unobtrusively it supports the day-to-day work of programming, which consists work of programming, which consists not of writing new programs, but mostly not of writing new programs, but mostly reading and modifying existing ones.reading and modifying existing ones.

So the real punchline of the story is this: So the real punchline of the story is this: weeks and months after writing weeks and months after writing fetchmailconffetchmailconf [my Python program], I [my Python program], I could still read the code and grok what it could still read the code and grok what it was doing without serious mental effort.was doing without serious mental effort.

Page 82: Python Intro For Managers

8282

Martin C. BrownMartin C. Brown

Author and Perl expertAuthor and Perl expert Perl: The Complete ReferencePerl: The Complete Reference Perl Annotated Archives Perl Annotated Archives

... and ... ... and ...... and ... ... and ...

Page 83: Python Intro For Managers

8383

Nicholas PetreleyNicholas PetreleyComputerWorldComputerWorld columnist columnist

One of my favorite programming One of my favorite programming languages is Python. It seems I don't go languages is Python. It seems I don't go a week these days without someone a week these days without someone asking me what I know about Python, so asking me what I know about Python, so it seems to be gaining quite a following it seems to be gaining quite a following in mainstream IT. in mainstream IT.

November, 2002November, 2002

Page 84: Python Intro For Managers

8484

The Bottom Line...The Bottom Line...

"Use the Best Tool for the Job: Put Both a "Use the Best Tool for the Job: Put Both a Scripting and Systems Language in Your Scripting and Systems Language in Your Toolbox"- Bill VennersToolbox"- Bill Venners

http://www.artima.com/commentary/langtool.htmlhttp://www.artima.com/commentary/langtool.html

Python would be a useful tool in the Python would be a useful tool in the toolboxes of our developers, DBAs, and LAN toolboxes of our developers, DBAs, and LAN

administrators,administrators,

for situations where....for situations where....

Page 85: Python Intro For Managers

8585

A command-language is too under-A command-language is too under-powered, and a systems powered, and a systems programming language would be programming language would be overkill.overkill.

Speed and minimizing effort are Speed and minimizing effort are importantimportant One-time, throw-away programsOne-time, throw-away programs Internal utilitiesInternal utilities PrototypingPrototyping Test scaffoldingTest scaffolding

Page 86: Python Intro For Managers

8686

Cross-platform portability is importantCross-platform portability is important System administrators need learn only System administrators need learn only

one scripting languageone scripting language Prototype/develop on one platform, Prototype/develop on one platform,

deploy on another (e.g. Windows NT and deploy on another (e.g. Windows NT and Unix)Unix)

Readability & maintainability are Readability & maintainability are importantimportant XML processingXML processing

The Python people also piped up to say “everything's just fine here” but then they always do. I really must learn that language. XML Is Too Hard For ProgrammersXML Is Too Hard For Programmers

Tim Bray, co-author of the original XML 1.0 specTim Bray, co-author of the original XML 1.0 spec

Page 87: Python Intro For Managers

8787

Ease-of-learning is importantEase-of-learning is important

An application is written in four different languages (Java, C, Perl, and Unix shell-script) because it was built by four different developers who were expert in four different languages.

Everybody knows this is a problem, but nobody has time to learn another language.

One solution -- a single common language that is both powerful enough to handle a wide variety of tasks, and easy enough to learn quickly and easily.

Page 88: Python Intro For Managers

8888

More Online InformationMore Online Information

http://www.python.org is the Python home pagehttp://www.python.org is the Python home page

Chapter 1 of Chapter 1 of Internet Programming with PythonInternet Programming with Python is is available online. It discusses reasons for using available online. It discusses reasons for using Python.Python. http://www.fsbassociates.com/books/

pythonchpt1.htm

Python Compared to Other LanguagesPython Compared to Other Languages http://www.python.org/doc/Comparisons.html

Page 89: Python Intro For Managers

8989

The EndThe EndQuestions? Comments?Questions? Comments?