Women in Technology

Hear us Roar

Charming Pythonistas

by Anna Martelli Ravenscroft

Anna Martelli Ravenscroft has a background in training and mentoring, particularly in office technologies.

Women are woefully underrepresented in IT. With few exceptions, women represent less than 30 percent of the IT workforce in most countries, while comprising approximately half the workforce. Even worse, undergraduate enrollment in CS majors has trended downwards, from 36 percent of US graduates in CS down to only 17 percent in 2004. Commonly cited barriers to entry of women into IT include discrimination, low self-efficacy, perceived difficulty, lack of role models and mentors, the "geek" stereotype, and even the definition of IT itself. The issue is of concern to our industry and is being studied extensively. Proposals and projects to overcome the barriers are springing up all over the world, with varying areas of focus, from middle-school girls to retention of experienced women engineers.

In the late 1990s, Carnegie-Mellon University was able to improve entry and retention rates significantly. What worked for them? Here's some of their advice from their groundbreaking study described in Unlocking the Clubhouse: "Programs should provide mentoring and community, multiple pathways into the curriculum for students with differing levels of experience, a high quality and positive learning environment, and should develop a culture that supports and celebrates multiple approaches to the study of computer science. Paint a Broad Picture of Computer Science: ...many prospective students, including some of the most enthusiastic, inherit from high school and society a narrow notion of computer science as focused on computers and on coding. Introductory courses that use integrative projects that focus on principles over programming, or that link science to applications, help broaden students vision."

These suggestions are echoed by other researchers, but they can be applied in many ways. I propose another way: leverage the strengths of an easy to learn, intuitive programming language that has an active, inclusive community base, namely Python. A free and cross-platform (usable on Mac, Linux, and Windows) programming language, Python is simple, elegant, and powerful. It doesn't require a Ph.D. in CS to understand and use effectively unlike, say, Haskell. It is easily learned by newcomers to programming (unlike Java, C, or most particularly C++), but (unlike Pascal and other "teaching languages") is powerful enough for diverse organizations from Pixar to NASA to use as production languages. Python "fits your brain" and "comes with batteries included," slogans that refer to the simplicity and ease of using Python for a variety of tasks. Let's look at how Python can be used to address several of the obstacles to women's entry into IT.

Program for Success

Studies have shown that women tend to have low self-efficacy, to underrate their ability with computers, and even to view CS as more difficult than surgery! To combat this, we need to incorporate programming earlier and more extensively in middle school and high school curricula, using a language such as Python. Most programming languages require a great amount of abstract or technical detail and knowledge to do even the simplest tasks. Python strips away the cruft and allows you to program the way you think. A task you could assign a second grader, such as "print 'hello world'," is just as simple as it sounds when you use Python:

>>> print "hello world"
hello world

Doing that simple task in most languages would require at least five lines of code, mostly overhead unrelated to the actual task. In even a slightly more complex program, such overhead may overwhelm the beginner, leaving them needlessly confused and frustrated.

Another advantage of Python: you don't have to compile a program first, waiting to find out whether it worked (compilation happens automatically and transparently whenever it's needed). Furthermore, an interactive console comes with every installation of Python, letting you try out commands on the fly and encouraging the kind of playing around that leads to increased familiarity and comfort: it's much easier to play with a computer when you're sure you won't break the computer while doing so.

Yet, Python doesn't stop at the beginner level. Python's recommended coding style lends itself easily to unit-testing and refactoring, which empowers any programmer (even a beginner) to test and improve her code. Python allows programmers to progress from easy to more complex tasks, without over-complicating the code. This process inspires creativity, learning, and yes, passion. This is an important consideration, as Kathy Sierra points out in her popular blog, Creating Passionate Users:

If the thing you want users to become passionate about is simply too easy, without enough opportunity for continuing challenge and growth, they'll get bored. It's not worth it. And if the thing you want them to be passionate about is too hard, they'll get frustrated. It's not worth it. This is tricky, because you have to find ways to balance that challenge level, while also providing opportunities for your users to keep getting better.

