Some thoughts for Ada Lovelace Day

This Scientific American article tells the tale of one of the genesis stories of complexity science, this one from 1952, describing what, until relatively recently, was known as the Fermi-Pasta-Ulam (FPU) problem (or ‘paradox’, though it is not in fact a paradox). It is now more commonly known as the Fermi-Pasta-Ulam-Tsingdou (FPUT) problem, in recognition of the fact that it was only discovered thanks to the extraordinary work of Mary Tsingou, who wrote the programs that revealed what, to Fermi, Pasta, and Ulam, was a very unexpected result. 

The team was attempting to simulate what happens to energy as it moves around atoms connected by chemical bonds. This is a classic non-linear problem that cannot be observed directly, and that cannot be solved by conventional reductive means (notwithstanding recent work that reveals statistical patterns in complex systems like urban travel patterns). It has to be implemented as a simulation in order to see what happens. Fermi, Pasta, and Ulam thought that, with enough iterations, it would reveal itself to be ergodic: that, given long enough, every state of a given energy of the system would be visited an equal number of times. Instead, thanks to Mary Tsingou’s work, they found that it was non-ergodic. Weird stuff happened, that could not be predicted. It was chaotic.

The discovery was, in fact, accidental. Initial results had shown the expected regularities then, one day, they left the program running for longer than usual and, instead of the recurring periodic patterns seen initially, it suddenly went haywire. It wasn’t a bug in the code. It was a phase transition, perhaps the first unequivocal demonstration of deterministic chaos. Though Fermi died and the paper was not actually published until nearly a decade later, it is hard to understate the importance of this ‘accidental’ discovery that deterministic systems are not necessarily ergodic. As Stuart Kauffman puts it, ‘non-ergodicity gives us history‘. Weather is non-ergodic. Evolution is non-ergodic. Learning is non-ergodic. We are non-ergodic. The universe is non-ergodic. Though there are other strands to the story that predate this work, more than anything else this marks the birth of a whole new kind of science – the science of complexity – that seeks to deal with the 90% or more of phenomena that matter to us, and that reductive science cannot begin to handle. 

Here’s a bit of Tsingou’s work on the program, written for the MANIAC computer:

Mary Tsingou's original algorithm design, drawn in freehand

It was not until 2008 that Tsingou’s contribution was fully recognized. In the original paper she was thanked in a footnote but not acknowledged as a co-author. It is possible that, had it been published right away she might have received proper credit. However, it is at least as possible that she might not. The reasons for this are a mix of endemic sexism, and (relatedly) the low esteem accorded to computation at the time.

The relationship between these two factors runs deep.  Historically, the word ‘computer’ originally referred to a job title.  As scientists in the 19th Century amassed vast amounts of data that needed processing, there was far too much for an individual to handle. They figured out that tasks could be broken up into smaller pieces and farmed out in parallel to humans who could do the necessary rote arithmetic.  Because women were much cheaper to hire, and computing was seen as a relatively unskilled (albeit very gruelling and cognitively demanding) role, computing therefore became a predominantly female occupation. From the 19th Century onwards into the mid 20th Century, all-women teams worked on astronomical data, artillery trajectories, and similar tasks, often performing extremely complex mathematical calculations requiring great precision and endurance, always for far less pay than they deserved or that a man would receive. Computers were victims of systematic gender discrimination from the very beginning. 

The FPUT problem, however, is one that doesn’t lend itself to chunking and parallel computation: the output of one iteration of the computation is needed before you can calculate the next. Farming it out to human computers simply wouldn’t work. For work of this kind, you have to have a machine or it would take decades to come up with a solution.

In the first decade or so after digital computers were invented significant mathematical skill was needed to operate them. Because of their existing exploitation as human computers, there was, luckily enough, a large workforce of women with advanced math skills whose manual work was being obsoleted at the same time, so women played a significant role in the dawn of the industry. Mary Tsingou was not alone in making great contributions to the field.

By the 1970s that had changed a lot, not in a good way, but numbers slowly grew again until around the mid-1980s (a terrible decade in so many ways) when things abruptly changed for the worse.

