blog

[ 07:45 AM on January 30, 2010 ]

WTF kind of ad is this, from youtube?
youtube-ad.png
For the record I was watching Reggie Bush highlights.

[ 03:46 PM on January 29, 2010 ]

Another fairly simple, but not completely obvious Java interview question...

What is the final value of i?
int i = 3;
i += 6;
What is the final value of b?
boolean b = false;
b |= true;
What is the final value of b?
boolean b = false;
b != b;

[ 12:43 PM on January 29, 2010 ]

Reggie Spud.
20100129094121-full.jpg

[ 06:33 PM on January 28, 2010 ]

Surgeons are shitty doctors

A doctor is concerned with maintaining human health through the knowledge of science. Neither are scientists, but a doctor should be able to take in a patient's symptoms, history -- all of them -- use science and come up with a plan to lesson the less desirable symptoms. In my expreience, and I only speak of my experience, a surgery post-op is more aptly-named a cover your ass visit. Let's make sure I didn't fuck the patient up more then when he/her came into the E.R.

I don't see why a surgeon should be the one to evaluate the health of a patient after surgery. It baffles me. Surgeons are skilled technicians and engineers. They are technicians in that they perform complicated, dextrous manuevers that the average person just cannot. They are engineers because they use science to perform their task. But, why is a surgeon the most qualified person to evaluate the current health of a patient?

The problem I see is this: A surgeon's solution is surgery, not medicine or anyting else. Let's alter the patient's body to improve his/her health. So, if that is their only tool, what good are they after no surgical solution will help the patient? My experience is this: My five lower vertebrae were compacted and spinal canal collapsed, and after various surgeries they are now fused, and my spine will not collapse, which is a good thing. Many thanks to my surgeon. But, why should the guy who did these procedures determine my continuing care? I told him everything that was going on today: My leg is numb, my foot goes into intense pain every night, my other foot contracts eratically, I can't sleep because the shooting pain in my hip, I can barely get myself out of bed in the morning, and his response was that was "I was doing well".

If I smell shit in my back yard I'm calling the county inspector. I'm not calling the guy who put in the septic tank. I think doctors should drop their claim to scientific knowledge at their bachelors degrees and admit to being engineers. I'm one, it's not that bad.

[ 10:56 AM on January 28, 2010 ]

Fixed a bug in craigmail, which allows you to select craiglist ads and send one message to multiple address. The bug was making the addresses undefined; they used to escape the addresses, guess they don't anymore.

[ 12:49 PM on January 27, 2010 ]

One reason not to live in Kentucky. Women now have to look at an ultrasound of the fetus before getting an abortion.

[ 04:46 PM on January 25, 2010 ]

I found this image amusing, with the headline "Police: Girl sold for cash, beer, and meat. Dad called cops when he wasn't paid." But, I found this part on the bottom left more amusing:
zyvpv-small.jpg
I wonder whether they can really back up this claim, do they really have other videos like this?

[ 02:04 PM on January 24, 2010 ]

WTF just happened?
reddit-squares.png

[ 12:10 PM on January 16, 2010 ]

Java interview question #4:
What kind of whale(s) has/have no dorsal fin?

[ 04:57 PM on January 14, 2010 ]

As it turns out, annular does not mean what I thought it would...
annular-solar-eclipse.png

[ 10:09 AM on January 13, 2010 ]

r2potatoo is getting a new friend in 2 days.
tater-nj-devils.png

[ 12:30 PM on January 06, 2010 ]

Firefox or xmarks needs a way to have conditional start pages. i.e., instead of having one setting saying to open a set of urls every time a new window opens, have conditions of what urls are used. For, example, declared things like this:
  • On the first window only, open these urls
  • or, from 9am to 5pm open these urls
  • etc

[ 07:40 PM on January 04, 2010 ]

measure is a set of bookmarklets allowing you to easily get position and distance information about HTML elements. Namely, it outputs the coordinates of the mouse, and allows to user to measure the x-, y-, and total-distance between two points on a page. After clicking the measure on link, you'll start to track your mouse.

To measure the distance between two points you click on the first point.

Then, click the stop point (at his feet),

and you'll notice the distances in the bottom-right corner.

[ 07:53 PM on January 01, 2010 ]

I was a little annoyed today, because I was getting annoyed. I was txting with a good friend, but the task of txting became so cumbersome that I started getting annoyed. Then, I thought it would be cool if you type your txts on your laptop and send with your phone. So, I added another application to the iwebapp that gives each party a similar interface -- a box in which to receive and aggragate message from the other party, and a screen in which to type messages. So, the idea is that you could open a browser on any phone (even the evil ones) to http://jeffpalm.com/tt, run this application on your desktop, and then type your txts into the app and transfer them to your phone. Here's a little demo with one caveat: I can't produce video showing my phone and laptop, because my my iSite was returned broken after lending to a 'friend', two laptops with cameras are out of commission, so that leaves this laptop and my phone with cameras. So instead, I mimic the phone using a browser on the desktop.

youtube-front-textTransfer.png

[ 04:10 PM on January 01, 2010 ]

