# Tag Archives: Teaching

## Understanding “understanding”

This past Saturday, I was grading a batch of tests that weren’t looking so great at the time, and I tweeted:

I do ask these two questions a lot in my classes, and despite what I tweeted, I will probably continue to do so. Sometimes when I do this, I get questions, and sometimes only silence. When it’s silence, I am often skeptical, but I am willing to let students have their end of the responsibility of seeking help when they need it and handling the consequences if they don’t.

But in many cases, such as with this particular test, the absence of questions leads to unresolved issues with learning, which compound themselves when a new topic is connected to the old one, compounded further when the next topic is reached, and so on. Unresolved questions are like an invasive species entering an ecosystem. Pretty soon, it becomes impossible even to ask or answer questions about the material in any meaningful way because the entire “ecosystem” of a student’s conceptual framework for a subject is infected with unresolved questions.

Asking if students understand something or if they have questions is, I am realizing, a poor way to combat this invasion. It’s not the students’ fault — though persistence in asking questions is a virtue more students could benefit from. The problem is that students, and teachers too, don’t really know what it means to “understand” something. We tend to base it on emotions — “I understand the Chain Rule” comes to mean “I have a feeling of understanding when I look at the Chain Rule” — rather than on objective measures. This explains the common student refrain of “It made sense when you did it in class, but when I tried it I didn’t know where to start“. Of course not! When you see an expert do a calculation, it feels good, but that feeling does not impart any kind of neural pathway towards your being able to do the same thing.

So what I mean by my tweet is that instead of asking “Do you understand?” or “Do you have any questions?” I am going to try in the future to give students something to do that will let me gauge their real understanding of a topic in an objective way. This could be a clicker question that hits at a main concept, or a quick and simple problem asking them to perform a calculation (or both). If a student can do the task correctly, they’re good for now on the material. If not, then they aren’t, and there is a question. Don’t leave it up to students to self-identify, and don’t leave it up to me to read students’ minds. Let the students do something simple, something appropriate for the moment, and see what the data say instead.

This may have the wonderful side effect of teaching some metacognition as well — to train students how to tell when they do or do not know something.

Filed under Education, Teaching

## Speaking of the inverted classroom

On Wednesday, I gave a talk at Indiana University – Purdue Universty – Indianapolis (IUPUI, for short) to the teaching seminar for math graduate students on the inverted classroom. It was sort of a generalization of the talk I gave on the inverted linear algebra classroom back at the Joint Mathematics Meetings in January. Carl Cowen was in attendance at that talk and invited me to make the 20-minute drive from my house to IUPUI to do something like it, and I was happy to oblige.

Since putting the talk up on Slideshare yesterday morning, it’s gotten over 200 views, 2 favorites, a handful of retweets/Facebook likes, and is currently being highlighted on Slideshare’s Education page. So I thought I would share it here as well. Enjoy and ask questions!

## Misunderstanding mathematics

Image via Wikipedia

Robert Lewis, a professor at Fordham University, has published this essay entitled “Mathematics: The Most Misunderstood Subject”. The source of the general public’s misunderstandings of math, he writes, is:

…the notion that mathematics is about formulas and cranking out computations. It is the unconsciously held delusion that mathematics is a set of rules and formulas that have been worked out by God knows who for God knows why, and the student’s duty is to memorize all this stuff. Such students seem to feel that sometime in the future their boss will walk into the office and demand “Quick, what’s the quadratic formula?” Or, “Hurry, I need to know the derivative of 3x^2 – 6x +1.” There are no such employers.

Prof. Lewis goes on to describe some ways in which this central misconception is worked out in our schools and in everyday thinking. The analogy between mathematics instruction and building construction, in which he compares current high school mathematics instruction to a building project where the scaffolding is constructed and then abandoned because we think the job is done, is pretty compelling. The whole essay is well worth reading.

