Programming

Word Generator

Friday, December 28th, 2007

Indromia, Quard, Conistate, Vercurelince, Quiniferphose!

In an inexplicable fit of word geekery, I wrote a program to generate new words via a statistical analysis of existing words. First I generated a histogram to count the number of times each possible three-letter combination occurs at the beginnings, middles, or ends of existing words. Then, to generate a new word, the program tries random overlapping three-letter combinations until each of their frequencies of occurrence in the histogram is above a specified threshold. Isn’t that idimogous?

Go ahead and give it a try below! You can specify a “normalness” scaling factor (5 gives very daisewisfasy-sounding words, 95 gives very conistate-sounding words), a maximum word length, a minimum word length, the source text for the statistical analysis (choose from the dictionary, the Bible, the complete works of William Shakespeare, etc), and an optional “seed” word for the generator to build upon (seeding with “muffin” could yield the wonderful “Muffinetry”).

Oh, and I also made a variation that uses U.S. Census data to generate new baby names (just click on “names”).

Make Fractal Art

Thursday, December 27th, 2007

Flam3 is a fractal art generator written by Scott Draves. It’s also the heart of a collaborative screen saver called Electric Sheep (named after the Philip K. Dick novel). While a beautiful fractal animation plays on the user’s screen, their computer is simultaneously rendering a few new frames for a future animation. Each computer uploads its new frames to a server, and in return downloads new animations that were created by the distributed network. These “electric sheep” are the “dreams” of the sleeping machines.

A program called Oxidizer (Mac) lets you edit those animations and create your own - or render single frames as high-resolution artwork. (You could also use Apophysis for Windows, or Qosmic for Linux). To get started, browse the current flock of sheep. Click on one you like, download its “genome”, load it up in Oxidizer and start playing around with its genes (here’s a nice tutorial). You can even cross-breed multiple sheep to create a hybrid. When you come up with something you like, you can render it as an animation or still frame. There are infinite variations to be made, so have at it!  Oh, and did I mention that all of this software is free?

Update: Scott Draves just pointed me to a preview of the next version of Electric Sheep, featuring even higher quality animations.  Thanks, Spot!

th-fractalflame.jpg

Your Own Personal Wiki

Sunday, December 23rd, 2007

Wherever I am, I can type “w recipes” into my browser’s address bar and get an editable list of recipes I’ve tried and liked. If I type “w books” I get a list of books people have told me to read. Or “w rails” to see the notes I’ve been taking as I’ve been learning to program in Ruby on Rails. I can also do this from my iPhone, using a special search page I made.

What’s a Wiki? It’s the same kind of software that runs Wikipedia - it’s easy for anyone to view and edit pages, whether or not you already know how to make web pages. But you can have your very own wiki, and you can keep others from being able to view or change it. Then a Wiki becomes a useful tool to organize your information, and have it accessible from wherever you are.

The software that runs Wikipedia is called MediaWiki. It’s free, but it’s tricky to set up and probably overkill for you. I’m using a simple wiki called W2 by Steven Frank, which is optimized to look good on standard web browsers as well as on iPhone. If you have a web hosting provider (and who doesn’t these days, right?), you just upload the files to your site (it’s written in PHP), optionally password protect it using an .htaccess file, optionally set up a Quick Search in Firefox (so you can just type “w” instead of “http://yoursite.com/index.php/”), and you’re good to go. It saves files as plain text, no databases to muck around with.

I use it every day.

th-wiki.png