Wednesday, December 26, 2007

Why is Climate Modeling Stuck?

I believe that progress in climate modeling has been relatively limited since the first successes in linking atmosphere and ocean models without flux corrections. (That's about a decade now, long enough to start being cause for concern.) One idea is that tighter codesign of components such as atmosphere and ocean models in the first place would help, and there's something to be said for that, but I don't think that's the core issue.

I suggest that there is a deeper issue based on workflow presumptions. The relationship between the computer science community and the application science community is key. I suggest that the relationship is ill-understood and consequently the field is underproductive.

The relationship between the software development practitioners and the domain scientists is misconstrued by both sides, and both are limited by past experience. Success in such fields as weather modeling and tide prediction provide a context which inappropriately dominates thinking, planning and execution.

Operational codes are the wrong model because scientists do not modify operational codes. Commercial codes are also the wrong model because bankers, CFOs and COOs do not modify operational codes. The primary purpose of scientific codes as opposed to operational codes is to enable science, that is, free experimentation and testing of hypotheses.

Modifiability by non-expert programmers should be and sadly is not treated as a crucial design constraint. The application scientist is an expert on physics, perhaps on certain branches of mathematics such as statistics and dynamics, but is typically a journeyman programmer. In general the scientist does not find the abstractions of computer science intrinsically interesting and considers the program to be an expensive and balky laboratory tool.

Being presented with codes that are not designed for modification greatly limits scientific productivity. Some scientists have enormous energy for the task (or the assistance of relatively unambitious and unmarketable Fortran-ready assistants) and take on the task with energy and panache, but the sad fact is that they have little idea of what to do or how to do it. This is hardly their fault; they are modifying opaque and unwelcoming bodies of code. Under the daunting circumstances these modifications have the flavor of "one-offs", scripts intended to perform a single calculation, and treated as done more or less when the result "looks reasonable". The key abstractions of computer science and even its key goals are ignored, just as if you were writing a five-liner to, say, flatten a directory tree with some systematic renaming. "Hmm, looks right. OK, next issue."

This, while scientific coding has much to learn from the commercial sector, the key use case is rather atypical. The key is in providing an abstraction layer useful to the journeyman programmer, while providing all the verification, validation, replicability, version control and process management the user needs, whether the user knows it or not. As these services become discovered and understood, the value of these abstractions will be revealed, and the power of the entire enterprise will resume its forward progress.

It's my opinion that Python provides not only a platform for this strategy but also an example of it. When a novice Python programmer invokes "a = b + c", a surprisingly large number of things potentially happen. An arithmetic addition is commonly but not inevitably among the consequences and the intentions. The additional machinery is not in the way of the young novice counting apples but is available to the programmer extending the addition operator to support user defined classes.

Consider why Matlab is so widely preferred over the much more elegant and powerful Mathematica platform by application scientists. This is because the scientists are not interested in abstractions in their own right; they are interested in the systems they study. Software is seen as a tool to investigate the systems and not as a topic of intrinsic interest. Matlab is (arguably incorrectly) perceived as better than Mathematica because it exposes only abstractions that map naturally onto the application scientist's worldview.

Alas, the application scientist's worldview is largely (see Marshall McLuhan) formed by the tools with which the scientist is most familiar. The key to progress is the Pythonic way, which is to provide great abstraction power without having it get in the way. Scientists learn mathematical abstractions as necessary to understand the phenomena of interest. Computer science properly construed is a branch of mathematics (and not a branch of trade-school mechanics thankyouverymuch) and scientists will take to the more relevant of its abstractions as they become available and their utility becomes clear.

Maybe starting from a blank slate we can get moving again toward a system that can actually make useful regional climate prognoses. It is time we took on the serious task of determining the extent to which such a thing is possible. I also think the strategies I have hinted at here have broad applicability in other sciences.

I am trying to work through enough details of how to extend this Python mojo to scientific programming to make a credible proposal. I think I have enough to work with, but I'll have to treat the details as a trade secret for now. Meanwhile I would welcome comments.

Monday, November 12, 2007

Fake Steve on OLPC

Fake Steve Jobs has some brutal (but sort of funny) articles about OLPC. Check this one, or google the site for "Negroponte".

GOGO gone?

I don't quite get this "limited time only" "give one get one" thing the OLPC people are running.

It's being spun as if I were giving the one I get to a child. But that is silly.

The child's interest will be piqued by the community aspect, and if there will be no XO systems for sale, it will be impossible to build the community. It's almost as if Bell had decided to start the phone system in Ougadougou (a real place with a real OLPC initiative, actually, but I like the name) and had financed it by selling telephones in America.

You know, one telephone isn't worth much. You need at least two.

So in practice it will almost certainly be "give two get two" program, with adult hobbyists buying. Or did I miss something?

Will there be a commercial XO product in the marketplace? If not, why not?

Is the platform stable enough to start thinking about end user apps? I don't realistically have the time to do systems work, but I'm very interested in what runs on it.

Friday, August 3, 2007

Alan Perlis Quote

From Dethe Elza's sig:
"It goes against the grain of modern education to teach children to program. What fun is there in making plans, acquiring discipline in organizing thoughts, devoting attention to detail and learning to be self-critical?"

--Alan Perlis

Wednesday, May 23, 2007

Article is Out

Not really makin a huge splash, but for what it is worth look for the spring 2007 edition of the Python Papers. See pages 8 and following.

In an email Duke Crawford offers the following links to an open source language drill program:

http://www.olpcnews.com/content/ \
localization/learning_language.html

http://sourceforge.net/projects/twexter
http://wiki.laptop.org/go/WiXi
http://wixi.cc/hello_world
http://twext.cc/go/18

Is anybody else out there?

Thursday, May 10, 2007

Laptop backlash

Get it while it's live: the NY Times reports “Seeing No Progress, Some Schools Drop Laptops”.

Responses here.

a snippet:

==>
So the Liverpool Central School District, just outside Syracuse, has
decided to phase out laptops starting this fall, joining a handful of
other schools around the country that adopted one-to-one computing
programs and are now abandoning them as educationally empty — and
worse.

Many of these districts had sought to prepare their students for a
technology-driven world and close the so-called digital divide between
students who had computers at home and those who did not.

"After seven years, there was literally no evidence it had any impact
on student achievement — none," said Mark Lawson, the school board
president here in Liverpool, one of the first districts in New York
State to experiment with putting technology directly into students'
hands. "The teachers were telling us when there's a one-to-one
relationship between the student and the laptop, the box gets in the
way. It's a distraction to the educational process."
<==

It's not surprising, really, but the timing is not good.

FInal Version of Article

The 3rd instance of the Python Papers will be coming out May 28.

Monday, April 16, 2007

Edu-Python: Python's Killer App?

DRAFT of an ARTICLE

IS EDUCATION PYTHON'S KILLER APP?


SALIENT QUOTATIONS

"Should the computer program the kid, or should the kid program the computer?"
- Seymour Papert

"We want to explore the notion that virtually everybody can obtain some level of computer programming skills in school, just as they can learn how to read and write."
- Guido van Rossum

"Python makes too much sense as a learning language to not ultimately have an effect in the education arena."
- Arthur Siegel

"If schools won't accept classes that have Python in them, then it doesn't matter how much better Python is than BASIC, the classes cannot be taught."
- Dean Nevins

PYTHON IN EDUCATION

If learning is about information, then surely learning will change somewhat under the influence of pervasive information technology.

This is an exciting time for those of us who believe that software development in general, and Python in particular, has a role in general education. Three of the four keynotes at PyCon '07 revolved around the idea of computing as a medium for education and/or communication. Adele Goldberg talked about the frustrations of getting carefully designed computational curriculum into the public school systems. Robert "rOml" Lefkowitz talked about code as a communication medium. Finally, on a more practical note, Ivan Krstic discussed the very exciting prospects of the One Laptop Per Child project, whose modest goal is to make computing available to all children everywhere.

These discussions gave a boost to the quiet world of educational Python. It seems like a good time to take stock of the entire educational programming landscape and Python's role in it.

COMPUTER LITERACY

In the early days of computing, it became apparent that computers would become ubiquitous and part of daily life. At that time, we had little idea what shape they would take in a generation.

I recall an episode of the futuristic TV news program "The Twentyfirst Century", hosted by the renowned Walter Cronkite, that discussed the implications of home computers. A professor's family had a massive mechanical teletype (a terminal that used a typewriter mechanism rather than a CRT or LCD display) in their home. The demonstartion application was, as I recall, changing the proportions in a recipe so that it served seven rather than four. I am sure it was a great tangle of Lisp under the hood and no great pleasure to use, but it appeared that if you perservered a recasting of your recipe with all the quantities multiplied by 7/4 and converted to standard cooking units loudly clanked out onto the fanfold paper. At the time, the 21st century was promoted in the media to be an almost flawless utopia, but even so one had the sense that both Cronkite and the professor's wife were struggling to express any enthusiasm for the concept of home computing.

If you think about what "computer literacy" means today in high schools, trade schools, and nontechnical programs in university, though, you'll see that it amounts to recipe scaling writ large. Mass market software presents complex and often counterintuitive user interfaces, and the skill of navigating through each of them is valued and promoted.

PROGRAMMING FOR CHILDREN

Of course, we do need to be able to cope with applications. Still, there have always been two visions of computing, one as a world in which there is a very sharp distinction between producers and consumers of software, and another where the continuum is blurred.

The alternative vision of computer literacy was formed by the early users of computers. In those days, there were no "applications". Being a computer user amounted to being a programmer. Many of us felt that the skills we learned by wrestling with the structure and logic of a program would be applicable to many aspects of life. We felt that the advantages we were getting could be democratized. In this view, "computer literacy" was about coding, not about being able to push a mouse around and click on things effectively.

This view is succinctly summarized by Georgia Tech Professor Mark Guzdial's comment on a blog page: "computing FOR learning (as opposed to learning ABOUT computing".[1]

Seymour Papert (with Willy Feurzig) developed Logo[2], the original "learning language in the late 1960's. The ideas of Logo were explicitly based on developmental psychology[3]. Papert not only claimed that remarkably young children (fourth graders, about 9 years old) could be exposed to the ideas of programming, he was successful in demonstrating this. Many subsequent teaching environments have been based on Logo, and especially on the observation that "turtle graphics" were a uniquely compelling development target for novices) the basic idea has not been as successful as Papert envisioned. (It's interesting to contemplate the fact that it was less expensive to construct a mechanical turtle than a graphic display in those days!)

Alan Kay is another key figure in the computing for learning movement. His 1971 "Dynabook" paper[4] is a remarkable exposition of the possibilities of computing from a time long before anyone actually had so muchas a portable display. Kay and Papert are still with us as I write (although, unfortunately, Papert was seriously injured recently), and among their recent efforts, along with Nicholas Negroponte, is the One Laptop Per Child initiative[5], where Python plays a key role, and which largely revives the Dynabook idea.

COMPUTING FOR NOVICES

Despite the strong advocacy of the likes of Papert and Kay, there is no consensus on whether most people can and should learn a modest amount of programming, nor what age is best to start. Still, we can agree that *some* people will become programmers, and they have to start with *some* language.

Among the most famous quotations attribute to the great computer scientist Edsger Dijkstra are critiques of teaching computer science with inappropriate languages, notably that "The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense" and "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." Many people have taken DIjkstra's advice to heart, and designed languages intended to expose young adult students to good practice and good theory from the beginning. Pascal and Smalltalk are probably the most successful examples.

Another effort in this direction was the ABC programming language project of Geerts, Meertens and Pemberton at Centrum voor Wiskunde en Informatica in Holland. They list advantages of ABC in comparison to Pascal as 1) small, intuitive syntax 2) maps well onto design principles 3) terseness 4) support for refinement 5) no declarative statements and 6) interactive [5]. Along with these good ideas the CWI group had the inspiration to put the young Guido van Rossum on staff, and it is here that the Python story begins.

