teaching machines

CS 145 Lecture 2 – More data, more instructions

Agenda what does this do? literals vs. variables a few more types (int, char, boolean) penny RAM a few more instructions (cos, pow) Javadoc String What does this do? Code Day2.java package preexam1; public class Day2 { public static void main(String[] args) { double myNum = 6.7; int brettsFavoriteNumber = 9; char debrasFavoriteLetter = ‘d’; […]

CS 330 Lecture 3 – Regular expressions++

Agenda more wildcard characters developing on clark.cs.uwec.edu substitution slurping a file expressions as replacements Perl subroutines zero-width assertions Code emails.pl #!/usr/bin/perl open($in, ‘<‘, ‘getlist.txt’); while ($line = <$in>) { $line =~ s/^(\S+).*$/$1\@uwec.edu/; print($line); } close($in); page.html <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <html> <head> <title></title> </head> <body> <h2>Foo</h2> <h3>Blech</h3> <h4>Scrumpt</h4> </body> </html> demote.pl […]

CS 145 Lecture 1 – Introduction, data, and arithmetic operators

Agenda introduction our class: prior programming experience majors communication math two fronts: data and instructions arithmetic operators variables data: ints and doubles instructions: System.out.println, + – * / % = Code Mathiness.java package preexam1; public class Mathiness { public static void main(String[] args) { System.out.println(26.16 * 0.15); System.out.println(1000000.0 / 540000.0); System.out.println(); System.out.println(57 % 12); double […]

CS 330 Lecture 2 – Regular expressions

Agenda Activate your Piazza account! Adventure, Zork Imperative languages Scripting languages Perl Scripting languages John Ousterhout once said: Scripting languages are designed for different tasks than are system programming languages, and this leads to fundamental differences in the languages. System programming languages were designed for building data structures and algorithms from scratch, starting from the […]

CS 330 Homework 1 – due before Friday, February 3

See the PDF.

CS 330 Final Project

See the PDF.

CS 330 Lecture 1 – Introduction, DFAs

Agenda build a language-recognizing machine DFAs: set of states (one starting, one or more accepting) input alphabet transition function, mapping state and current symbol to next state course information you? name? what if not computers? write a short language biography build more language-recognizing machines: one- or two-digit month numbers articles of the English language (a, […]

CS 145 Lab 1

Welcome CS 145 is a class where you learn to teach machines. You won’t just use them. You’re going to become a developer. Unlike the natural and social sciences, computer science and programming are not topics addressed in many of our schools. Let’s take a moment to describe what we computer scientists do with each […]

CS 145 Final

Exam

Final Project – BarApp

This one was a lot tougher to do that expected since the other half of my program was not being completed due to the unfortunate accident that put Mike in the hospital. Originally the design document called for a local cache of bar specials to be stored on each phone and was going to have […]

1 209 210 211 212 213 232