Interesting...I just sent this crucial status update (I won't say tweet)
spudtrooper-harley-tweet.png
and moments later I received a message saying hdridersusa was following me. It's not *that* interesting, but it had never happened before.

[ 12:42 PM on January 01, 2010 ]

I ran into another problem one-hand browing the web today -- I couldn't easily open links in new tabs with one hand. So, newtab lets you open links in new tabs when you double click them.

[ 09:41 AM on January 01, 2010 ]

Thanks to dado for contributing a fix to a regular expression problem in the craigslist image previewer -- noted here

[ 09:05 AM on January 01, 2010 ]

I was just skimming over a rather large page, here, and accidentally leaned on my laptop, so I lost my place. The world didn't end, but this did make me think it would handy to have a history of your scroll positions aviable to navigate back through. So scrollundo keeps a history of your scroll positions allowing you to navigate backwards by pressing Control+Up (i.e. undo) and again forwards by pressing Control+Down (redo). I realize this isn't great if you're on windows where Control actually does stuff, but it doesn't do al that much on macs.

[ 12:01 AM on January 01, 2010 ]

This is probably my most trivial greasemonkey script yet, but perhaps the most useful...upanddownpage lets you use one hand to page up and page down on macs. Again, the code is very trivial, but I find myself doing something with at least one hand (insert dirty jokes here), like playing guitar or writing, while I'm looking at a web page; and I don't want to use both hands to just page up or page down. Normally it's fn+up and fn+down -- fn on the far left, up/down on the far right, and this is a pain. You can switch tabs, go back, go forward, go up, go down, go to page end, and go to page start with one hand -- it's just inconsistent to exclude page up and page down. And, yes, it's utterly trivial:
window.addEventListener('keydown',function(e) {
    if      (e.keyCode == 38 && e.altKey) window.scrollByPages(-1);
    else if (e.keyCode == 40 && e.altKey) window.scrollByPages(+1);
  },true);
Oh yeah, happy new year.

[ 09:26 PM on December 31, 2009 ]

To add to the intesity of this New Year's Eve, setall now supports twitter's geo API, meaning that when you use it to post to both twitter and facebook (probably, more aptly-named setboth), you have the option of posting your location, too.

I'm not sure if I explain the setup in the google project, but basically this allows you to post your status via mail or directly on the web to both twitter and facebook, so your are assured to not bother those who are on one and not the other. So, now when you go to the interface you'll see a box if which to check whether you want to post your location, like this:
setall-new-location.png
If the Use location box is checked your location will be sent. Then, if you go check your status or (or my alter ego's) you'll see that it updates your status, like so:
setall-twitter-status-small.png

[ 11:18 AM on December 30, 2009 ]

This is clearly the best use of google maps to date:
ss1.png

[ 08:53 PM on December 29, 2009 ]

urlu.ms has a feature that now makes it clearly superior to bit.ly -- long URLs. So, you can turn nasty URLs, like nbc.com into lovely ones, like:
http://urlu.ms/Sj0qFQXboizTEOEZGc3W38OqR9Ik8GJZtK3
0kBnPt1dJPNOblD8vXKUvdB8qF1gR4h30NFy84O6Fymng4ktABt6
XduIfYpk4fl29O1oDAhnMN6f2bWDxJZgw94mHf0ZSzCCqBeBUWx
Game over.

[ 11:01 AM on December 28, 2009 ]

Inspired by a friend's photo, I give you Excel Darth Tater:
darth-xls.png
Made with ImageToXls.java

[ 04:28 PM on December 27, 2009 ]

I tried creating an 8-bit version of darth tater -- it's still ongoing -- this is what I have so far, going from least granular to most. Source is here. Looks like the 8 pixels per square version comes the closest. Potatos are tricky, you've got to play to their strengths:










[ 02:20 PM on December 27, 2009 ]

directions gives driving directions in text form rather then having to open a browser. It uses google directions javascript API to actually find the directions. Using it, you can type things like this and bask in the glory of a text-only world:

% directions -o 'New York,NY,10019' 'Los Angeles,CA,90001'
Distance: 2,784 mi
Duration: 1 day 19 hours

Distance   Duration   Directions
187 ft     1 min      Head northwest on W 55th St toward 11th Ave
0.8 mi     4 mins     Take the 1st left onto 11th Ave
299 ft     1 min      Turn left at W 40 St
0.7 mi     1 min      Take the ramp onto NY-495 W 
 --- Entering New Jersey ---
3.3 mi     3 mins     Continue onto NJ-495 W
0.2 mi     1 min      Take the exit toward I-95 S
6.2 mi     6 mins     Keep left at the fork to continue toward 
                      I-95 S and merge onto I-95 S 
 ...
 --- Entering California ---
72.6 mi    1 hour 7 mins Merge onto I-15 S
38.9 mi    36 mins    Take the exit onto I-10 W toward Los Angeles
0.9 mi     1 min      Take the I-10 W/I-5 S exit toward Santa 
                      Monica/Santa Ana
2.8 mi     3 mins     Follow signs for Santa Monica and merge onto 
                      I-10 W/I-5 S 
 --- Continue to follow I-10 W ---
0.2 mi     1 min      Take exit 15B toward Alameda St
220 ft     1 min      Merge onto E 14th St
3.5 mi     9 mins     Turn left at S Alameda St
0.6 mi     1 min      Turn right at E Florence Ave
0.3 mi     1 min      Turn left at Miramonte Blvd
394 ft     1 min      Turn right at E 77th St 
 --- Destination will be on the left ---

[ 01:13 PM on December 26, 2009 ]

Here are questions 3 and 4 in the java-question series:

Question 3: Will this compile? If not, why? If so, why would I ask this question?
import java.awt.*;
import java.util.*;
enum TrafficLight {
  GREEN(Color.green),
  YELLOW(Color.yellow),
  RED(Color.red);

  private final static Map<Color,TrafficLight> 
    INSTANCES = new HashMap<Color,TrafficLight>();

  private final Color c;
  private TrafficLight(Color c) {
    this.c = c;
    INSTANCES.put(c,this);
  }

  public static TrafficLight getInstance(Color c) {
    return INSTANCES.get(c);
  }	
}

Question 4: If you answered No to the first question, what should be done with the person who designed enums to make this so?
Answer 4: Drug out to the barn and shot.

[ 09:37 AM on December 26, 2009 ]

From the New York Times in a blurb about the theft of a sign from Auschwitz:
The ministry said the government would contribute about $138,000 after a furor over the lack of security at the camp...
I think it's a little too cute using the word furor when writing about anything Nazi -- how bout just say 'fit'?

[ 04:18 PM on December 24, 2009 ]

This morning I passed the "jews f✡r jesus" building and it reminded me that I didn't renew DNS for jews4xmas.com -- anyway, it will live it for ever here. I know, "phew", close one.

[ 10:05 AM on December 23, 2009 ]

Part 2 in my n-part series on Java interview questions...what does this print?
class StaticTest { 
  static class C {
    static { System.out.println("inside"); }
  }   
  public static void main(String[] args) {
    System.out.println("before");
    System.out.println(C.class.getName());
    System.out.println("after");
  }
}

[ 06:10 PM on December 22, 2009 ]

Love these:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (classFileParser.cpp:3075), pid=8080, tid=7240
#  Error: ShouldNotReachHere()
#
# JRE version: 6.0_17-b04
# Java VM: Java HotSpot(TM) Client VM (14.3 mixed mode windows-x86)
# An error report file with more information is saved as:
# C:\Users\...\hs_err_pid8080.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

[ 07:15 PM on December 20, 2009 ]

In the spirit of redditmore and wasting peoples' day, facebookmore automatically expands older posts on facebook home pages when you reach the bottom of the page, so you don't have to click the Older Posts link.

[ 04:10 PM on December 19, 2009 ]

Hmmmmmmmmm...something looks funny about this google map of local Bank of Americas...

google-boa.png

[ 01:56 PM on December 19, 2009 ]

More apropos then whether it's raining? -- is it snowing?

[ 11:40 PM on December 13, 2009 ]

[ 11:08 AM on December 02, 2009 ]

Egads.

twitter-out1.png

the world
twitter-bird1.png
is certainly
twitter-bird2.png
coming to
twitter-bird3.png
an end.

[ 10:24 PM on December 01, 2009 ]

These are your options for linkedin.com invitations to become linked up (or linked in?)
linked-in-options.png
Accept? OK. Archive, I guess if you want to save it. By, why on earth would the rejection text for an invitation to join someone's linkedin network be "I don't know this user"? The whole point is to meet people, and network, and get all linked in. I think they should change this something different, that captures the essense of rejecting someone's offer to meet you; like "I've heard about you" or "I slept with your mom, you really wanna go down this route?" or maybe "how'd you find me and what the hell is this company or organization or whatever you claim to know me from? I don't belong to that. You go away, now!" ... much better!

And, I did hit "Accept", by the way. I'm neither an asshole nor really in a position to be batting away any type of connection, personal or business. OK, enough there.

[ 08:27 PM on December 01, 2009 ]

Version 0.7 of the craigslist image preview GM script fixes a bug a faithful user pointed out to me today that made the first screen look something like this:

[ 07:53 PM on December 01, 2009 ]

I find myself writing tons and tons of scripts, even for things I know I'll probably do only once. So, code.google.com/p/binfiles is a google project where I'm collecting them all in one place. They all use the app gem to do some task, and hopefully, out of this I get some maintainability of all these files.

The basic concepts are these:
  • I put all of these files in ~/bin, you can put them where you want. But, if you don't there could be a hiccup caused from relying that they are in ~/bin.
  • If I want to do some task, that task will probably be done repeatedly, but don't want to invest tons of time into actually writing the overhead that makes maintainable/understandable scripts (e.g. argument parsing, help printing, convenient methods abstracted out to base classes, etc) I would first invoke newapp with the name of the app(s) as argument(s) and some other options, and it will create the file, make it executable, and try to add it to SVN. Here are the full set of options you'd see if you type pass the one of the two help arguments, -h or -help, or simply invoke it with no arguments.

    % newapp
    Produces starter code for commandline apps using the 'app' gem
    Usage: newapp <options> <arguments>
    where options include:
      -h | -help          Print this message
      -v | -verbose       Print debugging messages
      -d | -describe      Print a desription of this program
      -e | -explainargs   Print a desription of the argument types
      -b | -bindir        Use ~/bin for you destintion directory.
      -n | -motions       Just go through the motions
      -f | -force         Force override of existing files
      -t | -text      <s> New description of the app, 's'
    and where arguments are 'app names'
          
    After that a new file will be created for every name you pass as an argument. For example:

    % newapp a_sample_app -t "A sample app for this blog post"
    % cat a_sample_app
    #!/usr/bin/env ruby
    #
    # A sample app for this blog post
    #
    
    require 'rubygems'
    require 'app'
    
    class ASampleApp < App
    
      def initialize
        super
      end
    
      def description    
        "A sample app for this blog post"
      end
    
      def default_arguments
        []
      end
    
      def argument_explanations
        []
      end
        
      def get_options
      end
      
      def process_arg(arg)
        throw 'Implementation missing for method ' + 
          q(self.class.name + '.process_arg')
    
        # OK
        0
      end
    
    end
    
    ASampleApp.new.main ARGV
    		   
  • First, something about the arguments...all apps that are subclasses of App support the following arguments:

      -h | -help            Print this message
      -v | -verbose         Print debugging messages
      -d | -describe        Print a desription of this program
      -e | -explainargs     Print a desription of the argument types
      -b | -bindir          Use /users/jeff/bin for you destintion directory.
      -n | -motions         Just go through the motions
          
    To add more arguments implement the method get_options to return a list of Options, for example:

      def get_options
        [new_force_opt,
         new_text_opt,
         new_opt('-j','-jeff',"Print jeff's name"),
         new_long_opt('-s','-string',"Use the passed in",true)]
      end
          
    Here, the two methods that create Options are new_opt(short_opt,long_opt,description) and new_long_opt(short_opt,long_opt,text,required), the other true are shortcuts for commonly-used options.
  • Within your code, member variables are set by reflection, so for the third options from above, you could refer to the jeff option with @opt_j or @opt_jeff.
  • There is a special method for side-effecting code -- like file creation or deletion -- called block(msg) that takes as arguments a string msg and a thunk. If the user passes in -n or -motions, as in make, this method simply prints out the message. These options control whether any actually 'happens'. In normal mode, the thunk is run and msg is printed if the user has passed verbose options. I really like this one, probably the most, and here's an example of how you would use this to delete a file, f:

    f = ...
    block 'Deleting file ' + f do
      File.delete f
    end
        
    This way it's easier to write code that you can just see what it will do first, before doing things that could change your machine.
  • I kinda rambled there, but the idea is that the migration from little scripts to real programs shouldn't be painful. In fact, it should be fun, and these are fun to write (OK, I may have lost a lot of readers there). So, you should never have to parse arguments, or write help screens, or comment out nasty stuff that could screw things up. You just really implement one method -- parse_arg -- and do your stuff in there.

[ 05:06 PM on December 01, 2009 ]

resumep3 is a ruby/iphone project whose objective is to allow you to resume listening on one device to a song your paused on another device. So, there are n programs for n-many devices (iphone, laptop, etc), but for the most part each does the same thing.
  1. Check to see if you are playing music
  2. If you are:
    1. store your players state -- song info, time, etc -- remotely
    2. pause the player
  3. If you are NOT playing music:
    1. retrieve the last known player state remotely
    2. resume the player with this state
That really is basically all there is. The idea is that this is supposed to be anonymous,safe, but ultimately very easy to use. So at first I stored player state info (album,artist,track,time) IDed off the laptop's user name -- so, 'jeff' in my case. This worked, but there are probably more jeffs in the world. So, we need a way to have all your devices store locally a shared key. Of the only two programs that run this are a desktop ruby script and an iphone app, only the iphone has a unique id. So, the process of requesting a shared key differs between the two programs:
  • For the iphone, if we don't have a shared key we will request one from a remote URL, giving our unique id.
  • For the desktop, if we don't have a shared key we need to wait for an iphone to request one and then send it over the local network.
When I started making this change I noticed that entire desktop app was basically one file containing code from these two files:
  1. common.rb
  2. resumep3
Also, I thought it would be useful to have a iphone simulator program, too, so that I didn't have to run in XCode. I could also test the remote code using this. Instead of going through the needs of this program, let me point out the differences from the normal desktop app.
  1. It doesn't actually play and pause itunes
  2. and, it doesn't wait for a shared key, when it doesn't have one stored locally it requests one from get_id.php
I began using regular abstraction to pull out the common parts -- into common.rb -- and then have two subclasses -- one for the desktop app and one for the iphone simulator. And found that each the class implementating these programs would each essentially have three parts:
  1. The ability to pause the player and play tracks
  2. The ability to get the state of the player
  3. A means to retrieve a shared key, if one was not stored locally
But I could go further and take the command line aspect of the program out, and the argument parsing, help printing. And, what I decided to do was to completely decompose the program into one common interface: common_interface.rb, which had only seven methods that needed implementing, those were:
  1. run(has_options)
  2. find_track(info)
  3. find_info(track_id)
  4. read_info(user)
  5. play_track(track_id)
  6. pause_player
  7. find_the_shared_key
These methods basically fall into three interfaces:
  1. A Player implements:
    • read_info(user)
    • play_track(track_id)
    • pause_player
  2. A Library implements
    • find_track(info)
    • find_info(track_id)
  3. A KeyFinder implements
    • find_the_shared_key
Then a common base class could implement this interface solely by implementing run(has_options), because its implementation would be the same for both classes, and then delegating to the appropriate instance of Player, Library, or KeyFinder for the remaining six methods. At the end, I did use composition entirely and the two subclasses looked like this:
class DesktopComposedCommon < ComposedCommon

  def initialize(config)
    super(config,
          AppleScriptPlayer.new,
          ITunesBasedLibrary.new,
          WaitsForKey.new(config))
  end

end

class IPhoneComposedCommon < ComposedCommon

  def initialize(config)
    super(config,
          ConsolePlayer.new,
          ITunesBasedLibrary.new,
          RetrievesKeyFromSever.new(config,self))
  end

  def unique_id
    'asdkfjadflkjasdlfkjasdlfkjadsf02409234098234kjsdfksdf'
  end

end
This was kind of a pain, but it was fun decomposing the whole system and really maximizing both code and data reuse.

[ 11:52 PM on November 27, 2009 ]

closethesearchbox is a Firefox addon to help take the pain out the Finder box in the bottom left. One of the most annoying things to me is typing --in particular inside of a new message or a reply in gmail--and then for some reason I always get caught in the finder box and can't lose the focus unless I click that circled x.
It has nearly caused me to throw my laptop through the window on several occassions. What this addon does is it lets you click Control+F to close it -- the same way you click Command+F to open it. So, in the event that you get trapper in there, you can just click Control+F to get out and continue doing whatever you were doing.

[ 10:10 PM on November 27, 2009 ]

Once, again, I'm composing a post not about potatoes or computers or their intersection, this one involves solving the problem of being without a table top with common things. And, one of those common things will not be a real table top. Anyway, so I have shelves whose height is roughly the width of a table I own, which is void of a table top. So, I'll just share my experience with you.
1. First, get yourself a shelf. Then take all the stuff out of it. Perhaps, put it on a chair, guarded by someone, like so:
mvader-guarding-shit.jpg
So, you have an empty shelf, some would say naked shelf:
2. Next you wanna get some stuff around the house, like empty iphone boxes, or algorithms books, to support the shelves in the middle.
stuff-on-table-some-things-are-there-too.jpg
Then, put the book on the boxes.
book-on-iphone-boxes.jpg
3. Finally, you've got a decently workable table with Scary Spud and R2potatoo at the upper right. And, yeah, maybe this is a little about potatoes.
table-at-the-end.jpg
I now have a table top, and I must say, I'm pretty excited. Next, maybe I'll make something to go on water; maybe a battle ship or air craft carrier, all only from things that can snatch at the dentist before anyone comes to help you.

[ 10:15 AM on November 27, 2009 ]

textfiles.com is a fun site to read, but the files that have long lines are annoying sometimes. So, linewrap is a bookmarklet to wrap text files in your browser to 80 characters, so that pages that look like this:
Screen shot 2009-11-27 at 10.09.30 AM-small.png
will look like this after you click it:
Screen shot 2009-11-27 at 10.09.38 AM-small.png

It's not perfect, and doesn't respect word boundaries, but it does the job for now.

[ 01:05 PM on November 25, 2009 ]

What source code looks like matters, it really does. I was mailed some Perl last night that didn't look especially Perl-ish, so camelcase2underscores is a little ruby to convert camel-cased code to be underscore-delimited from files, strings, and/or URLs. Give it no args to see help
% camelcase2underscores
Usage camelcase2underscores <options> <inputs>
where options include:
  -h | -help     print this message
  -v | -verbose  verbosely print what we're doing
  -l | -loud     *very* verbosely print what we're doing
  -p | -print    echo the input
  -r | -report   print report at the end
and inputs are files, URLs, or strings.
If I find any other way to make code more Perlish, it'll go in here.

[ 11:30 AM on November 25, 2009 ]

search another is a firefox plugin to allow you to jump to another search plugin using the current page's query. For example, if you search google.com for cats and dogs, then you can quickly control-click and make that a wikipedia or yahoo search for the same thing by selecting the Search another... menu item and expanding your search plugins, like so:

[ 12:02 PM on November 24, 2009 ]

So, Java 7 will have some new features, and while some of them are welcomed (by me), one seems like someone lost a bet and was forced to add this to the syntax: Underscores in integer literals, e.g.
int oneMillion = 1_000_000;
Really?

[ 06:26 PM on November 23, 2009 ]

Here's a little gem I've been working on and using that helps in writing command line programs in ruby.
app-0.0.1.gem
The actual code is here:
app.rb
What this does is provide some shortcuts and abstractions including argument-parsing, help printing, and other things that are found in almost all applications on the command line. To use this you install the gem, and then extend the class App and implement some methods: Every app much implement either
# Process one argument
process_arg(arg)
for those who process each argument individually, or
# Process all the arguments
real_main(argv)
for those who want all the arguments at once. Optional methods to implement are:
# Return the description found in the help printing
decription


# Return a list of options created
# with 'newOpt' or 'newLongOpt'

get_options


# Return true to make unkown arguments an error
unknown_options_are_error?


# Return a list of explanations for the arguments accepted
argument_explanations


# Return a list of default arguments to use when the
# user doesn't supply enough

default_arguments
By default all subclasses or App support the following options:
  -h | -help         Print this message
  -v | -verbose      Print debugging messages
  -d | -describe     Print a desription of the program: newapp
  -b | -bindir       Use ~/bin for you destintion directory.
You can add other options by overriding the get_options method to return an array of options, such as:
def get_options
  [ newLongOpt('-f','-force','Force deletion of files',false),
    newOpt('-t','-text','Use text mode') ]
end
I've made an example subclass that I use to starting out new subclasses, here
newapp
To use it pass the name of the new app to create, it creates a new code shell in that file.

More work to do on it, but I was growing tired of having hundreds of shell, and ruby, and whatever scripts that were unmanageable, and I couldn't tell what they were for two days after writing them. Maybe this will help make more maintainable scripts.

[ 06:00 AM on November 21, 2009 ]

This was the first night I can remember in a long time that I got no sleep -- no sleep. Maybe it's things on my mind, maybe it's the nice weather, maybe it's the last resumep3. So, at least, when I left to take a little walk about an hour, I went straight from itunes to my iphone, then back; and was on the same page.

I also updated my error pages...e.g:
jeffpalm.com/laksjdflkjasdflkajsdfljk
Don't worry, there's nothing bad on the other end.

[ 05:57 PM on November 19, 2009 ]

I made a better darth tater collage than the last one, this one contains 22500 images based on about 4200 different colors -- all images are creative commons from flickr obtained using (http://labs.ideeinc.com/multicolr/).

Zoomed in a little. . .
darthtater-closeup.png

Here are some other ones
darthtater-11246x11248.png 151MB
darthtater-5623x5624.png 33.6MB
darthtater-2812x2812.png 9.6MB
darthtater-1406x1406.png 2.7MB
darthtater-703x703.png 800kB
darthtater-450x450.png 370kB

Here is the code to make this along with instructions on how to make one.
imageart.tar.gz
Basically here's how you do it.
  1. Run ImageArt.java on a image to create a text file containing all the colors of the pixels of an image. Each line is a comma-delimited string of the hex values of the colors.
  2. Run imageart -p on the resulting text file to spit out an array of colors, and copy this array into imageart.user.js.
  3. Copy some PHP files to a server where we can send requests from javascript.
  4. Go to http://labs.ideeinc.com/multicolr/ and the GM script will repeatedly load the colors in your image, grab all the image urls, and send them to the files on your server.
  5. Run imageart on the text file to generate html containing images for all the colors.
  6. Install the Save page as image Firefox addon, so you can save the generated HTML as an image.

Mouse over

[ 01:00 AM on November 19, 2009 ]

##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################

[ 02:18 PM on November 18, 2009 ]

Winter Park opens today.

:(

[ 12:21 AM on November 18, 2009 ]

imageo firefox is firefox plugin to allow you to click on an image and then geocode it, if it has geocoding information embedded in it. To use it, when control-click over an image, you'll see a popup menu with a Geocode Image.


When you click that open, you'll either see a new google map tab open


Or you'll see a message that the image can't be geocoded -- you'll probably prefer the former.


Some TODOS
  • Move the menu near the image stuff
  • Only show the menu when you're over an image
  • Have options about showing a message when you can't find geo information
  • Put away my laptop, pick up my guitar

[ 10:11 PM on November 17, 2009 ]

To more effectively stalk people, facebookpager is a greasemonkey script to duplicate the paginator at the top of facebook photo pagers -- saving lives. Here's how you use this thing.
  1. Whenever you visit facebook, the pager at the top of the photo page
  2. Will magically appear at the bottom, too

[ 01:10 PM on November 17, 2009 ]

Here's a proposal related to search plugins...search plugins define templates and schemes to go from a search query to a URL. So, with this in mind I have this little command line thingy, where you can specify a search plugin and search query, then a browser will open. This relies on the fact that there are search plugins, defined by the open search schema, like
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
  ..
  <Url type="text/html" method="GET"  
    template="http://google.com/search?hl=en&q={searchTerms}&.."/>
  ...
</OpenSearchDescription>
describing how to go from string to a URL. What I want is a format for describing how go to from the contents of a URL to a list of results, like this
<OpenSearchResultDescription>
 <Conversion 
   template='<h3 class=r><a href="{link:[^"]+}"[^<]*class=l\
                  >{title:([^<]|<em>[^<]*</em>)+}<\
                  /a></h3>' />
</OpenSearchResultDescription>
Here, the template describes a conversion that captures a google search and binds the matches to the members of a search result; each match have the bindings link and title. To motivate this a little, look at part of the content of this URL and look at the highlighted links in red and titles in blue:
<h3 class="r">
  <a realurl="http://www.cat.com/" 
     href="http://www.cat.com/" class="l">
    Caterpillar: Home
  </a>
</h3>
  ...
<h3 class="r">
  <a realurl="http://en.wikipedia.org/wiki/Cat" 
     href="http://en.wikipedia.org/wiki/Cat" class="l">
    <em>Cat</em>- Wikipedia, the free encyclopedia
  </a>
</h3>
So basically a template is a regular expression (have to use these, because most HTML isn't proper and breaks parsers) with bindings. In particular, it assumes that the given URL contains a list of search results (plus ads and other crap), and describes how to repetitively match part of the contents and bind portions to the parts of these search results. These bindings are of the form
{name:regex}
In this example, we have two such bindings, one is {link:[^"]+}, which says that for every search result match, bind the name link to whats contained in the regular expression -- here, anything that's not a double quote. This would make is easier to keep web content on the command line. So, search uses this declarative conversion to produce results like this:
% search google cat
[1] Caterpillar: Home
    http://www.cat.com/
[2] Cat - Wikipedia, the free encyclopedia
    http://en.wikipedia.org/wiki/Cat
...
1-81 or 'q' to quit> 
Anyway, the idea is to go from a query string to a list of results, declaratively, using a conversion form a string to a URL, then a conversion from the contents of a URL to a list of search results.

This was a horrid explanation, but I have to run.

[ 09:48 PM on November 16, 2009 ]

resumep3 now goes both ways; that is the desktop script and iphone app now will
  • save your current state, if your playing itunes or the media player, for the other device
  • resume from where you last left off if you're not playing
That is, if you're listening to music on your iphone and run the app, the next time you run the app on your phone it will resume the media player where you left off; the next time you run the desktop app, itunes will resume where you left off on your iphone. The reverse is true, too. If you are listening to itunes and then run the app, the next time you run the iphone or desktop app, you'll resume where you left off.

[ 12:37 AM on November 16, 2009 ]

I know what you're thinking -- I'm thinking the same thing, too. Every 3rd episode of Cops is shot in Vegas...but it's not true! In fact, with the exception of the string of Vegas episodes in season 3 and 10, there really aren't that many. This graph better shows the break down of the more popular cities in which Cops was shot.
cops-stacked-graph.png
I'm scratching my head, too! That big blob isn't Vegas, it's Coast to coast...what the hell is Coast to Coast? It's no surprise they are no longer shooting, so to speak.

[ 07:54 PM on November 15, 2009 ]

redditcomments is a greasemonkey script to display reddit comments inline on the main page, so you don't have to open the comments page to read them. Of course, I'd rather not read them. (I wouldn't be good in advertising). Here's how you use it:
  1. Whenever you visit reddit, you'll see new inline comments link under the posts.
  2. When you click this link, you'll briefly see a loading... message.
  3. Then, shortly after you'll see the first comment appear the post, along with next and prev links now.
  4. If you click next the next comment will appear.
  5. If you click prev a small child you don't know will die.
Oh yeah, ha, prev are next backwards in the screen shots, not going to change them, but the script is fixed.

[ 05:56 PM on November 15, 2009 ]

The parsing gem is an attempt to make everyday parsing tasks syntactically a little less of a pain in the balls. Right now, it offers 3 methods in the Parsing module, and here is an example:
  require 'rubygems'
  require 'parsing'
  
  # Printing all the hosts
  Parsing::logfiles { |e| puts e.host }
  
  # Print all the 'Url' elements
  Parsing::xml('//Url/') { |e| puts e }
  
  # Print all the lines
  Parsing::scan { |e| puts e }
  
  # Capture all the numbers in the lines
  Parsing::scan(/(\d+)/) { |res| puts res[0] }
The motivation is to strip away as much syntax as possible for tasks that require reading files or remote URLs, and involve pattern matching on that input.All these methods take as input files or URLs (these are optional, if they aren't provided, the command line arguments are used) and this input; then yield to a block of code -- that block would depend on the type of input you're reading. They, also, all return the pieces of input that were not used. For example, suppose you want to print all the user agents in some server log files, then your program would be this
  Parsing::logfiles { |e| puts e.agent }
You could then invoke this with arguments that were files and/or URLs. This is simply a convenience because I tend to write similar things over and over and over again. So,
  • Parsing::scan regex? files?: Parse the command line arguments, or files if given, and matches on regex, if given; if no regex is given we simply yield to the line. Example:
      Parsing::scan { |line| puts line }       # Every line
      Parsing::scan(/(\d+)/) { |r| puts r[0] } # Every integer
    
  • Parsing::xml xpath? files?: Parse the command line arguments, or files if given, and matches on xpath, if given; if no xpath expression is given we use //* to match all nodes. Example:
      Parsing::xml { |n| puts n}               # Every node
      Parsing::xml('//Url/') { |e| puts e }    # Url nodes
    
  • Parsing::logfiles files?: Parse the command line arguments, or files if given, and yield to a block taking an object with the following attributes:
    • host
    • logname
    • date
    • method
    • url
    • code
    • size
    • ref
    • agent
    Example:
      Parsing::logfiles { |e| puts e.agent }    # All user agents
    

[ 12:22 PM on November 15, 2009 ]

Here's another interesting (and fairly obvious) use of word trees -- visualizing visits to a web site. You can just turn an apache log file into a list of sentences where each line is a visit (i.e. ip/user agent pair), and each word on a line is a normalized visit of a page. For example:
logs-wordtree-small.png

You can create one with paths_as_sentences and then upload it to many eyes.

[ 11:49 PM on November 14, 2009 ]

search is a shortcut for using search plugins to open websites from your command line. The idea is that you pass it a search plugin name and query, and it will open a browser, searching the appropriate site for that query. For example, if I wanted to search google, but didn't want to enter the query into the input in the browser, I could type
  % search google mr potato head -v
  Finding plugin 'google'
  Searching searchplugins.net
  Opening http://www.searchplugins.net/pluginlist...
  Opening http://www.searchplugins.net/createos.as...
  Have plugin 'google'
  Opening http://www.google.com/search?hl=en&q=mr+...
  Writing alias to /Users/jeff/.profile
So, a couple things. A cache of the plugins is kept in ~/.searchdb so we don't have to look on the net everytime for the plugin. To clear this cache pass -c or -clean as paramters. To force a lookup instead of using the cache pass -f or -force as parameters. Secondly, if the plugin isn't in your path or alaised, this adds the alias plugin for 'search plugin', so instead of typing search plugin you can just type plugin. To explain what a plugin does, pass in -e or -explain, e.g.
  % search imdb -e
  Search IMDB
  % search google -e
  Search Google 100 results new window
And I just realized I had written something similar in nature (exact in URL, so it's lost). But that just used the ones in Firefox, this one uses any plugins. I still feel like a complete douche bag; even on top of doing this in the first place. It's cool, I made something interesting for death cubes earlier in the day. In doing so, I realized that there are many, many benefits to using your friends' mom's name as project names -- especially unfuddle messages.

unfuddle-mrs.png

[ 12:05 PM on November 14, 2009 ]

I made a little change in showemails so that, in addition to showing the contact info of a craigslist posting, you can also pop up a little google map of the location of that item, if it exists. So whenever you visit a craigslist subject listing page, you'll see extra contact info and show location links to the right...

When you click the show location link you will
  1. See a google map locating this item under the post

    and the link will turn to Showing

    if that location could be found.
  2. See the link turn to Not found in that same brownish color if we couldn't find a location

[ 10:19 AM on November 14, 2009 ]

Version 0.14 of the urlu.ms firefox plugin now allows to directly shorten a url and send it through the pop up menu


So, after you select a link on a page or want to use the location of that page, you can directly send the new, shortened link via:
  • Opening a new urlu.ms page
  • Twitter
  • Email
  • AOL instant messenger
  • Yahoo! messenger
I also improved the stats very, very slightly. So, you can add a + to the end of a shortened link -- yeah, just like bit.ly -- to see them. For, example, if your shortened link were http://urlu.ms/hTziKt, then you could see stats on that link by going to http://urlu.ms/hTziKt+. When our use base exceeds me, I'll think about making these stats more extensive.

[ 09:29 PM on November 13, 2009 ]

twittigator is a different way to view the links that your twitter friends post:


Enter your twitter username and password, click Load and you can browser the links your twitter comrads post by clicking on their user icon or using the left and right buttons. I should probably make the top thingy scrollable, but not now. I'm using basic authentication right now, so if you mind having your password sent in plain text, don't use it. And, yes, this is a shitty screen shot.

[ 08:26 AM on November 13, 2009 ]

This could exist, but here's a little tool to take the grunt work out of creating new gems.
newgem
To use it pass the name of the gem to create and you'll see something like this:
% newgem testgem
Creating gem testgem...
Writing ChangeLog...
Writing LICENSE...
Writing Makefile...
Writing README...
Writing demo.rb...
Writing testgem.gemspec.input...
Writing lib/testgem.rb...
Done.
Then you can change to that directory and make it with make. There are some options, they are
Usage: newgem [options] gem_name
where options include
 -h || -help                    print this message
 -v || -verbose                 be noisy
 -l || -license      <lic>      use license 'lic'
       -version      <ver>      use version 'ver'
 -a || -author       <auth>     use author 'auth'
 -e || -email        <addr>     use email 'addr'
 -s || -summary      <sum>      use summary 'sum'
       -homepage     <url>      use homepage 'url'
 -d || -description  <desc>     use description 'desc'
and 'gem_name' is the name of the new gem.
You can also put these options in /Users/jeff/.newgem

[ 10:56 PM on November 12, 2009 ]

In the spirit of the perl don't module, here's the ruby maybe gem that provides three new constructs -- maybe, probably, and unlikely -- as shown here:
require 'rubygems'
require 'maybe'
puts 'Maybe'
5.times do |x|
  maybe { puts x }
end
puts 'Probably'
5.times do |x|
  probably { puts x }
end
puts 'Unlikely'
5.times do |x|
  unlikely { puts x }
end
producing this
Maybe
1
2
Probably
0
1
3
4
Unlikely
4
To install, download maybe-0.0.1.gem and run
% sudo gem install maybe-0.0.1.gem

[ 11:10 AM on November 12, 2009 ]

I admit it, I was selfish, when coming up with ways to figure out if it were raining or not, I compeltely forgot about people without a ruby interpreter. So, here's a page that will answer the age-old question of whether it is raining where you are:
http://jeffpalm.com/raining
As it turns out, it is.

[ 10:43 AM on November 12, 2009 ]

My dad just emailed me saying "sorry it's raining in New York, but it wasn't back home." This was news to me; i.e. that is was raining here. So raining will tell you if it's raining in your zipcode by printing Yes or No. Examples right now:
% raining 10128
Yes
% raining 70123
No
For some reason I suddenly thought about something I saw on the almighty interwaabs the other day; an apology letter for being lazy. I don't feel like finding the link, but for some reason that came to mind just now?

[ 12:11 AM on November 12, 2009 ]

If you're in the market for a 3-letter .com domain, here's a look at the available ones.
3-letter-domains.png

As you can see x leads the pack, but o and w are close behind.

[ 10:40 PM on November 10, 2009 ]

redditmore is a greasemonkey script to asynchronously load reddit articles when you scroll to the end of the page, so you don't have click the Next link. This will save your mouse and track pad buttons wear and tear, and in the long run, you'll be able to send the kids to college and buy that horse farm you always wanted. Here's how you use it.
  1. Whenever you visit reddit, and scroll to the end of a page
  2. You'll see a message come up about the loading the next articles.
  3. Then, the next page's articles will asynchronously load, instead of clicking the link.

[ 08:00 PM on November 10, 2009 ]

My buddies
mybuddies.png

[ 03:27 PM on November 10, 2009 ]

resumep3 is an iphone app to allow you to continue listening to whatever track you were playing with your laptop/desktop on your iphone. The motivation is this: Yesterday, I was at a coffee shop listening to a song, enjoying it, but had to leave; I thought it would be cool if I could resume listening to the song on my iphone without opening the ipod, navigating to the song, and then manually seeking. So, this app will allow you to resume whatever song you were listening to without all this work.

I guess you'd want to go the other way -- i.e. resume listening on your desktop what you were on your iphone, but I haven't run into that use case yet, so I didn't put it in. Maybe I will and then submit to the app store? And, no, this isn't the one that I submitted yesterday. That one involves passing balls around to friends by touching your phones together, and then tracking where the balls go online.

[ 01:07 PM on November 09, 2009 ]

Kudos on your ads, gmail.
Screen shot 2009-11-09 at 1.04.30 PM-cropped.png

[ 12:33 PM on November 09, 2009 ]

nytimesbar is a greasemonkey script to remove that stupid bar at the top of nytimes.com and pull the rest of the body flush with the top of the window. Here's how you use it.
  1. Whenever you visit nytimes.com, instead of seeing that stupid bar at the top of the screen
  2. You'll see no bar and the rest of the body will be flush with the top of the window.

[ 05:09 PM on November 04, 2009 ]

The urlu.ms firefox addon version 0.12 now allows for direct link replacement. So, if you select a link on a page, such as


and then select to Replace inline in the pop up menu, you'll see a new link, such as


A more useful screen shot would probably be one from thunderbird or gmail. It would probably be useful not to use mr potatohead for every example. Oh well.

[ 09:12 AM on November 04, 2009 ]

twitterfollowers asks the questions (which someone has probably already answered), (1) which friend don't follow you? and (2) which of your followers don't you follow? To use it, enter a username and click Get followers, you'll see something like this

And apparently this stopped working almost immediately after posting this -- probably rate-limited?

[ 06:48 PM on November 03, 2009 ]

These are radio shack's presentation options on a search

Screen shot 2009-11-03 at 6.48.22 PM.png

5, 10, 15, 20, 40, 50, 60 ... Why 60 and where's 30?

[ 05:55 PM on November 03, 2009 ]

More pressing problems... reddittitles is a greasemonkey script to add titles to links that you send from reddit. So, if you open a link at imgur.com from reddit, the title of that post will be contained in the target page. For movitvation, here was an IM conversation about five minutes ago


Here's how you use this
  1. Whenever you visit reddit and open a link, the resulting url will carry the title of that post, So, for example, if I click this link
  2. The title carries to the resulting page.

    So, if the title adds context to the humor of the link, it'll show in the resulting page.

[ 05:16 PM on November 03, 2009 ]

I just back got from various appointments, and I must say I was let down, not by the directions from the almighty goog, but from their times. So here's a bookmarklet that will multiply the walking times for google directions by a certain number.
imslower
So, if you take longer to walk, that can be reflected in the overall time, leaving the actual train times untouched. For example, when running this, if I thought that today I was walking at a 1/3 of a person without crutches, I'd enter a 3 into the box


then all your total times would now reflect this, turning

into

And, all your individual route times would also reflect this, turning

into

Here is the original, not bookmarkleted source
googledirections
And yes, I realize the times themselves aren't changed, but, seriously, who uses those? Also, it probably doesn't work if your routes takes hours rather than mnutes. In that case, your walking time should fall out in the noise, and if it doesn't, you're walking too far to be worried about how your slow walking will affect your travel time.

[ 09:46 AM on November 03, 2009 ]

Here's a stacked graph showing the domains of reddits articles over about half of the day.
subreddits-vs-time-small.png

The middle purple is ask reddit, the violet is self.reddit., and as noted in a previous post, for some reason, right before 11pm every post was in this category -- which was odd. Then they seemed to decrease to 1 or 2, then back to normal. Nothing life changing.

[ 11:15 PM on November 02, 2009 ]

Why is every article on reddit an ask reddit post right now?
self-reddit-small.png

[ 01:21 PM on November 02, 2009 ]

Here is a firefox addon for urlu.ms, which allows you to select content on a page and share it with other people, like so.

The concept, conceived in part by birthday boy, is to share the content of a page, rather than just an address. So, when installed, this will allow to (currently) share images, links, and the address itself of a page.

[ 10:10 AM on November 02, 2009 ]

I'm not a patriot really, I like this country, I live here; but I do find a little issue with the claim that Meb Keflizghi is the first American to win the NYC marathon since the 70s (cite). True, he is an American citizen because he took a test and could name the capital of Vermont -- I can't -- but I don't think it's right to say that an American won the race. And this isn't taking anything away from Mr. Keflizghi, it's a slight against Americans. Statements like this lead people to believe that Americans are getting less fat and lazy -- I would argue the opposite. Anyway, congrats to him.

[ 12:13 PM on November 01, 2009 ]

Continuing with google calendar, gmailcal is a greasemonkey script to integrate your google calendar with gmail. So, when you visit gmail and have a public calendar you'll see a box in the upper right that will pan through your calendar events. Here's how you use it: When you have a public google calendar, whenever you visit gmail you'll see all your calendar events in a box in the upper right.

There are two links at the top that will pan through your events

[ 11:40 AM on November 01, 2009 ]

I have no clue what time it is? I'm supposed to turn my clocks back an hour today (supposedly), but I'm pretty sure every 'clock' I own will do that automatically; moreover, I got up at around the same time I have been lately. time.gov claims it's about 1/4 til 12, but how can I trust them? Maybe they're in on it, too.

[ 04:14 PM on October 31, 2009 ]

As shown on a fake news site, tweetedbrands is a site that shows the number of tweets for the 50 most popular companies -- or the 50 most popular tweeted companies, not sure. Anyway, it's doesn't seem to update, so this greasemonkey script updates the values in the background:
tweetedbrands.user.js
When it's running is periodically will update the counts. When it starts updating a count, that count will turn green , i.e. from this
tweetedbrands1.png

to this
tweetedbrands2.png

(Yes, I realize the second value is lower; that screen shot was taken after) and then variably start counting up to the new value. It somewhat evokes enough shits and giggles to be worthwhile -- just barely.

[ 10:05 AM on October 31, 2009 ]

The other day I had a few errands to run (I know, startling), and I wanted a map of their locations -- couldn't find one. So, gcalmap maps out your google calendar, if it's public. Mine's not, but r2potatoo@gmail.com's is, and here is a map of his (or her) calendar.
gcalmap-ss1-small.png

I was going to use the goog's data api, but for reason it wouldn't load. Really, it would seem to prevent the map from loading, and despite following the instructions...nothing. So, I cooked up my own little API, so it's not guaranteed to work. The main difference is that the calendar feed has recurring events and single events, so those need to be handled differently. So, don't use this in emergencies (be it fire, tornado, or otherwise).. Yeah, that's enough.

[ 05:05 PM on October 30, 2009 ]

I re-re-invented the wheel this morning (and last night) by making yet another URL re-writer:
http://urlu.ms
But there are two things I think this one has that others don't:
  1. You can choose a category for the new link to that it, itself, carries a little information about the site to which it points.
  2. Instead of just shortenting links, you can choose a descriptive new link and the site will try to come up with one that matches the site of interest using content from that site.
Still, lots of bugs, etc. But, a fun little project; hopefully people use it so I have lots of data to play with -- all annonymous of course.

[ 01:49 PM on October 29, 2009 ]

googlist is a greasemonkey script to provide a toggle menu on pages that has showed up in google search results. So, after you search for something with google, when you visit pages contained in the search results, a menu with appear on the page with all the search results. This eliminates the pattern of doing a search, opening a numbers of tabs, then navigating to- and closing all the tabs. Here's how you use it.
  1. After performing a google search, for example for mr potatohead
  2. When you visit pages contained in the search results, you'll see a link in the top/left corner
  3. When you click on this link you'll see a list containing all the search results that included this page and you can click one of the other ones to continue visiting the search results
There is a singleton model for 'security' and laziness sake; i.e. there is one history per browser, so everytime you search you abolish the last search results.

[ 04:42 PM on October 28, 2009 ]

schwarzenator turns your text into a
form s-
uitable for a letter from the Governor of
California. The rest is ma-
king this post contain enough
yummy letters t-
o make it
up to snuff.


(in reference to this)

[ 03:14 PM on October 28, 2009 ]

I post usescripts to userscripts.org now and then, so I was curious what are the popular times to post, etc. And, what are the times where the scripts with the most installs, reviews, etc are posted/updated. So, here are a few graphs looking at that. They are taken over a week and show the sum of certain measures related to post hour. The last one is normalized a little, throwing out outliers.

userscripts-pages.jpg

userscripts-fans.jpg

userscripts-posts.jpg

userscripts-installs.jpg

userscripts-installs-normalized.jpg
Yeah, not tons of info here. But, if anything is taken, it's that the latter part of the day is the time when scripts with higher numbers of these measures are posted/updated. So, without knowing the relation between traffic and time, one would conclude that you would want to post during the beginning of the day to stand out. That, and use curl to falsely up your install count.

[ 11:32 AM on October 28, 2009 ]

As much as I want to meet sexy singles or learn how to get a hollywood body, the ads in the middle of digg suck. Use this GM script to remove them.

In other news, I lost one of my iphone cables, I have no clue where it is, what could have happened; completely confused. There was one in my front room, one in my bedroom, one in my kitchen. This isn't life-changing, but it's similar to walking into the bathroom only to notice the toilet's not there, sort of.

Also, yesterday I was watching way too many episodes of this show on hulu about wall street. I think the second (and final) season was filmed in 07 or 08, but it's worth wasting your evening and watching a bunch of them simply to hear how 'things suck' because of the looming subprime mortgage crisis. Ha.

[ 09:25 AM on October 28, 2009 ]

Let's face it, shopping on craigslist is a brute force effort, and no one wants to waste (1) mouse clicks, (2) time reading the drivel left by the poster (ironically, you're reading this?). Anyway, showemails is a greasemonkey script to show the contact info for craigslist postings on the subject page, so you don't have to actually open the posting to contact the poster. Here's how you use this thing.
  1. Whenever you visit a craigslist subject listing page, you'll see an extra contact info link to the right
  2. When you click this link you will see one of three choices, if the poster has put the standard Reply to email, that email will show up in a relatively-gross pinklike color
  3. If the poster hasn't hidden their email address, but it could be found on the posting, if will appear orange-link
  4. Finally, if no email could be found, it will look brownish

[ 11:08 PM on October 27, 2009 ]

ping is a little utility to graph ping times (brought about by poo-like wifi lately). Running it looks like this



Here's the code and jar, though it's really one file -- Ping.java.

[ 03:00 PM on October 27, 2009 ]

Sometimes it's useful to have the IP address of people emailing you, so here's a bookmarklet that'll show the IP of a thread a gmail messages.
gmailip
Click on it when you're looking at a thread of gmail messages and an alert will show the IP of the first originating message. Here's the original javascript:
gmailip.js

[ 10:09 AM on October 27, 2009 ]

twittertime is a greasemonkey script to show the actual post times for twitter posts instead of the 'about' times. Here's how you use it.
  1. Whenever you visit twitter, instead of seeing an estimated time, like so
  2. you'll see the actual time (converted to the local time zone1), like so


1 denotes pain in the balls because I couldn't find how to do this correctly

[ 08:51 AM on October 27, 2009 ]

Create bit.lyed URLs with one line
require 'open-uri'

ARGV.each do |u| 
  puts open('http://bit.ly/?url=' + u).
    read.match(/short_url">([^<]+)</)[1] 
end

[ 01:41 AM on October 27, 2009 ]

twitterhover is a greasemonkey script to show user information as the titles of twitter user links instead of just the user name. Here's how you use this:
  1. Whenever you visit twitter, instead of seeing just the name in the popup over a user link, like so
  2. you see more user information, like so

[ 09:42 PM on October 26, 2009 ]

I was just thinking, what is the one thing missing from facebook, and it came to me....Dorothy, Rose, Blanche, and Sophia. That's right, goldengirls is a greasemonkey script to play the Golden Girls theme whenever you log into facebook. Not only will this 'close the loop' on the facebook experience, but it will also bring you and your co-workers that much closer together.

I learn about shop lifting on reddit

[ 11:33 AM on October 26, 2009 ]

shoplifting-reddit.png

[ 10:01 AM on October 26, 2009 ]

setall is a PHP/email-based project to support setting your various statuses (e.g twitter, facebook, ...) by email. The idea is that you can set your status by sending an email, and, in the future when these systems support GPS information, the subject of this email can be that. This page is set up to make this easier, by providing a link to mail your status with geo location in the subject. I started this at about 8:30am this morning, and it's not 10am yet, so it's in its infancy, but works (for me). It's hosted by the goog here:
http://code.google.com/p/setall
For all those worrying about the hole in front of my house being dug the other day, I'm happy to say it's been sloppily covered up. There is now what appears to be a rectangular-shaped vat of tar instead. Yea!

[ 02:24 PM on October 25, 2009 ]

flickrgeo is a greasemonkey script to insert a little google map on flickr photo pages (perhaps) whether or not they 'officially' have GPS information included in the image. Here's how you use this:
  1. Whenever you visit a flickr photo page you'll see a new side panel for location...
  2. If the original image does in fact have GPS information in it, despite whether flickr chooses to export this information through their API, you'll see a map appear...

Why have I used this photo twice in one day? Flickr 'claims' it doesn't have GPS information, but the original image, taken with a satan device, does; and I can make a good guess at where it was actually taken. For some reason all the geo information inserted with my camera is poo.

[ 10:36 AM on October 25, 2009 ]

I ran across a couple images that made me wonder where they were taken, so imageo is a little page to geo code images that you upload or to which you point. When you've geocoded an image, say this one, you'll see something like this

You can either upload it as is obvious on the page itself or use the bookmarklet
imageo
and click it when you're on an image for which you'd like the geo information.

[ 10:42 PM on October 24, 2009 ]

I just read Michael Nutt's canvas demo and tutorial, and it's really cool...so I made a take on it -- waves -- with a little bit to allow you to control the direction of the waves by tilting your laptop. The code is here
waves.tar.gz
You can run it with make run or you can download and run the jar
waves.jar
In any case you'll need a mac and AMS Tracker (put it in /Applications). When running as you tilt your mac laptop, the waves will change, like so

[ 04:38 PM on October 24, 2009 ]

I'm not a big fan of certain reddit domains -- e.g. self.IAmA and self.AskReddit... so, instead of complaining about it (maybe just a little) customreddit is a greasemonkey script to remove articles from domains and subreddits you don't like. You can enter domains you wish to be excluded, and articles from those domains won't show up in results.

[ 09:20 AM on October 24, 2009 ]

Facebook comments are often poolike, so, here's a bookmarklet to remove other peoples' comments on a facebook page
remove comments
You can imagine what it look like without a screen shot.

[ 02:01 PM on October 23, 2009 ]

Apparently there is no littering (spelled with a P) twice a week for an hour and a half in front of my house


Good to know.

[ 01:47 PM on October 23, 2009 ]

facebook growl is growl integration to facebook chat. When running you'll get growl notifications for facebook contacts signing on and off, like so
It's a nice combination of a bookmarklet, javascript trickery, applescript, and Java.

As yes....you'll now be able to sleep tonight with firm accurate knowledge of exactly who of your facebook buddies is currently logged in.

[ 08:36 AM on October 23, 2009 ]

A nice ruby one-liner for finding your public ip
puts /([\d\.]+)/.match(open('http://checkip.dyndns.org').read)[1]
Also, if you have nunclear weapons at your disposal -- even plain chemical weapons will do -- please drop one in front of my house to shut up the guy with the jack hammer. I know he's just doing his job, but I've got as much appreciation for him right now as I would a dentist giving me a root canal.

[ 11:51 AM on October 22, 2009 ]

record is an idea from Felix last night (though he's still out of town, so I got to make it), where you can record a journal of GPS locations and merge them in a set of photos. The use case is this: You have a quality camera that doesn't have GPS, but you'd like to have GPS coordinates for the photos you take. So, while you're taking photos, you record a journal of your GPS locations and them merge them into the photos later. The straight-forward solution would be to have an application to do this. My way of doing it is to record you locations in javascript, mail them to you, copy them into a text file, then run a Java program with an some embedded Perl to write the GPS coordinates as exif data. This way doesn't require you to have a device of the dark side.

[ 03:04 PM on October 21, 2009 ]

i-heart-emacs.png

[ 11:02 AM on October 21, 2009 ]

searchlinks is a bookmarklet to search the URLs (i.e. href attributes) of a page. To use it, when you're on a page of interest, click the searchlinks link, and you'll be prompted for a search term
searchlinks1.png

then, if there are links satisfying this term, they will be colored gator colors, going from this
searchlinks2.png

to this
searchlinks3.png

and the window will scroll to the first one. Here is the original javascript
searchlinks.js

[ 09:35 PM on October 20, 2009 ]

define is a little command line definer -- to avoid using the dreaded browser. Example
% define dog
1. a domesticated canid, Canis familiaris, bred in many varieties.
2. any carnivore of the dogfamily Canidae, having prominent canine
   teeth and, in the wild state, a long and slender muzzle, a
   deep-chested muscular body, a bushy tail, and large, erect
   ears. Compare canid.
3. the male of such an animal.
4. any of various animals resembling a dog.
5. a despicable man or youth.
6. Informal. a fellow in general: a lucky dog.
7. dogs, Slang.  feet.
...

[ 03:52 PM on October 20, 2009 ]

Here's a graph relating the number of comments made for today's top reddit articles to the time since those articles were posted.
reddit-comments-small.jpg
The x-axis is time in hours, and the y-axis are the number of comments made that hour. Looks like the peak commenting time is somewhere around 3-6 hours, with one obvious outlier...

[ 11:11 AM on October 20, 2009 ]

Sweeping changes to usecurrentlocation puts your current location in both the directions input and the normal one...wow.

[ 09:29 AM on October 20, 2009 ]

WTF! This scarecrow lego guy is $36 on amazon!!!
41fNZQAPFcL._SL500_AA280_.jpg
Now, he's cool, and tempting, but 36 bucks? No way. Amazon's hitting that crack pipe again.

[ 03:21 PM on October 19, 2009 ]

I'm in a starbucks and my ass hurts. But, potatunes works again
potatunes-crappod.png

as well as the little one to the right.
potatunes.png

Thanks to the cum-guzzler (excuse the term, semen-slurper is more appropriate for mixed company) that stole my laptop and other stuff, the world has had to go without knowing precisely what I was listening to for a little while. Working on a way to make this generic; for those curious is a little ruby and applescript...and, working on a way to sit in hard chairs without wanting to chop off my butt.

[ 09:31 AM on October 19, 2009 ]

mycraigslist is a greasemonkey script to save and manage craigslist posts that interest you. When visiting a craigslist page you can save a page and then later visit this page to manage all your saved pages. This doesn't use a remote server, so everything is saved locally. One drawback is that there is a single-user model -- i.e. there is a list of saved postings per browser.

Once installed, here's how you use it
  1. Whenever you visit a craigslist posting, you will see an extra link at the top of the page that will save this posting to your list of saved postings.
  2. After you save a page, you'll be able to remove with the same (but differently-named) link
  3. After saving one or more postings, these postings will appear green in the subject listing pages.
  4. Also, after saving one or more postings you can visit http://jeffpalm.com/mycraigslist/manage to view and manage your saved postings.

[ 12:22 PM on October 18, 2009 ]

warnings is a mashup showing NOAA warnings taken from here. If it works you'll see markers indicating weather and other types of warnings around our great country, like so.
weather-warnings-goat-humper.png
I obviously need a proxy to do the GET from javascript, so if you need a XML-ish source of NOAA events it's here
http://jeffpalm.com/warnings/lookup.php
Happy Sunday.

[ 11:48 AM on October 18, 2009 ]

I know I've written this before, and it's trivial but useful. unpack generically unpacks archives like tar balls, zips, etc. To use it just pass in archives and it'll use the appropriate tool to unarchive or bitch and moan like a wounded goat if it can't find one.

[ 02:54 PM on October 17, 2009 ]

nycweather is a crucial page showing the varying temperatures over manhattan today.
nycweather.png

  • = 48°F
  • = 47°F
Consider yourself informed.

[ 01:59 PM on October 17, 2009 ]

redditcolor is a greasemonkey script to colorize reddit articles according to score. i.e. the higher the score, the hotter the color. Whenever you visit reddit, higher scoring articles will be redder...



while colder articles will be grayer.


Uh, and yeah, between writing and posting I noticed I screwed up -- the gray scores should be blacker -- I didn't feel like making new screen shots. I'd rather make some scrambled eggs. More than that, I'd rather eat some scrambled eggs.

[ 06:16 PM on October 16, 2009 ]

glickr is a little mashup that will show random, periodic flickr images taken in your current vicinity.
3.png 2.png 1.png

[ 10:31 AM on October 16, 2009 ]

entry is some quick ruby that takes as arguments apache log files or ips and print out the entry points for those ips. Example entry access_log 12.23.34.45. Useful for seeing where certain customers came from if there are distinct entry points.

[ 09:46 AM on October 16, 2009 ]

Here is a youtube clip showing how to use the iphone clipboard controller. Apparently starbucks doesn't allow connections over the local subnet, so I had to wait until I was stealing another wifi network to actually test it. It works.

[ 07:50 AM on October 16, 2009 ]

weather is a greasemonkey script go to forward to your local zipcode's weather when you visit weather.com. So, instead of typing your zipcode everytime into the input, you will be automatically forwarded to your zipcode's weather conditions if your browser supports geolocation. This is ideal for those who are
  • On the go a lot
  • Really fucking lazy
I am guilty of the latter this morning by wishing for a way to find out how cold it was outside without (1) going outside or (2) entering my zipcode into a form.
Once installed here's how you use it.
  1. Whenever you visit weather.com, you will be forwarded to your local zipcode's conditions
  2. instead of seeing the normal, generic homepage.
For those curious there is a good database of zipcode lat/lng coords here.

[ 11:58 AM on October 14, 2009 ]

Feature request to Apple
I have two equally-good user icons:

spud-right.jpg             spud-left.jpg

But, the problem is that when I use ichat I see the icon on the right side, so, to effectively convey the image of him speaking the chat, I want to use the one facing left. But, when I use AIM on my phone or on other clients, it appears on the left, so I'd want the one facing the right. Please add a feature to ichat declaring two user icons -- left- and right- facing icons--to solve this pressing problem. I can't be the only one experiencing sleepless nights due to this problem.

[ 04:33 PM on October 13, 2009 ]

Here is a little javascript to do 'declarative input validation' for HTML input elements.
validate.js
The idea is that to validate an input's value, you can do one of two things.
  1. Assign a certain class name value, e.g.
    <input class="validates_email" ... />
    for validating email input. Currently I support that one and
    • validates_zipcode
    • validates_phone
  2. Use the validates attribute to validate an arbitrary regular expression, e.g.
    <input validates="\d+" ... />
    to validate that the input should be a number.
If there is invalid input you are prompted to fix it. To use it include the javascript file, validate.js, right before the body tag, e.g.
<script 
 type="text/javascript" 
 src="http://jeffpalm.com/code/validate.js">
</script>
There's a example here.

[ 03:15 PM on October 13, 2009 ]

In more macalarm news, it now sends a webcam picture of the person stealing your laptop via twitpic, for example
So, everyone can at least see a picture of the person stealing it. In this case, I was the person fake stealing my laptop, but in general, being on crutches my nice new shiny macbook is a prime target; it's nice to know that, at least, if someone steals my laptop while in the starbucks pooper, their mug will be smeared all over the interwebs.

[ 03:01 PM on October 13, 2009 ]

I updated macalarm to tweet when your laptop is being stolen...just put your twitter creds in the options:
I know, I'm so fucking with it it makes you vomit. I superfluously incorporated twitter into something, again.

[ 12:24 PM on October 10, 2009 ]

usecurrentlocation is a bookmarklet to insert your current location into the A input field on google maps. To use it copy the following link to your tool bar
use current location
And after clicking to get directions on google maps click it and your current location will be inserted into the first input field like so.

[ 12:30 PM on October 08, 2009 ]

clip is a controller and history app of your clipboard. The purpose is to keep the last 10 (or user defined) number of clipboard items, select from those, and offer a way to controll them wirelessly. I use the javascript trick to serve page from jeffpalm.com, yet control another computer on the same subnet. There is a desktop version that looks like this:

and a web way so you can control your clipboard from any device, including your phone of feath, like so:

[ 12:05 PM on October 06, 2009 ]

While edging into my third hour waiting for a stupid appointment I made a tiny change to findme so the link will prompt a satan phone to drop s marker, like so
On another note, it would be great if
  1. My phone didn't think I was in the east river, and
  2. All the inneficiencies of our horrible health care system could be harnessed into something good--like the way the subway captures the energy in putting on its brakes. We could have a big donut party.

[ 11:40 AM on October 04, 2009 ]

connectn is a Java version of Connect 4 using spudtrooper and darthtater and a small amount of intelligence. Here's what it looks like

[ 12:56 PM on October 03, 2009 ]

I like (or at least used to like) reddit a little better than digg, but digg's got edge of a mobile site and it's a pain in the balls to read reddit on a phone. So, mreddit is a version of reddit that looks like digg's mobile page. So, to read reddit you can read this...

instead of this...

[ 08:25 AM on October 02, 2009 ]

According to these Lego packages,


they are appropriate for ages 5 to 12. But, there's also a warning that it's not for children under 3. This clearly raises ( not begs) the question, what about those kids ages 3 or 4? They're left out of the fun of both playing and choking on the pieces. I think Lego needs to throw in a few pieces that are either large enough to play with, or small enough to choke a 3 or 4 year old.

[ 05:09 PM on October 01, 2009 ]

Something to do on the 21st.

[ 11:01 AM on October 01, 2009 ]

I hate some subreddits, e. g. IAmA, so here's a bookmarklet (because I can't write greasemonkey scripts on my phone) that color codes the subreddit links on reddit so your eyes can wander to those that have a chance to be interesting:
color subreddits
Here's what it should look like

[ 07:12 AM on September 27, 2009 ]

I guess pandora makes it on ads, but I can honestly say I would gladly pay monthly or daily or whatever for it...I'm kissing their ass only because I've lost tons of music due to stolen and wrecked laptops, but this site has completely saved me. Here's the scenario: I was listening to bright eyes radio and an a pearl jam ad popped up (coincidentally it was really a target ad), soni clicked it to listen to pearl jam radio. The first song was a slow one from vitology, but theybga it coming from greater hits, though I thought they already had a greatest hits album called Ten. Anyway, it finished, and about ten minutes later I finished my three-song dump with Lou Reed and the Stones. If were listening from my music I wouldn't have heard these...kudos pandora!

On another note pandora lastfm has bitten me is the ass a little because there is so much overlap between the two libraries...anyway, it was fun to write and that's the purpose,

[ 12:22 PM on September 24, 2009 ]

Thanks to one if the ends of that painful conversation, here's a correction to my last post. The recipient of the 'location' message has to drop a pin, not click the blue dot; duh (to me) the blue dot is current location and was showing b/c I was testing by myself...again, duuuuuuhhh.

[ 10:31 AM on September 24, 2009 ]

findme is a page (best for iphones) for sending your current location to someone via email. The motivation is this: It pained me last night to listen to someone describe directions to find him when both people had phones that were location-aware. So, instead f verbally describing where you are when you want to meet someone, why not send them a link to your location. This way they can click the link, and (if they have an iphone) simply click directions to that location.
To use it navigate to jeffpalm.com/findme/ and you'll see a screen like so:


Then your can either goto the location, mail it, or read about this page. The link you send or view (on an iphone) will bring up a screen like this:


From here, you can click the blue dot to find directions to this location.

[ 01:23 PM on September 23, 2009 ]

Regular languages don't express every string (obviously), but I think it would be cool to have a validates attribute of HTML input elements that would express the valid inputs. Perhaps invoke a handler when invalid, like oninvalid For example, a 'numbers only' input could look like this:
<input validates='\d+' 
  oninvalid='alert("numbers only, bitch");'
/>
Some of the error message probably isn't necessary, but these attributes would be useful.

[ 01:28 PM on September 22, 2009 ]

It was cool when Pearl Jam said "fuck you Ticketmaster" and tried to sell their own tickets to shows. It was less cool when they decided to make a commercial for Target.

[ 10:23 PM on September 21, 2009 ]

I may have posted this before, but a user of this check box user script pointed out it didn't work for pages from highwire.org, so here are three bookmarklets that work fir that page to check all, check none, and toggle all the check boxes on a page--or at least those on highwire.org
check all
check none
toggle all
To use drag these links to your toolbar and click on one when viewing a page to take the appropriate action.

Have I mentioned doing anything only on the iPhone is less than ideal? I would love to see an apple commercial that instead of showing how easy it is to add pepperoni to a pizza, the viewer's shown what a kick in the nuts it is to write any code. Granted the phone of darkness was never marketed as a development platform...

[ 08:24 AM on September 21, 2009 ]

Version 3.1.5 of gdirections could possibly give the following error:

If you are, here is an unofficial fix made with the help of, probably, its most loyal user and my stupid iPhone:
install
This will disable the search plugins, regardless of the settings.

[ 07:01 AM on September 19, 2009 ]

I feel oblidged to saying this
I have not been kidnapped.
Coders at work is a good read.


I definitely identify with lots of these guys and what they have to say. I also definitely didn't come out of it with a picture of the perfect code monkey, but that's ok.

[ 07:16 AM on September 16, 2009 ]

Here's a fun (though pretty easy) interview question: What does thus program print (or not print) and why?
class T {
  public static void main(String[] args) {
  final int HEIGHT = 5;
  new java.awt.Canvas() {
    {System.out.println(HEIGHT);}
  }
  }
}
Without the why, and in order of quality, some answers
  1. On a new snow leopard mac, 2, otherwise probably not 5.
  2. Probably not 5.
  3. 5.
  4. "spudtrooper"

[ 02:02 PM on September 15, 2009 ]

Discovery has a show I Shouldn't Be Alive that re-enacts survival situations, and it's ok...sometimes suspenseful, especially when they have a group of people in the plot and only a portion of them narrating. But, thia suspense is lost when there's one person protagonist and one narrator.

[ 06:58 AM on September 14, 2009 ]

While doing a little search to find structurally equivalent (or similar) classes by Euclidean distances in re. to types distributed in macs I ran across these two that are virtually identical.
  • apple.laf.AquaInternalFrameTitlePane
  • javax.swing.plaf.basic.BasicInternalFrameTitlePane
Check for yourself with javap -c...Can they do that? Oh well, gotta get my laundry--not before I use the bathroom.

[ 07:26 AM on September 12, 2009 ]

Two semi-random apple things...
  1. Once again I'm screwed by apples 1 to 1 policy with iPods and computers. I have a shuffle full of legitimate music (b&s and fugazi if you must know), but it's being held captive and can't be used in episode #2 of Urban Squirrel Hunter.
  2. I do like how the death phone's spell check rewards poor typists. That is, if you are misspelling a word,, it prompts you for the real word. So, why isn't there a tab like completion for words?!?!

[ 08:41 AM on September 11, 2009 ]

For pleasure hacking yesterday I made a connect four game pitting spudtrooper against darthtater -- the former us always me. Anyway, after not having anyone to play I added some 'AI' and darthfucker finally beat me here. I used a pretty simple heuristic of looking six moves invthe future (each one took around 1.8 seconds, so around 14 seconds/move decision for an 8x8 board). Basically I summed a fitness attached to each board enumerating the search space exhaustively. So this fitness was a log of the level times an aggressiveness factor ( + for offense, - for defense that decreaesed also with the level. At the end the log coefficient was about 1.5 and aggresiveness hovered around -2. This created a defensive tater in the beginning of the game, which progressively became more offensive. I don't even like this stupid game...I'm going back to scrabble.

[ 11:05 AM on September 09, 2009 ]

Seeing asy birthday is around the corner I thought I'd share my wishlist. Some usual suspects...
and yes I don't own a spudtrooper or darthtater!

[ 02:46 PM on September 08, 2009 ]

[ 06:07 AM on September 08, 2009 ]

This is my 'professional' picture-- credits -- but the other day two separate people suggested I change it.
More here. Anyway, I think it's the only picture of me in a suit, and it's an Armani...so I'm torn???

[ 08:09 PM on September 06, 2009 ]

So, I thought having no wifi would completely eliminate pleasure hacking; not true. First, I was reminded that make is not BSD, poo. So I made my complete-enough version to look at apple's java implementation and some instances of possible poor design choices...here's what I found.
  • Method createNativeWindow in class apple.awt.CWindows that has 31 parameters.
  • There's a rather long method named makeInfoOnlyServantCacheLocalClientRequestDispatchetFactory in a class with a name I don't feel like typing on my phone.
  • There's a rather long field named ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, and it appears to be mispelled -- REEFRAG?
  • Finally, there's a class com.sun.tools.corba.se.idl.Noopnthat implements 22 interfaces.
And I take it back, the names aren't poor choices, just long, and must have been the product of an emacser or someone with the equivalent of META-/.

[ 06:09 PM on September 05, 2009 ]

Here's a slightly more interesting histogram showing user script domains propotional to the number of downloads.  
userscripts.org **********************...
   vkontakte.ru ********
     google.com ********
    youtube.com *******
   facebook.com ******
      orkut.com ******
  imageshack.us ****
  pennergame.de ****
  rapidshare.de ****
Again the first ones are predictable, but the rest not so much.  This I'd probably due to not being fine-grained enough, oh well.

Also, it's worth noting (and probably more impotant) that while typing this up my iPhone corrected the <pre> tags with  <pee>.

[ 09:47 AM on September 04, 2009 ]

This is a pretty weak post, but here's a bookmarklet -- for phones of evil mostly -- for showing the stylesheets for the current page:
show css
and here's what it looks like:

and, yeah, I was 'borrowing' some css...again what a joy it is to write any code-like things on the iPhone.

[ 09:08 PM on September 02, 2009 ]

While flipping channels I passed BookTV where an author read from his book. Now as a youngster (and in grad school) I was urged to read rather than watch TV. Now they are reading to you on television...is the world coming to an end? What's going to happen next, forcing kids to eat donuts to keep them away from that pesky exercise? Sending methedon addicts to heroin labs?

And who the hell came up with the Easter Bunny, and since when did rabbits lay eggs? According to wikipedia the Germans began this legend, and began making bunnies to eat 200 years later. I think Santa Claus hailed from Germany, too, but I think in the case of the hare they were sipping something a bit stronger than egg nog. Either way, I hand it to the Germans to celebrate Jesus rising from the dead by sending your kids hunting for colored eggs layed by a large, anthropomorphic rabbit.

[ 12:27 PM on August 29, 2009 ]

If you're wondering why there hasn't been anything remotely worth reading or involving scrabble, email me. But while we're on the subject of scrabble, I beat the hard level 417 to 397 this morning.

[ 03:12 PM on August 27, 2009 ]

I was wondering what are the most popular domains for which to write grease monkey scripts, so I looked at a few thousand random scripts from userscripts.org. Here is a rough histogram showing only the ten most popular.
userscripts.org ********************
   facebook.com *****************
    youtube.com ******
     google.com ******
  erepublik.com ******
 googleapis.com *****
  imageshack.us *****
     elbruto.es ****
     douban.com ****
        gnu.org ****
The first one is surprising and could be wrong, the next few confirm predictions, and the rest fall out in noise really.

I guess I also wanted some pleasure hacking s & m, because I wrote the code all on my stupid iPhone.

[ 08:38 AM on August 25, 2009 ]

I scored my 1st victory over the scrabble hard level yesterday, here is the board.
It lives in floto because the mephistopholes phone doesn't support file inputs.

(There's a image here, Roscoe...he he)

[ 06:58 PM on August 22, 2009 ]

The first page edited on my iPhone is here, and I've concluded that I'll just stick with emacs.

[ 02:25 PM on August 22, 2009 ]

I may be alone in thinking this, but I really think facebook should add levels friendship such as work friend, school friend, friend with benefits, good friend, friend on thin ice, etc...At the very least a user should be able to assign a partial ordering to his/her friends. Also there should be a kill ring or recycle bin so you can see who someone has defriended.

I'm just trying to bring people closer together.

[ 07:52 AM on August 21, 2009 ]

I'm typing this on #5 so I'll probably screw it up somewhere...anyway, as I munch on some peanut butter puffins I'm reminded of my quest for a puffin which is ongoing. The map is out if date, but we're about 1/6 there, so if everyone who reads this buys a couple boxes, we'll be there. So, eat puffins, mail the top to me, repeat.

[ 01:55 PM on August 06, 2009 ]

Beep beep...from my 5th rectangle of death.