graph showing the huge drop in women in IT from the 1980s onwards

Whether this was due to armies of parents buying PCs for their (male) children thanks to aggressive marketing to that sector, or highly selective media coverage, or the increasing recognition of the value of computing skills in the job market reinforcing traditional gender disparities, or something else entirely (it is in fact complex, with vast self-reinforcing feedback loops all the way down the line), the end result was a massive fall in women in the field. Today, less than 17% of students of computer science are women, while the representation of women in most other scientific and technical fields has grown considerably.

There’s a weirder problem at work here, though, because (roughly – this is an educated guess) less than 1% of computer science graduates ever wind up doing any computer science, unless they choose a career in academia (in which case the figure rises to very low single figures), and very few of them ever do more mathematics than an average greengrocer. What we teach in universities has wildly diverged from the skills that are actually needed in most computing occupations at an even sharper rate than the decline of women in the trade. We continue to teach it in ways that would have made sense in the 1950s, when it could not be done without a deep understanding of mathematics and the science behind digital computation, even though neither of these skills has much if any use at all for more than a minute fraction of our students when they get out into the real world. Sure, we have broadened our curriculum to include many other aspects of the field, but we don’t let students study them unless they also learn the (largely unnecessary in most occupations) science and math (a subject that suffers even lower rates of non-male participation than computing). Thinking of modern computing as a branch of mathematics is a bit like treating poetry as a branch of linguistics or grammar, and thinking of modern computing as a science is a bit like treating painting as a branch of chemistry. It’s not so much that women have left computing but that computing – as a taught subject – has left women. 

Computing professionals are creative problem solvers, designers, architects, managers, musicians, writers, networkers, business people, artists, social organizers, builders, makers, teachers, or dreamers. The main thing that they share in common is that they work with computers. Some of them are programmers. A few (mostly those involved in designing machines and compilers) do real computer science. A few more do math, though rarely at more than middle school level, unless they are working on the cutting edge of a few areas like graphics, AI, or data science (in which case the libraries etc that would render it unnecessary have not yet been invented).  The vast majority of computing professionals are using the outputs of this small elite’s work, not reinventing it. It it not surprising that there is enormous diversity in the field of computing because computers are universal machines, universal media, and universal environments, so they encompass the bulk of human endeavour. That’s what makes them so much fun. If you are a computing professional you can work with anyone, and you can get involved in anything that involves computers, which is to say almost everything. And they are quite interesting in and of themselves, partly because they straddle so many boundaries, and ideas and tools from one area can spark ideas and spawn tools in another.

If you consider the uses of computer applications in many fields, from architecture or design to medicine or media to art or music, there is a far more equal gender distribution. Computing is embedded almost everywhere, and it mostly demands very different skills in each of its uses. There are some consistent gaps that computing students could fill or, better, that computing profs could teach in the context they are used. Better use could be made of computers across the board with just a little programming or other technical skills. Unfortunately, those who create, maintain, and manage computers and their applications tend to mainly come out of computer science programs (at least in North America and some other parts of the world) so many are ill prepared for participating in all that richness, and computing profs tend to stick with teaching in computer science programs so the rest of the world has to figure out things they could help with for themselves.

I think it is about time that we relegated computer science to a minor (not unimportant) stream and got back into the real world – the one with women in it. There’s still a pressing need to bring more women into that minor stream: we need inspirations like Mary Tsingou, we could do worse than preferentially hiring more non-male professors, and we desperately need to shift the discriminatory culture surrounding (especially) mathematics but, if we can at least teach in a way that better represents the richness and diversity of the computing profession itself, it would be a good start.

Originally posted at: https://landing.athabascau.ca/bookmarks/view/10624709/some-thoughts-for-ada-lovelace-day

Strategies for successful learning at AU

