.source code

I have started to post some of my program code. Any code I post is subject to copydoc restrictions. These can be summarized as: What restrictions?

Or if you prefer I spell it out: You can do what you damn well please with it. But it would be nice if you attribute source.

Any comments or questions? You know the email trick: DOC

What is this?

Here be code and data for "Casting Polymers". Casting polymers are materials that mold-makers use. There are many different types of polymers. Some silicones, some polyurethanes... They all have different features when cured. Some are hard plastics. Some soft rubbers. Different colors, cure times... The list goes on.

What this system is designed to do is help a mold-maker select the polymer with the features he needs. If for instance he wants to make some sort of lens, he could ask to see all plastics that are clear when cured.

I call this type of system a feature filter.

Casting polymers is a prototype domain.

The code and especially the user interface is a bit rough right now. What I would call a programmers interface.


A few years ago I got annoyed with the way certain search results were displayed. You couldn't, for instance, get a list of all cars for sale in Toronto that were standard and had an asking price of less than $6K.

So I decided to build such a system.
Since I am familiar with the financial markets, my first shot was to do a feature filter based on the stock market.

It turns out that there is way too much data available. So I decided to go for beer. Not too much data and I knew something about it. :-) So Bogus Beer was the first prototype domain.

The Data Problem.

One of the first thing I discovered about feature filters is that getting the data "right" is a real challenge. You can scrape data online and try to parse it automatically but you mostly never get it right. So a lot of "hand coding" is necessary. This dramatically slows the process and, of course, leads to the need for more hands.

There are, in fact, ways to try to get around this issue by using techniques from natural language processing, semantic web and XBRL. Contact me if this is a hot button for you.

One Two Buckle ...

Since the first prototype Bogus Beer, I have done two more. One for 3D printers. And this one for casting polymers.

But as soon as I started on my second attempt, it became obvious that large parts of the processing were similar. Some were identical. So I decided to "template" it. I built a meta system using Jinja 2. The meta system uses feature definitions to generate a new domain specific system. Now, if I have feature definitions and data I can generate a new domain specific system within an hour! Then the other 80 percent of the work begins. :-)

If you're involved in developing systems that are similar, but a bit different from the last time, this is certainly the way to go.

What? No list comprehensions?

The code is generated by a meta system. so don't blame me! ;-) And if you think it looks a bit like warmed over Fortran, you're prolly right. Took out all the "go to" statements. :-)

What You Need.

- A computer. (Sorry. Sometimes I just can't resist. :-))
- Python.
- Django.
- Some place to deploy it.


I have Bogus Beer running on Google's App Engine. But don't particularity like it. I find the process of getting it going constraining and confusing.

I suppose it's fair to say that if you want to run some process on Google then you must follow their API. But I doubt I'll ever see millions of hits per second so am looking for someplace else in the cloud that's a little more flexible.

Of course you're free to deploy it anywhere you wish.

Many Hands Make...

I'm open to any suggestions, criticisms...

And, not to forget, it is open source. So feel free to do something with it.

What about the Meta System Code?

For the moment, I want to just sit on it but would like to open it up. If I can figure out a way to monetize it (get $$$ in the door)...


If you do want to install and run this feel free to contact me if you run into any problems. There are a few things ah... SECRET documentation that I haven't revealed.

And now, what you've all been waiting...

.source code for

polymers settings
polymers urls
polymers views
polymers wsgi

polymers update
polymers fileHandler
polymers dataHandler

.data for


.templates for


Note that when you look at this page it seems that the *pre* has been escaped at one point.
Dunno why. Grab the source.

Yeah! I know. Tarball? Where's the tarball?