September 19, 2014 3:34 PM

Ask Yourself, "What is the Pattern?"

I ran across this paragraph in an essay about things you really need to learn in college:

Indeed, you should view the study of mathematics, history, science, and mechanics as the study of archetypes, basic patterns that you will recognize over and over. But this means that, when you study these disciplines, you should be asking, "what is the pattern" (and not merely "what are the facts"). And asking this question will actually make these disciplines easier to learn.

Even in our intro course, I try to help students develop this habit. Rather than spending all of our time looking at syntax and a laundry list of language features, I am introducing them to some of the most basic code patterns, structures they will encounter repeatedly as they solve problems at this level. In week one came Input-Process-Output. Then after learning basic control structures, we encountered guarded actions, range tests, running totals, sentinel loops, and "loop and a half". We encounter these patterns in the process of solving problems.

While they are quite low-level, they are not merely idioms. They are patterns every bit as much as patterns at the level of the Gang of Four or PoSA. They solve common problems, recur in many forms, and are subject to trade-offs that depend on the specific problem instance.

They compose nicely to create larger programs. One of my goals for next week is to have students solve new problems that allow them to assemble programs from ideas they have already seen. No new syntax or language features, just new problems.


Posted by Eugene Wallingford | Permalink | Categories: Patterns, Software Development, Teaching and Learning

September 15, 2014 4:22 PM

It's All Just Keystrokes

Laurie Penny describes one effect of so many strands of modern life converging into the use of a single device:

That girl typing alone at the internet café might be finishing off her novel. Or she might be breaking up with her boyfriend. Or breaking into a bank. Unless you can see her screen, you can't know for sure. It's all just keystrokes.

Some of it is writing in ways we have always written; some it is writing in ways only recently imagined. Some of it is writing for a computer. A lot of it is writing.

(Excerpt from Why I Write.)


Posted by Eugene Wallingford | Permalink | Categories: General

September 12, 2014 1:49 PM

The Suffocating Gerbils Problem

I had never heard of the "suffocating gerbils" problem until I ran across this comment in a Lambda the Ultimate thread on mixing declarative and imperative approaches to GUI design. Peter Van Roy explained the problem this way:

A space rocket, like the Saturn V, is a complex piece of engineering with many layered subsystems, each of which is often pushed to the limits. Each subsystem depends on some others. Suppose that subsystem A depends on subsystem B. If A uses B in a way that was not intended by B's designers, even though formally B's specification is being followed by A, then we have a suffocating gerbils problem. The mental image is that B is implemented by a bunch of gerbils running to exhaustion in their hoops. A is pushing them to do too much.

