teaching machines

CS 330: Lecture 5 – Lookaround Assertions and Numeric Ranges

Dear students, To start things off, we’re going to play some Regex Bingo. Find a partner and make a 4×4 grid of randomly generated strings. Include uppercase and lowercase letters, numbers, whitespace, and punctuation. Keep the strings short. There’s no free space. I will call out the following regex, one at a time. Cross out […]

CS 318: Lab 4 – Structuring Elements

Dear students, Today we will branch out from our 1-page sites. To connect our pages to other pages, we will make extensive use of the anchor element, whose tag is a. Its href attribute contains a URL to another page, much like img‘s src attribute contains a URL to an image. Consider this example: There's […]

CS 491: Lecture 2 – Potentiometer

Dear students: Last time we used a push button to make a game where we reversed the spin of a planet. Today we implement a crude game of Peggle. We’ll discuss potentiometers and physics. We’ll use the potentiometer to aim the cannon. Potentiometers are rotary sensors that are useful for gathering inputs that fall into […]

CS 330: Lecture 4 – Find and Replace

Dear students, Last week we started examining regex, a language for recognizing languages. We examined their syntax and theoretical background. I want to spend two more days discussing them. Today we look at several applications of them inspired by real-life needs that I’ve encountered: Extract the URLs from all img elements. If you alter this […]

CS 318: Lab 3 – More Core

Dear students, Let’s start with a quick informal reading quiz: Question 1 What’s a phrase element? Question 2 What happens to whitespace in our HTML files? Question 3 What kind of list elements are available? When I think about my favorite and most memorable learning experiences, my high school Spanish classes immediately come to mind. […]

CS 318: Project Proposal – due on February 14

In this class, you are asked to apply what you’re learning by building a website for a client. The project is broken down into a series of milestones. The first milestone is to find a client and formally propose your project. Complete the following tasks to achieve this milestone. Task 1: Choose a Client Find […]

CS 330: Lecture 3 – State Machines and More Regex

Dear students, Before diving into code, let’s be computer scientists for a minute. We’re going to consider a model of computation called a deterministic finite automaton (DFA). A DFA is a special case of a state machine. Here’s a state machine used to model an avatar’s state in a game: Thanks, Bob Nystrom. And one […]

CS 330: Lecture 2 – Regex Capturing and Find-All

Dear students, Last time we started looking a regular expressions. There’s something I didn’t share because I was afraid your minds would explode. It’s this: Regex is a language for recognizing a language. We use regex to create little recognition machines. We feed a string into such a machine, and it either belches approvingly or […]

CS 491: Workday 1

Dear students: Today is our first workday. You and your team will spend the time hashing out ideas, discussing one anothers’ strengths and interests, and coming up with a plan. In particular, these are some things to do during class today: Inform your instructor of your studio’s name and employees. He will make a private […]

CS 318: Lab 2 – Core Elements, Relationships, and Validation

Dear students, Today we meet the core elements of an HTML document. First, a little review of your reading: Question #1 Provide an example of a TLD. Question #2 What is the subdomain of the URL https://to.madeup.xyz? Question #3 What is the protocol of the URL https://to.madeup.xyz? Question #4 If computers on the internet are […]

1 38 39 40 41 42 232