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 […]
CS 330: Lecture 12 – Type Systems Continued
Dear students, Last time, we introduced types as one of the distinguishing features of a programming language. We enumerated a bunch of types commonly supported in programming languages and distinguished between static, dynamic, and duck typing. The first two identify the time at which types are inspected, and the latter referring to the idea that […]
CS 318: Lab 9 – Fixed Positioning
Dear students, Today we begin our exploration of the several ways to break away from the normal left-to-right, top-to-bottom flow of a web page. We started with fixed positioning, because it introduces the ideas of anchoring outside the hierarchy. In fact, fixed position effectively removes an element entirely from its natural position in the hierachy […]
CS 491: Lecture 4 – Pathlete
Dear students: Today we implement a little puzzle game inspired by The Legend of Zelda: Link’s Awakening: To make this happen, we’ll use an analog joystick to direct the platform. These commonly have five pins: voltage, ground, a horizontal analog pin, a vertical analog pin, and a digital button pin. Let’s hook up circuit like […]
CS 330: Lecture 11 – Type Systems
Dear students, Today we begin our focus of programming language concepts, rather than the tools (regex, lexers, and parsers) that we use for interpreting programming languages. In particular, we start off with types. To get us started, here’s a question to discuss with your neighbor. What are types? Why do have them? In the past, […]
CS 318: Lab 8 – Horizontal Alignment and Gradients
Dear students, Today, we will continue to explore the box model—because we need to. The vast majority of our difficulties with designing for the web will involve alignment and positioning. Suppose you want to horizontally center an element. What must be true? It must be a block element. Centering doesn’t make sense for phrase elements. […]