teaching machines

Limiting Execution Time in a Shell

Every fall my school participates in the ACM’s International Collegiate Programming Contest. Thankfully, we don’t have far to travel. In even years, we host the competition locally. In odd years, we go to a town only a half-hour away. This year was odd. When we arrived, I learned that there was zero infrastructure for judging […]

CS 245 Final

See the PDF.

Madeup in a Browser

Finals week has afforded me a chance to think about something else for a while. Like getting the Madeup interpreter to run in a web browser! Thanks to the folks behind THREE.js and the Ace Editor, we’ve got a way to program and view 3-D models in a browser.

Getting a List of Forks of a Bitbucket Repository

A friend of mine handles the distribution and submission of homework assignments in an elegant manner: He creates one source repository on Bitbucket for an assignment, committing to it any scaffolding code that he provides to students. Each student forks his repository. The student makes the fork private, so only he and the student can […]

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 […]

Running a Mac Bundle Synchronously

My holiday wishlist is pretty simple this year: I want to be able to run Mac bundles from the Terminal, such that standard in and out stay in Terminal and that the application window is frontmost. OS X provides the utility open, but open runs the bundle asynchronously, and we lose standard in and standard out from […]

Madeup

Madeup is a language for making things up. Using commands for moving around, its speakers walk interesting paths through 3-D space and generate geometric models tracing the paths. The models may be viewed in any standard 3-D model viewer or sent to a 3-D printer. The language was designed for several reasons: To enable the creation […]

Employer Questions

I’ve got a student graduating and applying for jobs. With one company, he’s in the middle of a three-stage interview. The first stage was conducted over email, and he was asked the following questions: What software development books do you think are the best? Which ones are on your bookshelf? What authors or public personas […]

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