I first came to appreciate the interrelated and overlapping functionality of engineered subsystems in graduate school, when I helped a fellow student build a software model of the fuel and motive systems of an F-18 fighter plane. It was quite a challenge for our modeling language, because the functions and behaviors of the systems were intertwined and did not follow obviously from the specification of components and connections. This challenge motivated the project. McDonnell Douglas was trying to understand the systems in a new way, in order to better monitor performance and diagnose failures. (I'm not sure how the project turned out...)

We suffocate gerbils at the university sometimes, too. Some functions depend on tenure-track faculty teaching occasional overloads, or the hiring of temporary faculty as adjuncts. When money is good, all is well. As budgets tighten, we find ourselves putting demands on these subsystems to meet other essential functions, such as advising, recruiting, and external engagement. It's hard to anticipate looming problems before they arrive in full failure; everything is being done according to specification.

Now there's a mental image: faculty gerbils running to exhaustion.

If you are looking for something new to read, check out some of Van Roy's work. His Concepts, Techniques, and Models of Computer Programming offers all kinds of cool ideas about programming language design and use. I happily second the sentiment of this tweet:

Note to self: read all Peter Van Roy's LtU comments in chronological order and build the things that don't exist yet: http://lambda-the-ultimate.org/user/288/track?from=120&sort=asc&order=last%20post

There are probably a few PhD dissertations lurking in those comments.


Posted by Eugene Wallingford | Permalink | Categories: Computing, General

September 04, 2014 3:32 PM

Language Isn't Just for Experts

Stephen Ramsey wrote The Mythical Man-Finger, in defense of an earlier piece on the virtues of the command line. The gist of his argument is this:

... the idea that language is for power users and pictures and index fingers are for those poor besotted fools who just want toast in the morning is an extremely retrograde idea from which we should strive to emancipate ourselves.

Ramsay is an English professor who works in digital humanities. From the writings posted on his web site, it seems that he spends nearly as much time teaching and doing computing these days as he spends on the humanities. This opens him to objections from his colleagues, some of whom minimize the relevance of his perspective for other humanists by reminding him that he is a geek. He is one of those experts who can't see past his own expertise. We see this sort of rhetorical move in tech world all the time.

I think the case is quite the opposite. Ramsay is an expert on language. He knows that language is powerful, that language is more powerful than the alternatives in many contexts. When we hide language from our users, we limit them. Other tools can optimize for a small set of particular use cases, but they generally make it harder to step outside of those lines drawn by the creator of the tools: to combine tasks in novel ways, to extend them, to integrate them with other tools.

Many of my intro students are just beginning to see what knowing a programming language can mean. Giving someone language is one of the best ways to empower them, and also a great way to help them even see what is possible.


Posted by Eugene Wallingford | Permalink | Categories: Computing, Teaching and Learning

September 03, 2014 4:13 PM

My PhD Advisor Takes on a New Challenge

Just this week I learned that Jon Sticklen, my PhD advisor, has moved to Michigan Tech to chair its Department of Engineering Fundamentals. As I recall, Michigan Tech focuses much of its effort on undergraduate engineering education. This makes it a good fit for Jon, who has been working on projects in engineering education at Michigan State for a number of years now, with some success. I wish him and them well.

By the way, if you can handle a strong winter, then Tech can be a great place to live. The upper peninsula of Michigan is stunning!


Posted by Eugene Wallingford | Permalink | Categories: Personal, Teaching and Learning

September 01, 2014 3:17 PM

Back to the Beginning

August was quiet on my blog only because it was anything but quiet elsewhere. The department office had its usual August business plus a couple of new challenges thrown in. I spent one day on jury duty, one day in retreat with fellow department heads, and one day on a long bike ride. My older daughter was home for a few days before heading back to college for her senior year, and my younger daughter was preparing to leave for college for the first time.

On top of that, I am teaching our intro course this fall. I have not taught intro since the fall of 2006, when I introduced media computation into our Java track. Before that we have to go back to the late 1990s to find me in front of a classroom full of students embarking on their first programming experience. I'm excited and a little apprehensive. There is great opportunity in helping students lay the foundation for the rest of their CS coursework. But there is also great risk. For the most part, these students have never worked with a floating-point number or a variable or an assignment statement, at least in the context of a programming language. How badly might I lead them astray?

We now teach Python in this track. I could have used media comp as our organizing theme again, but the instructors who have been teaching in this track for the last few years have moved to a data manipulation them, using a textbook by Bill Punch and Rich Enbody. I decided to do the same. There is no sense in me disrupting the flow of the track, especially with the likelihood that I won't teach the course again in the spring. (In the interest of full disclosure, I told my students that Bill was one of my mentors in grad school at Michigan State.)

The first week of class went well. As expected, the students reminded me how different teaching intro can be. There are so many ways for novices to interpret so many things... Type a simple expression or two into the Python shell, ask them what they think,and find out for yourself!

Every teacher knows that the first day of class shatters any illusion we might have of teaching the perfect course. Such illusions are more common for me when I teach a course for the first time, or the first time in a long while. The upside of shattering the illusion is that I can move on to the daily business of getting better.

At the end of our first lab session, I walked with one student as he was leaving the room. He had asked a few questions during the exercise. I asked how he felt, now that he had completed successfully his first lab as a CS major. "I am excited and scared," he said. "Scared has been keeping me away from computer science, but I know I have to try. I'm excited."

I know exactly he how feels. I'm apprehensive, not in fearing failure or catastrophe, but in being aware that I must remain vigilant. When we teach, we affect other peoples' lives. Teaching a first course in the discipline, introducing students to a new set of ideas and way of thinking, is a multiplier on this effect. I owe it to these students to help them overcome their fears and realize their excitement.


Posted by Eugene Wallingford | Permalink | Categories: Teaching and Learning

August 30, 2014 7:43 AM

A Monad Sighting in Pop Literature

Lab experiments are invaluable in the hard sciences, in part because neutrinos and monads don't change their behavior when they are being watched; but humans do.

Several things ran through my mind when I read this sentence.

  • "Monads don't change their behavior when watched." Wow. The authors of this book must know a little functional programming.

  • Monads mentioned in the same sentence as neutrinos, which are fundamental particles of the universe? Oh, no. This will only make the smug functional programming weenies more smug.

  • Monads are part of the "hard sciences"? These authors really do get functional programming!

  • This sentence appears in a chapter called "The Three Hardest Words in the English Language". That joke writes itself.

  • Maybe I shouldn't be surprised to see this sentence. The book called Think Like a Freak.

I kid my monad-loving friends; I kid. The rest of the book is pretty good, too.


Posted by Eugene Wallingford | Permalink | Categories: Computing

August 19, 2014 1:49 PM

The Universal Justification

Because we need it to tell better stories.

Ethan Zuckerman says that this is the reason people are addicted to big data, quoting Macej Ceglowski's wonderful The Internet with a Human Face But if you look deep enough, this is the reason that most of us do so many of the things we do. We want to tell better stories.

As I teach our intro course this fall, I am going to ask myself occasionally, "How does what we are learning today help my students tell a better story?" I'm curious to see how that changes the way I think about the things we do in class.


Posted by Eugene Wallingford | Permalink | Categories: General, Teaching and Learning

August 16, 2014 10:19 AM

Channeling Virginia Woolf

In her diary, Woolf once secured in words a state of mind that has waylaid me recently.

Still if one is Prometheus, if the rock is hard and the gadflies pungent, gratitude, affection, none of the nobler feelings have sway. And so this August is wasted.

And yet hope remains. August is but half past.

~~~~~

(From an entry dated Tuesday, August 18, 1921, in A Writer's Diary.)


Posted by Eugene Wallingford | Permalink | Categories: Personal

July 30, 2014 1:04 PM

The Reach of a MOOC

Doug Schmidt

Distributed computing, OOP, and patterns guru Doug Schmidt recently posted on Facebook a statistical recap of his summer MOOC on pattern-oriented software architectures for mobile devices and cloud computing. Approximately 80,000 people signed up for the course, 40,000 people showed up, and 4,000 people completed the course in a meaningful way (taking automated quizzes and possibly doing peer-graded programming assignments). So that's either a 5% completion rate for the course, or 10%, depending on which standard you prefer.

A lot of folks complain that the reach of MOOCs is muted by their notoriously low completing rates. But Schmidt puts the numbers into perspective:

... I've taught ~1,000 students at Wash U., UC Irvine, and Vanderbilt in the past 20 years, so regardless of the completion *rate* the opportunity to reach > 4,000 students and teach them about patterns and frameworks for concurrent programming in Java and Android is pretty cool!

Schmidt has a lot of knowledge and experience to share. His MOOC shared it with an awful lot of people in one offering.

My department has not attempted a "massive" on-line course yet, though a few of our faculty did take a small first step last month. As Mark Guzdial lamented a few months ago, Google required that all of its CS4HS summer workshops be offered on-line. A few of my colleagues, led by Ben Schafer, have taught CS4HS workshops for the last five years, reaching in the ballpark of 20-25 teachers from northeast Iowa in each of the first four. As reported in the department's own Facebook post, this year the course enrolled 245 teachers from thirty-nine states and Puerto Rico. I haven't seen final numbers for the workshop yet, but just after it ended Ben reported good participation and positive evaluations from the teachers in the course.

I don't know yet what I think about MOOCs. The trade-offs are numerous, and most of my teaching experience is in smaller, more intimate settings that thrive on individual relationships with students. But I can't deny the potential reach for MOOCs to reach so many people and to provide access to valuable courses to people who otherwise likely could never attend them.

On a lighter note, the first comment in response to Schmidt's Facebook post is my favorite in a while:

I just loaded the dishwasher. Our jobs are so similar! Crazy, eh?

Don't worry, Kristie. Sometimes, I look at all the amazing thing Doug does and feel exactly the same.


Posted by Eugene Wallingford | Permalink | Categories: Teaching and Learning