I do think that it’s a bit too easy to lay the blame for the current state of mathematics instruction at the feet of American high schools, as Lewis does multiple times. Even if high schools do have flawed models of math instruction, certainly they are not alone in this. How many universities, even elite institutions like Fordham, have math classes or even entire curricula predicated on teaching math as rote mechanics? And what about the elementary math curricula? Pointing the finger at high schools is the natural thing to do for college professors, because we are getting students fresh from that venue and can see the flaws in their understanding, but let us not develop tunnel vision and think that fixing the high schools fixes everything. Laying blame on the right party is not what solves the problem.

Lewis brings up the point that we should be aiming for “genuine understanding of authentic mathematics” to students and not something superficial, and on that I think most people can agree. But what is this “authentic mathematics”, and how are we supposed to know if somebody “genuinely understands” it? What does it look like? Can it be systematized into a curriculum? Or does genuine understanding of mathematics — of anything — resist classification and institutionalization? Without a further discussion on the basic terms, I’m afraid arguments like Lewis’, no matter how important and well-constructed, are stuck in neutral.

Again coming back to higher education’s role in all this, we profs have work to do as well. If you asked most college professors questions like What is authentic mathematics?, the responses would probably come out as a laundry list of courses that students should pass. Authentic mathematics consists of three semesters of calculus, linear algebra, geometry, etc. And the proposed solution for getting students to genuinely understand mathematics would be to prescribe a series of courses to pass. There is a fundamentally mechanical way of conceiving of university-level mathematics education in which a lot of us in higher ed are stuck. Until we open ourselves up to serious thinking about how students learn (not just how we should teach) and ideas for creative change in curricula and instruction that conform to how students learn, the prospects for students don’t look much different than they looked 15 years ago.

## Active learning is essential, not optional, for STEM students

This article (1.2 MB, PDF)  by three computer science professors at Miami University (Ohio) is an excellent overview of the concept of the inverted classroom and why it could be the future of all classrooms given the techno-centric nature of Millenials. (I will not say “digital natives”.) The article focuses on using inverted classroom models in software engineering courses. This quote seemed particularly important:

Software engineering is, at its essence, an applied discipline that involves interaction with customers, collaboration with globally distributed developers, and hands-on production of software artifacts. The education of future software engineers is, by necessity, an endeavor that requires students to be active learners. That is, students must gain experience, not in isolation, but in the presence of other learners and under the mentorship of instructors and practitioners.  [my emphasis]

That is, in the case of training future software engineers, active learning is not an option or a fad; it is essential, and failure to train software engineers in an active learning setting is withholding from them the essential mindset they will need for survival in their careers. If a software engineer isn’t an active learner, they won’t make it — the field is too fast-moving, too global, too collaborative in its nature to support those who can only learn passively. Lectures and other passive teaching techniques may not be obsolete, but to center students’ education around this kind of teaching sets the students up for failure later on.

One could argue the same thing for any kind of engineer, or any of the STEM disciplines in general, since careers in those disciplines tend to adhere to the same description as software engineering — a tendency toward applications (many of which don’t even exist yet), centered on interaction and collaboration with people, and focused on the production of usable products.

## MATLAB as a handout creator

One of the fringe benefits of having immersed myself in MATLAB for the last year (in preparation for teaching the Computer Tools for Problem Solving course) is that I’ve learned that MATLAB is an excellent all-purpose tool for preparing materials for my math classes. Here’s an example of something I just finished for a class tomorrow that I’m really pleased with.

I was needing to create a sequence of scatterplots of data for a handout in my Functions and Models class. The data are supposed to have varying degrees of linearity — some perfect/almost perfectly linear, some less so, some totally nonlinear — and having different directions, and the students are supposed to look at the data and rank the correlation coefficients in order of smallest to largest. (This is a standard activity in a statistics class as well.)