While much of the history of the Python community remains an oral history, we do have the following quote from Guido: "Over six years ago, in December 1989, I was looking for a 'hobby' programming project that would keep me occupied during the week around Christmas. My office ... would be closed, but I had a home computer, and not much else on my hands. I decided to write an interpreter for the new scripting language I had been thinking about lately: a descendant of ABC that would appeal to Unix/C hackers." [6] Python, then, is a combination of a well designed learning language and a practical scripting language.

COMPUTER PROGRAMMING FOR EVERBODY

Once Python had attained a certain momentum, Guido van Rossum under the auspices of the Corporation for National Research Initiatives applied for and received a small grant to support a project called Computer Programming for Everybody of CP4E, to investigate democratizing programming. The project was funded for a single year, half the anticipated duration, through DARPA. Guido and much of the core development team moved into the for-profit sector at aboutr that time as well. The proposal [7] lists broad objectives of developing high school and college curriculum, developing tools, and developing a user community, as well as many subcomponents of these objectives.

The motivation section is in the intellectual lienage of Papert and Kay:

===>
If we are successful, non-experts will be able use their computers and other intelligent devices much more effectively, reducing their level of frustration and increasing their productivity and work satisfaction. (New leisure possibilities will undoubtedly ensue as well!) Computer users will be able to solve their own computer problems more often, reducing the need for technical support.

