Death and Stories

Yesterday, I lost a friend, Paul Tjogas, a man who was very good in every sense of the meaning. He spent his life helping others, remained positive, asked questions instead of pretending he had all the answers, was respectful of others, and had a sense of ethics that was beyond reproach. Even though I hadn’t seen Paul as much as I would have liked since moving from Berkeley to the Peninsula, I enjoyed the time I was able to spend with him.  I will miss him and my heart goes out to his wife Deb and his children, Chloe and Darryl.

In 2008, Randy Pausch of Carnegie-Mellon University did his famous Last Lecture, which was mostly intended for his kids.  It’s an amazing presentation.  Randy passed away less than a year later.

Paul, like Randy, had pancreatic cancer.  It sure would help if someone could find a cure.  We don’t need good people to die before their time.

I don’t have a fatal disease, but I do have Crohn’s, and given the number of trips I have had to the emergency room over the years, I occasionally wonder how much time I have.  I’ve decided that when I go–preferably a long, long time from now–I’d like to leave stories behind.  Randy left his online for the world to see.  Paul, I’m sure, left behind great stories for his family.  I should have a lot of time to work with, but stories don’t write themselves, so as mine pop into my head, I’m going to dump them here.

I’m also going to write about CS education, politics, sports, and anything else that pops into my head, but I want to make sure to pass on life lessons.  To borrow from my favorite demotivational poster:

“It could be that the purpose of your life is only to serve as a warning to others.”

Lordy do I have plenty of warnings.  And some positive stuff, too, in case my man Roni Habib is paying attention.  I shall post them here.

 

The 2016 AP Computer Science A Test Reviewed by an Old Curmudgeon

I did the AP Computer Science A free response test while watching basketball, baseball, and hockey games on the teevee.  It took me about 3.5 hours, but that included an overtime basketball game, an overtime hockey game, a triple-overtime hockey game, and a lot of channel-switching.

Realizing that it is much easier to be an armchair whiner than it is to write a test of this nature, this test still warrants criticism.  To the credit of the AP people, they listened to people and recognized that the multiple choice portion of the test was too long for the amount of time provided and they moved from 75 to 90 minutes this year.  They also recognized that the free response portion of the test was too short–it really was way too short for years–and they reduced the amount of time for that from 105 to 90 minutes.  So far so good.

The problem is that if you are going to write a 90 minute test, it should probably mean 90 minutes for a good computer science student, not 90 minutes for a good computer science teacher.

For the reader with some programming expertise, it probably makes sense to have a browser tab open with the test to follow along.

QUESTION: Did anyone give this test to high school teachers to find out how long they thought it would take?  I’m serious about this.  I just went through a thread on Facebook where top teachers at top schools were expressing concern about how long the test took them and the kinds of errors they made.

QUESTION: I thought I taught topics other than string operators this year.  Was this a mistake?  I’ve never written a test with this much emphasis on strings and I hope I never come close.

#1: My students should do pretty well on this problem.  (Maybe I’ll learn whether they internalized it based on the test results.)  I’ve actually been giving this problem as homework for about a decade, but returning random, unique numbers instead of Strings.  If you’re curious or want to use it yourself,

http://paleyontology.com/AP_CS/randp.html

#2: Good luck to the ELL student and the student who gets bogged down in terminology.  This problem could have been written in about 1/3 of the space used on this test.  Just get rid of the MessageLog reference.  It’s superfluous.

In case a test writer is reading this, PLEASE be nice to ELL students.  Make sure that what you are testing is whether they understand the big ideas and core topics, not your festive tangent that includes unfamiliar and irrelevant terms.

#3: I enjoyed this one, which may be because I like crosswords. I wonder how much my familiarity with crosswords saved me time trying to understand this problem.

It is much nicer doing this problem with Eclipse than it is to do it on paper. I lost a point on the first pass for failing to properly create an array, but it was an easy catch with the NullPointerException displayed by Eclipse.

// RANT ON //
CAN WE PLEASE GIVE STUDENTS AN ORGANIC TESTING EXPERIENCE THAT INCLUDES AN INTEGRATED DEVELOPMENT ENVIRONMENT?  YOU KNOW, LIKE HUMANS USE TO DO PROGRAMMING NOW THAT IT IS NO LONGER 1981 AND WE NO LONGER NEED PUNCH CARDS?  CHECK THIS OUT!  IT’S FREE!
// RANT OFF //

