Category Archives: Programming

SQL and noSQL Can Be Thought of as Duals in the Mathematical Sense

Yin and yang computer miceThis month’s Communications of the ACM (Association for Computing Machinery) has an interesting article which explains how SQL databases and noSQL databases are duals of each other in the Category Theoretical sense.


Algebraic Geometry: “Ideals, Varieties, and Algorithms” C++ Code

Ideals, Varieties, and Algorithms book cover
I did an REU (Research Experience for Undergraduates) this summer and we used the textbook “Ideals, Varieties, and Algorithms” (isbn 978-0-387-35650-1) by David Cox, John Little, and Donal O’Shea. As the title mentions, algorithms are an important tool in the study of varieties via their corresponding algebraic ideals. One of the main tools used in algebraic geometry is what is known as a Groebner basis, which is somewhat akin to a basis set in Linear Algebra. Anyway, I wrote some C++ code which implements a few of the algorithms in the book, but stops short of implementing Buchberger’s algorithm for computing a Groebner basis. The code should be useful as a starting point because it implements a Monomial class and a Polynomial class both with lots of useful methods thus eliminating the drudgery of implementing the book’s algorithms in C++.

The code can be found at: my web site as a gzipped tarball. Please let me know if you find it useful. I developed the code on an Ubuntu Linux machine, but it is generic enough that it should compile on any platform. You will need to read the README to understand the simple input, output format.

Iterated Function Systems and Fractals

This code generates fractals based upon an iterated function system (IFS). Several input files and a Makefile are included. The code is written in C++, and distributed as a tarball. I did this for a class at the University of Utah, but it is based upon a homework assignment for a computer graphics class at MIT (6.837).

Below is the famous Barnsley fern which was generated by an IFS with just four transforms!
Barnsley Fern

Strategy Letter VI – Joel on Software

Joel Spolsky has an excellent essay on his blog about AJAX web apps and where they’re headed. The essay is entitled Strategy Letter VI – Joel on Software and I highly recommend it!

I used to be very enthusiastic about a startup that originated at MIT called Curl Corporation that did much of what Joel talks about with one major exception, instead of targeting JavaScript, they targeted their own runtime. Now that has the major disadvantage that users must download the runtime in order to run client-side Curl code, but the widespread adoption of Flash (which sucks in comparison because it was designed for visual effects) leads me to believe that if they had decided to freely distribute their runtime (for commercial as well as non-commercial use), then they would be rulers of the web by now. Their language is fairly Lispy like Joel talks about in his essay, and was a joy to use, but alas, they decided to take the short-term route and market their technology to large corporations for intranet applications. I tend to think that if they had taken the long-term strategy of targeting the entire web, then we would all be using Curl now and enjoying very rich client-side web apps instead of bickering about how to best AJAXify your web-site/application.

At this point in time, I think Joel is spot-on about the need to target JavaScript, instead of creating a new runtime, because that avoids the chicken and egg dilemma. But the devil is in the details. It may be a considerable challenge to seamlessly target Microsoft’s, Apple’s and Mozilla’s JavaScript engines.