Meandering Out Loud

Musing, Muttering, and Mischief Along a Random Path

Plushie - Interactive Toy Modeling System

While I can’t so myself, I have friends that can and enjoy doing so. Yuki Mori a Ph.D student, at Fine Digital Engineering Laboratory Research Center for Advanced Science and Technology (RCAST) The University of Tokyo, has developed a system called Plushie that enables you to design and create patterns for 3D plush toys.

[kml_flashembed movie="http://www.youtube.com/v/rbQWxL-_8LU" width="425" height="350" wmode="transparent" /]

Yuki Mori, Takeo Igarashi. Plushie: An Interactive Design System for Plush Toys. ACM Transactions on Graphics (Proceedings of SIGGRAPH 2007), vol.23, No.3, Article No.45, San Diego, USA, August 2007 (Link to the PDF is available on her site).

Collecting Senders From Gmail Using POP3

Over the years, we’ve had a lot of people submit jokes for LOL. Since we’ve recently upgraded the site to allow user submissions, we thought it would be nice to let them know they can now add their own jokes (Truth be told, we were slow adding them).

I’m not going to go into great detail, but I thought I’d post a mini howto. Note: I’m not supporting this code, but you are free to use it

Firstly, Ruby 1.8’s POP3 implementation doesn’t support SSL. stunnel provides encrypted channels for software that doesn’t understand SSL. I run cygwin on my Windows box to get access to essential tools. Note: Configuring cygwin and installing it is beyond the scope of this entry, so ask Google for help.

A quick search for gmail and stunnel allowed me to cobble together the following configuration file called gmail-tunnel.txt

client = yes
debug = debug
foreground = yes

[pop3s]
accept = 127.0.0.1:42
connect = pop.gmail.com:995

Open up a command window and issue this command to start the tunnel:

C>stunnel gmail-tunnel.txt

Save the following code in rpopget.rb and then execute it from another command window while the tunnel is active. It will write a file called address.csv that lists each address and the number of times that person sent mail.

#!/usr/bin/ruby

require 'net/pop'

HOST = 'localhost'
USER = 'YOURACCOUT@gmail.com'
PASS = 'YOURPASSWORD'

$addr = {}

def add_address(a)
    $addr[a] = $addr[a].nil? ? 1 : $addr[a] + 1
end

Net::POP3.start(HOST, 42 , USER, PASS) do |pop|
    if pop.mails.empty?
        puts 'No mail'
    else
        pop.mails.each do |email|
            $stderr.printf(".")

            lines = email.header.split("rn")
            lines.each do |l|
                if l =~ /^From:/
                    if l =~ /^.*/
                        add_address($1)
                    elsif l =~ /^From: (.*@.*)[ ]*/
                        add_address($1)
                    end
                end
            end
        end
    end
end

open("address.csv", "w") do |f|
    f.puts "Address,Count"
    $addr.each_pair do |a, c|
        f.puts "#{a},#{c}"
    end
end

Surfin Sunday - Santa Can You Hear Me

Every once in a while I hop on that rabbit trail known as “the net”. Today’s trail started on twitter. Seeing that I’m a fan of Cali Lewis on GeekBrief.tv, I wondered who she follows. Nosing around, I decided that maybe I should add some more people to follow.

On a whim I put “trader” in the search box, a couple of squirrel revolutions later, and out pops a list with a name I couldn’t pass up – TradingGoddess. Jump to her blog, spin the mouse wheel and out pops the gem below.

[kml_flashembed movie="http://www.youtube.com/v/IZOGLoYPVKQ" width="425" height="350" wmode="transparent" /]

LOL.com Is Taking Shape

Ages and ages ago some friends and I were able to get the lol.com domain and have kept it all these years. A couple of years ago, when advertising started coming back, my business partner John Munsch and I started talking about how we could make it more than just a dead site and an email trap.

A little over a year ago, we brought up a very simple site with a very limited set of jokes. We opened up a gmail account to accept jokes to place on the site, but it was too hard to keep up with the submissions, format them all, and get them live on the site. After the site had been up for a while, it became apparent that there was growth potential and it was worth getting an interactive site up and running.

So for the last year or so John and I have been working to bring our initial vision to life. John has done most of the development for this site, I’ve done most of the IT. We have released version 2.0 of LOL.

We’re proud of our baby. If you have some time stop by and give it a look.

Ruby Consolidation in the Eclipse World

Apparently I’ve been a little out of touch. I’ve been happily using RDT with Eclipse and hadn’t needed to change. While catching up on some reading, I ran across this press release "Aptana to Merge RadRails and RDT into its Ajax-focused IDE".

Aptana LogoAptana bills itself as “the leading Interactive Development Environment (IDE) for Web 2.0 and Ajax development”. I took a moment and watched their screen cast and have to say it looks like a good start. As soon as I need to update my IDE again, I’ll look at switching over. For now, I’m going to keep pluging away with my current version.

Moved…Again

It’s been ages since I’ve posted anything to the blog on my site, because I just got fed up with the data entry. Today, on a whim, I decided to see how much effort it would be to take my old blog from www.donthorp.net and move it to a wordpress blog.

The export from Moveable Type and import into WordPress went smoothly. It took me a moment to figure out why my posts weren’t showing up. It’s because a WordPress import brings the articles in as drafts. Once I figured that out, I went through and published each post.

It wasn’t completely flawless, because I still need to fix up some URLs that used root relative URLs from my original site (e.g. /gallery instead of http://www.donthorp.net/gallery). I may also install WordPress on my system and then it’ll be less of an issue.

O’Reilly Animals

A co-worker dropped in and picked up one of my O’Reilly books and mused outloud about a cover with an alligator on it. It took a little bit of digging, but I finally found The Animal Menagerie, a listing of all the books and their animals.

In case you’re wondering, the book with an alligator is Java Examples in a Nutshell. It’s not one that I have in my personal library. I’m at the point where adding many more books would require an addition on the house.

Swing Threading

The article Rethinking Swing Threading by Jonathan Simon provides a good description on how to use event based programming to simplify your Swing development.

I used a similar method in the past and it worked very well. My only addition to what he did was to add a Job system for handling the tasks. Basically, I wrote a Task for each operation that I wanted to perform in the system and handed it off to the job manager to execute and monitor. In addition to being able to simplify the Swing code, it made it possible to easily annotate the task with any exceptions that occurred for use in displaying errors to the user.

Tomcat Configuration

There is a great article at OnJava.com called Top Ten Tomcat Configuration Tips. It points out a method of adding new web applications without adding a context in server.xml.

Basically, you can create an XML fragment that contains the context you would have placed in the server.xml and put it in a separate xml file. Name the file MyApp.xml, place it in the webapps directory and there you go. The docBase attribute can point to anywhere on your file system, so you don’t have to place your application in the Tomcat webapps directory.

Why is this important? If you have a web application and you want to write an installation program for it what do you do? You could write code to edit server.xml to add/remove/modify your context or you could simply copy/delete/replace MyApp.xml in the Tomcat webapps directory. On Windows, you could do a standard install, put your web application under Program Files/My Company/MyApp and copy your context file to CATALINA_HOME/webapps. You’re uninstall process also becomes much simpler.

Gadgets: USB Memory Wristwatch


They don’t provide measurements that I can find, but the LAKS USB Memory wristwatch looks pretty cool.

It works on Windows, Linux, and Mac. That implies that it’s driverless. If you are really adventurous, you can order them customized (minimum order 100). The 128MB version is 93 USD.