I could have just made up data with the right shape on Excel or hand-drawn the scatter plots, but whenever I do that, it looks made it up — not with the randomness that a real set of data, even if it’s strongly linear, would have. So instead, I thought I would take a basic linear function and throw varying degrees of noise into it to make it less linear.

I wrote this little function to generate noise:

function n = noise(degree, size)
n = degree*cos(2*pi*rand(1,size));


This just creates a vector of specified length (“size”) centered roughly around 0, and the bigger “degree” is the more wildly the numbers vary. (I’m sure there’s some built-in way to do this in MATLAB, but it probably took less time to write the function than it would have taken for me, the MATLAB neophyte, to look it up.)

Then I just made four linear functions and literally added in the noise for each, as well as a fifth function that was just spitting out 25 random numbers and a sixth that was a pure linear function with no noise. Then plot all of those in a 2×3 subplot. Here’s the code:

x = 1:25;
y_bigneg = -3*x+90 + noise(5,25);
y_smallneg = -5*x + 100 + noise(30,25);
y_bigpos = 3*x + 3 + noise(3,25);
y_smallpos = 3*x + 3 + noise(10,25);
subplot(2,3,1), scatter(x, y_bigpos)
subplot(2,3,2), scatter(x, y_smallneg)
subplot(2,3,3), scatter(x, y_smallpos)
subplot(2,3,4), scatter(x, y_bigneg)
subplot(2,3,5), scatter(x, rand(1,25))
subplot(2,3,6), scatter(x, 90-4*x)


Here’s the result, after going in and adding titles and removing the legends in the Plot Tools window:

That can then be saved as a PDF and embedded into a $\LaTeX$ document or just posted directly to Moodle for students to play with. All of that code above could easily be compacted into one big M-file with some modifications to let the user control the number of points and whatever else.

This is basic stuff, but it’s awfully handy for creating professional-looking documents and graphics for teaching mathematics. That’s an area where I’m finding MATLAB is highly underrated.

1 Comment

Filed under Calculus, Math, MATLAB, Problem Solving, Teaching, Technology

## Analyze, hack, create

One of these days I’ll get back to blogging about the mathematics courses I teach, which make up the vast majority of my work, but the MATLAB course continues to be the place where I am working the hardest, struggling the most, learning the biggest lessons about teaching, and finally having the greatest sense of reward. This week was particularly rewarding because I think I finally figured out a winning formula for teaching a large portion of this stuff.

This was the last in a three-week series on introduction to programming. We had worked with FOR loops already. I had planned to look at WHILE loops in the same week as FOR loops, then have the students play around with branching structures in week 2, then have them apply it to writing programs to do numerical integration week 3 for use in their Calculus II class in which most of the class is currently enrolled. But the FOR loop stuff went very roughly. So I moved the numerical integration stuff up a week and saved the entire remainder of looping and branching structures — WHILE loops, the IF-ELSEIF-ELSE structure, and SWITCH — for week 3.

I approached it like this.

The majority of their homework consisted of watching three videos: one on general programming in MATLAB, another on MATLAB loop structures in general, and a third on IF and SWITCH statements. That’s about 20 minutes of straight viewing; I told the students to budget an hour for these, since they’ll want to pause and rewind and work alongside the videos. Then, the majority of their homework was this M-file:

%% Script M-file for April 5 Prep/HW for CMP 150.
%
% For each block of code below, write a clear, English paragraph that
% explains what the code does. You can play with each block of code by
% removing the comment symbols and running this file. (You can "uncomment"
% lines by deleting the percent symbol or by highlighting the code you want
% and selecting Text > Uncomment from the menu above.)

%% Code example 1

x = input('Please enter in a number less than 100: ');
while x < 100
disp(x)
x = 2*x - 1;
end

%% Code example 2

x = input('Please enter in a number: ');
if x>=0
y = sqrt(x)
else
y = exp(x) - 1
end

%% Code example 3