Earlier today I responded to a prospective student who was, amongst other things, seeking advice on strategies for success on a couple of our self-paced programming courses. My response was just a stream of consciousness off the top of my head but I think it might be useful to others. Here, then, with some very light editing to remove references to specific courses, are a few fairly random thoughts on how to succeed on a self-paced online programming course (and, for the most part, other courses) at Athabasca University. In no particular order:

  • Try to make sure that people close to you know what you are doing and, ideally, are supportive. Other people can really help, not just for the mechanical stuff but for the emotional support. Online learning, especially the self-paced form we use, can feel a bit isolating at times, but there are lots of ways to close the gap and they aren’t all found in the course materials and processes. Find support wherever you can.
  • Make a schedule and try to keep to it, but don’t blame yourself if your deadlines slip a bit here and there – just adjust the plan. The really important thing is that you should feel in control of the process. Having such control is one of the huge benefits of our way of teaching, but you need to take ownership of the process yourself in order to experience the benefits.
  • If the course provides forums or other social engagement try to proactively engage in them. Again, other people really help.
  • You will have way more freedom than those in traditional classrooms, who have to follow a teacher simply because of the nature of physics. However, that freedom is a two-edged sword as you can sometimes be swamped with choices and not know which way to go. If you are unsure, don’t be afraid to ask for help. But do take advantage of the freedom. Set your own goals. Look for the things that excite you and explore further. Take breaks if you are getting tired. Play. Take control of the learning process and enjoy the ride.
  • Enjoy the challenges. Sometimes it will be hard, and you should expect that, especially in programming courses like these. Programming can be very frustrating at times – after 35 years of programming I can still spend days on a problem that turns out to involve a misplaced semi-colon! Accept that, and accept that even the most intractable problems will eventually be solved (and it is a wonderful feeling when you do finally get it to work). Make time to sleep on it. If you’re stuck, ask for help.
  • Get your work/life/learning balance right. Be realistic in your aspirations and expect to spend many hours a week on this, but make sure you make time to get away from it.
  • Keep a learning journal, a reflective diary of what you have done and how you have addressed the struggles, even if the course itself doesn’t ask for one. There are few more effective ways to consolidate and connect your learning than to reflect on it, and it can help to mark your progress: good to read when your motivation is flagging.
  • Get used to waiting for responses and find other things to learn in the meantime. Don’t stop learning because you are waiting – move on to something else, practice something you have already done, or reflect on what you have been doing so far.
  • Programming is a performance skill that demands constant and repeated practice. You just need to do it, get it wrong, do it again, and again, and again, until it feels like second nature. In many ways it is like learning a musical instrument or maybe even driving. It’s not something you can learn simply by reading or by being told, you really have to immerse yourself in doing it. Make up your own challenges if you run out of things to do.
  • Don’t just limit yourself to what we provide. Find forums and communities with appropriate interests. I am a big fan of StackOverflow.com for help and inspiration from others, though relevant subreddits can be useful and there are many other sites and systems dedicated to programming. Find one or two that make sense to you. Again, other people can really help.

Online learning can be great fun as long as you are aware of the big differences, primarily relating to control and personal agency. Our role is to provide a bit of structure and a supportive environment to enable you to learn, rather than to tell you stuff and make you do things, which can be disconcerting at first if you are used to traditional classroom learning. This puts more pressure on you, and more onus on you to organize and manage your own learning, but don’t ever forget that you are not ever really alone – we are here to help.

In summary, I think it really comes down to three big things, all of which are really about motivation, and all of which are quite different when learning online compared to face-to-face:

  1. Autonomy – you are in control, but you must take responsibility for your own learning. You can always delegate control to us (or others) when the going gets hard or choices are hard to make, but you are always free to take it back again, and there will be no one standing over you making you do stuff apart from yourself.
  2. Competence – there are few things more satisfying than being able to do more today than you could do yesterday. We provide some challenges and we try to keep them difficult-but-achievable at every stage along the way, but it is a great idea for you to also seek your own challenges, to play, to explore, to discover, especially if the challenges we offer are too difficult or too boring. Reflection can help a lot with this, as a means to recognize what, how, and why you have learned.
  3. Relatedness – never forget the importance of other people. You don’t have to interact with them if you don’t want to do so (that’s another freedom we offer), but it is at the very least helpful to think about how you belong in our community, your own community, and the broader community of learners and programmers, and how what and how you are learning can affect others (directly or indirectly).

