Skip to content

Update: Migratory Internet Junk

I know it’s taken me a long time to post this, but I received my box of migratory junk on May 10! I got box INTJ-7 which had been shipped out by a nice guy from San Diego. I don’t have a lot to say now (and no pictures) but I’d like to share some of what I got out of it. Perhaps my biggest find was right on top: a Hand Held Products IT4410 2D barcode scanner. On the product page I found the manual manual (pdf link) which explains all of its features.

HHP 4410HD Barcode Scanner

It turns out that the scanner emulates a PS/2 keyboard and will read almost any 1D or 2D barcode symbology. After a few hijinks with a loose ribbon cable and flaky PS/2 support on my computer I got the scanner working perfectly. I was even able to change its configuration by scanning barcodes from the manual displayed on my LCD (though I don’t know if it will work with glossy screens — mine is matte).

I’m planning on putting up a more complete summary of what I’ve found, but here are a few other things that caught my eye:

  • A solenoid-controlled proportional valve for small pneumatics or hydraulics.
  • A bag of large rubber grommets, one of which I cut up to replace the feet on a table lamp.
  • Three matched stepper motors.
  • A worm-gearbox connected to a large motor with integrated optical encoder.
  • A wide variety of IR LED/phototransistor gates.
  • A pile of 1.8V, 2.5V and 3.3V voltage regulators.

Stay tuned for pictures and more details on what I’m taking and what I’m going to do with it.

Tagged , , , , , , , , , ,

Heads Up: Migratory Internet Junk

If you haven’t heard of TGIMBOEJ (The Great Internet Migratory Box Of Electronics Junk), you should definitely check it out. The basic idea is that a box of random electronic junk gets shipped between makers and tinkerers, each of whom take something and contribute something to the box, and document what they end up doing.

To make a long story short, I was recently offered a chance to receive one of these migratory lending libraries, so expect to see something in this space about it soon.

Tagged , , , , , ,

Clever Stencil

I ran into this stencil on the side of a fire extinguisher box at Reed College and thought it was delightful.

Tagged , , , ,

More Mandelbrot

I just recently revisited the M-Set code from my Perl Snippets post. The code I had was pretty ugly, so I decided to rewrite it in Python. The result is not only a lot cleaner and easier to understand, but it’s also a lot faster:

$ time python > \dev\null
real	0m0.051s
user	0m0.036s
sys	0m0.010s
$ time perl > \dev\null
real	0m3.518s
user	0m3.463s
sys	0m0.029s

You can find the code here.

This script works well for zooms, as long as you stay below a few thousand iterations. The following picture was generated with x=-1.1887204, y=-0.3032472, width=0.01 and 150 iterations.

Tagged , , , , , ,

Conky Calendar with Date Highlight

Since I got a new desktop a month or so ago, I’ve been running Ubuntu as my main operating system, and am using Conky for a nice heads-up-display. There are a lot of articles on the web about both Ubuntu and Conky, but one thing I couldn’t find a good, accurate how-to on was getting a calendar that highlighted the current date. While getting the calendar is easy using the cal command, actually getting the date highlighted is somewhat hard, and all of the articles I found suggested methods that broke in various situations. However, I managed to get it all worked out, and have a beautiful calendar that looks like this:

After the jump, I’ll give you the code and explain how it all works. Continue reading ›

Tagged , , , , , , , , , ,

iWork Autosave

So I had the wonderful experience this weekend of losing over 1,200 words of work on a paper because I forgot to save it regularly. I was really, really sad about that and really bummed that Pages, my word processor of choice (I love the formatting tools), doesn’t support either autosaving or document recovery. However, my preference for Pages is strong enough that I didn’t jump ship to an auto-saving editor. Instead I went out and found WorkSaver. WorkSaver
Worksaver simply sits in your menubar and, at a definable interval will save every iWork document you have open, provided that it’s already been saved once. This means that when I’m writing I don’t have to even worry about saving my document after creating it and choosing where to save it. Of course, it’s a shame that you have to manually save the file when you create it, but it’s a lot better than losing all your work. I can highly recommend WorkSaver if you use iWork simply for the peace of mind it provides. Of course, it’s not perfect for everybody, but when I’d rather focus on writing a paper than on making sure my computer doesn’t decide to make it all go away, WorkSaver is just what I need.

Tagged , , , , , , ,

Perl Snippets

I’ve been getting into a mood lately that makes me fiddle around with fun Perl stuff, but sadly school’s picking up to the point that writing anything up isn’t going to happen. However, I have a couple short scripts that I’m just dying to share.

Just Another Perl Hacker