#4: Imagine being a student who is feeling time pressure when landing on that first page of this problem with all those explanations, instructions, and examples. Is that how settlers felt after traversing 2/3 of the United States only to encounter the Rocky Mountains?

QUESTION: Why do we think our standardized test is any better than all of the ones that people rail against?

What is the Difference Between Functions and Procedures?

[Note: Hadi Partovi and Baker Franke of Code.org contributed a lot of this and Emmanuel Schanzer offered ideas.  I don’t really know how to assign credit to specific pieces, but I want to make sure to acknowledge their efforts.  Editorial comments about possible implications of the vocabulary issues are mine.  — JEP]

In mathematics, the word “function” means this:

For a consistent set of inputs, a function returns a single, consistent output.

Notationally, a function is typically a single letter such as f, g, or h, followed by parentheses containing parameters such as x, y, and z.  The parameters are generally referred to as variables in a high school math class.

For example, if f(x) = 2x + 3, then f(5) = 13.  Always.

If g(x, y) = x * y, then g(4, 5) = 20.  Always.

If h() = 5, then h() = 5.  Always.

Mathematical functions need not take any inputs.  But they do need to be consistent.  Students are taught the vertical line test for graphs where y = f(x) to verify that consistency of output.

In computer science, programming languages allow people to give functions more descriptive names.  For example, if you want to write a function that takes a number as an input and returns the square of that number, you could name that function square.  In the programming language JavaScript, that would look like:

function square(x) {
  return x * x;
}

(Isn’t that much nicer than f(x) = x2?  Isn’t it nice to see the name “square” and not think that it means to multiply s*q*u*a*r*e?)

In computer science, we have procedures.  A procedure is like a function in that it takes any number of inputs.  It is different in that it need not produce consistent outputs.

All functions are procedures.  Not all procedures are functions.

Here is a JavaScript procedure that is not a mathematical function:

function notReallyaFunction(x) {
  return random();
}

notReallyaFunction returns a random number between 0 and 1, regardless of x.  That’s not a problem for procedures in programming languages.  There is no requirement to return consistent outputs.

Note that the word function does not imply that a function is being created in the mathematical sense. It is a keyword in the JavaScript language used to create a procedure.

From the teacher’s point of view, this seems like a simple vocabulary fix, and it would likely be just that if math teachers could reliably be aware that the word function is being used in a non-mathematical way by programmers and if computer science teachers had the depth and breadth of knowledge to be aware that this should be discussed at least briefly with their students.  To their credit, Code.org does address this in their curriculum, even if it is an issue in this widely viewed video.

Vocabulary frustration can be a reason for students to tune out of programming. The AP Computer Science curriculum demands knowledge of the Java programming language. Explaining public static void main to the intellectually curious student is quite a challenge for teachers and problematic for some.  I’ve seen students who were very capable mathematicians tune out on day one of class because this vocabulary is intimidating.  I’ve had a parent, who works at Google, express frustration about expecting novices to deal with the overhead of getting started with the simplest program in Java.  It can be intimidating.  Minimizing and eliminating unnecessary duplication and conflation of terms can make a difference between a child participating and a child opting out of learning CS. (It might also help the child learning mathematics after programming to be less confused.)

The JavaScript programming language isn’t going to be changed. It is a widely used tool for creating all kinds of wonderful programs. It’s too bad that the designers chose the word function as a keyword, but that ship has sailed.

Still, my objection to the Code.org video remains. The topic is good, Chris Bosh is a tremendous messenger, and I still wish they would go back and change the word “FUNCTIONS” to “PROCEDURES”.

What is the Difference Between Computer Science Class and Math Class?

On October 4, I watched a video produced by Code.org in which Chris Bosh (my favorite NBA player) was talking about procedures.  Only the script that Mr. Bosh was reading used the word “function” instead of “procedure”.  It may seem like a small thing, but as a teacher who has dealt with algebra and geometry students who find the vocabulary of mathematics somewhere between merely off-putting and thoroughly confusing, I thought I would defend the distinction.  So, I had the audacity to post a polite complaint to the CS Education Discussion Forum on Facebook as I know it is gets attention from the good folks at Code.org.

