My MOOC Explorations Continue

It’s been a few months since my last post. That’s because I got totally immersed in learning coding, specifically Ruby, far more seriously than I had expected. In the last two months, I got very sick. But now I am back.

First of all, the Capstone Python class on Coursera got postponed from a January start date. It finally started in early April and I have completed it and thus completed the excellent 5-course Python series, taught by Prof. Chuck Severance of the University of Michigan.

While waiting for the Capstone class to start, I stumbled upon the Flatiron School‘s  Learn platform which I really enjoyed and wrote about in my previous blog. In no time I found myself being pulled deeper and deeper into Learn. In February, I formally signed up as a fee-paying online student on Learn and have put in a good amount of time everyday (until I got sick.)

Like many of today’s online teaching / learning platforms, Learn has also been going through continuous changes. So not everything is 100% smooth – but then what is 100% trouble-free in life? The bottom line is: I have learned a tremendous amount through  Learn. I will write about it in my future blogs.

This entry is in response to Learn‘s assignment question: “Why did you decide to learn software development?”

It may be a while before I will call myself a “software developer,” but I am getting to understand what “software development” means. Computer technology permeates our lives, so we should, and we must, gain some basic understanding of how it works. Programming languages are also (surprisingly) interesting – so why not learn some programming? In a previous post, I argued that every teacher should learn to code a little. I have come to believe everybody should learn some programming, because, as Massimo Banzi, the creator of Arduino, succinctly said:

… it’s important to be masters of the technology.”
– Massimo Banzi –


How a learner parsed a coding exercise – Part 2

I’d like to explain why, in my previous post, I showed the steps through which I (awkwardly) completed an exercise for my Coursera class. USS MOOC-owl

For one thing, I want teachers of programming to know that sharing of answers, in the case of learning code, is not a bad thing. In particular, for a MOOC class (such as my Coursera class) where one has up to 100 times to attempt a quiz (until one gets 100% right or tired of doing it), one certainly has plenty of opportunities to get help elsewhere. So it defies logic that showing code in the Help Forum is not allowed. Seeing the answer can be a very effective way of learning, at least in the early stages. In fact, if a student has no clue where to start, let alone continue, she may be discouraged to the point of quitting. One post titled “Ready to give up” received a huge number of responses, both from teaching assistants and from fellow students with offers of encouragement and “sample” code. Although I have not seen too many “dramatic” posts like this one, I have seen a lot of expressions of frustration.

Lamp-of-KnowledgeSecondly, programming course design should take into consideration those who truly want to learn, who will try hard, but who lack blocks of fundamental knowledge – and who may not even be able to articulate what the missing knowledge may be. A MOOC class certainly should not immediately assume students are lazy or stupid. It is easy for people who teach – who decide what to emphasize, what direction the argument should take, and what minutia to test on – to cast students who ask seemingly simple questions as being lazy or stupid. Classes, especially MOOC classes, designed for mass appeal, must be prepared to provide assistance for people with massive knowledge gaps for the particular field in question. Even those of us who can break down the steps and figure out where the “knot” is, aka having better learning skills, cannot always learn everything without help. Sometimes, the knowledge gap is so fundamental that people who teach forget to cover it. That is ok, but please don’t get irritated when questions come up that seem to be below your level.

When a person willingly signs up for a class, that person has enough initiative in her and can’t be 100% lazy. Those who are truly lazy probably wouldn’t take the time and effort to ask questions – and ask follow-up questions. Those who are truly stupid would not take an online class on programming. Though all teachers enjoy having “smart” students in a class, it is wise not to equate “smart” with “advanced.” Learners of programming, gifted or otherwise with a solid foundation in programming, would not choose Programming 101, would they?

Whenever I begin to learn a subject, I am always reminded how incredible elementary school teachers are. I have spent many years teaching university level classes. I know I’d be a terrible failure as a tertiary school teacher, at least initially, until I learn how to teach at that level. That is because so much of what I, a university professor, assume to be “common knowledge” in a college classroom usually has not been learned at the secondary level. It is the secondary school teacher that bridges the knowledge gaps so the student comes to college equipped with “common knowledge.” As a college professor, I have the easy task of building upon that foundation – It’s like explaining to potential homebuyers how to appreciate the potential of a house without having to lay the foundation, put up the frame, or install the windows, doors, and roof. A lot of the grunt work has been done – by others.

Granted, there are lazy people, and there are definitely stupid people (or else who’d be there to receive the Darwin Awards?). I have encountered students who aren’t best suited to be a writer or a linguist or a thinker, but who certainly have plenty of talent elsewhere – I can think of a few who I’d like to have near me should there be a calamity of any kind. For this reason, I feel it’d be stupid of me to call them stupid.

