Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.

2009/02/24

Taking a Great Notion ...



I have a Blackberry. That makes me cool.

It has two mapping programs. Google Maps and Blackberry Map. And I can tell which one uses which.

According to the article in Wired, which I read last night in the library, there are three main geolocating technologies. There's WiFi, which my phone doesn't do. There's GPS, which works from satellites and is slow and sometimes has problems with buildings. Then there's Cell Tower Triangulation. Which doesn't really do triangulation, but rather uno-angulation. There's a cell tower. You connect to that tower. Therefore, you must be really really close to that cell tower.

I assure you that I have not jumped in the Wabash with my Blackberry. Nor am I on the edge of I65 when I'm home.

Which is a big downfall for Google Latitude. Which, considering how potentially orwellian it could be, might be a good thing.

Loading Jaunty Notifications....


You can get Jaunty-Style notifications in Intrepid. They're not 100% yet, I don't think, but I would say they're easily 85%, if not more.

It shows how much (or little) C++ programming I do that I had to apt-get so much stuff in order to make it work.

2009/02/23

Thunderbird Wishes...



I am a user of the Thunderbird mail app. I use it with my work mail, a home account and three GMail accounts which I access as IMAP. The one thing that the GMail web interface has that the IMAP doesn't really have is an "Archive" button. What you can do is move the files to [Account] >> [GMail] >> All Mail, but that isn't a one-click thing. If you want to move multiple items to a directory, there is Move To "[directory]" Again, but you can't leverage that if you're moving this to Spam, archiving that, and moving the other thing into another directory.

I would love to have "Archive this" as a right-click menu choice. Anyone know how to add menu items to Thunderbird?

2009/02/20

Talkin' About The Weather...

About a year ago, maybe more, a man released code that would allow you to send the current weather conditions to the display of your HP printer. He, being a pilot, used the deep, intense, fully-featured weather information that pilots need to know if they can fly, but is perhaps a bit too complex for mere mortals.

So, at some point in the year between then and now, another guy rewrote it, using Google's weather API, which gives you XML, which he parses with XML::DOM.

I've moved the parts into subroutines, made it quiet for non-interactive uses (like crontab) and did a few minor checks. Also, I made it talk to Twitter, but that code isn't ready for the world yet.

(Links are in the code)


#!/usr/bin/perl

# $Id: hpsetdisp.pl 11 2006-03-22 01:21:03Z yaakov $

# hpsetdisp.pl
# Connects to a JetDirect equipped HP printer and uses
# HP's control language to set the ready message on the
# LCD display. Takes an IP address and message on the
# command line. My favorite message is "INSERT COIN".
# Keep in mind the limitations of the display when composing
# your clever verbiage.
#
# THIS PROGRAM IS PROVIDED WITH NO WARRANTY OF ANY KIND EXPRESSED OR IMPLIED
# THE AUTHOR CANNOT BE RESPONSIBLE FOR THE EFFECTS OF THIS PROGRAM
# IF YOU ARE UNCERTAIN ABOUT THE ADVISABILITY OF USING IT, DO NOT!
#
# Yaakov (http://kovaya.com/ )
#
# Modified by Garrett Hoofman
# 10/18/2007
# http://www.visionsofafar.com

# Modified by David Jacoby
# 12/10/2008
# http://varlogrant.blogspot.com/

use strict ;
use warnings ;
use 5.010 ;
use Getopt::Long ;
use IO::Interactive qw{ interactive } ;
use IO::Socket ;
use XML::DOM ;
use subs qw{ get_weather send_to_printer } ;

my $zip = '' ;
my $printer = '' ;
my $interactive = '' ;
my $rdymsg = "Ready" ;

GetOptions( 'zipcode=s' => \$zip,
'printer=s' => \$printer,
'interactive' => \$interactive, ) ;

chomp $printer ;
$zip !~ /\d/ and exit 0 ;
my $weather = get_weather $zip ;
$rdymsg = $weather =~ m{\d}mx ? $weather : '' ;

if ( $interactive ) {
say $rdymsg ;
}
if ( $printer ) {
send_to_printer $printer , $rdymsg ;
}

########## ########## ########## ########## ########## ########## ##########
sub get_weather {
my $rdymsg ;
my $parser = XML::DOM::Parser->new() ;
my $file = 'http://www.google.com/ig/api?weather=XXXXX&hl=en' ;
my $zip = shift ;
$zip =~ s{(\d{5})}{}mx ;
$zip = $1 ;
$file =~ s/XXXXX/$zip/mx ;
my $doc = $parser->parsefile( $file ) ;

for my $species ( $doc->getElementsByTagName( 'current_conditions' ) ) {
$rdymsg =
$species->getElementsByTagName( 'temp_f' )->item( 0 )
->getAttribute( 'data' )
. " Degrees F "
. $species->getElementsByTagName( 'condition' )->item( 0 )
->getAttribute( 'data' ) ;
}
return $rdymsg ;
}
########## ########## ########## ########## ########## ########## ##########

