teaching machines

SENG 440: Lecture 21 – Panning and Zooming

Dear students, Today we will examine two common gestures that occur on mobile platforms: pinch-and-zoom and panning. We won’t create a full app, just a custom view that displays an image and supports these two gestures. First we’ll implement it by just adjusting the bounding rectangle containing the image. Once that works, we’ll switch transform […]

SENG 440: Lecture 20 – Multitouch

Dear students, Today we write an app that solves the problem of choosing of which player goes first in a game. All players place a finger on the phone, and the app chooses one of them randomly. The game is inspired by the commercial app Chwazi. Next lecture we will discuss writing an app that […]

SENG 440: Lecture 19 – Nearby

Dear students, Today we write an app that allows multiple devices to play a single piano using Google’s Nearby API. One device serves as the host, running a third-party MIDI interpreter. (I use FluidSynth.) A client joins the host. The host device plays octave 4, and the client device plays octave 5. Next lecture we […]

SENG 440: Lecture 18 – Location

Dear students, Today we write an app for hiding and finding messages in geographic locations. Our primary goal is to explore how to acquire and use a device’s location, and this app is just one playful example of the many possible applications that are aware of the user’s place. Next lecture we will discuss communicating […]

SENG 440: Lecture 17 – Gravity Sensor

Dear students, Today we write Lonely Phone, an app that senses when the phone is laid flat and starts ringing to grab the user’s attention. This will be the first time we use the code you wrote outside of class and submitted through the Crowdsource tool. This makes me slightly nervous. When I control the […]

SENG 440: Lecture 16 – Camera, Part 2

Dear students, Last time we met we tried something new. I assigned in-class exercises, you worked on them, and that’s all we had time for. We will discuss and implement your solutions today, which will wrap up our work on the Backlog app. I’d like to keep getting you involved in the writing of our […]

SENG 440: Lecture 15 – Camera

Dear students, We are back from a break. I hope you grew as a human being. I did, and I’m hoping to change things up a bit in this second half of the semester. The first half was largely me leading you on code adventures in lecture. I really don’t enjoy teaching in this tutorial […]

SENG 440: Lecture 14 – Alarms and Notifications

Dear students, Today we examine some helpful utilities: notifications and alarms. We’ll write an app that prompts the user to accumulate memories by taking a photo each day. Today we’ll focus on the prompting side of things, saving the camera for later. Before we forget, here’s your TODO for next time: Read the project 2 […]

SENG 440: Project 2

See the PDF.

SENG 440: Lecture 13 – Object-Relational Mapping via Room

Dear students, Today we examine persisting data with databases. We will add a song database to our Rattler application. Initially we’ll just maintain an in-memory database, but then we’ll switch to long-term storage using Room, an object-relational mapping framework. Since ORM tools let us maintain our schema and forge our queries in our host language, […]

1 31 32 33 34 35 233