Skip to content

Instantly share code, notes, and snippets.

@rcoreilly
Last active October 21, 2019 08:24
Show Gist options
  • Save rcoreilly/e5c0f9d0c91beb6b120ef19e12b42266 to your computer and use it in GitHub Desktop.
Save rcoreilly/e5c0f9d0c91beb6b120ef19e12b42266 to your computer and use it in GitHub Desktop.
What is the Role of CS in a Liberal Arts Undergraduate Education?

What is the role of Computer Science in a Liberal Arts Undergraduate Education?

This is my perspective, as someone who has relied extensively upon computer science for my entire career (and life!) but who has never majored in CS (only "Cognitive Science") and who has recently joined the CS Department with a 50% affiliation, and is now in a position to potentially have an official opinion about such things (or at least 50% of one).

Disclaimers: I like to write out ideas as a way of exploring them (much like writing programs) and I haven't really thought through the implications of any of this for actual policy, and recognize that some / all of it may be really bad for the CS dept, and also that it clearly reflects my "end user" / "coder" perspective on CS. Also, much of this may be blatantly obvious but anyway it seems like at least it leads to certain conclusions that may be worth considering, in the context of current or future discussions of Data Science, etc.

Three main points:

CS is Universal, like Math

Math is taught throughout the entire sequence of education, from elementary school through college, because it is generally relevant to just about everything, from buying and selling stuff, to designing and making just about anything, running companies, planning for retirement, and obviously all the more advanced scientific fields, etc. The same is true of computer science. As we know, computers can do everything and anything (they are universal computational systems after all) and they generally make it easier and, in many cases, a good deal funner (graphics, etc) to do any kind of math, and lots of other things that turn out to be rather difficult with simple mathematical equations. Thus, CS should be taught along with math throughout the curriculum. There are movements afoot with coding camps and a few "hours of code" here and there, but really learning how to program a computer should happen in elementary school as part of the regular curriculum, and it should be incorporated at every step along the way. Graphical block-based programs can be used initially, and can bring basic mathematical concepts like "multiplication is repeated addition" etc to life (and in the process, iteration / looping is learned as well). Computers remove the major barriers of abstract symbols and painful hand calculation from learning math concepts -- not only will everyone benefit by learning how to program, they will also learn math better and more easily and a wider range of students will likely learn to at least like math when they see what kind of work it can do for them, to get programs to work. I've personally (re)learned (and more deeply understood) a lot of math just as a means to a programming end. By high school, 3D transformation and projection matricies (and thus the core of linear algebra) can be taught in the context of 3D game programming, for example.

By the time someone is in college, they should be able to augment every relevant subject with appropriate coding components. Almost every class can benefit from interactive simulations, and this is the approach I take to teaching Neuroscience and Psychology, which is very successful in bringing to life "advanced" ideas about how neurons and synapses give rise to things like memory and emotion. Very average Psychology students at large state universities can get these concepts when they sit down in front of colorful interactive simulations and explore with their own hands. And if everyone actually knew how to code, then we'd be able to do a lot more with such classes (right now the lowest common denominator is basic point and click stuff).

Given that we don't yet live in this ideal future, we have to deal with what we've got. But if we do agree with the basic principles of the above argument, then it makes sense that we need to do as much as we can for our current students, to integrate CS aspects into their overall educational experience.

CS at the University should be a Service to All

By the above argument, if CS == math, then we also need to recognize that, like math, CS "for the masses" != CS as an advanced academic discipline. A tiny fraction of people will ever go on to break new ground in math, and the work they do will be largely incomprehensible to the rest of us, who just learn math for its practical benefits. The same is true for CS. CS at the university level must recognize its essential role as a service deparment that helps everyone else get their work done, while still providing the intellectual environment for work at the academic frontier. Math departments do this routinely. And CS departments have the advantage that their advanced research is still a lot more practically relevant and fundable than math.

Having never been in a math department (much less CS) I have no idea how this service thing works out from a teaching staff perspective, but somehow it does -- maybe there are just a bunch of grad and even undergrad TA's or something? It may be more challenging for CS -- much of the core burden has already been pushed off into the earlier educational stages in math, so it isn't quite as bad as having to deal with rank beginners, whereas in CS we have to start with the bulk of students coming in with essentially nothing.

The above persepective may be extremely unpopular among (at least some of) my new CS colleagues, but I do think it is one of those inconvenient truths, and we should probably not try to fight it, but rather embrace it and do whatever we can to make it work for us.

