Simple Random Number Generator Gem
I just published the simple-random ruby gem, which is ported from C# code by John D. Cook. You can view the source on github or install the gem via rubygems: gem install simple-random The gem allows...
View ArticleJava maps and sorting
I’m always a little annoyed I have to implement sorting Map keys by their values myself in Java. It seems like they should be a part of the standard Collections library or something. Maybe they are...
View ArticleJekyll and Code
Tom Preston-Werner, aka mojombo, rocks. When GitHub announced GitHub Pages recently, they pointed to a new blog engine, Jekyll. Jekyll generates the blog as a set of static pages — no database reads,...
View ArticleLDA in Ruby
Since Ruby is my new favorite toy, I thought it would be fun to try my hand at C extensions. I came across David Blei’s C code for Latent Dirichlet Allocation and it looked simple enough to convert...
View ArticlePlurk your tweets
A couple of days ago, I wrote a script that would tweet anything you plurked. Thanks to some code from Neville Newey (based on PHP code by Charl van Niekerk), the plurk.py script I wrote has been...
View ArticleTweet your plurks
If you want to use Plurk, but aren’t ready to leave Twitter, I wrote a little python script you can use to automatically mirror your plurks on Twitter. This will not work for response plurks, but your...
View ArticleJava Properties
I discovered the java.util.Properties class a couple weeks ago in the ginormous Java API docs. If you’ve ever created a software project where you have a lot of different settings that change...
View Articlebrainfscking set theory
I mentioned the esoteric programming language brainfuck a little while back. It consists of 8 operations and was created in order to make the smallest compiler in the world (I think the current best is...
View Articlebrainfsck
Either the coolest or the stupidest programming language in the world, brainfuck was designed by Urban Müller in order to create the world’s smallest compiler of a Turing-complete programming language....
View ArticleMorning Madness
Ever get pissed twice before you’ve really even opened your eyes? This is why I shouldn’t read my RSS feeds so early in the morning. At the top of the list is Bush equating Democrats who oppose the war...
View ArticleSimple Cellular Automata
So I’ve been reading A New Kind of Science by Stephen Wolfram, the creator of Mathematica. It was hyped up big time back when he first wrote it, since he had gone silent for a number of years, hinting...
View ArticleSubstitution Ciphers
For one of my homework assignments, I have to solve words encrypted via a substitution cipher. These ciphers were insecure before computers came around, but they are still fun. If you’re unfamiliar...
View ArticleUltrafast thumb-only keyboard
In a recent press release, kannuu is claiming to have revolutionized text entry. They claim that you can now perform text entry with just your thumb at the same speed of a regular keyboard. Too good to...
View ArticleMerge sort fun
Suppose you have an array of floating point numbers with each index into the array being an id number corresponding to some external data structure. You want to sort this array, but in doing so you...
View Article