Thirdly, people who teach should not forget what it feels like to be a student trying to understand a lecture – it is like trying to get into the professor’s head. Student cannot necessarily figure out what a goal is for an exercise, sometimes even when the professor explicitly explains it. That’s the nature of learning: We cannot learn everything all at once. Sometimes we learn a skill, but forget the purpose of that skill. Sometimes we learn the purpose of a skill, but have trouble learning that skill. Certain things require repeated explaining. Just because the professor has said a thing once doesn’t mean that that piece of information has registered. And certainly don’t expect students to completely grasp what the professor intends to say. There is nothing wrong with guessing, if that is the explicit goal of the class. If a professor said, “If you can guess what I am thinking, you’ll get an A,” I would either drop the class or do my best to guess. But learning should NOT be about guessing what’s in a professor’s head. When a student refuses to do so, she is hardly being lazy. Owl-booksidraw

For all my complaints, one may get the impression that I am dissatisfied with my Coursera class, Programming for Everyone. THAT is absolutely false. In fact, I can’t imagine lectures or textbooks on such a technical subject can get any better in terms of bridging the gap between students and the knowledge they need to master. Because this is an online class, a MOOC class with thousands of students, much of what a student needs in terms of support comes from the teaching assistants. Yet, the easy accessibility is not always present from the support staff.

To be continued…

Images from


How a learner parsed a coding exercise

Today I shall lay out, as clearly as I can, what happened when a “newbie” (me) attempted to do a simple coding assignment. I am using a recent assignment from my Coursera class as an example. It’s a simple assignment, perhaps an equivalent of a pre-K Montessori school exercise in terms of complexity.  In the end, the successful code consisted of only four lines, all in English. Yet, I spent a lot more time than one might expect to complete the assignment. I could have learned more than four sentences in Swahili in the same span of time.

Here are the original instructions:

Write code using find() and string slicing to extract the number at the end of the line below. Convert the extracted value to a floating point number and print it out.

text = “X-DSPAM-Confidence: 0.8475”;

For  those who know even less coding than I do – in plain English, this exercise says:

What you have here:  A string of letters, numbers and symbols (as specified between the quotation marks).
What you need to do: Write code (in Python) to have the computer identify, isolate, and print out only the numerical elements (which are at the end of the string) as a decimal.

My very first challenge with this exercise was to render the instructions into plain English as shown above. Close reading and dogged persistence were both a big help. The next step was to start coding.

Viewing this exercise as my human self, I hardly needed to exert any mental energy because the problem was so simple. And yet I had to put myself into the shoes of a computer (a computer with shoes, that is) and try to translate what needs to be done into its language, so it would carry out the task instead. And my mind immediately went blank.

At the time when I began my exercise, there were very few questions posted in the Help Forum, so either I asked specific help questions and wait for answers, or tried to work on my own. So I chose the latter. I went back to re-read the textbook, re-watch the instructional videos. One function the professor had discussed, written as text.find(), was indeed meant to carry out the identify/isolate part of the exercise, though it did not immediately occur to me how to implement it. Fortunately, re-watching the instructional videos brought it back, so I entered my first line of code.

It was a simple exercise, but took me a long time. Below is how I did it, line by line:

A beginner's convoluted steps to learn a few lines of simple code.

A beginner’s convoluted steps to learn a few lines of simple code.

And why am I dwelling on this? I will explain in my next post.


What happens when a machine does the grading in a MOOC class

The Coursera class I am taking uses an “auto grader” to grade homework. It seems reasonable to put a computer to good use, given the (presumably) large number of students enrolled in the class, and given that it is, in fact, a computer class. After all, all it needs to do is to compare the programming code a student enters and the “correct” code. Should be a cinch.

MOOC Automatique

But it doesn’t seem to work all that smoothly.

Early on in the course the auto grader gave me a pass on a few simple lines of code. But when I checked my code outside the auto grader’s environment, I discovered my code didn’t work. So I posted an inquiry on the Help Forum. Luckily, a teaching assistant not only responded, but she had actually checked my work, and told me to re-work my code. I learned a huge amount as a result.

I say “luckily” because I have subsequently seen requests from students for code-checking, and then stern refusals from the various teaching assistants, even when a teaching assistant acknowledges that the auto grader would give someone a pass “even if the code is incorrect.”

So what good is the auto grader if it cannot check code? When the auto grader gives a pass to bad code, can a learner truly learn?

A long while back, my son came home with a math homework which the teacher had graded. All of the answers had been marked wrong. My son said, “Mom, there is no way these answers are all wrong — take a look!” I looked – Sure enough, the teacher was wrong on all of the questions. The few “correct” answers the teacher jotted down turned out to be only correct for adjacent questions. We realized that the teacher used an answer sheet, but mismatched the answers. That was one of the worst years of my son’s math education, and he gradually lost interest in math, despite his natural aptitude for math.

Let’s suppose my son’s teacher, instead of marking every correct answer as wrong, marked all the wrong answers as correct, would my son have had a better math education that year? Would he maintain his enthusiasm for math?autopilot of the year

