CS 1: Lecture 36 – Unit Testing
Dear students, Today, we examine one of the less glamorous aspects of writing code: testing it. There are three big reasons to write systematic tests of your software: To make sure that your code does what you think it does. To expand your thinking into situations outside your normal parameter ranges and workflow. To ensure […]
CS 1: Lecture 35 – Implementing a Growable Array
Dear students, Today, December 6, is National Growable Array Day. We will celebrate growable arrays everywhere by growing one of our own growable arrays, right here, in our classroom. I hope you wore your festive gear. Behind every growable array is an plain old ungrowable array. When that ungrowable array gets filled up, a new […]
CS 396: Meeting 13 – Innovative Computer Software
Dear students, Today we welcome John Huss of Integrated Computer Solutions as our guest. John brings us the perspective of working for a small company. You’ll have to excuse me for using this class as an opportunity to reunite with old friends. John is a friend I haven’t seen since 2003. He and I were […]
CS 1: Lecture 34 – Volume Slicer
Dear students, When we last met, we made a slideshow application. This was our first graphical application that we wrote from scratch. We organized the code into two camps: model code and view code. This separation made the model code reusable under many different circumstances. Let’s do all that again today, but in a different […]
CS 1: Lecture 33 – Separation of Concerns in Slideshow
Dear students, A primary benefit of object-oriented design is that it helps us organize our programs coherently. We can put code and the data that it regularly processes together into the same chunk. Objects allow for the separation of concerns. Class A can focus on its task, and be very good at it. It can […]
CS 1: Lecture 32 – Stopwatch
Dear students, As with methods, a primary benefit of object-oriented programming is code reuse. We can create a utility and use it over and over again, in many contexts. We will do just that by designing a Stopwatch class. We will use it to time a few operations: a words-per-minute calculator the amount of time […]
CS 396: Meeting 12 – Digital Ocean
Dear students, This week we welcome Brian Hogan from Digital Ocean. How did I meet Brian? Well, back in 2012, I was teaching CS 330: Programming Languages for the first time ever, and I was looking for someone to come in and share about a language that few of us knew. A few students recommended […]
CS 1: Lecture 31 – Reverse Engineering Objects
Dear students, In object-oriented programming, the programmer is really a writer of screenplays. Objects are our actors, which we orchestrate around the stage. We cue them to say certain things, have them interact with other objects, and shape them to have an identity that is all their own. Today, we’ll feel our away around the […]
CS 396: Meeting 11 – Solomon Partners
Dear students, This week we welcome Mike Citak from Solomon Partners. Mike has been in Wisconsin before—he got an English degree at the University of Wisconsin, Madison. Then he found his way down to Iowa, where I had the honor of being his teacher in a class a bit like our CS 145. I shouldn’t […]
CS 1: Lecture 30 – Hello Objects
Dear students, Today we start by finishing up our exercise with the card game. We’ve seen the Computer as a Calculator, a Chef, a Philosopher, a Pilot, and a Factory Worker. We’ll see it in two more roles: a Scribe and a Creator. A scribe is literate, recording accounts and memories for later retrieval. We’ve […]