CS is Data Science, put it all in the water

The CS that "the masses" need is not necessarily the CS that CS people typically want to teach. This is kind of a corollary to the above point, but goes beyond that. Currently, there is a lot of interest in something called Data Science, but nobody really knows what exactly it is. I think CS needs to encompass Data Science and all the other practical aspects of using computers to get stuff done in the context of other disciplines. In other words, DS == CS and both are equally hard to pin down, because, again, CS is universal and can (and should) do everything (including CS == math). Every time I feel the impulse to add the term Data in my code (e.g., to a variable or type name), I just have to remind myself that everything is Data and thus Data is meaningless as a term and should always be omitted. The code is always easier to read after that. Thus, by this principle, Data Science = Science and, yeah, I never add the term Computer to my code either, so Computer Science = Science too. The computer is implied.

In short, the CS department should, in its service mission, focus on teaching the practical computer skills that apply broadly across many disciplines, each of which has "Data" that needs to be understood, and phenomena to be simulated. These include:

  • Basic programming, obviously. And practical skills like using editors / IDE's, github, etc.

  • Organizing data into data structures that are efficient for different kinds of structures (tables, trees, etc) -- that's core CS, but the core of it is pretty simple too, so don't go overboard here -- just need the main ideas. The Go language for example is amazingly expressive with just an array (slice) and a map (hash table) container, and likewise the list and dict in Python are the workhorse core container types. Then you need something like a table (pandas etc) to organize multivariate / multi-type data, maybe a few key concepts from databases (indexing etc), and just the core of trees & graphs (leave most of it for more advanced courses -- not as universal as the data table).

  • Plotting the data so you can really understand it. Visualization is one of the most important benefits of computers, and the ability to easily manipulate and visualize data is an essential part of its general benefit across disciplines. Roughy 1/2 of the neurons in the brain are devoted to visual processing, and our most core, systematic understanding of abstract relationships is based on map-like spatial processing areas in the Parietal lobe. Getting data in a form that connects with this spatial reasoning system in our brain cannot be overstated as a major end goal.

  • Creating simulations to generate data so you can do "what if?" kinds of experiments, and really see what the implications of different possible hypotheses are. All of statistics can (and should) be taught in this way, starting with the simplest of repeated coin flips, gathering and plotting the results, etc. Then you really understand what the mean, variance, etc are, because you coded them up, and saw the normal distribution appear before your own eyes, with no hidden magic. Some of the best, most general-purpose data analysis techniques are "bootstrap" methods that are really just these kinds of generative models -- "raw" statistics is so much easier to understand than statistical equations! Can easily sneak in entropy and information theory here along with a basic understanding of probability.

  • The core multivariate toolkit: high dimensional data as a vector in n-dimensional space, rotation / projection along basis sets, PCA, regression, classification, clustering. There are really just a few core ideas here that again can be taught graphically and interactively through programming and are widely applicable across many disciplines. This is the entree into ML and AI, and pointers into that could be given, but as a "core" course it could stick to just these basics. Would be great to just touch on Fourier decomposition as a different kind of basis set -- can do so many things so efficiently in Fourier space, and complex numbers are really demystified when they end up just being a special kind of tuple.

All of the above really should be an integrated curriculum where you learn programming in the service of organizing, analyzing, and visualizing your data. Programming is especially indispensible for creating simulations, which really pushes the relevant concepts -- wasn't OOP invented originally for simulation? In one year of such an integrated curriculum, people could simultaneously learn all of these core concepts, and have the foundation for both CS and DS, and their own BS in whatever discipline they actually care about! Ideally, the students would use self-relevant data throughout -- i.e., they would always be applying these techniques to something they really care about, and asking and answering real questions.

If I was the Chancellor, I would just wave my magic wand and require all students to take this one year core course sequence, and provide the necessary resources to make it happen (ramping up over time etc). With this core foundation in place, classes in ML / AI, advanced statistics, advanced programming, data structures, etc would all be much more fun and interesting to teach, and all the other disciplines would be able to similarly up their game as well. Most of the new people hired in my field of Neuroscience and Psychology are well-versed in these core concepts of computer / data science, even if some of their more senior colleagues are not. Thus, having students in my classes be already adept at programming and basic data-science and statistical concepts would make it possible to teach more advanced domain-specific courses such as "analyzing brain imaging data" in a much more satisfying way.

Ok, that ended up being a bit more than 50% of a vision, but maybe some % of it is sensible..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment