teaching machines

CS 352 Lecture 32 – Von Neumann Architecture

Dear students, Today we discuss the pattern that generalizes most modern computers: the von Neumann architecture. But we start back before such a pattern converged. In the 1940s, the ENIAC was built to calculate artillery tables for World War II. It was built out of many vacuum tubes (which served the same role as transistors). […]

CS 352 Lecture 31 – Framebuffer

Dear students, Today we continue our discussion of working more directly with I/O devices by reading and writing to their device files in Linux. Last time we reverse engineered the PS/2 mouse protocol. This time we use the Linux input_event API to read from keyboard. With two input devices to read from, we’ll encounter an […]

CS 145 Lecture 30 – ArrayList

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 352 Lecture 30 – Mouse

Dear students, Today we’re going to do something a little different. I don’t think me lecturing is the best way for you to learn, but I don’t think there’s enough time in a semester to do much better. I am always looking for ways to step back and let you more actively participate. Today, we […]

CS 145 Lecture 29 – Arrays in Two Dimensions

Dear students, We’ve seen that we can create an array like this: type[] id = new type[#]; That type can be anything, like int, String, double, boolean, BufferedImage, and so on. It can also be another array: type[][] id = new type[#][]; Just as 1D arrays let us use one integer to map into a […]

CS 352 Lecture 29 – Functions Cont’d

Dear students, We try as hard as we can to use registers for our calculations, but we cannot always avoid going to memory. Today we will look at how variables inside functions are allocated, accessed, and freed through a few more examples. Unlike registers and globals, stack and heap variables don’t have names. We must […]

CS 491 Meeting 10

Dear students, We are in the working phase of developing our games, so most of our time will be spent giving weekly progress reports. Here are some questions we will probably ask you: What’s the riskiest part left to investigate in your endeavor? What three or more specific things will you accomplish before we meet […]

CS 145 Lecture 28 – Arrays * 4

Dear students, With arrays, we are treating the computer as a factory worker, performing some automated task on every item rolling through an assembly line. It’s these mindlessly repetitive tasks that make computers so compelling. While they do the grunt work, we can move on to a more intellectually-challenging exercise, like getting the machine running […]

CS 352 Lecture 28 – Functions

Dear students, Today we look at how functional abstractions are built atop rudimentary assembly instructions. The magic to make functions happen is really just two ideas: a register (lr), which places a bookmark for our program counter so we know where to return to after the function finishes a standard protocol for passing parameters and […]

CS 145 Lecture 27 – 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 […]

1 40 41 42 43 44 110