Saturday, March 31, 2012

Open Ended Courses

This blog post describes an idea that occurred to me recently. It was largely prompted by quotes from the creator of KhanAcademy about learning naturally vs. what normally happens in the classroom. Given changes that are happening in the educational marketplace, I feel that schools are going to have to change things to address this. One thought that has occurred to me is the introduction of open ended courses that don't have the normal time restrictions that have been part of the teaching for decades.

Bicycles and Unicycles
The story that Sal Khan likes to use is one of teaching a kid to ride a bike. You don't have a certain day where you test him/her on the bike, and if the student falls you give a D and move on to unicycles. However, that is what we do in classes. I have ~15 weeks to cover a certain amount of material. At certain dates that I pick in advance, I give tests. Based on how much the student has learned by those dates and their ability to communicate that learning on the test, they get an appropriate grade. After that, I move on. Those students who did poorly can redouble their efforts, but they are then left trying to learn what they didn't get down previously along with the new material we are moving into. In Khan's analogy, they are practicing both bicycle and unicycle at the same time.

Is there any way to fix this? I think that the problem comes from two aspects of the current course. The most obvious is that there is a definite time limit, and generally it is a fairly short one. All courses march in this lock step of one semester/quarter to the next with grades given out at the end.

The other part of the problem is that the standard lecture format has a distinct lack of personalization. At a school like Trinity, I get to have classes that are generally in the 10-20 student range. If students choose to, they can spend a lot of time with me outside of class. That is good. That does allow personalization. However, my lectures and tests are universal for all students in a given course. They happen on the same day and cover the same material, regardless of how fast an individual student is moving.

I can make arguments that this isn't a problem. In the "real world" there are deadlines and things have to be done by certain times. However, I still find Khan's analogy to be persuasive and the honest truth is, learning is different from real world application. Should I care so much when a student learns things or should I focus on the fact that the student can learn them?

This has led me to the idea of open ended courses. Students sign up with a professor to learn a certain amount of material. Assessment is done individually. The only end date might be something like the graduation date. Transcripts would probably need to indicate what has been completed as well as what has been signed up for, but not completed. There is no lock step though. Students finish a course whenever they decide they are done and demonstrate as much mastery as they have attained at that time.

Anyone who teaches and is reading this might well say that is an interesting idea, but how do you actually pull it off? In some ways, it just seems impractical. I think the answer to this is demonstrated by what Sal Khan has put together in the KhanAcademy.

Inverted Lectures
Video lectures have been moving into University classes for a while now. There are terms like "inverted lecture" to describe ways of using them. Teachers know that asking students to read books outside of class and show up with the knowledge generally fails. Part of that is because books are so non-dynamic. Video lectures are more dynamic, and they can be paired with automated assessment so that students have an idea of how much they have really learned before trying to move on.

I am working to build a set of these types of lectures for my textbook, "Introduction to the Art of Programming Using Scala". My hope is that by fall 2012 I will have over 100 short lecture videos up at the book website and that I will be able to organize my own courses largely using the inverted lecture format.

I don't think it is a huge step from the inverted lecture format to open ended courses. There can still be meeting times and an intended pace. the meeting times aren't filled with logic, they are filled with application or discussion of material. In my own courses, I intend to present problems and ask students to apply what they have learned to write programs to solve those problems. I will critique their solutions and optimally I would like for students to work in pairs and see code written by other students.

The main hurdle is not delivering content, but assessment. One has to create a method of assessment that students can do when they are ready, on what they are ready to approach. I really believe that the ideal form of assessment in most areas is the oral exam. So I might dedicate several hours each week to giving oral exams. Students could sign up for times in advance and each course would have a certain number of exams that students have to get through to complete the course. In CS it would certainly also be possible to have some automated assessment where students have to write code to solve problems. That type of system could be set up fairly easily and used both for student practice and for formal assessment.

Still Need to Teach
Less anyone thinks that the inverted lecture is a way for faculty to get out of teaching, I can assure you that I will spend several times as much time preparing video lectures as I would delivering lectures in a semester. What makes this different from just pointing students to KhanAcademy or Codecademy is the time spent in class. Faculty become more like learning coaches, especially for courses taken by many students.

For example, anyone who adopts my textbook, inside or outside of Trinity, could use my video lectures. That does remove the burden of content creation from them. Then again, most faculty don't write their own textbooks so that isn't a huge change. The real change is in how they spend their time with students. They can spend it doing things that are more individualized. They can look over what the students are doing and provide feedback individually because they are not spending their time lecturing to students en masse. I also think that they will spend a lot more time on individualized assessment, doing things like oral exams.