value = input('Please enter in a whole number between 1 and 20: ');
switch value
case {2, 3, 5, 7, 11, 13, 17, 19}
disp('Your input is a prime number.')
case {1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20}
disp('Your input is a composite number.')
otherwise
disp('I do not think you entered in a whole number between 1 and 20.')
end


In other words: Here’s a bunch of code. Write up a plain-English description of what everything is doing. That was their homework. (Here’s the full assignment.)

Then in class, we played a game. For each code sample, I asked, “What if I entered [fill in the blank] to this bit of code?” For example, for code sample #1, what would happen if I entered in 100? One student immediately said, “Nothing”. Another said “It would give you a ’0′ because that’s what ’100 < 100′ returns as in MATLAB.” Then I had them close their eyes. “How many say, ‘Nothing’?” Count the hands that go up. “How many say ’0′?” Count those hands. Put the tally on the board. The result: 7 for “nothing”, 6 for “zero”. Instant discussion fodder.

(By the way, this would have been a perfect place for clickers. I’m working on that.)

Next I asked, “What would happen in code sample 1 if I put in a negative number?” One guy said: “I know! I did that, and the thing kept running and never stopped, and I had to unplug my computer!” So I showed them all Control-C; then asked, “Why did that [the failure of the program to stop] happen?” In no time at all — a high-order discussion about an important related topic to looping structures (avoiding infinite loops) that I had not even planned to bring up.

We played that game for 20 more minutes. Students were into it. They were coming up with their own cases. We tried entering in ‘Hi mom’ to code sample #1 and it actually gave something back. It was mysterious and entertaining and nerdy. They discovered that testing out extreme cases is not only important for understanding your code, it’s fun. And it was a lot better than lecturing.

The best thing is, when I got them finally into their lab problems, they were asking better questions. “I think I can do this program with a SWITCH statement, but could I make it better with an IF statement?” And: “I’ve got all the cases listed out here in my SWITCH statement, but I wonder if I could just use a vector or LINSPACE to list them out instead.

So that’s going to be my approach from here on:

1. Analyze: Look at someone else’s code and write out a complete, plain-English description of what every part of it is doing.
2. Hack: Take the same code and modify it, tweak it, rewrite it, throw extreme cases at it. This is the bridge between reading code and writing code.
3. Create: Write some code to do something new — now that you’ve learned the language from someone else’s use of it.

For all I know I could be totally reinventing 40-50 years of established best practices in computer science pedagogy. But it’s pretty exciting nonetheless.

Filed under Education, MATLAB, Problem Solving, Teaching, Technology

## The MATLAB class at midterm: Comfort level

To end the first half of the semester in the MATLAB course, I gave students a lengthier-than-usual survey about the course — a sort of mid-semester course evaluation. I have a load of interesting data to sift through and analyze, relating to various aspects of the course and tagged with metadata about gender, GPA, major, whether they live on or off campus, and so on. I hope to finish analyzing the data before the semester is over. (Ba-dum-ching.)

One of the questions I asked was a mirror of a question I asked in the beginning: On a scale of 0 (lowest) to 10 (highest), rate your personal comfort level with using computers to do the kinds of things we do in this class. I’m thinking that there are affective issues about working with computers, and especially MATLAB, that are never discussed but which play a huge factor in student learning. (We seem to just tell engineers to suck it up and get to work, and assume that all MATLAB learners are engineers.) Here are the data, such as they are, for this question during the first week and at mid-term:

For some reason there were three students who didn’t respond to the midterm survey at all (it was worth 5 out of 15 points on week 7′s homework). I don’t know if the “4″ and the two “8″‘s from week 1 that are missing from week 7 are the ones who didn’t respond to the survey; or if the “4″ is now a “6″ and one of the previous “6″ people didn’t respond; or what.

Of course the striking thing here is that nothing has changed. I consider this a win on two levels.