Even if most users do not program regularly, a familiarity with programming and the structure of software will make them more effective users of computers. For example, when something goes wrong, they will be able to make a better mental model of the likely failure, which will allow them to fix or work around the problem. They will also be able to assess better when they can make the changes themselves and when they will need the services of an expert. They will be more able to converse with experts, since they will now share more of a common language. An analogy is obtaining basic literacy in automotive maintenance: you know enough to check your oil and add a few quarts if necessary, but you also know that you shouldn't try to change your own brakes. When the mechanic says "your rotors are warped and you need new pads," you understand what he is talking about.

If this effort is successful, there could be many millions, eventually billions of computer programmers, at various levels of proficiency. The effects this will have on the state of the art of software development is hard to imagine. The nature of software will change to accommodate the needs of these programmers, allowing customization through source code modifications--and personalizations will be plentiful.
<===

The funded CP4E project's principal achievement, was developing the IDLE system. This is not to be minimized, as IDLE remains the development platform of choice for beginners in many contexts.

Still, it must be admitted that many of the goals of CP4E remain unfulfilled to this day. The SIG that was centered on the project, while hosting many fascinating discussions, lost focus. Until recently, a fairly large number of fairly small projects were developed in and around the cluster of ideas that motivated CP4E and the edu-sig. Efforts to create a directory and a repository for this work have so far failed to reach critical mass. There appears to be a cat-herding problem, with each enthusiast having his or her own individual goals. That said, a great deal of fascinating work has been and continues to be happening, and quite a few young people have been exposed to Python as their first programming language and environment. Perhaps even more importantly, the mission of CP4E, and Python's role in it, has been an active goal for quite a few people in the intevening seven years.

