CS 330 Lecture 27 – Fold
Dear students, Let’s start with a Program This! Complete two of the following functions based on your row number. All of them accept a list. Solve them using the pattern-matching style, with base cases and general cases defined separately. All of them should be two-liners. upped, which generates an uppercase version of the incoming String […]
CS 318 Lab 18 – Forms
Dear students, Thus far we have focused on one half of the communication process: the “speaking” of our ideas to our sites’ visitors. Generally this is not enough. We would like to hear back from our visitors. We want them to join a mailing list, make an order, contribute an idea, vote, and who knows […]
CS 330 Lecture 26 – HOFs Elsewhere and Closures
Dear students, Let’s start with a Program This! Write the necessary Java 8 code to filter a List. Make the code as general as possible, allowing its clients to supply their own filtering criteria. Here’s my solution. To leave a hole in the filtering algorithm, we must leave a parameter for the predicate. We’ll use […]
CS 318 Project – Prototype 1 – due on April 24
Your next milestone in the project is to create a digital prototype for your site. You will present this prototype to randomly assigned classmates for an initial evaluation. Task 1: Create a Prototype Create a first draft of your site in a folder named prototype1 in your GitHub project. Name this directory exactly; no spaces, […]
CS 318 Lab 17 Cont’d – Dropdowns and Tabviews
Dear students, Last time we started implementing dropdown menus. We decided to continue that effort today, though I do want to add one extra and related exercised: a tabbed viewer. Here’s your TODO list: Read chapter 10 in your book. Complete the Codecademy exercise on forms. It is woefully incomplete and it uses single quotes […]
CS 330 Lecture 25 – Filter, Map, and Foreach
Dear students, Let’s start with a Program This: Write in Haskell a function count that accepts a predicate and a list. It yields the number of elements for which the predicate is true. We’d write it like is in an imperative way: count = 0 for each element in list if predicate is true of […]
CS 318 Lab 17 – Pseudoselectors and Dropdowns
Dear students, Today’s lab is designed around something I saw in a lot of your mockups: dropdown navigation menus. There aren’t a lot of new ideas here, but application of old ones. So, I won’t talk much. However, I did incorporate a few of the pseudoclass selectors that you met in CSS Diner. Let’s revisit […]
CS 330 Lecture 24 – Lambdas
Dear students, There are at least four ways of defining functions in Haskell: by defining a named function by partially applying parameters to get a new function expecting only the remaining parameters by composing a gauntlet of functions together by defining unnamed lambdas We discussed composition last time. We continue that today, but we also […]
CS 330 Lecture 23 – Ways of Making Functions: Composition
Dear students, There are at least four ways of defining functions in Haskell: by defining a named function by partially applying parameters to get a new function expecting only the remaining parameters by composing a gauntlet of functions together by defining unnamed lambdas We’ve seen the first two. Now let’s turn to composition. You’ve almost […]
CS 318 Lab 16 – Midterm
Dear students, Today we have a midterm. Here’s your TODO list for next time: Complete CSS Diner, a game for learning CSS selectors. Read chapter 9 in your book. On a quarter sheet, share 2-3 questions or observations from your playing and reading. See you next time! Sincerely, Midterm You will reverse engineer and recreate […]