Inside 206-105

Existential Pontification and Generalized Abstract Digressions

Computer Science

Obviously Correct

What do automatic memory management, static types and purity have in common? They are methods which take advantage of the fact that we can make programs obviously correct (for some partial definition of correctness) upon visual inspection. Code using automatic memory management is obviously correct for a class of memory bugs. Code using static types […]

Polyglot programming

Being back in town over MIT's Infinite Activities Period is making me think about what kind of short lecture I want to try teaching. I've been turning over the idea of a polyglot programming class in my head: the idea is that while most people feel really comfortable with only one or two programming languages, […]

Why you shouldn’t do a PhD in systems

The opinions presented in this post are not necessarily mine. I'm just one very confused undergraduate senior with a lot of soul searching to do. When I tell my friends, “I’m going to get a PhD,” I sometimes get the response, “Good for you!” But other times, I get the response, “Why would you want […]

A Year of Notebooking (Part 2)

This is notebook two. Max Schäfer: Refactoring Java Most Java refactoring tools built into IDEs like Eclipse are little more than glorified text manipulation macros. There are no guarantees that the result of your refactoring will have the same behavior as the original: you can even refactor code that doesn’t even compile! To prevent this, […]

The return of Hellenistic reasoning

I recently attended a talk which discussed extending proof assistants with diagrammatic reasoning support , helping to break the hegemony of symbolic systems that is predominant in this field. While the work is certainly novel in some respects, I can't also but help think that we've come back full circle to the Ancient Greeks, who […]

Spring Reading: 2011 edition

Books are expensive, but by the power of higher-education (also expensive, but differently so), vast oceans of books are available to an enterprising compsci. Here’s my reading list for the spring break lending period (many of which were recommended on #haskell: Concepts, Techniques, and Models of Computer Programming by Peter Van Roy and Seif Haridi. […]

Many-valued logics and bottom

I was flipping through An Introduction to Non-Classical Logic by Graham Priest and the section on many-valued logics caught my eye. Many-valued logics are logics with more than the usual two truth values true and false. The (strong) Kleene 3-valued logic, sets up the following truth table with 0, 1 and x (which is thought […]

Killer mutants attack (mutation gone wrong)

This is a collection of WTFs due to misuse of mutable state. We'll start off with some Java. What do you expect this snippet of code to do? Sensor Accel = sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); Sensor Orient = sm.getDefaultSensor(Sensor.TYPE_ORIENTATION); sm.registerListener((SensorEventListener) this, Accel, sm.SENSOR_DELAY_FASTEST); Ostensibly, it registers the current object to receive just accelerometer updates. But what if I […]

No one expects the Scott induction!

Recursion is perhaps one of the first concepts you learn about when you learn functional programming (or, indeed, computer science, one hopes.) The classic example introduced is factorial: fact :: Int -> Int fact 0 = 1 -- base case fact n = n * fact (pred n) -- recursive case Recursion on natural numbers […]

Generalization and vagueness in specifications

What semantics has to say about specifications Conventional wisdom is that premature generalization is bad (architecture astronauts) and vague specifications are appropriate for top-down engineering but not bottom-up. Can we say something a little more precise about this? Semantics are formal specifications of programming languages. They are perhaps some of the most well-studied forms of […]