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—and, I believe, generally all persons—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 […]
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: […]
CS 330: Lecture 13 – Types: Safe vs. Unsafe
Dear students, While you’re waiting for class to start, here’s a little exercise for you to discuss with your neighbor: How would you write an algorithm for computing the score of a hand of Blackjack? Face cards are worth 10, aces are worth 1 or 11, and everything else is worth its rank. Sum up […]