teaching machines

CS 330: Lecture 19 – Vtables

Dear students, Did you know that in the early days of C++, it was just a thin veneer over C? Classes were just syntactic sugar. We might have had a class that looked like this: class Hero { public: Hero(char *name, int hp) { this->name = strdup(name); this->hp = hp; } void cure(int boost) { […]

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 318: Project Mockup – due on March 28

Your next milestone in the project is to create mockups for each page of your site. You will then present these mockups to your client for initial feedback. Task 1: Create Mockups Use Moqups to create a mockup for each page of your site. For each page that will have significantly different desktop and mobile […]

CS 318: WordPress for March

Your task for March is style your blog with some CSS and write five posts about topics of your choosing. The posts don’t need to be long. Feel free to share poetry, a photo diary, vignettes of your life or someone else’s, baseball commentary, snapshots of your spring break adventures, and so on. Across your […]

1 35 36 37 38 39 232