1. The course has, at the very least, not made students generally less comfortable with using computers, which I think is pretty positive considering the subject matter and audience here.
2. The kinds of things we are doing with MATLAB have gotten progressively more complicated through the semester, so holding steady on comfort level while progressing in complexity is pretty much the same as progressing in comfort level. If you report the same comfort level after learning how to drive on the interstate as you did when first learning how to drive, period, it means that you’re more comfortable with driving in general than you used to be.

Filed under MATLAB, Teaching, Technology

## Turning questions into learning

Image by CarbonNYC via Flickr

The hardest thing about teaching the MATLAB course — or any course — is responding to student questions. Notice I do not say “answering” student questions. Answers are not the issue; I’m no MATLAB genius, but I can answer 95% of student questions on the spot. The real issue is whether I should. If my primary task is to teach students habits of mind that translate into lifelong learning — and I earnestly believe that it is — then answers are not always the best thing for students.

I’ve noticed four types of questions that students tend to ask in the MATLAB course, and these carry over pretty seamlessly to my other courses:

1. Informational questions that have nothing to do with the problem they’re working on or the material. Example: When are your office hours? When is this lab due? When is the final exam?
2. Clarifying questions that seek to make sense of the specifications of a problem. Should we use a script M-file or a function M-file here? A FOR loop or a WHILE loop? Do I have to make this plot from the command line or can I use the Plot Tools window?
3. Functional questions that are generally of the form, How do I [insert task here]?. How do I plot a function in MATLAB? How do I get the plot to be red instead of blue? How do I get this FOR loop to work?
4. Interpretive questions that seek the meaning of syntax, a command, or an error. What does MATLAB mean when it says I should ‘pre-allocate’ this variable? Why are there all these different ways to call the MAX command? Why do I have to use num2str in some situations but not in others?

I’ve tried to list these question types in increasing order of cognitive complexity, although that ordering doesn’t always hold. (Some clarifying questions can get quite complicated, for instance.) How these types of questions are ranked in this way points me in the direction of how to respond to them.

Formal informational questions are easy to answer. I always give the same, direct answer to these: It’s (on the syllabus || in the calendar || printed on your assignment). Students learn pretty quickly that this is the same answer to this kind of question all the time, so they tend to stop asking and just look it up instead, which is precisely what they should be doing.

I’m happy to give straight answers to clarifying questions, although sometimes it’s better not to. For example, if a student team is working on a program that needs a loop, and they want to know if they should use a FOR or a WHILE loop, then the best way to respond is not to tell students what to do but rather to lay out the pros and cons of each approach and let them choose.

It gets very tricky when we get to the last two types.

I let the following basic philosophy guide me: I don’t answer functional questions on labs during lab sessions or on homework while the homework is still not yet turned in. Once the lab or homework is over, then I’ll usually answer directly. But otherwise, my goal is to guide students into turning their functional question into an interpretive question. I do this through a series of Polya-like questions to the students that flows a little something like this (click to enlarge):

This is less complicated than it looks. Basically, if a student asks a functional question, I first see if the student’s done what they’re asking before. If so, they go refresh their memories. If not, they look it up in an appropriate help file until they find something that looks like what they want. Then they play with it for a minute or two to get the basic idea. Then, by that point, they either know what they’re supposed to do, or else they have a deeper, more cognitively complex question to ask, not What do I type in to do this? but Why does this work the way it does? In a freshman-level class like this one, any time I can get students to elevate themselves from functional questions to interpretive/clarifying questions, I consider it a win.

What students get out of this process is the ability to move beyond needing the professor to tell them what to do. They become self-feeders. This is important because the professor is not going to be there when they really need this stuff, two or three courses down the line or when they’re out on the job (for which they were hired because they, and nobody else around them, has these kinds of computer skills). They are getting the ability to learn on their own, which is what I consider really to be the single, primary life skill.

