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

On Data

People talk about all the stuff we’re going to be able to do once computers are fast enough and storage is cheap enough. Sadly, I don’t think technological advances will gain us much. Taken to the limit, the digital world of computers is just the analog world that we already have. And there’s nothing easy […]

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

The Programming Gene

My wife and I read to each other. We ran into this the other day in Daniel Defoe’s Robinson Crusoe: So I went to work, and here I must needs observe, that as reason is the substance and original of the mathematics, so by stating and squaring everything by reason, and by making the most […]

Sit Down and Code

At the 2012 Midwest Instruction and Computing Symposium, visualization researcher Daniel Keefe offered a keynote presentation on data-intensive visualization. His work involves the design of novel interfaces to navigate complex data sets. Visualization researchers always have the best demos. Mr. Keefe expressed his frustration with programmers: they hear the problem and then they sit down and write […]

1 164 165 166 167 168 204