Skip to main content

C'est la Z

Tag: CS

Advent 2019 Day 2

Day 2 of Advent of Code 2019 was also pretty straightforward and once again I wrote my solution in Clojure but in order to talk about this from a teacher's point of view, we'll look at a Python solution. At its core, this is a simulation problem - read the data into an array or list and write a program to run through the steps. At first I was hoping that the solution would consume the data - that is, once you read past an instruction you don't go back to it.
# COMMENTS

Advent of Code 2019 Day 1

Like most programming challenges, Advent of Code ramps out from easier, more accessible problems to harder, more complex ones. As such, a number of the early challenges are great problems for early CS students. I thought that while I watched my NY Giants play valiantly in their attempt to get a high draft pick I'd talk about today's challenge from a teacher's point of view. The summary of part one is that you have a list of inputs (masses of components) and for each one you have to perform a calculation (how much fuel is needed).
# COMMENTS

Advent Of Code 2019

It's almost December which means it's almost time for Advent of Code 2019. Advent of code is an annual computer programming competition created and ruyn by Eric Wastl. It's been running since 2015. I've written about it before, mostly from a teacher's point of view (Solve A to Solve B, Data structures and Hidden Complexity, Tools can shape how we think and a few others). Basically, Eric releases one poblem a day at midnight from Dec 1 through Dec 25.
# 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

Lesson and project inspiration from old BSD games

When I was writing the I Speak Jive post, the first thing I had to do was find those old programs. It turned out to be harder than I thought. I found online versions but it took a while to find this GitHub repo. On the way, I seemed to recall that these might be bundled with a bunch of old BSD games so I took a look at the BSD games package for Linux.
# 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

School Visit Update 2019

I've been spending a lot of time at area high schools this fall. Today I was at FDR High School in Broooklyn. <figure> <img src="" width="500px"/> </figure> I only learned about FDR HS a little over a year ago when I met their CS teacher Josh Hans at a NYC PD event. I visit last fall and then again today. Whenever I visit a school it's a different experience.
# COMMENTS

Give me a break (and a continue)

What can I do to discourage my students from using the "break" statement? That was more or less the gist of the comment and it elicited some good responses. This time the conversation was on Facebook but I've seen this one and participated in it many times before. I never liked the question when presented as a "how can I stop them" one. I equally dislike when the offered advice is basically "never use break no matter what" or something similar.
# COMMENTS

On Technical Interviews And Diversity

I recently stumbled upon Laurie Barth on Twitter and noticed a couple of tweets about tech interviews and the hiring process, something I've been thinking about recently. Solid rant. I think the teach to the programming test market already exists. And it’s why interviewers who subscribe to these tactics get upset if a candidate admits they’ve seen the problem previously. Because it ruins the illusion that this is revealing how candidates think.
# COMMENTS

Seam Carving and Dynamic Programming

It's spring break and for me that's always been a good time to explore some new ideas. Here's one that some of you might like, particularly if you're teaching APCS-A or something similar. Many APCS-A teachers do a unit on image processing using the picture lab (alternate resource). Image processing is a nice platform to explore two dimensional arrays. You basically use a 2D array of pixels (points) to represent an image.
# COMMENTS