Every once in a while, I’ll have a spare moment to code a test for something, or I’ll get bored and just want to do something. On a rare occasion, I will hack out something quickly that I need. I don’t consider these to be full pieces of software, but incomplete examples of things that I want to build out more.
Luhn Validation example
I was drawn in by all the hype of Erlang about a year ago and I decided I’d give it a shot. After doing the standard tutorial programs, I wanted to try something more complex. I’m definitely not a functional programming proponent, so this is probably my only foray in to Erlang.
Download Luhn Validation example – (Erlang, 2kb, zip file)
ZAMN Password Generator
When the ZAMN editor was in development, someone had emailed me with details and source of a password generator. I’m not sure why I didn’t include it ever, but I ported it to Python a while ago.
Download ZAMN Password Generator – (Python, 3kb, zip file)
Python Metaclass Example
I was looking for something to do with metaclasses, but could never think of anything. Then I figured it out.
If I was attempting to do an IRC client, I would want to encapsulate the Commands as objects. Maintaining a command queue would be kind of annoying, verbose, and could be hard to do. So I needed a way to be able queue these objects up without the objects knowing/caring that they’re being queued. View the solution:
Download Python Metaclass Example – (Python, 1.3kb, source file)
Nested Set Generator
Inspired by this article on hierarchical data, I decided to create this script to generate the important left and right numbers in the set. It’s a simple concept, but imagine doing this by hand for a hundred or so categories; there’s a lot of room for error!
The code is not all that superb, but hey…it’s just an example :)
Download Nested Set Generator – (Python, 0.8kb, zip file)
jQuery Timer
I wrote this plugin a while back when I was transitioning from using Prototype to using jQuery. I had a few demos of special effects I was doing with Javascript, but I never actually used them in production. Consequently, I’ve never actually used this plugin on a project. But a few other people have, so here it is. BSD Licensed.
jQuery Timer plugin – (external url)