I understand that managing MOOC courses require technological assistance. Auto grader makes it possible for massive numbers of homework assignments to be graded. But is it any better than an incompetent teacher mis-matching answers from an answer sheet?


Niklaus Wirth on teaching programming

key to learn

Yesterday I watched the video of Dr. Chuck Severance’s “Conversation with Niklaus Wirth” who created PASCAL and pioneered many other programming languages. This 20-minute long video  is nothing short of amazing and inspiring.

What struck me most is Niklaus Wirth’s refrain on simplicity: He and his colleagues were “convinced that the future lay, particularly for teaching programming, in simple languages.” Simplicity, he says, is  about “concentrating on what is essential and presentable to students.”

A true master of his craft, indeed:

How learning Python compares to transplanting azaleas

Nothing beats having a good class. Looping, one of the first things one learns in coding, used to be such a confusing concept. But my Coursera class took care of that, in one lecture. At this moment, I find myself marveling at the fact that concepts in Python seem incredibly straightforward: You tell it to do a task, give it the necessary supplies (names, numbers or phrases), and it does exactly the way you lay it out. Aside from the necessity, and the challenge, of translating from Python to English, I believe, learning Python no harder than say, transplanting azaleas – one just has to learn the right way.

No, this is from a Mountain Laurel, not azalea. So much for precision.


A collection of great video clips on programming and computer technology

1373288724Python for Everyone, the Coursera course I am taking, exposed me to a range of fascnating video clips related programming, including these videos of interviews with Python’s creator, Guido van Rossum and these:

1. Computing Conversations: Eben Upton on the Rasperry Pi. An eye-opening encounter with Raspberry Pi – both its populist application and its potential as an independent platform.

2. Pooja Sankar: Building the Piazza. I am not familiar with Piazza; still, this is an inspiring and interesting video.

3. Massimo Banzi: Building Arduino. Do you know what “Arduino” is? Neither did I! But it’s amazing how these unknown (to most of us) creations have changed our lives. Most impressive is how thoughtful (and short) these inventors are.


How learning Python compares to learning a foreign language 

The third week of the Coursera class, Programming for Everyone, covers conditional statements. Here one gets a glimpse of the flexibility and complexity of a computer language dealing with uncertainty. The interesting piece for me is what Dr. Chuck calls “compound statements” – multi-line statements forming (& executed as) one block.

So a programming language, such as Python, has its own vocabulary, syntax, questions (in the form of the “if” statements), beginning and ending, notes/footnotes (in the form of comments, and, if properly written, produces a desired outcome. So in this sense, learning Python from the beginning is like taking third year French language classes where one immediately gets into complex discussions in the target language. Knowing “Bonjour!” and other ways of greetings in French simply isn’t enough.

If someone has completed French 101, 102, 201, and 202, a third year French class ought to be manageable. For someone with only French 101 under their belt, jumping into 301 is hard. For a novice learner who hasn’t taken 101, a third year French class would make no sense whatsoever. That’s why there are “prerequisites” for these classes.

Question is: What are the equivalents to French 101 or 201 in computer classes?



Anatomy of instructions for a coding exercise – Part 4

Undoubtedly, some may think my translation (see my previous posts) was for the stupid: It’s like how we teach kids in schools nowadays–too much hand-holding and not enough independent learning.

Independent learning is a good thing — I am all for it. If someone doesn’t have the necessary building blocks to learn at all, how is she supposed to learn independently? Teach Chinese numbers 1 to 10 to someone with no prior knowledge of Chinese. OK, that’s easy; done. Now tell that person to create a calendar in Chinese–better yet, make it a lunar calendar. That, my friend, requires a lot more than numbers alone, even though numbers make up a calendar.

Put it another way: This is how I read the instructions (my words in red):

“Write a program to prompt (I see multiple lines of code that generate a prompt to which the user responds) the user for hours and rate per hour using (“using”?) raw_input  to compute gross pay. Use 35 hours and a rate of 2.75 per hour (Huh? Oh, enter 35 when prompted for hours and 2.75 when prompted for rate.) to test (“test”?) the program (the pay should be 96.25 (What does this have to do with anything?)). You should use raw_input to read a string (I thought I was supposed to use raw_input to compute gross pay! What string?) and float( ) to convert the string (What string?) to a number. (Why do I need to convert anything? I have all the numbers I need – 35 and 2.75– to compute with!)   Do not worry about error checking or bad user data.” (Whew! I won’t.)

These instructions, by the way, are accompanied by excellent video and print explanations. The professor is excellent; the help and peer support have been great. Having dabbled in Codecademy and read a bunch of tutorials on Python, I was not exactly a complete stranger to Python.

Yet how I read this simple assignment is not at all how it is supposed to be read, despite having watched  Dr. Chuck’s excellent video lecture at the very beginning of the course on how to develop the programmer’s “mindset”.