The ensuing discussion with Hadi Partovi, Emmanuel Schanzer, Baker Franke, and others was interesting.  Because the words are conflated in the computing industry (and very specifically in some languages such as JavaScript), there was an argument that the two were synonymous.  It’s a very reasonable point, but there is a distinction between a student learning math and computer science and a programming professional.  I’m worried only about the former.  (I was amused to learn from Hadi that Bill Gates apparently takes my side of this argument.  Yay Bill!)

To my surprise–and educating me on how to deal with people with whom one has a professional disagreement, Hadi dropped me an email, asking me to look over a document that Code.org was drafting that talked about various terms as they arise in a typical math class and in a typical CS class.

More recently, Baker Franke and I talked and he suggested that I put these distinctions into my blog.  Thus begins a series of entries that discusses linguistic issues as regards the learning of mathematics and the learning of computer science.

Hopefully, this will generate some discussion.  Computer science is still a very young field and figuring out how to best communicate big ideas in the field has its challenges, vocabulary being a big one, particularly with novices.

Here are the topics that will be covered.  I will provide links to them as I create blog entries.

  • Function v. Procedure
  • Variables
  • =
  • Numbers and other data types
  • Operators
  • Abstraction

Entering the Teaching Profession is Madness

My colleague, Diana Ichikawa, referred me to this article. It makes me both glad and sad for different reasons.

Glad:
* Young people are looking at teaching and realizing that, as careers go, it might be better to choose one where you can have a long-term financial outcome that is appealing. If you are going to give up your income potential in your early years, there has to be a long-term payoff or the career path is less viable.  So, I feel a bittersweet glad for young people who are actively avoiding that fate.

Sad:
* We need a better educated populace. Whether it is reading, writing, mathematics, science, computing, understanding history, etc., we need people to be able to think and communicate effectively.
* We have a society that bashes teachers, has destroyed their pensions in many places, bashes unions (the lack of understanding the contributions of unions in this country is appalling), and compensates people interesting in helping kids very poorly.

Solution?  If local constituents want better, they need to put their money where their mouths are.  Provide real incentives for young people to consider the profession.  Treat teachers with respect and dignity.  Right now, choosing to go into teaching is often accompanied with unpleasantry and untenable, economic madness.  Who wants to make a lifetime out of that?

Vida Blue

When I was a kid, I used to eat up baseball.  I’d look in the newspaper and study all the stats.  I’d memorize all the stats.  A large part of what excited me about math is that I thought I could translate those numbers into explaining why teams were good and why players were good and it was exciting and YAY!

The Oakland A’s were often on TV and in the postseason in the 1970s.  I would see “Blue, OAK” in the newspaper and hear the name on the radio.  At least I thought I heard the name on the radio; I only got it half-right.  At the tender age of 6, I voted for “Bida Blue” as a write-in candidate for the All-Star Game, not understanding that the fans couldn’t vote for pitchers.  Despite my write-o (sorry, Vida), he started in the 1971 All-Star Game.  (He also started the 1978 All-Star Game as a Giant.)

Fast forward to 2002, a point in my life where I had some interesting results in fantasy baseball.  I won the CDM Diamond Challenge in Y2K (~9600 entries), participated in the League of Alternative Baseball Reality in 2001, and was trying to start a company that did fantasy baseball gaming (it and I failed miserably).  I was invited to participate in MLB.com’s inaugural experts league as a writer for Ron Shandler‘s BaseballHQ.com, and–Lo and behold!–at the draft table, sitting down next to me on my right was Vida Blue.

Vida had a draft partner that day, who told me a bit about his background.  He had grown up in Louisiana without much money, was an amazing athlete (football as well as baseball), and didn’t have a fancy education.

For most people, the enduring memories of Vida Blue will be his amazing work as a professional baseball player.  For me, it is partly that, but partly what I learned about him that day.  Maybe he didn’t have that fancy education, but he had no shortage of intellectual curiosity.  To me that’s what counts.

I had done my usual homework to prepare for the event, with a spreadsheet full of baseball data on my laptop.  Vida had not seen anything like this and he had all sorts of questions about how to use the laptop to how I got the numbers to how I used the numbers to how I set up a spreadsheet and so on.  At the time, most people who saw me using a spreadsheet would have been thoroughly disinterested–either because they had experience with spreadsheets or because they were entirely disinterested in computing.  Vida was genuinely interested in understanding something he hadn’t seen before with an enthusiasm that was really fun.

