teaching machines

CS 330: Lecture 18 – Memory

Dear students, We’ve been talking about memory a fair bit lately, and I think it’s helpful that we have a clear picture of what’s happening when we run an executable. So, let’s have a quick discussion. When we double-click on a program or invoke it in the shell, the machine code for that program gets […]

CS 318: Lab 13 – Responsive Design

Dear students, Today we begin our investigation into responsive design, the central mechanic of which is selectively applying styles based on the viewing context. You have one style for large desktop displays, another for tablets, another for phones, and so on. In general, we might do the following on smaller screens: Remove images or present […]

CS 330: Lecture 17 – Subtype Polymorphism

Dear students, As we discussed last time, polymorphism is the pursuit of code that works with many types. It manifests itself in several forms that we’ve been discussing: Coercion, in which we have a value of type X and an operation that expects type Y, but there’s a known path for converting Xs into Ys. […]

CS 318: Lab 12 – Two-column Layouts

Dear students, Today we visit the canonical two-column layout. We’ll use the float property to allow other content to flow around it. We’ll do a quick example together of adding illuminated letters to a page. Suppose we have this paragraph: <p>A writer&mdash;and, I believe, generally all persons&mdash;must think that whatever happens to him or her […]

CS 330: Lecture 16 – Ad Hoc Polymorphism Continued

Dear students, As we discussed last time, polymorphism is the pursuit of code that works with many types. It manifests itself in several forms that we’ve been discussing: Coercion, in which we have a value of type X and an operation that expects type Y, but there’s a known path for converting Xs into Ys. […]

CS 330: Lecture 15 – Ad Hoc Polymorphism

Dear students, As we discussed last time, polymorphism is the pursuit of code that works with many types. It manifests itself in several forms: Coercion, in which we have a value of type X and an operation that expects type Y, but there’s a known path for converting Xs into Ys. The function is polymorphic […]

CS 318: Lab 11 – Mockups

Dear students, The next milestone of your project is to create mockups of your pages. The intent behind a mockup is to create a visual sketch of your page that can inform your design before making changes becomes too costly. Its audience is both you, your co-designers, and your client. There’s a great temptation to […]

CS 491: Lecture 5 – Pathlete Continued

Dear students: Today we don’t introduce any new hardware, but we do explore a common mechanism for designing levels: text assets. Unity’s drag-n-drop editor is great, but some times ASCII does the job more quickly. We’ll use a plain text editor to lay out levels for Pathlete, the game we started last week. We’ll also […]

CS 330: Lecture 14 – Polymorphism and More Type Safety

Dear students, Like we’ve been saying, type systems keep you from invoking illegal operations on data. A good type system will alert us when we write code like this: char alphabet[] = "abcdefghijklmnopqrstuvwxyz"; char c4 = 4[alphabet]; printf("c4: %c\n", c4); Actually, this code compiles—without warnings—and runs just fine. Because array subscripting is commutative: a[2] is […]

CS 318: Lab 10 – Absolute and Relativing Positioning

Dear students, There’s immense power in the position property. It is your vehicle for anchoring elements relative to another, animating them on user interactions, providing a heads-up display that is always on screen, and achieving a fluid layout that can bend and flex with the browser window. The most common values for this property include: […]

1 23 24 25 26 27 110