Why learn & understand when you can search?

A recently and widely (in my nerd circles) shared XKCD comic featured ineffective sorting techniques. The alt text (what you get when you hover over the comic) proposed an additional sort:

StackSort connects to StackOverflow, searches for 'sort a list', and downloads and runs code snippets until the list is sorted.

Internet nerdom being fairly OCD, someone (Gregory Koberger) of course went and implemented this, and it works!

As Gregory says, this is potentially a security nightmare waiting to happen, so it’s not clear that you should actually run his code. Being a brave and foolish (and somewhat careful) soul, however, I’ve fallen on this sword so that you don’t have to, and I can confirm that it works. After trying several dozen StackOverflow pages (most of which yielded either “Could not extract a function to run” or “Contained potentially bad code”), it stumbled across a working version of Quicksort in JavaScript.

Ta Da!

The success of this approach, however, does suggest interesting things about how people approach certain kinds of problem solving these days. Where “old people” like me would have bought a book to learn something new, my students are much more prone to assemble a patchwork understanding from tons of Googling. While I think this often leads to a quite fragile and incomplete understanding of the topic at hand, it is often sufficient to get them through what is assigned. In other words, they’re very skilled at answering the question that was posed, which was itself often somewhat shallow because that’s what we all have time for. So while faculty would like to think that we’re creating experts (whatever that means) in certain topics, we rarely have the time to give them assignments and tasks that require a deep level of expertise.

In the land and time of books, we might have believed that everyone read and understood the 8 assigned chapters, but the assignments almost certainly didn’t strictly require that. In fact I’m willing to bet a whole lot skimming actually went on that was not so different from the Googling that happens now. The difference is that when I skimmed a book, there was a reasonably coherent thread connecting the dots that were touched on. “Skimming” the Internet, however, is a much less coherent experience. The authors, examples, and assumptions aren’t the same from search result to search result. Worse (in computing) the versions aren’t necessarily the same, so we often end up with inconsistent and downright contradictory results! A few years ago I taught a class that used Python 3, and it turned out that almost all Googling pointed us at Python 2 examples and answers, which lead to all manner of confusion amongst my students.

So call me old-fashioned, but I still like a book, even if it’s an e-book, when I’m learning something conceptually new, as I do really appreciate a coherent voice and structure. If I need to remind myself of a library function or piece of syntax, it’s to the Googles. If I’m learning something that’s very similar to something I already know, then I’m happy with on-line docs if they’re well written. If, however, I’m expanding my horizons in more significant ways, a book is still the thing.

Related posts

An unsolicited forward to an unfinished book

Bill Tozier was generous enough to share an early draft of his book-in-progress, currently entitled Answer factories: The engineering of useful surprises.

It’s a true joy, and I’m really looking forward to being able to read the “finished” work. It’s a project oriented book, though, which means that to really learn from it we’re going to have to play along at home, programming, and experimenting, and analyzing. We’re all going to have to set aside some time for this when it does come out. But it’ll be worth it. And while the claim is that we’ll be learning about Generative Projects or Genetic Programming or whatever Bill decides to have GP stand for when he wraps this thing, we’re also going to learn a lot about software development and problem solving along the way, from someone who’s got a lot of great things to say on those important subjects. So we’d best buckle our seatbelts!

I do, however, have to take issue with a claim Bill makes in the introductory “About this book” section:

This is not a textbook. If your instructors try to use it as one, complain. If they argue, send them to me.

To be honest, it’s turning out a lot more like an anti-textbook. It will not improve your performance on tests. We’ll use “advanced” techniques before we discuss “basic” ones, ignore common practices to focus on more appropriate contingent solutions for specific problems, and may not even touch on techniques your instructors think you ought to know.

Remember, my goal is to support and extend your existing skills so you can productively explore further. Seek comprehensive knowledge and historical grounding in other books. They are full of it.

I can’t help but think he had me in mind when he wrote these lines, and I doubt he’ll be surprised to learn that I’m certainly seriously considering using it in my Evolutionary Computation and Artificial Intelligence course in the Spring. <snigger>

The issue, I suspect, is what one considers a “textbook” and what the point of such a thing is. Traditionally textbooks are big, fat things that provide a “coherent” overview of “everything you need to know about subject X”. I’ve got a bunch of these on my shelves with nice overviews of things like calculus and physics and chemistry. Old things, with a clear sense of what matters and what order it should be presented in.

In teaching computer science, however, things are typically much less clear. What’s “vital” in our field? What’s the “natural” or most pedagogically sensible order to present that material? There are lots of ideas out there, but hardly consensus. And that’s on the introductory material; my upper division electives usually focus on material where there’s even less agreement.

Starting in the late 90’s I started moving away from “traditional” textbooks when I could. I found that the most important part of most of my courses was process rather then content. Most computing textbooks I’ve seen are, unfortunately, much stronger on content than process. There are piles of books full of catalogues of algorithms, but they’re mostly presented like magic tricks, things Very Smart People dreamt up in some strange opium vision, inaccessible to the rest of us. The challenge in my experience is coming up with these visions, the process and the problem solving. So a book like Fowler’s wondrous Refactoring is far more educational in the long run, giving us skills for life instead of a box full of baubles.

The contrast between process and content has been made far more pronounced by the web and its many tools and collections. Young folks (and even this old guy) almost never reach for a book when they want to look something up; that’s what Google is for. The reference value of big encyclopedias of “facts” is greatly diminished when we can so easily find things on-line, but a well-written description of an important process is still a treasure.

Which brings us back to Bill’s book.

He claims it’s not a textbook because he doesn’t plan to cover “every” technique or concept or approach. He’s going to doing things in the “wrong” order. Foolishly, he’s not going to help improve our performance on tests, choosing to instead helping us develop skills that will help us for years to come.

Silly, silly man.

So, yeah, I do want to use Bill’s book in my class, and my students are more than welcome to complain to me or take it up with Bill. I doubt, however, that they will. The writing is opinionated and ornery and humble in all the right ways, and the emphasis on projects and problem solving are the sort of thing our students just eat up. I’m guessing that they’d happily line up behind something like this vs. a more traditional text.

As will I.

P.S. You should check out the book’s LeanPub site (https://leanpub.com/pragmaticGP) and sign up for notification. It’s a great way for people to help delude Bill into thinking that he’s not actually wasting his time.

Or something like that.

Related posts