I continue to think that is awesome.  Let’s be honest: he didn’t need to be there, he didn’t need the money, he didn’t need to ask any questions of the geeky, nerdy guy.  Yet he kept asking questions and seemed really interested.  So that’s how I think about Vida Blue.

Vida was also a really nice guy.  I really enjoyed that day.  (I also enjoyed that league as I won it.)  🙂

Tonight, I saw Vida at AT&T Park, doing work for Comcast SportsNet and, as he was taking pictures with people, I thought, well, maybe he’d remember 2002?  He certainly remembered that he participated in a fantasy league that year, but I think any memory of me was long gone.  That’s OK; he’s still awesome.

Vida was kind enough to take a picture with me.  He still looks like he could win a Cy Young and MVP like he did in 1971.

Vida_and_me

On the Joys of Being a Social Studies Teacher

Following the lead of UC-Berkeley’s fabulous Beauty and Joy of Computing class, we are now talking about computing in the news on a near-daily basis.  The student whose turn it is to run a class discussion chooses a topic, we read a short article, and then there is discussion.  I’m not accustomed to being a social studies teacher and I am definitely developing a deep appreciation for what my colleagues in that department can do.

I’m learning as I try to sort out suggested questions for students to pose to their classmates.  I’ve learned that a good first question is, “What was this article about?”  And I’ve learned that a good second question is, “OK, what was this article REALLY about?”

Today’s topic was “Siri v. Google Now”.  The kids understood the difference between the two, but nobody was asking, “What are you giving up to use one of these tools?”  It makes for an interesting discussion.

Yesterday, a student chose the Apple Watch which currently demands an iPhone purchase as a prerequisite.  My favorite comment was from a student who often travels to China.  He said that the iPhone was hugely popular there and also claimed, “Unlike Americans, the Chinese are materialistic…”

The things I learn from my students…

A Good Person Gets Recognition

Emmanuel Schanzer, all-around good guy and the driving force of the Bootstrap movement, was recognized in an article entitled “10 Men Making Waves For Women In Tech“.  It’s a really nice piece.

Emmanuel just posted about this on Facebook, and I really like what he wrote, so I am going to politely embarrass him by reprinting it here.  He expresses points that I often try to make and wish I could make as well as he does, regarding the accessibility of CS education for everyone, the strong connection to mathematics, and the importance of a great team to make it happen:

“I’m truly honored to be added to this list, and I’d like to add to what is written about me in the article.

While I may have started Bootstrap, it has long since been the work of an incredible team of talented people. Without Shriram KrishnamurthiKathi FislerDanny YooRosanna SobotaEmma Youndtsmith, Matthias Felleisen, and the entire Program by Design community, the program would not be what it is today. This is also a recognition of their decades of work.

As for what the program is today, I think it’s important to note that Bootstrap was never conceived as a “program for girls”. It has always been about the beautiful intersection of mathematics and computer science, focused around building cool things out of pure algebra. I am thrilled to see it used in so many electives and after school programs, but the heart and soul of the curriculum is all about the math classes that *everyone* takes in school — not just the kids who are interested, not just the ones who have time after school, or the ones who already see themselves as programmers. All students. All of them.

That focus places enormous constraints on our team when we sit down to write lesson plans, scope out new features, or train teachers. We can’t assume that all students are engaged, or even want to be there. And we can’t just let them tinker around and have fun, because dammit it’s a math class and assessment matters. We can’t ignore students who have special needs, who are english-language learners, or who don’t have access to computers when they do their homework. And we can’t assume that the teachers have programmed before, or that they even see it as valuable. These constraints make our jobs really, REALLY hard.

But these constraints also keep us focused on what’s important, and sharpen our efforts to be purely focused on the obstacles that make impact possible. Impact without equity is an oxymoron, so we set our compass by that star, and sail in the direction we think is good for everyone. I didn’t set out *just* to bring more girls into computer science, but thanks to the work of the best team I could hope for, Bootstrap is doing just that.

Good teaching lifts up everyone.”

Programming Isn’t Math, but That Isn’t the Point