No Traction
The one place where I threw the idea of the open ended course out among my peers, it got no traction. Even though it was a group looking to change curricula, it didn't go anywhere. I think it might be a bit too big a departure from the status quo for many to accept. However, given the possibility of an "Education Bubble", I think all ideas should be on the table. In case you aren't familiar with the idea of the education bubble, I'll write another post about that with evidence for and against, as well as my thoughts on what colleges need to do to make sure they aren't destroyed by it bursting.

Of course, one could do just about everything I've described here on a rigid semester schedule. Indeed, I plan to start moving that way next year. However, I think the approach really takes off if it is applied to a large number of classes on a campus, and we do remove the artificial time bounds.

Show me the Money
This has some interesting implications for both colleges and students when it comes to money. Currently students pay for courses. At Trinity a full-time student pays a fixed amount for anywhere between 12 and 18 hours. Taking fewer or more leads to paying per hour of credit. In this open ended course model you don't pay per course. Instead, you pay to be on campus and have access to the resources. Students can go through the curriculum at their own pace, but then it is a matter of cost. Top students might fly through and graduate in two years. Other students take longer. Taking longer is a luxury they would pay for. They will want to focus on subjects they learn more quickly in. If there is a subject a student finds very challenging though, they can go for the minimum grade to get it off their plate or they can push through using more time until they have mastered it for full marks.

What do you think? Should college courses be open ended? What implications do you see that having that I haven't mentioned here?

Saturday, March 17, 2012

Modern Automation, Similarities and Differences to the Industrial Revoltuion

Setting the Stage
I write a fair bit in this blog about how technology is disrupting the world, including the role of automation in the economy. Some comment discussions on Google+ and Facebook have led me to some new thoughts comparing and contrasting the current situation with what happened around the 1920-1930s in the US as the industrial revolution automated agriculture. Prior to that time, the majority of the workers in the US worked in the field of agriculture. When automation changed that, it caused serious economic hardship, and it took a significant period of time for people and the economy to adjust.

Things Did Adjust
When you talk about technological unemployment, many economists seem to like to point to the industrial revolution as the classic example of how the disruptions of technology cause temporary pain, but lead to greater overall economic growth. The purpose of this post is to look a bit closer at some features of how that worked, and compare it with the current situation.

The bottom line is that the economists are correct in their statements about the industrial revolution. The economy did adjust to automation and become more robust in the end. However, I think a major part of that adjustment was in the form of education. If you were living in rural America in 1910 (as the majority of Americans did at that time), you probably didn't get past 8th grade if you even made it that far. There simply wasn't a need to. You were going to work on a farm. You probably wouldn't need to read, much less use algebra or trigonometry. What is more, the people you trusted, like your parents, were probably telling you that you would be better off leaving school and starting to develop "real world skills" for those jobs on the farm. They didn't lie to you, that was sound advice is 1910.

Between 1910 and 1930, the industrial revolution moved into agriculture and that advice stopped working. The jobs in agriculture went away. One man with a tractor could do the work of 100 without. As economists love to point out, new jobs were created. Those new jobs were in factories in cities. The problem was, those jobs required a bit more education. You definitely needed reading and there were a growing number that did require algebra and trig. The people designing the machines, and there were a reasonable number of them, required a lot more than that too. So now people needed more education to get the jobs.

Down, But Not Out
People don't learn overnight though. You had a bunch of people from out on the farms who are in the wrong place and have the wrong skills. It takes a while both to move those people and teach them a new skill set. I want to focus on the learning part as that is more my area. It takes a number of years to get a kid from 5th grade level to 8th or 12th grade level. It really isn't faster for adults either. So you have a period where there aren't enough people with the right skills and a lot of people with the wrong ones. It takes time to build a more educated workforce and things sucked in the meantime.

What really sucked was to be one of the last group of kids who were told to drop out and learn to farm in 4th grade only to find a few years later that all the local farms were automated and your skill set wasn't needed anymore. If that was you, you had to put in a lot of effort to build the skills needed for these new jobs. You were down, but you didn't leave school in 4th grade because you were incapable of going further, you left because you were told you didn't need to go further. So with some effort you could gain that knowledge and pick yourself back up.

Changing Advice on Education
The thing is, in 1930, there was a lot of potential in the US public for improving skills through education. Most people were undereducated. They hadn't reached their potential because they didn't need to and were advised against it. Somewhere around the 1950s, kids were being told that they really needed to graduate from High School to find jobs. By the 1980s, you needed to go to college to get a good job. By 2000, college wasn't seen as the key to the good jobs, it was the key to almost every job. We had moved into the information age and High School counselors were telling students that if they didn't get some college they were doomed to lower-end jobs.