The sidebar attemps, and surely fails, to be an exhaustive list of Python related education projects. It includes projects where Python is or has been used to develop a domain specific learning language or learning tools, or where Python is used as the language of discourse in teaching programming, or in using programming to teach other topics. It is limited to resources aimed at novice programmers who are not necessarily going to become technical or computing professionals.

WHY PYTHON?

Pulling together these Python as a First Language/CP4E experiences, formalizing them, and making a case for them in educational settings, remains somewhat
elusive. If we accept Dijkstra's admonitions that a first computing language is important to the inetllectual development of the student, it seems to those of us who appreciate Python for what it is. It's arguably our responsibility to get beyond "we like it because it is good" for the non-Python audience.

The Python community knows what it likes and is amazingly verbose and articulate in discussing this or that programming construct, but we have never been particularly adept at explaining our vision to those who have not experienced it. In researching this article, I made some effort to get Python First enthusiasts to explain the basis of their enthusiasm in the context of the novice programmer.

===
MORE
===


AUDIENCES AND OBSTACLES

In discussing the future of Python as a first language, we need to distinguish between several populations of novices:
1) a child working with a parent or other adult
2) a child working alone
3) a child studying a formal course in school
4) a college student studying a formal course
5) an adult seeking to achieve some personal software goal

These audiences have distinct constraints and distinct objectives. It seems clear that, except for very young children, foe whom a limited environment such as eToys or Alice may be of great value for more than a few weeks, Python is clearly a viable choice.

Python's competitive position is weakest in the second and third categories, for quite distinct reasons.

In the case of a purely self-motivated child, the child's immediate objective is to do something cool on a web page and email the URL to friends and family. Python is, of course, a very powerful weapon in the hands of the experienced programmer, especially in combination with the vast alphabet soup of frameworks and libraries available. Unlike the core language, though, this power does not scale down to simple applications. Most mass market ISPs do not support Python CGIs, and certainly don't support the likes of Twisted or mod-Python. Also, the libraries and frameworks, though powerful, are conceptually inaccessible to the novice. To the extent that frameworks like Django are easy to use, they probably move far away from Dijkstra' concepts of a pedagogically useful language, and at the extreme Zope/Plone is more of a bureaucracy than a development platform. Compare this with the ease of use and remarkably complete and accessible documentation of PHP, or the zero barrier to entry of Javascript, and we lose the budding web program to pedagogically less valuable languages. Perhaps we needn't worry about the self-motivated young programmer, though. Through their enthusiasm they will learn the limitations of their platform, and eventually move to Python or a similar language. As a youth I programmed in uglier things than PHP and yet lived to tell the tale.

More of an issue is the school. Adele Goldberg's PyCon keynote was largely a lament about trying to work within the US public school systems. She is giving up on it as a primary goal of her efforts, for a sad litany of reasons. Although her root causes were familiar to me (too much politics, too much fear, no room for experimentation), despite her sad tale she missed a couple of points that are relevant to adding a computing language to the curriculum that would not agitate the good Dr. Dijkstra. First of all, computing (except for advanced placement) is considered a vocational pursuit, not an intellectual one! This madness is endemic; Jeff Elkner's diligent pursual of all that is Pythonic within a public school system in Virginia all occurs in the context of a vocational track. Python is considered in competition with VBasic in this context. For college-bound students, Java has become the language of choice as a conseqeunce of the structure of the Advanced Placement examinations. (Everyone seems to agree that this is a pedagogical imporvement over C++, which presumably was as baffling to the teachers as the students.) The consequence is that despite the enormous scale of the school system, which would allow for rigorous experimentation and improvement, most schools are stuck teaching Java and VBasic.

In the home or the college, these constraints are not operative. Python First continues to gain momentum in these settings.

ENTER OLPC

Amid all of this mixture of success and frustration, a new five hundred pound gorilla has entered the room. The One Laptop Per Child[] initiative has promise of reviving the original vision of CP4E.

+++>

The project's origins go back more than four decades to the early days of computing, when most machines were still the size of small dinosaurs, and almost no one dreamed they would ever be suitable for children. But pioneering thinkers like Seymour Papert disagreed sharply, and over time led the long march from radical theory to reality proving the immense power of the personal computer as a learning tool for children.
<===

Even better, much of the system, and specifically the operating system GUI (called Sugar)[] will be based in Python. Some clever architecture will even allow the child to play with the code! (Of course Python is available.) The very large scale and funding of this initiative promise to provide new focus to the CP4E community.

OLPC does an end run around the school bureaucracies of developed countries. In less developed countries, bureaucratic and political obstacles may also be less developed. It provides a Python-friendly platform with massive distribution among children who have not seen code. It promises to enhance the prominence of Python and allow much larger scales of experimentation wioth pedagogic ideas, all the while being perceived as great fun.

It might not be in time to save the world, but we can hope for that too.

Wednesday, April 11, 2007

Python-First Educational Resources

OLPC and SUGAR

OLPC Interface Guidelines

OLPC/Sugar demo (video)

Sugar



OTHER PYTHON SOFTWARE

Childsplay

Crunchy

Guido van Robot

PataPata

PyLogo

RUR-PLE



PROGRAMMING FOR THE VERY YOUNG


Alice

OLPC-Squeak demo (video)

Squeak


VIDEO


Introducing Python

Various, Especially Python-in-Mathematics Videos - Urner



PRESENTATIONS


The computer revolution hasn't happened yet - Kay 1998

My presentation to the Austin Python User Group last week
- Tobis 2007


PAPERS


Models of Growth - Cavallo 2004

Using Python in a High School Computer Science Program
- Elkner 2000

A Personal Computer for Children of All Ages - Kay 1972

Promoting Computer Literacy Through Programming Python - Miller 2004 (dissertation)

Python First: A Lab-Based Digital Introduction to Computer Science - Radenski 2006

CP4E - van Rossum 1999


Teaching Scientific Programming Using Python - Williams (master's thesis)



WIKIS, BLOGS, ARTICLES etc.

C2 Wiki: Computer Programming for Everybody

Alan Kay and OLPC - Windley 2006

Interview with Jeff Elkner - Willison 2000

OLPC - IEEE 2007


PORTALS


python.org edu-sig

python.org beginners' resources

Python Bibliotheca



ONLINE BOOKS
and COURSES

An Introduction to Programming - Rollins

Software carpentry - Williams

How to Think Like a Computer Scientist: Learning with Python Downey, Elkner and Meyers, 2004; also available in book format

The LiveWires Python Course


PYTHON FIRST TEXTBOOKS


Learn to Program Using Python - Gauld 2001

Object-Oriented Programming in Python - Goldwasser and Letscher 2007 (to appear)

Introduction to Computing and Programming in Python, A Multimedia Approach - Guzdial 2004

Beginning Python: From Novice to Professional - Hetland 2005

Python Programming: An Introduction to Computer Science -
Zelle 2003

Monday, March 26, 2007

I: Pedagogical Advantages of Python

What experience do you have teaching coding to beginners using Python as the target language? Using other languages? Especially welcome are comparison/contrast of teaching with language X vs teaching with Python from a pedagogical point of view.

II: Pythonic Teaching Tools

What experience do you have using Pythonic tools (environments, libraries) as part of your teaching environment, regardless of the language that the students are learning? What advantages does python present you as an educational tool developer and/or deployer?

III: Attractiveness of Competing First Languages

What advantages do other languages have over Python in increasing the attractiveness of the language to self-directed learners? e.g., JavaScript's universal accessibility, PHP's ease of use and extensive documentation. Can these disadvantages be overcome, and if so, how so and how quickly?

IV: Institutional Competition

What advantages do other languages have over Python in their attractiveness to educational institutions? e.g., Java being the language of the Advanced Placement Test in the US, VBasic being perceived as the appropriate medium for vocational preparation. Can these disadvantages be overcome, and if so, how so and how quickly?

V: Pythonic tools

What existing libraries, tools and resources should the instructor proposing to use Python in education be aware of? What are the most important Pythonic libraries, tools, and resources are under development?

Why Pencil Science?

This is a blog about the nuts and bolts of computer literacy from a Pythonic perspective.

I would like not merely to defend the position that computer programming is "for everybody" but also to examine the proposition that Python is the appropriate vehicle for it.

Of course, "computer science is not about computers" but about formally expressing processes using symbols. The misnomer is consequential in how most people think about the question of the role of programming in education.

We don't teach children how to write because we expect them all to be professional writers. Professional writers are not opposed to literacy on the grounds that they will lose readership. We do not call the ability to write "pencil science".

Perhaps we should start, though. Maybe it would make the absurdity of how we misrepresent beginning software education as a vocational track more clear.

I am focusing my explorations on an opportunity to write an article for the Python Papers in the very near future. I'd like to use this blog, at least at first, as a gathering place for ideas from others. If you have anything you'd like to add, read on.

Many thanks
Michael Tobis