This advice is by no means comprehensive! If you have other ideas or advice, or things that have worked for you, or things that you disagree with, do feel free to share them in the comments.

Computer science students should learn to cheat, not be punished for it

This is a well thought-through response to a recent alarmist NYT article about cheating among programming students.

The original NYT article is full of holy pronouncements about the evils of plagiarism, horrified statistics about its extent, and discussions of the arms wars, typically involving sleuthing by markers and evermore ornate technological fixes that are always one step behind the most effective cheats (and one step ahead of the dumber ones). This is a lose-lose system. No one benefits. But that’s not the biggest issue with the article. Nowhere does the NYT article mention that it is largely caused by the fact that we in academia typically tell programming students to behave in ways that no programmer in their right mind would ever behave (disclaimer: the one programming course that I currently teach, very deliberately, does not do that, so I am speaking here as an atypical outlier).

As this article rightly notes, the essence of programming is re-use of code. Although there are certainly egregiously immoral and illegal ways to do that (even open source coders normally need to religiously cite their sources for significant uses of code written by others), applications are built on layer upon layer upon layer of re-used code, common subroutines and algorithms, snippets, chunks, libraries, classes, components, and a thousand different ways to assemble (in some cases literally) the code of others. We could not do programming at all without 99% of the code that does what we want it to do being written by others. Programmers knit such things together, often sharing their discoveries and improvements so that the whole profession benefits and the cycle continues. The solution to most problems is, more often than not, to be found in StackExchange forums, Reddit, or similar sites, or in open source repositories like Github, and it would be an idiotic programmer that chose not to (very critically and very carefully) use snippets provided there. That’s pretty much how programmers learn, a large part of how they solve problems, and certainly how they build stuff. The art of it is in choosing the right snippet, understanding it, fitting it into one’s own code, selecting between alternative solutions and knowing why one is better (in a given context) than another. In many cases, we have memorized ways of doing things so that, even if we don’t literally copy and paste, we repeat patterns (whole lines and blocks) that are often identical to those that we learned from others. It would likely be impossible to even remember where we learned such things, let alone to cite them.  We should not penalize that – we should celebrate it. Sure, if the chunks we use are particulary ingenious, or particularly original, or particularly long, or protected by a licence, we should definitely credit their authors. That’s just common sense and decency, as well as (typically) a legal requirement. But a program made using the code of others is no less plagiarism than Kurt Schwitters was a plagiarist of the myriad found objects that made up his collages, or a house builder is a plagiarist of its bricks.

And, as an aside, please stop calling it ‘Computer Science’. Programming is no more computer science than carpentry is woodworking science. It bugs me that ‘computer science’ is used so often as a drop-in synonym for programming in the popular press, reinforced by an increasing number of academics with science-envy, especially in North America. There are sciences used in computing, and a tiny percentage of those are quite unique to the discipline, but that’s a miniscule percentage of what is taught in universities and colleges, and a vanishingly small percentage of what nearly all programmers actually do. It’s also worth noting that computer science programs are not just about programming: there’s a whole bunch of stuff we teach (and that computing professionals do) about things like databases, networks, hardware, ethics, etc that has nothing whatsoever to do with programming (and little to do with science). Programming, though, especially in its design aspects, is a fundamentally human activity that is creative, situated, and inextricably entangled with its social and organizational context. Apart from in some research labs and esoteric applications, it is normally closer to fine art than it is to science, though it is an incredibly flexible activity that spans a gamut of creative pursuits analogous to a broad range of arts and crafts from poetry to music to interior design to engineering. Perhaps it is most akin to architecture in the ways it can (depending on context) blend art, craft, engineering, and (some) science but it can be analogous to pretty much any creative pursuit (universal machines and all that).

Address of the bookmark: https://thenextweb.com/dd/2017/05/30/lets-teach-computer-science-students-to-cheat/#.tnw_FTOVyGc4

Original page