One of my favorite computer science professors, Mark Guzdial of Georgia Tech, writes a computer science education blog.  It’s one of those things that is a must-read, on the grounds that it is current, interesting, and understandable.

Here is a recent post that has had me thinking:

http://computinged.wordpress.com/2014/10/04/programming-is-not-math/

At issue in the article is whether programming is mathematics.  I think that line of thinking may not be helpful.  My concern is that lumping all programming tasks under one hat will lead to bad generalizations.  

Better would be to ask what kinds of problems are you trying to solve as a programmer?  Depending on the problem, it may be possible to operate at a level of abstraction that masks away mathematical complexity.  Or it might be that a person’s ability to find good, fast, elegant solution paths is very much dependent upon mathematics.  

There is a difference between being able to write programs and being an awesome engineer–possibly to the tune of three hundred times the amount of productivity:

http://online.wsj.com/articles/SB113271436430704916

(If anyone has more recent information on the productivity topic, please drop me an email.  I need to learn how to allow comments that are spam-resistant.)

I’m not saying that the productivity difference is all math skills, but wouldn’t it be helpful to know if there is a correlation?  If that is a key component to two orders of magnitude of productivity, it would be misleading to say that “programming isn’t math”.

There is a famous Code.org video in which Bill Gates (amongst others) tells us that you don’t really need to know much math to do programming.  I get the point that the barrier to entry for programming something good ought to be small.  On the other hand, Microsoft didn’t come into existence because its programmers maxed out their mathematics educations at multiplication.

Talking about coding this way, to my thinking, conflates programming, coding, mathematics, and computer science in awkward ways.  There is overlap, but the terms all have distinct, essential meanings.  I think this may also diminish the importance and depth of computer science as a discipline.  Given that society as a whole does not seem to get computer science and requires persuasion that it is an important academic discipline, that ought to give pause to any advocate of K-12 CS education.

Here’s the point… It would be instructive if the research world could come up with a typology of programming problem types that do not correlate with mathematics.  Until that happens, making assertions about whether “programming is math” could lead to bad conclusions.

If you want CS education, put your money where your mouth is.

As a computer science teacher at Gunn High School in Palo Alto, CA, and a co-founder of the Silicon Valley chapter of the Computer Science Teachers Association, I sometimes get asked what I think regarding the state of CS education and its importance.  I was interviewed by KQED, the local NPR station regarding some of my opinions.  I don’t know how much of it (if any) will air, but since interviews are subject to edits and I am inexperienced with them, I thought I would blog my opinions to be as clear as I can.

It is important to lay out what is at stake.  It is currently possible in most states to graduate without doing any kind of computer science class.  Our education system may use computing and technology to deliver education, but it does not expect students to learn how to do computing and make technology.  People get programmed by what they view on the internet, but students are not expected to learn how to program anything in order to receive a diploma.

Computer science is about abstraction, problem decomposition, design, creativity, data analysis, and programming.  It’s about creation of products as opposed to being an end user.

Students who learn to think about these things are going to be at an enormous competitive advantage over their peers when applying to colleges and applying for jobs.  Code.org predicts a chasm of one million jobs between industry demand for computing labor and college graduates who are qualified to fill the positions.

It is not at all hard to make a national security case.  Do we want other countries who are taking CS education seriously to pass us by because we were too stubborn to do what it takes to teach computing?

There is all sorts of good curriculum being developed for K-12, so I am not going to focus on that.  If you are interested, I refer you to CS10K, ECS, and CS Principles, and there is more beyond that.  While K-12 curriculum may be a problem, it is being addressed, so I will focus on other issues.

Here are some things being considered to help solve the problem.

 

1. Legislation.

There is good news and bad news.  First the good news.

Do you dream of an issue where everyone is on the same side in the US?  Computer science education may be it.  Code.org has been magnificent in leading the charge.

In California, ACCESS has been working on legislation.  California had seven bills and a resolution in the state legislature regarding CS education.  (I testified on behalf of AB 1539 and AB 1764, the latter being one of two of those bills being sent to the Governor as I write this.)

Now the bad news… Until these pieces of legislation come with money, legislation won’t address the dearth of CS teachers.

 

2. Retraining teachers from other disciplines.

I think this is worth doing, but it has limited upside.  It’s sort of ironic that I am saying this because I spent a fair amount of time this past summer, teaching courageous and enthusiastic teachers how to deliver content from UC-Berkeley’s Beauty and Joy of Computing class.