Unfortunately students tend to resist this process. It is not what they are used to. They are used to teachers telling them the answers to their questions, regardless of what kind of question it was, and to them a failure of a teacher to give a straight answer to their questions is tantamount to either incompetence or indifference. So this process requires a constant P.R. effort and constant clarifying about why we do things this way. And that P.R. effort doesn’t always work. I still have students who complain that I don’t answer their questions; who feel belittled when they identify that they’ve seen a command before and are asked to go back and review it; who feel questions are pointless because I’m just going to ask them more questions in return.

These are freshmen, used to a transactional model of education predominant in American high schools. The fact that this model — the teacher tells the students what to do; students follow teacher’s directions; students get good grades — is the predominant one is a serious problem in our schools, but that’s another issue. Whatever the case may be, I am getting these folks in the final four years of their formal schooling (for the most part) and if I don’t get them thinking on their own, they will crash and burn in the real world.

And I think that even if these students go on never to use MATLAB again after graduation but have a well-practiced and fluid ability to learn new and complicated things on their own, I consider that the biggest win of all. And it’s a good reason to take the MATLAB course in the first place.

## Indiana teacher licensing changes now official

The sweeping set of teacher licensing changes for Indiana, which I first blogged about here last July, has officially been signed into law. Frankly, I’m surprised, on two levels.

First, although this proposal flew mainly under the radar in Indiana, it was quite polarizing. The public, especially parents of school-aged kids, seemed mainly to be in favor of the bill; while teachers, teacher unions, and university education professors were quite vocally against it. Usually something this divisive doesn’t make it to being signed into law, or else it gets gutted and compromised first. But I can’t find any changes that were made between the bill and the law. It looks like what we saw is what we will get.

Second, it was pretty clear if you scratched the surface of this bill that one of its reasons for being was to put Indiana in a position to get Race to the Top money from the Federal government. Once Indiana was declared out of the running for that money, I figured the bill would get dropped, or else gutted/compromised. But apparently not so.

There will be winners and losers as these changes are implemented. As I said back in July, probably the biggest losers will be the education departments at large universities, which are constructed for the sole purpose of preparing preservice teachers to fulfill the outgoing licensing requirements. Now that the pedagogy coursework requirements for education majors will be drastically reduced, so will the workloads of many of the profs in those departments, and one wonders what happens next. The smaller colleges, like mine, will be fine. Our education faculty are generalists by necessity, and most of our secondary education degrees — which will no longer exist — are just one or two courses shy of a content major anyway. The big winners in this are going to be:

• People who want to become teachers but lack the time, resources, or willpower to follow the traditional — and highly regimented and lengthy — coursework for an education degree. Many of these are students who come to my college wanting to get a degree in math or science and eventually find their way into teaching, and who walk away disappointed that preparing to become a teacher is an all-or-nothing proposition — you can’t just “pick up a teaching license” in a content area. You either choose to invest dozens of credit hours in education courses or you stay out of teaching. I will be very happy to tell all of my highly talented math and engineering students that as of today, if you want to become a teacher, you can.
• Indiana college students, who now have more career options open to them. College students who trained to become teachers but who later want to leave the profession for something else will have a content degree to fall back upon. Those with, or who are working on, content degrees won’t have to make the all-or-nothing choice I mentioned above; if they decide later in their degree program to become teachers, they can.
• Indiana school kids, especially high school kids who are now guaranteed to have teachers who will now be just as proficient in their subject areas as a beginning practitioner of the discipline working in business, industry, or government or going to graduate school. We all realize that content competence (if not mastery) is not a sufficient condition for good teaching; but it is a necessary condition, and far too often that condition is not met. No longer!

This is a big net win for Indiana.

Filed under Early education, Education, High school, Life in academia, Teaching

## Programming, lectures, and the inverted classroom

Image via Wikipedia

We started programming in the MATLAB course a couple of weeks ago. It’s been… interesting. Keep in mind that 75% of the students in the class have never written a program of any sort before; half the class rates themselves below a 6 out of 10 in “comfort level” in using computers at all. As with everything else in this course, the audience is everything.

