Programming & Computer Science


Ken Pu, Ph.D. (Toronto, 2006)

ken . pu @
kenpu @


I am a professor in Computer Science at a Canadian university. My job description is very open ended.


A large chunk of my time is spent on the education of computer science. Normally, I teach four undergraduate courses on a variety of topics in computer science. Given that my expertise is in systems, my teaching is usually limited to systems courses such as Compilers and Databases.


I do research in database. I like how broad database can be, and it allows me to work on a wide range of problems. I worked on projects ranging from database on mobile devices to managing open data from different countries. More recently, I am working on managing logical constraints using databases.

This Blog

I don’t like social media platforms (Twitter, Facebook, G+) because they don’t support scientific writing at all. I think one day I might work on a social network for scientists. Until then, I share my ideas here.

Think of the writings here as my twitter feed.

6 Clojure on a page

Clojure is a cool language. I like how the language features allow a programmer to think in the language. This series of posts describe ideas in the language of Clojure.

Each post fits on a single page (if you try to print them out).

  • Functions and Scopes - 2

    Dynamic variables are symbols that can be temporally bound to a new value, and the binding propagates into the body of a function. This pattern is known as dynamic scopes, and is generally considered as a bad idea. Nonetheless, here it is.

  • Functions and Scopes - 1

    The body of a function is a new scope. In side this new scope, we can refer to symbols. We will look at different types of symbols that are available inside a function.

  • Functional Approach

    The on-going assumption is that programming is all about data transformation. Let’s see how we achieve this with functions.

  • Getting Your Hands Dirty

    Learning Clojure requires you to install Clojure. Luckily, contrary to common belief, Clojure compiler is as simple as a single file.

  • About Programming - 2

    Clojure has really nice syntax for specifying values, symbols and bindings.

  • About Programming - 1

    Programs are a way for us humans to communicate with machines. Literals, symbols and bindings of symbols to values are incredibly fundamental, and yet often left implicit.