CS 330 Lecture 6 – Regular Expressions
Agenda what ?s homework 2 deadline extracting matches capturing transforming matches Program This Code chapterer.rb ocracy.rb blogify.rb report_generator.rb report_with_equations.txt Haiku
CS 330 Lecture 5 – Regular Expressions
Agenda what ?s Perry on “what’s best?” what are regices used for? common regex algorithms in Ruby asserting a pattern extracting matches transforming matches languages’ differing tacks on regex extracting a table of contents TODO Start Regexercise, homework 2. Optional: http://stackoverflow.com/questions/1732348 and http://www.codinghorror.com/blog/2009/11/parsing-html-the-cthulhu-way.html. See the dissonance between the question and answers, a hallmark of humanity. See Worse […]
CS 245 Lab 2 – Interfaces and Interfaces
First, if you have checkpoints left over from last lab, get them inspected during the first 15 minutes of this lab. Work in pairs. Where possible, work with someone that you did not work with last week. The exchange of new ideas and perspectives is not an opportunity you want to rob yourself of. Synopsis […]
CS 245 Lecture 4 – Interfaces
Agenda what ?s virtual lab Spanish verb conjugation program this a text editor TODO Keep at preassignment 1. Finish lab 1. Frolic. No 1/4 sheet. Program This Code Verb.java Conjugator.java ArErConjugator.java IrConjugator.java Verber.java Main.java TextEater.java Haiku
CS 330 Homework 2 – due before February 12
See the PDF.
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 Preassignment 1 – due before February 10
See the PDF.
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) […]