OpenCyc

Since I read a Discover magazine article about this back in the mid-80s, I've been interested to see where this technology would end up.

From the website, "OpenCyc is the open source version of the Cyc technology, the world's largest and most complete general knowledge base and commonsense reasoning engine." The goal of the project is to give computers the ability to reason about data, and to possibly converse directly with humans in plain English.

The file that stores OpenCyc's "world" is just over 500MB.

License: Apache 2

Complex mocking with PHPUnit

PHPUnit provides an API for creating Mock Objects and testing code with them. It is fairly flexible, but there are some things it can't do without breaking out of the recommended fluid API and using the mock framework's classes directly.

To compound the problem, the documentation is a bit too brief, and it leaves out the description of the underlying mock framework classes. The PHPUnit API documentation isn't much help, but it is a starting point.

Clojure Tutorial For the Non-Lisp Programmer

Clojure is a new programming language that uses the Java Virtual Runtime as its platform. Clojure is a dialect of Lisp. The language home page is at http://clojure.org/.

Simple CRUD Generator

This is a simple application that lets you browse and edit a MySQL database in a CRUD-like manner. It requires PHP 5. Be warned, it doesn't generate code. Instead, it produces a user interface on-the-fly.

The user interface consists of three pages. One page show the tables. The second page shows the records for a given table, and the third page allows you to edit a record.

The application is based on some form generation work I've been developing for Modern Merchant. This opens up the application to some interesting extension points.

Try out Modern Merchant

I'm getting really excited about Modern Merchant. It's an open source e-commerce application (shopping cart) that I've been developing. It's developer-friendly, modular and object-oriented. Version 0.6 has just been released.

If you're looking for an e-commerce application, give this one a try.

Javascript Console For IE

New Version: 0.4

I love Firebug for Firefox, but I really don't like debugging Javascript in IE.

I wrote this little console so that I can kind of see what's going on when scripts in IE don't behave the same way as in Firefox. It's inspired by one of my most favorite web development tools ever, Firebug, which is a Firefox extension.

It has three features:

  1. Outputs messages from anywhere in your javascript code.
  2. Provides a console to display the messages and evaluate Javascript expressions.
  3. Has a history of all the Javascript expressions entered. You can navigate the history with the up and down arrows.

Download it: ie-console.js

Try it!. You don't need IE to try it out. However, the history feature doesn't work in Firefox.

Enter this into the console:

document.body.childNodes

Instructions

  1. Download and save ie-console.js to your website
  2. Include the script in your HTML like this:
    <script type="text/javascript" src="/js/ie-console.js"></script>
  3. Press F12 to open the console.
  4. Or, use console.log() in your JavaScript code to output debugging messages, just like Firebug.
  5. Press F12 again to close the console.

Lightweight Neural Network Ruby Extension

[Updated: 2008-3-3]: I completed a Ruby extension to the Lightweight Neural Network C library.

I really wanted to get into the thick of writing Ruby, and at the same time, I was getting into artificial neural networks, so I came up with a fun project. It's a Ruby extension for the lwneuralnet C library.

The extension currently lets Ruby programmers create a simple back propagation network that can be trained to recognize patterns in its input.

Download and learn about the lwnueralnet C library here.

An Article I Posted at PDXPHP

At the last PHP user group meeting, I talked a bit about the safe way to inject data into HTML and SQL. I followed up the talk with some examples and some organized thoughts on the matter.

Here's that article.

Emacs + Bash on Windows

This is my second week working for my previous client, Platt Electric. It's tough working on a Windows desktop again, but I discovered a few new tricks to make it even more Unix-like.

Pretty excited about having Bash inside Emacs inside Windows. Without Bash, Emacs for Windows was kind of half-ass.

I added a couple commands to my .emacs file to make it happen:

;; For the interactive shell
(setq explicit-shell-file-name "c:/bin/cygwin/bin/bash.exe")

;; For subprocesses invoked via the shell (e.g., "shell -c command")
(setq shell-file-name "c:/bin/cygwin/bin/bash.exe")

Cygwin is required for this.

An Introduction to PDF Generation

This article attempts to make a good starting point for generating a PDF file from scratch, without using a PDF generation library, or for creating your own library. It's written in Ruby, but it can easily be translated to another high level language of your choice.

Syndicate content