TEALS is a program that is all over the country, trying to help.  They put computing professionals, volunteering their time, into classrooms to team teach.  The goal is to transfer enough of the discipline to the teachers as well so they can take over and start delivering the material and grow programs on their own.  (I disagree strongly with CS being treated as a science class, but I agree it would be nice to make it ubiquitous.)

Happy to be proven wrong, but here the kind of thing I envision happening.

Suppose my school decided to retrain me as an English teacher.  I could probably learn enough to be competent, but teaching English isn’t my passion.  I clearly wouldn’t have the background that my colleagues in the English department have because they have studied the discipline intensely for years, learning from scholars at universities and collaborating with students with similar interests during that process.

I think the same sort of thing applies in CS.  Many retrained teachers will be enthusiastic about computing, study it intensely and, in time, become experts.  Others will teach CS, but it won’t be their passion, and that’s often a recipe for unhappy students who see an unhappy teacher.  There are lots of other possible outcomes, some better than others.  No matter how you slice it, it isn’t the same as hiring a person with a CS background to teach CS.

As I say, I’m happy to be shown wrong.  I look forward to seeing how the retraining work plays out.  Even if imperfect, programs like TEALS could help.  But it takes money.  At least with TEALS it is not taxpayer money as Microsoft is the key sponsor.

 

3. Online courses.

Who doesn’t like good, free content?

Maybe this is the way of the future, but while technology such as MOOCs can be helpful, but they are not a substitute.  What’s odd to me is why so many people seem to find this to be surprising.

For students who have the time and motivation, a MOOC can be great.  However, what we have learned from current technology is that 90% of people who start MOOCs don’t finish them.  We also learned from Udacity and San Jose State that MOOCs may not be a panacea.

I don’t doubt that people benefit from an online course even if they do not complete all of it.  That said, if a student wants to go to college, completing half of a junior year English class probably wouldn’t help on an application.  I’m not an admissions officer at a university, so I welcome being corrected by one, but I’d guess that course completion matters for CS too.

When I was a graduate student, I was very interested in how students collaborated on programming assignments.  They had wonderful discussions, and the sharing of ideas led to better ideas.  Being in the same place, it was easy for them to create physical artifacts (diagrams, code, outlines, etc.) that could be built upon and argued about in real time.  There are visual cues you get when in the same place as your colleagues–facial expressions and body language, for example.  You can hear tone of voice.  These things matter in the learning process.

So far as I know, there is no substitute for this when courses are delivered online.  The quality of learning is just better when people are interacting with each other.

I think we do a disservice to our students when we try to remove the social component of learning in order to save money.

(NOTE: I would welcome info on the latest and greatest research on this.  Happy to be shown wrong, but I suspect that millions (billions?) could be saved merely by looking to cognitive science research on how kids learn best.)

 

4. Infuse CS into existing mainstream classes.

Pat Phillips compiled some wonderful possibilities nearly a decade ago, and the connecting computing to other disciplines is important.  Still relying on this alone is not enough.  Imagine asking teachers to incorporate trigonometry or physics or French or US history into classes in other disciplines.  You could do some cool lessons, but there is a difference between a taste of a discipline and immersing oneself in it.

So, by all means do CS lessons as part of curriculum across disciplines, but don’t treat that as a substitute for learning CS as a discipline.

 

5. Money.

Well, I hope this is being considered because I fear we are stuck if it isn’t.

This sounds obvious: If we want to teach kids rigorous computer science with a game plan for what happens after high school, we should hire some qualified computer science teachers.

If we want to create a crop of highly-qualified CS teachers, we will need to invest in them.  This means creating financial incentives so rational people will want the job.  Right now, becoming a K-12 teacher of any stripe is fiscal madness–all one needs to do is look at the attacks on unions, salaries, benefits, you name it.  Why would someone want to subject themselves to a career of that?

Becoming a K-12 CS teacher is a double-whammy.  A young person developing technical skills in college can go straight into industry and make more than twice what a teacher does.  To teach in a public school, a teacher must pay to go through a credential program.  Seriously, who wants that?

If we want talent–especially young talent–to consider teaching computer science, we need to make it a noble, well-compensated profession.