I figured that it was about time in my hacking career (read: I was bored enough) that I should make a japh script. After a couple attempts I came up with this:

 	for (map{ord($_)-33}split ''){
print "\n";
                   /|                        |\
      !            ; :                        : :
                  | Y,                      ,P |
     !             |  Yb.        __        ,dP  |
                  l\  YMMb,_ _,/  \,_ _,dMMP  /f
  !                 j;  `YMMP'  `--'  `YMMP'  ;j
                   : \   YP`-._    _.-'YP   / ;
  !            !      \ `\,  _,\_    _/,_  ,/' /
                     `,_,   \`o>  <o'/   ,_,!'
                         `\            /'
                           |  _    _  |
      !                     / 88b  d88 \
                           \ `8P  Y8' /``-.
             !               `\,    ,/      \
                             _`----'        \
                  !        _.'/ '          `, \
                        .'_,'_..._          \ ;
       !               .',/.dMMMMMMb. |      /  \
                    .'./.MMMMMMMMMMM ; !    /    ;
                   / /.MMMMMMMMMMMMM/     /     ;
                  | ;dMMMMMMMMMMM!P/'   ,/'   !    ;
                  |/dMMMMMMMMMP'     .'          |
   !               ;dMMMMMMMMM|     _/            |
                 ;dMMMMMMMMMMb_|_!| /;            ;\,
                 dMMMMMMMMMMMM`M`M`;.---..      '   `\,
                :M!MMMMMMMMMMMMMMMP/'     `\            \
               /|MMMMMMMMMMMMMMP/          \    _!_      `.
  !            / |MMMMMMMMMMMMMM|            |.-'  `-._    \         .'\
             ;!  ;MMMMMMMMMMMMMM|            :         `-._ `-.     /  _\
             |   ;!MMMMMMMMMMMMM;            |             `-. `-.._.'/
              \   `\YMMMMM!MMMP/'\           |                `~~----'
               `-._, ``YMMMP'_.-'\         ! ;_
                 |      /         `-.,_./     7
                _/    `\,    !        /      _/
             ,-' ,  ,   /         _.'      /
            (_(_(__(__.'       !,-'        /


I’ll let you go ahead and figure it out on your own. It’s not super-hard, but it’s fun.


In another fit of boredom I decided that it was finally time to create a mandelbrot set renderer. I originally tried to make one of these in basic, long before I had the math to do so. I was proud that I got the real axis to render, and figured it was time to complexify it. To keep things simple I decided to make it render an ASCII-art version of the set that would fit in a terminal window. The output looks like this:


The code’s far from polished and not what I like to publish, but it’s a fun thing to look at and offers you some neat abilities to poke things around and fix some pesky problems that just need clear thinking applied to them. It’s available here.

Tagged , , , , , , , , , ,

Make a Money/Card Clip

So the other day I finally got tired with my (awesome) wallet and decided to make something new. I ended up choosing a money clip. Not only would it be a nice, high quality, metal object living in my pocket, instead of a crummy, dirty wallet, but a money clip is good looking, classy and minimalistic way of keeping a hold of my money and cards. Looking around my room I didn’t really get any inspiration, until I saw an old metal fork lying in a box. I cut the head off with my dremel and a fiberglass cutting wheel. A little bit of sanding and bending resulted in a, super-useful money clip. I’ve been using it for the past few days and it’s been serving me really well, looking good, and altogether holding up like a quality product.

If there’s interest, I’ll put up more information / pictures and maybe put some of these bad boys up for sale.

Tagged , , , , ,

GPSd under OS X

Update 7-13-11: I’ve posted an updated set of instructions on getting GPSd to compile on OS X here; this post will remain for archival purposes. For information on installing GPSDrive, see this post.

So I recently picked up a cheap GPS module on Amazon. It was about $30 with shipping, and I got a neat little dongle which connects over USB to my computer and communicates with software. It didn’t come with support for OS X (although interestingly enough it shipped with Mac OS 8 and 9 drivers), but it promised to send generic NMEA-0183, so I wasn’t too worried.

When it showed up, some quick software probing revealed that it houses a usb to serial adaptor (a Prolific PL-2303, which I’ll get to in a bit) and a gps module that’s configured to send NMEA strings through the virtual serial port. This sort of information is compatible with a host of software, but most of it is commericial, and only available at a considerable price.

Luckily, there’s a wonderful open source project called gpsd which provides support for a wide raft of devices and protocols, and talks to an even wider assortment of software. Primarily, I wanted to be able to get my gps to talk to the network scanner Kismac, and Randall Munroe’s script. Both of these were built to take information from gpsd, so I was in business. However, gpsd, which is designed to play nicely with Linux, takes some coaxing under OS X. This is meant to describe how I got it all running. Continue reading ›

Tagged , , , , , ,

Genetic Algorithms in Perl

Inspired by recent genetic algorithms floating around, I decided to try my hand at implementing one in perl. I’d thought for a long time that it would be quite difficult, but really it’s quite easy. My biggest hangup was dealing with data structures, but once I did that, it turns out that all you really need is a few functions:

  • A fitness function, that determines which individuals are most fit to reproduce
  • A mutate function, that will add random chance into each generation
  • A breed function that allows the best individuals to reproduce.

I ended up implementing a very simple algorithm, but it’s fairly fast and very generic – it can be easily adapted to just about any task. Sadly, I have no fascinating application just yet, but if I stumble across one, I’ll be sure to post about it.

After the jump, I’ll put up some of the code I used and a link to the script, all for your viewing pleasure.
Continue reading ›

Tagged , , , , ,