teaching machines

CS 330 Lecture 37 – Ruby Objects

Agenda what ?s why do I preincrement? Ruby symbols classes in Ruby The Final For the final, you are expected to: write code that intelligently shares data via references (C++) be able to templatize a given class to increase its reusability (C++) generalize functions into higher-order functions that parameterize work (Haskell) use pattern matching to […]

CS 330 Lecture 36 – Hello, Ruby and Roogle II

Agenda what ?s what does this do? Ruby’s classification dynamic typing and duck typing finishing Roogle What Does This Do? Dynamic vs. Duck With dynamic typing, the interpreter goes through this thought process: Ah, I’ve got a value V here. The coder is trying to do operation O to it. Before I run this, I […]

CS 330 Lecture 35 – Roogle, a Poor Man’s Search Engine

Agenda what ?s program this a simple search engine scrappy Ruby top-level functions imperative and object-oriented with some functional globals vs. locals Hash, Array, and Set Program This TODO Make some progress on http://tryruby.org. Quarter sheet. Code Indexing Pseudocode Searching Pseudocode roogle.rb Haiku

CS 330 Lecture 34 – Issues of Inheritance

Agenda what ?s program this weak encapsulation composition multiple inheritance? directed super the dreaded diamond problem TODO Read the first three pages of http://mislav.uniqpath.com/poignant-guide/. Quarter sheet. Program This Code rect.cpp raffle.cpp Multiple.cpp random.cpp Haiku

CS 330 Lecture 33 – Marching Squares: A C++ Case Study

Agenda what ?s contourer: a case study on OOP and C++ bit manipulation TODO Get two homeworks done before the networks students ruin us all. Code msquares.cpp Haiku

CS 330 Lecture 32 – Garbage Collection

Agenda what ?s deconstructors garbage collection a C++ smart pointer TODO Read section 7.7.3 in your book. Quarter sheet. Wondering about Java’s garbage collection? Read http://www.ibm.com/developerworks/library/j-jtp10283/. Why do we need both delete and delete[]? Check out http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=287. Code FasterString.cpp SmartPointer.h Haiku

CS 330 Lecture 31 – Generics and Templates

Agenda what ?s some C++ trivia a quick Java ArrayList polymorphism: subtype vs. parametric Java’s generics the acks of type erasure C++ templates TODO Read sections 3.5.3 and 8.4 in your book. Quarter sheet. Code UnwildList.java WildList.java WildList.cpp Haiku

CS 330 Lecture 30 – Overloading Builtin Operators

Agenda what ?s what does this do? a FasterString class operator<< friend operator[] operator+ operator* operator+= on parity TODO Read http://weblogs.java.net/blog/cayhorstmann/archive/2011/12/06/operator-overloading-considered-challenging?utm_source=feedly. No quarter sheet. Code refs.cpp Vector3.cpp FasterString.cpp Haiku

CS 330 Lecture 29 – Virtuality in C++ and Overloading Builtin Operators

Agenda what ?s no class Friday program this http://www.parashift.com/c++-faq/refs-vs-ptrs.html cosmic superclass overriding with virtual implementing Polynomial::solve pure virtual the means of dynamic dispatch overloading builtin operators a FasterString class deconstructors Pulse Student evaluations are just numbers, but I like to hear anecdotes too. Please take a moment to think about how this course is run: […]

CS 330 Lecture 28 – C++ References and the Pillars of OOP

Agenda what ?s call-by-reference class Quadratic inheritance class Polynomial virtual polymorphism pure virtual/abstract class Function TODO Defeat homework. No quarter sheet. Code Functions.h Functions.cpp graph.cpp makefile Note to copy and pasters: makefile rules need to be indented with real tabs, not spaces. Haiku

1 24 25 26 27 28 35