CS 330 Lecture 4 – Regular Expressions
Agenda what ?s the gauntlet state machines/DFAs DFAs are regular expressions bingo TODO Walk through http://regexone.com. Write expressions to match: Lines ending with a hyphenated word. Words with an internal uppercase letter. Lines lacking a semi-colon at their close. Don’t match lines that have a semi-colon followed by whitespace. Instances of the identifier i. Don’t match […]
CS 245 Lecture 3 – Callbacks a la Interfaces
Agenda what ?s image directory cursor what are types for? abstracting the three little pigs making Grandma’s code call ours named interface implementations anonymous interface implementations TODO Watch Steve Witten’s Making Things with Math (http://www.youtube.com/watch?v=Zkx1aKv2z8o). Minutes 15-20 provide some intuition about the preassignment. Start preassignment 1. I fixed some typos in the specification, so please […]
CS 330 Lecture 3 – Shell and Regex
Agenda what ?s what does this do? what sets shell apart? writing Java globbing and patterns TODO Read Gabriel’s Worse is Better (http://dreamsongs.com/RiseOfWorseIsBetter.html). Read section 13.4.2. 1/4 sheet. What Does This Do? Code … Haiku
CS 330 Lecture 2 – Shell Scripting
Agenda what ?s who you are toolsmiths? duality redirection, expansion, and substitution some scripts find biggest files recycle instead remove mass email TODO Read chapter 13 through 13.2.1. If you are thirsty for more: http://www.johndcook.com/blog/2010/06/30/where-the-unix-philosophy-breaks-down http://www.faqs.org/docs/artu/ch01s06.html Optional challenge: write a one-liner to change permissions of all files and their descendants to be others-readable (without qualification) […]
CS 245 Lecture 2 – GUIs, Clickture
Agenda what ?s who you are program this writing a slideshow application TODO Optional: review CS 145 stuff in chapters 3 and 4 in Core Java. Read Core Java 6.3 through 6.4.2 and 7 through 7.2. What Swing widget creates a box for editing text? 1/4 sheet. Program This Code IPAddress.java TestIPAddress.java AnnotationExample.java Clickture.java ImageDirectoryCursor.java […]
CS 330 Lecture 1 – Hi and Shell
Agenda meta define this course outline shell Define This TODO Watch and play along with the video above on using Bitbucket for homework. Read the syllabus. Read Fred Brooks’ The Computer Scientist as Toolsmith II (http://www.cs.unc.edu/~brooks/Toolsmith-CACM.pdf). Change your shell as you wish. Bring a 1/4 of paper to Friday’s lecture with two questions and two […]
CS 245 Lecture 1 – Hi and JUnit
Agenda introductions black box meta test-driven development JUnit an class for an IP address TODO Watch and play along with the CS 245 Bitbucket video above. Find and watch a YouTube video on JUnit. Read the syllabus. Hand in at the beginning of next lecture a 1/4 sheet of paper with two questions and two […]
CS 245 Lecture 28 – Heap Demo and Closeout
Agenda what ?s removing from a heap heap demo data structure decision tree advice Code BiggerOrBetter.java Heap.java Circle.java Circles.java Advice Rob Pike, in Notes on Programming in C: Fancy algorithms are slow when n is small, and n is usually small. Donald Knuth, in Structured Programming with Goto Statements: Programmers waste enormous amounts of time thinking about, or worrying […]
CS 491 Lecture 26 – Geocoding and Location-aware Apps
This is the final week of the semester, and you are hastily completing your projects. I’m occupied too, so this last exercise will be terse. The only feature we haven’t discussed in class is supporting reverse geocoded checkin posts. If someone goes to a business or other physical landmark, they should be able to—with one […]
CS 245 Lecture 27 – Heap Implementation
Agenda what ?s data structure utility belt what does this do? implementing a heap using an ArrayList size isEmpty clear finding children of a parent and parent of a child add remove What Does This Do? Code Heap.java Haiku