One result of this is that the US is probably close to maxed out on education. There are inevitably some things that can happen to help certain students go further. There are definitely things that can be done to make the whole process more efficient. However, I don't think this is an area of huge untapped potential. I don't see any technology that is going to take current High School dropouts and turn them into Ph.D.s in STEM fields.

New Round of Automation
Automation has been ongoing since the beginning of the industrial revolution. We now have a mere 2% of the US population working in agriculture. Automation in factories did to certain segments of manufacturing what the tractor had done to agriculture. However, none of these later moves to automation have had quite the same impact as the automation of agriculture did around 1930, because none of them have hit such a broad segment of the population. Nothing has hit since then with the ability to disrupt 30+% of the population in such a short period of time. Nothing until today that is.

I personally believe we are at the leading edge of a decade that will disrupt the jobs of close to 50% of the population. It isn't a single product like the tractor that will do it. Instead, it is the combination of more capable computer AI software with more functional robotics. The single biggest aspect is that the AI is becoming able to handle the unexpected, and make the robotics work in unpredictable environments. The details of this argument make a whole separate blog post. What I want to focus on here is the impact of this and how society can or can't adapt.

Not a Repeat of the Past
I think the stories from the Occupy movement of people who had degrees and couldn't find jobs are a parallel to the kid in the 1920s who was told to drop out of school and start working the farm. While it is easy to take a condescending view of the 20-somethings who racked up a whole bunch of debt majoring in some field from the Humanities and can't find a job today, doing so is not only non-productive, it really isn't fair. Those kids grew up being told that they should get a college degree in something they loved and that would get them a job. That advice has worked for decades. The people giving the advice didn't lie, they simply didn't have 20/20 foresight into the future. (Something it is impossible to blame people for.)

There is a difference between today's occupiers and the unemployed farm hand of 1930 though, the unemployed farm hand had a lot of untapped potential when it came to education. The youth of today typically don't. Yes, they could go learn something different to give them more desirable skills, but I fear that doesn't scale the same way. Plus, many of these people chose the direction they went because they found that those other areas (which might be better for jobs) didn't work well for them.

Where Does This Leave Us?
So if you buy the argument above, we are hitting another time of significant disruption when large fractions of the US population will be put out of jobs, much like they were 80 years ago when the economy underwent huge change. Unlike 80 years ago, we can't just send them all back to school to further their educations, most people have basically maxed their education potential. This seems like a bleak outlook. What makes it even worse is that I'm not even throwing out the idea that computing power is growing exponentially and that if people do try to retrain, they will have a hard time learning enough of what they need before the AI becomes capable of the job they were training for.

My own thoughts on where this leaves us have changed a fair bit over the last 8 months. In some future blog posts I'll go through a few ideas of things I see as possibilities. The interesting aspect of these possibilities is that many of them are quite positive and lead to people having a better overall life.

Tuesday, March 13, 2012

Proving the Value of Higher Education

