Jay McGavren's Journal

2010-03-07

Another Ruby tweet...

Was browsing the new Popular Science archives, which led to an article from 1984, which had a picture of the book Creative Graphics for the BBC Microcomputer, which led me to an archived copy of the book online, which had a dirt-simple program to draw Lissajous curves, which led me to write this tweetable Ruby version. (Phew!)

ruby -rcurses -e"include Curses;i=0;loop{setpos 12*(Math.sin(i)+1),40*(Math.cos(i*0.2)+1);addstr'.';i+=0.01;refresh}" #ruby
****         *******                ********                ******           **
*  *        **     **              **      **              **     *         * **
*  **       *       **            **        **            **       *        *  *
*   *      *         **          *           **          **        **      *   *
*   *      *          *         **             *         *          **     *   *
*    *    *            *        *              **       *            *    *    *
*    *   **             *      *                **     **            **   *    *
*    **  *              **    *                  *     *              *   *    *
*     * **               *   **                  **   *               ** *     *
*     * *                ** **                    *  *                 * *     *
*     * *                 * *                      * *                 **      *
*      **                  **                      **                   *      *
*      *                   **                       *                   *      *
*      **                 * *                      * *                 ***     *
*     * *                **  *                    *   *                * *     *
*     *  *               *   **                  **   *               ** *     *
*    *   *              *     *                  *     *              *  **    *
*    *   **            *       *                *      *             *    *    *
*   **    *            *       *               *        *            *    *    *
*   *     **          **        **            **         *          *      *   *
*   *      *         *           **           *          **         *      *   *
*  *        *       **            **        **            **       *       **  *
** *         *     **              **      **              **     **        * **
 **           ******                 *******                *******         ***

Read more...
2010-03-05

If your code base has .xsl files, and you sometimes confuse them with with the .xls files… You might be a Java dev.

Read more...
2010-02-24

An underinsured taxpayer...

Posted (in vain, I’m sure) to Sen. Jon Kyl’s Facebook wall:

I'm a productive, tax-paying, native-born American with inadequate health insurance for myself and my family. Oh, we tried to purchase private insurance, but no one will underwrite us because my wife had major surgery too recently. We wound up having to settle for a $250-a-month out-of-pocket plan. We pay an additional $300 a month for medications because there's no prescription benefit. I've gone from contractor to salaried status with my employer, so the situation will improve for me. In June, when my benefits start. Until then, I have to wait and worry about my family. Senator Kyl, I ask you, is this an acceptable situation? Is it acceptable for the millions of Americans who won't have a reprieve in a few months? -Jay McGavren, Mesa

Given Kyl’s voting record on this issue I doubt it will even be read. By Senator Kyl, that is. But at least it’ll make the topic a little harder for him to ignore.

I did this as part of MoveOn.org’s virtual march for healthcare reform. Please consider doing the same!

Read more...
2010-02-23

Ruby Tweets!

ruby -e "i=0;loop{puts ' '*(29*(Math.sin(i)/2+1))+'|'*(29*(Math.cos(i)/2+1)); i+=0.1}" #ruby

about 23 hours ago via web

ruby -rtk -e "w=TkCanvas.new(TkRoot.new{title:paint});w.pack.bind('B1-Motion',proc{|x,y|TkcOval.new(w,x,y,x+4,y+4)},'%x %y').mainloop" #ruby

about 3 hours ago via web

Almost got this one short enough to tweet:

ruby -rtk -e"v,w=0,0;a=[1]*9;c=TkCanvas.new;c.pack.bind('Motion',proc{|x,y|a<<TkcLine.new(c,v,w,v=x,w=y,:arrow=>'last');a.shift.delete rescue 1},'%x %y').mainloop"

Ruby Tk

Read more...
2010-01-25

Killing the Pegasus...

Going salaried at my current employer, and have to fill out a job application as a formality. So I was digging around for past employer info in my archives, and came across this e-mail, sent on the occasion of departing Pegasus Solutions…

Date: Sat, 22 Oct 2005
From: Me
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
To: John
Subject: Re: New job!

John McGavren wrote:
 > What level are you now, and what did you put your stat points into?
 > Oh! I'm curious about the loot you got from killing the pegasus too.
 > Any tomes of knowledge? Or swords?

Um, no.  But I am gonna take my stapler with me.

-Jay

Read more...