For the past two years, I’ve been writing a blog post each month featuring common mistakes that students make, tools to make students’ lives easier, sample problems, and discussions of common course topics. While I’ll be signing off from these monthly blog posts, I’d like to take the time to feature my top picks from the last couple of years: using git, topics in Java programming, and avoiding begging the question in proofs.
Practice Problem: Ending with a Newline
Let’s consider a text file: maybe it ends with a newline character, or maybe it doesn’t. Tools like git work more smoothly with files that end in newlines. Command-line tools like cat also produce clearer output when working with files that end in a newline. So, today’s Java programming problem asks you to fix files that don’t end in a newline.
Practice Problem: Is 3 Irrational?
In a first number theory course, there’s typically a proof that the square root of 2 is irrational. The traditional proof uses the properties of divisibility to arrive at a contradiction. We can even swap a 5 into the proof, in place of the 2, to prove the square root of 5 is irrational. But could we do the same with a 9, and “prove” that the square root of 9 is irrational?
Practice Problem: Circular Linked Lists
Linked lists are a topic I frequently discuss with students. So for this month’s blog post, I want to present a linked-list practice problem. We’ll look at a variation on the traditional singly-linked list, called a singly-linked circular list with a tail pointer. How can we insert into this type of list, and how can we search one for a given value?
What’s That Tiny Makefile?
When I’m working with programming students, I usually write a quick Makefile. Only a few lines long, this file allows us to recompile code on the command line just by typing “make”. In this post, we’ll skip over all the details of writing complex Makefiles. Instead, we’ll see how to slap together a rudimentary Makefile in seconds — one that will save us time while we’re working on an assignment.
