teaching machines

CS 145 Lecture 34 – Slideshow

Dear students, I’ve said several times that object-oriented design helps us organize our code. We can put code and the data that it regularly processes together into the same chunk. Objects allow for the separation of concerns. Class A can focus on its task, and be very good at it. It can be tested and […]

CS 352 Lecture 35 – Caching Strategies

Dear students, We looked last time at how our code will perform better if we capitalize on temporal and spatial locality. Sadly, we cannot avoid misses altogether. Caches are finite storage, and their designers must decide where blocks from memory will go in the cache and how long they will stay there. As you’ve done […]

CS 145 Lecture 33 – Stopwatch

Dear students, As we saw with methods, a primary benefit of object-oriented programming is code reuse. We can create a utility and use it over and over again, in many contexts. We will do just that by designing a Stopwatch class. We will use it to time a few operations: a words-per-minute calculator the amount […]

CS 145 Lab 11 – SplatBot

Welcome to lab 11! 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 create a robot […]

CS 352 Lecture 34 – Memory Hierarchy Cont’d

Dear students, Last time we introduced the memory hierarchy. This hierarchy is not unlike a league of superheroes, each with its strengths and weaknesses. But the weaknesses are minimized, as long as you rotate in the proper superhero for each villain you encounter. For the memory hierarchy, the goal of stacking together these technologies is […]

CS 352 Lecture 33 – Memory Hierarchy

Dear students, Here’s the situation: our processors typically have somewhere between 4-30 general purpose registers. In a load/store architecture like ARM, computation can only be done on registers, and 4-30 pieces of data is simply not enough. Why not, then, make a computer with millions of registers? There are several reasons: Registers are identified within […]

CS 145 Lecture 32 – Objects Cont’d

Dear students, In object-oriented programming, the programmer is really a writer of screenplays. Objects are our actors, which we orchestrate around the stage. We cue them to say certain things, have them interact with other objects, and shape them to have an identity that is all their own. Today, we’ll feel our away around the […]

CS 491 Meeting 11

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 31 – Hello, Objects

Dear students, We’ve seen the Computer as a Calculator, a Chef, a Philosopher, a Pilot, and a Factory Worker. We’ll see it in two more roles: a Scribe and a Creator. A scribe is literate, recording accounts and memories for later retrieval. We’ve already seen how we can use Scanner to retrieve data from a […]

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). […]

1 2 3 4 13