CS 1: Lecture 29 – Growable Arrays

Dear students, Arrays make the modern world happen. The computer itself can be viewed as one big array, lining up all our data, music, photos, and movies on disks and in RAM. However, arrays have their limits. In particular, arrays are fixed in size. We need to know their size when we create them. Sometimes […]

CS 396: Meeting 10 – Cisco

Dear students, Today we welcome Jonathan Gardner from Cisco as our guest. Jonathan and I were fellow graduate students down in Knoxville, Tennessee. Graduate school is a pretty sweet place, because everybody that’s there wants to be there. Not only did we have computer science interests binding us together, but we were also on the […]

CS 1: Lecture 28 – Arrays in 2D

Dear students, Let’s start today off with some blackboxes. As we solve these, consider which of the four patterns our algorithm fits. Blackbox #1 Blackbox #2 Blackbox #3 Blackbox #4 Blackbox #5 Now let’s consider a famous statistical problem. Suppose birthdays are uniformly distributed across the calendar year. What’s the probability that we in this […]

== true

When I was a junior in college, I lost a point on an exam because I had code like this: if (isTall == true) { … } Dr. Wallingford showed me with his red pen that == true is completely unnecessary. This is quite clear when you consider the truth table: isTall isTall == true […]

Random Splats

I keep a thinklist of things I’d like to think about. This list comes in handy during meetings. Sometimes I even look forward to meetings, because that means I’ll have some time to think. Recently I added to this list the notion of generating random splats. My first thinking was to generate a circular polyline […]

CS 145: Lab 9 – Arrays

Welcome to lab 9! If you have checkpoints from the last lab to show your instructor or TA, do so immediately. No credit will be given if you have not already completed the work, nor will credit be given after the first 10 minutes of this lab. In this lab you will work with data […]

CS 1: Lecture 27 – Array Patterns, Part 2

Dear students, Last time we started looking at a few array patterns: map, linear search, and optimize. Today we visit the last of these: the accumulate pattern. Accumulation algorithms collect all the data up into one big value. Finding the sum, mean, and product of a bunch of numbers fits this description. So does joining […]

CS 1: Lecture 26 – Array Patterns

Dear students, After you solve a few array problems, you start to see some regular patterns emerging in your algorithms. Today, we break down a few of those patterns. The payoff of cataloging these is that the next time we encounter an array problem, we can apply the general structure and save our labor and […]

CS 396: Meeting 9 – Cray

Dear students, Today we welcome Dan Ernst from Cray to our class. He’s going to lead us in a discussion about where our industry is headed in terms of hardware. You probably think Dan is a complete stranger, a separate human being whose life has run completely independently of yours. Like two processes on two […]