The key to inspiring passion is to have something worth learning, and a way for that learning to happen.

Too many newcomers to IT are bored or frustrated, rather than challenged and inspired, which ends up killing their motivation and interest. Python provides an easy path for passionate learning to happen.

You're Not Alone

In direct opposition to the "loner" programmer stereotype, Python has many mailing lists, web sites, and newsgroups (in several languages) that are welcoming to newcomers, women and men alike. Python.org reaffirms the community aspects of Python: "The only thing more fun than programming in Python is exchanging information and ideas with other Python users. The Python community interacts in many different forums, both online and in the real world." There's even a special list just for people learning Python, called Python Tutor. "People interested in learning about programming with Python are encouraged to join," according to Python.org, "as are experienced users interested in helping others learn." The Python Software Foundation and local Python groups hold conferences in various locations around the world, and they encourage sprints (weekend to week-long get-togethers for working [coding, debugging, testing, designing] on particular issues). Sprinters spend time chatting, eating, touristing, and otherwise socializing, as well as a lot of time developing code together to solve a particular problem or set of problems.

Agile Programming, a relatively recent movement in software development, encourages pair programming, collaboration, sustainable development, as well as other woman-friendly methods. No longer does the "solitary coder in the basement" hold sway. Pair programmers work together, one typing the code, both designing and watching for bugs. Collaboration with other pairs, and with end-users is encouraged. In addition, "the agile method inspires a productive and efficient working environment without long work hours." More generally, agile methods emphasize individuals and interactions over processes and tools, as described by the Agile Manifesto, and identify the team, not the individual, as the main actor. Educators are discovering that encouraging the use of agile methods--such as pair programming--in middle school and high school-level courses leads to increased interest and enjoyment of the courses by girls.

Python is particularly well-suited for these agile development practices. With its clear, readable syntax, someone (even without a lot of experience or background) can easily read another's program and know what it's doing, facilitating pair-programming and other collaboration. A sustainable pace can more easily be achieved since Python "offers high productivity for all phases of the software life cycle: analysis, design, prototyping, coding, testing, debugging, tuning, documentation, deployment, and, of course, maintenance," as described by Alex Martelli in Python in a Nutshell.

Exploring the Multidisciplinary Nature of IT

Python is particularly well-suited to exploring the breadth of IT. Python is perfectly at home in web design (with many frameworks to choose among, from the straightforward user-friendly Django and Plone, to the more rich and complex Twisted), psychology experimentation (Vision Egg and PsychoPy among others), database design (Dabo), game creation (PyGame), text processing for literary analysis, a Natural Language Toolkit for linguistic analysis, financial accounting, Geographic Information Systems (GIS), and even more fields. The Python culture embraces all these ways of doing IT and provides a single, easy-to-learn language for accomplishing a wide variety of goals, increasing the ease of interdisciplinary collaboration. Python allows the use of programming as a tool, rather than as a lifestyle, encouraging experimentation and providing alternative entry points to prospective programmers.

Programming for Everyone

What is the common thread in these proposals (besides my own admitted passion for Python)? These interventions are not tailored exclusively to women. Improving the field for women can be achieved by improving the field for everyone--geeks, non-geeks, minorities, men and women. Python encourages exploration and promotes creativity, for everyone. As a pythonista, I encourage you to introduce a young friend to Python. (No, not the Fibonacci Sequence or the Sieve of Eratosthenes [unless she's a mathematician]; find something she is interested in.) If she knows that she can accomplish something she finds useful and interesting, she'll be more likely to stick with it. She may even become interested in pursuing IT as a career. But regardless of whether she becomes a professional programmer, she's got another tool to achieve her own dreams. And isn't that what it's really about?

Series creator and editor Tatiana Apandi Recommends: Reading this article by Gloria W. Jacobs who also professes her love of Python.

The Python Community that says, "The only thing more fun than programming in Python is exchanging information and ideas with other Python users." Get in on that fun at http://www.python.org/community

Helping to empower any girl interested in math, science, and technology, by sharing Girlstart with her.

Return to Women in Technology.