Skip to main content

C'est la Z

Category: CS

Quick Sort over Zoom

I haven't been blogging much this year. Not sure why - probably pandemic fatigue. It's also affected my blog reading - more scanning, less deep reading. I've also been trying to spend mode time off screen learning how to paint (with,let's say mixed results :-) ) leaving less time and energy to blog. Hopefully I'll pick up on both ends as more people get vaccinated and we can get to a more normal life.
# COMMENTS

On Teaching Recursion

Yesterday I read three posts on teaching recursion. First by Shriram Krishnamurthi discussing his thoughts on how recursion is taught incorrectly. This prompted Adam Michlin to write about teaching recursion later with some commentary on APCS and then finally, Alfred Thompson added his thoughts. Much like everything else in education there is no single right way to do things. To say as an absolute that you should or shouldn't teach in a certain way is wrong - too many variable.
# COMMENTS

Working with texts part 3 - word chains

At this point, we've done a fair amount of playing with text so it's time for a fun little project. We're going to generate some text "in the style" of a source text. The technique we're going to use is usually called a Markov Chain text generator. Basically a model where the next state or word is based entirely on the current state. I don't dwell on the math under the hood but in case you're interested, here are a few links: Wikipedia, Explained Visually, UC Davis Math.
# COMMENTS

Working with texts part 2 - bag of words

Following up on a previous post, we're going to continue to talk about playing with text. This time, building and working with a bag of words from a text. A bag of words is a simple language processing model where you just consider individual words in a text. What they are and how many times they occur. This is a pretty simple model but you can still have a good bit of fun with your students with it.
# COMMENTS

Code Review Revisited or research - the teacher version

Last semester I wrote about how I was introducing my students to code review. I thought it worked pretty well and was anxious to try it again. Well, I did the lesson(s) again this past week and it looks like it's a keeper. The setup was pretty much the same with some hiccups due to using a new platform. Last semester I used plain GitHub public repos. This time, I've been using GitHub classroom which I like very much but I forgot that I made this assignment use private repos which turned out to be a hassle.
# COMMENTS

Solve A To Solve B

So many programming assignments involve a direct solution. Write a program to do this or write a problem to solve that. It's pretty typical. There's nothing wrong with assignments like these. They allow students to practice what they've been learning and it gives them the opportunity to create some cool programs. All the same, I like it when there's an indirect problem. You're faced with a problem but in order to solve it you first have to solve some other problem That's why I liked day 10 from this year's Advent of Code.
# COMMENTS

An experiment with code review

Sometimes professional practices don't work well in the classroom and sometimes they do. One professional practice that does work well is code review - reading and reflecting on other peoples code. I've had my students do code reviews in the past but this time I did things differently. Here's what I did and here's how it went Two weeks ago my students completed a lab. The lab involved reading in a poorly indented C++ program and spit out a properly indented one.
# COMMENTS

Who Played Spiderman - part 3

Parts 1 and 2 Part 1 Part 2 Part 3 In the first two parts of this set of posts I wrote about the motivation and design a question answering system that can answer "who" queries like "who played Spiderman" or "who shot John Lennon?" It's not perfect. When doing the Spiderman query, chances are the desired answer will be at or near the top of the list of most frequently appearing names but so will "Peter Parker.
# COMMENTS

Who Played Spiderman part 2

Parts 1 and 3 Part 1 Part 3 Part 2 When we left off last time we used a search engine API to gather a whole bunch of documents with the term "played Spiderman" or "who played Spiderman." Now we have to process these documents to answer the question. Fortunately, the documents are basically just big strings of text.
# COMMENTS

Who Played Spiderman part 1 or my Nifty Assignment (that was rejected)

Parts 2 and 3 [[/post/who-played-spiderman-2/][Part 2] Part 3 I wasn't going to teach this lesson today. I was planning on starting a multi day project starting with an exercise in specification writing and design. Beforehand though, we had to talk about classes. One of my students asked if probability and/or statistics were really important for CS. I started to cite a few examples and then decided to segue into this.
# COMMENTS