1 the business case for agile languages stephen ferg bureau of labor statistics

48
1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics [email protected] www.ferg.org

Upload: bruno-perry

Post on 17-Jan-2018

216 views

Category:

Documents


0 download

DESCRIPTION

3 "Little Languages" appear... awk sed

TRANSCRIPT

Page 1: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

11

The Business Case

forAgile Languages

Stephen FergBureau of Labor Statistics

[email protected]

Page 2: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

22

In the beginning... System programming languages

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

Command languages JCL TSO CLists, CMS "execs" Batch files

Page 3: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

33

"Little Languages" appear... awk sed

Page 4: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

44

Scripting languages evolve UNIX shell

scripting Rexx Tcl, TK

Perl Python PHP Ruby

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

Page 5: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

55

Agile programming languages

"Scripting" languagesaren't just for scripting any more.

We really should stopcalling them

"scripting" languages.

"Agile" languages would be more accurate.

Page 6: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

66

What is an agile language? Interpreted

requires a run-time interpreter or virtual machine

Untyped or dynamically typed No data declarations

No compilation step

Page 7: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

77

The hallmark The hallmark of agile of agile languages......

VastlyVastlyincreased increased

productivity!productivity!

Page 8: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

88

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

•Assembly LanguageOne line = one machine instruction

•System programming languagesOne line = 3 to 7 machine instructions

•Scripting/agile languagesOne line = 100s to 1000s of

instructions

Productivity ::= the number of machine instructions that a programmer can produce per year.A programmer can write roughly the same number of lines of code per year regardless of language.

Page 9: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

99

     

None StrongDegree of Typing

AssemblerAssemblerSystem LanguagesSystem Languages

Scripting LanguagesScripting LanguagesVBVB

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

CC

C++C++

JavaJava

Inst

ruct

ions

/Sta

tem

ent

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 10: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

1010

University of Karlsruhe (Germany)Technical Report, March 2000

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

Page 11: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

1111

A good example... PythonA good example... PythonDeveloped in 1991 Developed in 1991 by Guido van Rossumby Guido van Rossum

Best of breedBest of breed Powerful / flexiblePowerful / flexible Easy-to-learn / useEasy-to-learn / use Open sourceOpen source

A fan of Monty Python's Flying Circus

Page 12: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

1212

Developer Reports I find that I'm able to program about three times

faster in Python than I could in Java, and three times faster in Java than I could in C.

Andy Hertzfeld

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

-- Matthew "Glyph" Lefkowitz

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

-- Greg Stein, eShop

Page 13: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

1313

Productivity = Web speedMay 4, 2004 When burglars brought down the Internet link to Ziff-

Davis' Manhattan offices, open-source software - and Sean Gallagher's personal Web server - kept eWEEK.com's stories flowing.

For about six hours yesterday, the staff of eWEEK.com was treated to a lesson in emergency improvisation. But thanks to 123 lines of Python code, running on a $7-a-month personal Web site on an Apache Web server somewhere in California, you probably didn't notice.

Page 14: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

1414

Fast to write... but maintainable?

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

Eric S. Raymond, author of The Cathedral and the Bazaar

Page 15: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

1515

"Programming is fun again!"

Over and over on comp.lang.python :

"Now that I've discovered Python,

I enjoy programming again!"

Page 16: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

1616

The ability of agile languages to increase

productivity and maintainability

leads to...

increasing use of scripting/agile languages.

Page 17: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

1717

John Ousterhout, developer of Tcl

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. I think there is a trend ...

Dynamically typed languages such as Python, Ruby, and even Smalltalk will be mainstream industrial languages in the coming years.

Robert C. Martin, author of Agile Software Development

Page 18: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

1818

Sounds good, but ...

Page 19: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

1919

Is Is open-source open-source

safesafe ? ?

Page 20: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

2020

Can you Can you trusttrust open-source software?open-source software?

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

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

Page 21: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

2121

Is anybody using open-source software?

Is open-source software used in the Federal

government?

Page 22: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

2222

Who is using open-source software?

Linux Apache MySql PHP | 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).

... and then there's ...

"LAMP"

Page 23: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

2323

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

In 2002, a Mitre study found 115 FOSS (free and open-source) products in use in the U.S. Dept. of Defense.

DoD

Page 24: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

2424

In September 2003, IBM began promoting Linux with a series of television ads depicting a young boy receiving lessons from famous innovators and teachers. The boy represents the next generation of humanity, learning from teachers who – like the open-source community – freely share their accumulated expertise.

... and IBM

Page 25: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

2525

Why would a Federal agency

use open-source software?

From Government Computer NewsNovember 20, 2000 ...