I started this three-week unit last week with a minilecture on FOR loops. But wait, you say: I thought you were using an inverted classroom model for the MATLAB course, where students are assigned reading and viewing tasks outside of class, accompanied by homework assignments designed to help them extract the relevant information and then do simple applications of what they’ve learned. Well, yes, that’s been the plan, and the practice up until now.

But I decided to go with a minilecture/activity model for the programming unit for two reasons. One, as has been the case much of the time when putting this class together, I wasn’t finding any materials out there to give out to students on the absolute basics of MATLAB programming — by which I mean the concept of the function M-file and looping structures (we’re getting to branching structures later) — that is suitable for a total-novice audience. The Mathworks, Inc. tutorials, usually well-suited for this kind of thing, were just a little too advanced. And there just wasn’t much else out there on this subject that I’ve found that was free, online, and well-suited for this kind of thing. If you think that smells like a screencasting opportunity waiting to happen, you might be on the right track.

Secondly, the students have been struggling with this inverted classroom model even when the materials I give them are good and the subject (like curve fitting) is both familiar and pretty basic. The struggles have been mainly cultural and psychological, not intellectual. The students are plenty smart enough to pick up the basics on their own. But we’ve run into some linear combination of these issues:

• Not adopting an appropriate timetable for learning the material outside the classroom. That timetable is: get to work early on the stuff, spend small chunks of time on it, and make those chunks frequent. The ideal schedule probably comes out to: no more than 30-45 minutes at a sitting, done over the course of 5-6 days. That jives with the “2 hours outside of class for every hour inside of class” conversion factor that usually works for college. Instead, the average start time on the outside work has been less than 24 hours before the labs.
• An expectation that after watching the videos or doing the reading, we are now ready to write workable code. There has not been widespread recognition that programming, or just working with a computer system in general, is all about getting your hands dirty with stuff that is not assigned before there is a chance of doing correctly the things that are assigned. There is a certain amount of time between being exposed to information and being able to do something right with it, and that time has to be spent doing things wrong with it. The misunderstanding, common to this demographic, is that information = expertise. Get exposed to the information enough, and you’ll be good at whatever that info was about.
• A simple psychological block against the idea that basic acquisition of concepts can take place in the absence of an expert.

I asked students in a questionnaire what changes to the class would help them learn MATLAB better. Overwhelmingly (75%) the students said that a lecture before the lab activities would be helpful, even though this would mean drastically reduced time on the labs in class and therefore more time spent outside of class, which is something they (understandably) don’t want. When I asked a couple of students what they expected to get from a lecture that they can’t get through online materials, use of the class discussion board, office hours, or conversations with their lab partners, the answer was: We’d just feel better about things if you’d lecture.

So, as I said, I started the first programming class with a minilecture. I walked students through the creation of a function called sin_period:

function period = sin_period(p)
period = 2*pi/p;
x = linspace(-2*pi, 2*pi);
plot(x, sin(p*x))


So this is an unsophisticated example of how you can write a MATLAB function that does a couple of pretty different things at once. It calculates the period of $y = \sin(px)$ where the parameter $p$ is provided by the user, and then it generates a plot of this function. Lab activity #1 given to the students: Modify this function so that the plot contains exactly two periods of $y=\sin(px)$ and it puts a plot of $y=\sin(x)$ on the same plot, using a dashed red line, for reference. (I really sold this to the education majors, who make up half the class, as an example of where a MATLAB function could be a useful classroom demo tool for a trigonometry or precalculus class.)

The second demo in the minilecture was using a basic FOR loop:

for i=1:10
disp(['The square of ', num2str(i), ' is ', num2str(i^2)])
end


This was actually given out in homework during the week with the instructions to change stuff in this loop and see what happens. What is the disp command doing? What is that num2str command and why do we need it? What happens if we leave off the square brackets inside disp, and why do we get the error message we get? And above all, what does this code actually do? What would you change to get it to print out the squares of the first 20 positive integers? And so on.