Last year, 2011, a law went into effect requiring colleges and universities to post a cost calculator on their web pages. ( The goal being that people planning to go to college should be able to make an informed choice and understand their likely costs. In this blog post I am going to propose another law that goes a step forward.

In many ways, the costs of college have always been fairly transparent. However, I know people in admissions think that the cost calculators could have as big an impact on recruiting as rankings had when they were first introduced. What is far less transparent about college is what you get out on the other end. The What's It Worth? study showed correlations between degrees and earnings across the nation, but modern technology should allow this to go much further. Most importantly here, it should allow us to get measures of what people earn after leaving different schools with different degrees.

I learned about the cost calculator in a meeting of the admissions committee at Trinity University. The cost calculator is a big deal for us because Trinity is not cheap. The standard argument is that a liberal arts education prepares students to go on to very successful lives. What struck me as unfortunate is that we can do little more than provide anecdotes to that effect. While most Universities, including Trinity, have active alumni associations, it simply doesn't fly to ask everyone how much money they make. However, thanks to modern computing technology I think that with very minimal support from the federal government, it would be possible to get that information in a reliable and anonymous way.

The scheme I have in mind relies on the fact that colleges and universities have the Social Security Numbers of their graduates. It also requires that the IRS help out a bit. The colleges would request income information for groups of people. Ideally I see these being groups based on major and years of graduation. The IRS would provide only a median income level for the group, and perhaps quartiles if the group is large.

To preserve anonymity, groups need to have no fewer than 50 people and the IRS need only provide information back if it has data for at least 30 of them. I feel like groups should also include at least one full major for at least a five year window. Smaller schools and smaller majors will need to group things to make the 50 person rule. They might choose to group several related majors or to make windows of 10 years instead of just 5.

Requests for data could only come from accredited institutions, and there would be significant penalties for falsifying anything. That would prevent an institution from putting a single person into more groups than they should be part of to bump thing up. The use of median and quartiles instead of mean is also significant here. The exact levels of income at the top and the bottom are unimportant so a single billionaire can't throw things off.

Of course, this would only track income in the US so it couldn't follow people who go to work abroad. I'm sure there are a number of other possible pitfalls as well. However, it seems to me like a very plausible, low cost way to really show the value, or lack thereof, in the higher education provided by a particular institution. If the federal government is forcing schools to provide cost calculators with the idea of helping to inform and protect the consumer, this seems to me like the next logical step to provide actual information on financial benefit. What is more, the cost to the IRS would be extremely minimal and the cost to colleges and universities should not be all that high either. The information is already being stored in computer systems capable of far more complicated tasks. Even the software required would be simple to write.

What do you think? If you like the idea, suggest it to your US congress people or maybe just send this blog post to

Monday, March 12, 2012

My Actor Epiphany

One of the great strengths of Scala is that is contains support for multiple different forms of parallelism. You have access to the Java thread libraries for anything that you want to do at a low level. However, you also have built-in data parallelism through the parallel collections and support for the actor model as well. At a certain level, the actor model is fairly simple, an actor is like an object that can have a thread associated with it so that different actors can be doing things at the same time. It was a model that I had imagined using without really knowing about it. However, having a description of something isn't the same as really understanding it. A few weeks ago, while working on project descriptions for my book, the real implications finally clicked.

Before going into the details of the moment of epiphany, let's dig a bit deeper into the actor model. With normal objects, you make the object do something by calling a method. For actors, you send a message. The syntax can be similar, and they sound very similar, but there is a huge difference in semantics. When you call a method on an object, the current thread moves over to run the code in that method. When you send a message to an actor, the current thread stays with the current actor. The message will be processed by another thread. Typically, messages do not have "return values." They can, but this impairs the parallelism so you want to avoid it is possible. The message gets placed on a queue for the actor and that actor will get to the message in the order of the messages it has received. If a response is needed, a message can be sent back to the original actor.

To make the actor model work, one of the key aspects is that if you are going to have mutable data, it exists in a single actor. You never allow two separate actors to mutate the same data at the same time. That way you avoid race conditions. In Scala this is often done by making sure that all messages are immutable and you never call methods on other actors. Actors only interact by sending immutable messages (typically case classes).

This was all in my head, and it all made sense. However, I can say that I didn't really grok it until I started picturing the MUD project using actors. For those who are not old enough or weren't geeky enough when they were younger, a MUD (Multi-User Dungeon) is multi-user text-based RPG. Normally a MUD was pretty hack-and-slash. There were other things like MOOs that were more about the role-playing part. Think of World of Warcraft with text instead of graphics.

The normal object-decomposition of a MUD has characters, rooms, items. Characters move between rooms and pick up items. The simplest implementation of this uses one thread to handle the networking part of logging in and a second thread to run the game loop. You keep a sequence of characters and run through them. You could also have a priority queue and use events for scheduling. The bottom line of this approach is that it has one very busy thread and one thread that is mostly asleep. It does not scale up.

So my naive thought on making it actor based was to make the characters into actors. After all, they are the things moving around and doing stuff. If they are actors, they each get their own thread and things start happening in parallel. There is only one problem, what happens when two players do something at the same time that deals with the room they are in? For example, they both go to pick up the same object at the same time. That is a classic race condition. Now, it really isn't a problem when one character or the other gets the item. In fact, threads are probably more fair than the normal loop where the order of the sequence will determine who actually gets the item. The problem is that if you make normal method calls on the room, then you can have a situation where both characters get the item because the race condition overlaps the activities. That is not acceptable. Putting in standard synchronization seems the wrong way to go. Actors are supposed to have to prevent you from doing that.

The answer is, of course, very simple. make the rooms into actors as well. This isn't mind blowing, but when the full implications sunk in for me, it really helped me see how the actor model works in general. Now when two characters go to pick up the same items, they send messages to the room. Those messages get queued in a particular order. When the first is handled, it removes the item from the room and sends a message back to that character saying they got the item. When the second message is handled, it finds that item is no longer present and sends back a message to that effect. The end result is exactly what we want. All threading problems go away and the system can now scale to very high concurrency. The key idea here is that you need to broaden the image of what should be an actor. Actors are not just the things that are active. They are also anything that might be acted upon by two actors at once.

I'm still trying to figure out if I can do rings simulations using actors. Perhaps I'll try that some this summer using Akka 2.0. If I find anything that works, I will definitely blog on it.