The experience of the NASA Acquisition Internet Service (NAIS) development team ...

Page 26: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

2626

Our proprietary Web development application that promised interoperability with another vendor’s database software failed to interoperate... Then we discovered Perl and have been using it for the last five years for all NAIS applications.

Recently, price restructuring for a commercial DBMS threatened to consume most of the NAIS budget. We decided to convert to MySQL. Our tests showed MySQL could perform NAIS functions faster. Cost of the optional technical support was about 1 percent of that for the commercial product. Technical support for MySQL has been excellent when we needed it, plus there are hundreds of Web sites that offer free help and support for such open-source products. We plan to evaluate the Apache HTTP Server to correct limitations of the commercial Web server we currently use.

Page 27: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

2727

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

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

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

Page 28: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

2828

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

Yahoo uses Python for its groups site, Yahoo uses Python for its groups site, and in its Inktomi search engine. and in its Inktomi search engine.

The Philips (formerly IBM) Fishkill The Philips (formerly IBM) Fishkill semiconductor manufacturing facility semiconductor manufacturing facility uses Linux and Python for factory tool uses Linux and Python for factory tool control.control.

Page 29: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

2929

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

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

The National Weather Service uses Python to prepare weather forecasts.

Page 30: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

3030

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

The Theoretical Physics Division at Los Alamos National Laboratory uses Python to control large-scale simulations on massively parallel supercomputers.

Page 31: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

3131

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

US Dept. of Agriculture uses Python & Zope for massive collaboration

US Dept. of Labor uses Python & Zope for the Workforce Connections learning management system

Page 32: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

3232

... or "What about vendor longevity?"

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

Page 33: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

3333

Common MisconceptionsCommon Misconceptions Open-source software has no vendor

The vendor of an open-source product is the (single) person who developed it.

Anybody can change (and maybe mess up) an open-source product.

Page 34: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

3434

The Python Software Foundation

A non-profit organization Holds Python's intellectual property

rights Produces the core Python distribution:

the Python language, standard libraries, documentation, source code, etc.

Manages contributions to the Python codebase

Page 35: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

3535

The PSF will outlive Guido.There is no guarantee of any commercial vendor's long-term survival.

Oh, by the way... you do have software escrows for all of your commercial software don't you?

Page 36: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

3636

Is OSS as good as commercial software?

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

The fact that a piece of software is commercial is no guarantee of its quality.

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

Page 37: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

3737

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

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

The Bottom Line

Page 38: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

3838

What about market share?Open-source: mindshare

How alive is the user community?

International Python Conference IPC - in USA since 1994 In conjunction with OSCON since 2002

EuroPython conference in Europe since 2002

Page 39: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

3939

NewsgroupActivity

comp.lang.* December

2002

java 26953c++ 19913c 13874perl 10486python 9647basic 7909ruby 6466lisp 6132tcl 5256pascal 4229smalltalk 2398fortran 2355cobol 1845Statistics compiled

by Aaron K. Johnson.

Page 40: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

4040

What are its capabilities, features?

Python is famous for its"batteries included"

philosophy

Frank Stajano

Page 41: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

4141

The Python Standard Library GUI strings regular expressions database connectivity HTTP, CGI, HTML, XML numeric processing debugger object persistence

Page 42: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

4242

What about execution speed ?

Modern hardware processors generally make language speed a non-issue

Most applications are limited by speed of database or network connection, not programming language

Slower than a systems language, but ...

Remember when they said that relational databases would never catch on? "Too slow" they said...

Page 43: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

4343

How will we ever survive without type-checking?

Robert C. Martin

I found that type issues simply never arose. My unit tests kept my code on the straight and narrow. I simply didn't need static type checking.

Page 44: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

4444

Where will I find support?Where will I find support? comp.lang.python -- Outstanding!!comp.lang.python -- Outstanding!!

Many online books and tutorialsMany online books and tutorials

Consulting and contracting firms that Consulting and contracting firms that specialize in open-source training and specialize in open-source training and developmentdevelopment

Page 46: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

4646

The Bottom Line...

"Use the Best Tool for the Job: Put Both a Scripting and Systems

Language in Your Toolbox"

- Bill Venners http://www.artima.com/commentary/langtool.html

Page 47: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

4747

Investigate scripting and agile languages Navigate your standards process, if necessary Provide training, learning materials Start experimenting ....

Scripts, internal/administration utilities One-time, throw-away programs Test scaffolding Prototyping

How Do I Start?

Page 48: 1 The Business Case for Agile Languages Stephen Ferg Bureau of Labor Statistics

4848

A prediction: you will move “The Tipping

Point” It is possible to

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

Python makes it easy enough