Dates as Fractions

Today is 4/28. As a fraction, today is $\frac{4}{28} = \frac{1}{7} \approx 0.143$. But how close is that to the proportion of the year that has passed? We are on day 119 of a year with 366 days, and $\frac{119}{366} \approx 0.325$. That’s a difference of approximately 0.182. That’s not very close. Perhaps there are […]

Infield Form Labels

I’ve done enough web development now and taught enough web development courses that I am starting to develop opinions. Or maybe I’ve had opinions since the start, but now I feel qualified enough to air them publicly. Today’s opinion is on labels for form elements. Let’s all agree that we need them. But where do […]

CS 268: Lecture 19 – Today Client

Dear students: We have arrived at the last big idea of the semester: managing global state. To deal with complex and shared data in our React apps, we will push the data into an object managed by Redux. With this new manage of managing the data, we’ll have to find new ways of changing state […]

CS 268: Lecture 18 – Today Service

Dear students: We look at the mechanics of web services last time. Today we build up a non-toy web service for a time capsule application. Behind our web service will be a MySQL database, and our service will endpoints for the four common CRUD operations for operating on our database’s records: creating, rreading, updating, and […]

Apathetic Numbers

My son is 11, and he likes to think about numbers. In this time of working and learning from home, I’ve had him reading Isaac Asimov’s Realm of Numbers. The other day my son stumbled upon this numerical curiosity: $$3 \times 1.5 = 3 + 1.5$$ How fascinating that the numbers don’t care whether they […]

Apache and Icons

This semester I’m teaching a web development course. This is the first time I’ve taught the course, which means I have no Catalog of Errors that we teachers consult when trouble arises. Rather, I am writing the first entries in this Catalog as we speak. This week I spent an hour chasing down a pernicious […]

CS 268: Lecture 17 – Hello, Express

Dear students: Many websites pull down data from web services, just as we did with the News API. But how are these web services made exactly? That’s what we explore in this lecture. We’ll use Express to create our own web service that responds to HTTP requests and serves back its data through JSON. We’ll […]

CS 268: Project 2 – React App

In the second project of this course, you will create a web app that consumes a web service using several tools from the Node.js ecosystem, including React, Redux, and Express. Expectations Your app must meet the following expectations: You will create an app that has a coherent purpose. Its content must be original and satisfy […]

CS 268: Lecture 16 – Hello, React

Dear students: The first theme of this course has been learning the foundational technologies of the web: HTML, CSS, and JavaScript. Today we officially reach the second theme: designing modern web apps with React. Systems like React ease the burden of designing interactive sites with dynamic content. Here’s your TODO list: Install Node.js, an ecosystem […]

CS 268: Lecture 15 – Higher-order Functions

Dear students: Today we hit up higher-order functions, a feature of modern languages that will shorten up your code considerably. Once you know a few of these higher-order functions, you may never write loops again. Why? Because so much of our looping algorithms follow certain patterns, we can generalize those patterns into reusable functions. For […]