I wanted this to be not so much a minilecture as a discussion among students of what they did, what they encountered, and what they learned during their code-tweaking. But it ended up being nothing but me lecturing. I’m not sure what happened. Certainly I didn’t insist on students sharing what they discovered; maybe I was getting nervous about taking up too much more lab time.

After this was over, I gave Lab activity #2: Write a function M-file called vector_diff that accepts a vector “x” as input and produces a vector “d” as output, whose entries are the differences in consecutive entries of “x”. For example, vector_diff([1 3 0 8]) should return [2 -3 8]. Of course the diff function in MATLAB already does this, and some students figured that out, but the point was to recreate that functionality from scratch to learn how a FOR loop works.

So, you ask, how did that lab turn out?

It was all over the map in terms of quality. With the sin_period activity, about half the students got it exactly right. The other half almost uniformly added in the plot of $\sin(x)$ with the correct color and linestyle but were unable to get the function to adjust the x-range so that two periods of $\sin(px)$ show up. In other words, they were able to add in the routine stuff (just a plot command) but not able to transfer the idea of local variables within functions to use the period (which we’d already calculated) to set the x values. (All you have to do is replace x = linspace(-2*pi,2*pi) with x = linspace(-period, period).)

The FOR loop had a lot more variation. Some groups got it almost exactly right (biggest obstacle: not knowing how to add new entries to a vector). Some groups wrote code that appeared to be trying to use the right ideas, but the syntax was way off, for example using the counter variable “i” as if it were a vector (for example, using i(1):i(n) as the range on the counter). Some groups turned in nothing at all; although it turned out later that those groups had something done, but because it wasn’t exactly correct they decided to turn in nothing.

This is not a total loss, and this week (which I’ll report on later) I think we improved a lot through some more basic discussion of how to program, in general. But I take several lessons away from the results of the week 1 lab, with its much-requested lecture component:

• Lectures are only helpful to the extent that they impel students to act on what they are hearing. If you want a lecture just because you’d like an expert to assuage your misgivings about a subject — you want a lecture merely to feel better and more centered about what you’re learning — then the lecture is going to accomplish nothing other than providing a false sense of security to the students. Is this helping the student? No.
• Students who are still less than one year out of high school, where largely the opposite of what we’re doing in this class is the norm, have no idea that the first point is the case. For most students in this concrete mode of thinking, teaching = lecture = learning. This doesn’t mean they aren’t smart or capable of becoming self-supporting learners, which is sort of an overall goal of my teaching in any class. It does mean that they have to be exposed to activities that enable or require self-sufficiency, early and often. Or else they will be totally unable to function after they graduate.
• Therefore I’m more convinced than ever that the inverted classroom model for this class really is the right way to go. Give students “lectures” outside of the class time; give them time to think, questions to answer, simple tasks to perform that are based on what they read and watch. If they do it, this will generate the right questions which they can then ask (themselves, their lab partners, or me). Then they have an entire class meeting in which to do some more complicated task.
• But this only works to the extent that students adopt the short/frequent/early schedule for working on the material. If students continue to operate on the assumption that 300 minutes applied in a single 2.5-hour block late on Sunday night is the same as 300 minutes applied in five 60-minute blocks across multiple days of the week, then of course they’ll choose what appears like the lowest-footprint model and go with the single big block. But this is a flawed assumption, especially in an activity which most students self-identify as being something with which they are totally unfamiliar and largely not all that comfortable.
• This means I have to do a better job of getting students to realize this. I don’t want to start FORCING students to work this way — for example, by having teams submit journal entries or blog posts or something every couple of days. I’d rather get them to see that learning a computer tool is much more fun when you give yourself time to play, time to make and correct mistakes — time to get used to the kinds of expert behaviors that computer people employ. Incentivize rather than require.

The story continues.