########## ########## ########## ########## ########## ########## ##########
sub send_to_printer {
my $printer = shift ;
my $msg = shift ;
my $socket = IO::Socket::INET->new( PeerAddr => $printer,
PeerPort => "9100",
Proto => "tcp",
Type => SOCK_STREAM
) or die "Could not create socket: $!" ;

my $data = <<EOJ
\e%-12345X\@PJL JOB
\@PJL RDYMSG DISPLAY="$rdymsg"
\@PJL EOJ
\e%-12345X
EOJ
;
print $socket $data ;
}
########## ########## ########## ########## ########## ########## ##########

2009/02/16

Talking At Me...



As I'm embedding this, I haven't watched this. This is, more or less, a note to self to watch this. But this should be good. Not because TED talks are good. By and large, they are. But because Clifford Stoll is always interesting to listen to. He can be spastic to watch, to be sure, but interesting to listen to.

I used to have his Silicon Snake Oil on the bookshelf next to Nicholas Negroponte's Being Digital, being that they're so anti-each-other that being in such close contact should make them explode.

Riding the Lightning...

A friend of mine rides the Big Iron. He takes more computers than I have ever used, bundles them together into big clusters, then lets others run their long, complicated processes on them. When many people can't get their computers to work, they go to me. When I can't get my computers to work, I go to him.

He had, until recently, used the KDE mail and calendar tools. I use Thunderbird for mail, and pop open a Google Calendar window when I need my calendar. I had tried Sunbird a while ago, but found it slow and buggy and not significantly better than a Google web app. He mentioned that he was trying Lightning, the calendar plug-in for T-bird. So, I did too.

And my calendar tried to alert me to every event on my schedule for the last six months.

If it's the week or more after an event, Lightning, you can just assume I'm not going.

I had to turn off alerts. And what is the utility of calendaring software without alerts?

I'll keep on it for a while, though.

2009/02/15

Noting Peculiarities ...

K's laptop decided it didn't have a camera anymore.

It did, of course. It is built onto the EeePC 900HA. But it claimed it didn't.

Took me 90 minutes of looking to find out that, hey, the BIOS turned it off.

If you look for hardware in the hardware list, and the BIOS turned it off, it doesn't show up.

But now it works. So, good night.

2009/02/05

Knowing Your Problem Set...



My employer (writ large) made a widget that'll tell you via SMS if there's emergency. This is of questionable use to me. I work in a sub-basement, so I have cell phone reception on campus from the time I leave my car to the time I hit the bottom of the staircase, and back. But what the heck. Could be useful, right? One day, I might know not to come in because my phone tells me that it's under 10 feet of snow.

This is the entry form.

It only accepts ###-###-#### for the phone number. Not ### ### ####, which is what I wrote first. Not ###.###.####, which is what I generally use.
Not (###)###-####, which is the universal (or at least US) standard.

A three-field phone number makes sense. There are many out-of-state students here, students who might want to receive their alerts on their out-of-state phones. Having the three fields in one? Doesn't make a lot of sense. Not without code to identify different formats.

2009/02/02

Breaking Keys...

Jeff Atwood makes some points on programming keyboards. I have to say I agree with a great many of them. I have both bog-standard IBM Model M and the blank das keyboard on my wishlist.

He specifically makes points that playing with the Arrow Key cluster or the function keys is bad wa. What I would like to mention is the Home Key cluster. The keyboard I use at home was given to me, and it has the Scroll Lock/Print Screen/Pause cluster joined to the top of the Home Key cluster. This is not bad in itself. In the top position, where the Scroll Lock cluster was, there's a Power cluster.

For most people, this would be a good thing. Especially if they keep their computers in a place where the front panel is not as accessable as you might like.

But I have 3 computers and two monitors. I use a KVM. This is a great and useful tool, but on occasion, when I'm really more concentrating on what I'm doing than what my hand is doing, I go for the "Other Desktop" switch, which is double-clicking on the Scroll Lock, and I miss. And I hit the Sleep key, instead.

Which sucks.

Print Screen is useful for screen capturing, especially when you don't have software to handle it. Otherwise, the usefulness of that block is nearly 20 years dead, unless it is overridden. But if you use them, even moving that block can be annoying.