Archive for December, 2005

what the heck is this

So I got what I thought was a phishing scam email today. It was supposedly from Circuit City. However it was from ebm.cheetahmail.com. So, like I always do…I went there to see what they would try to get from me, so I could put useless info in their DB. Most of the links though go to the real site. Save for some personal information ones. Those I hurriedly filled with bogus information. Then I went to the cheetahmail home page. They appear to be some marketing company. So perhaps it was legit. Legit in the sense that perhaps they were paid by Circuit City to spam me.

intj

While I thought I left all this behind at university when I graduated with my degree in Behaviorial Science, my coworkers seem to have become obsessed with Myers-Briggs tests.

I am sure I took one back in the day. Though by the time I was completing my education I had begun to believe that Psychology was a mess of parlor tricks for the mind.

At any rate, not one to be left out of our workplace conversations, I decieded to take the test again. I have no recollection of what the outcome was before, but this time it was ‘intj’

The ‘i’ is for introvert. Which I would not have guessed. (shows how much I have disregarded this field). However upon rational examination, my intense desire to spend lots of time alone might be considered introverted. I am not shy…not really, I just prefer LOTS of time by myself. I mean…I like me the best. Why wouldn’t I want to spend all this time with me??

**edit**

I really can’t believe I am reading this crap but…

When under a great deal of stress, the INTJ may become obsessed with mindless repetitive, Sensate activities, such as over-drinking. They may also tend to become absorbed with minutia and details that they would not normally consider important to their overall goal

INTJs need to remember to express themselves sufficiently, so as to avoid difficulties with people misunderstandings. In the absence of properly developing their communication abilities, they may become abrupt and short with people, and isolationists.

I hate psychology :)

Digg follow up

It would appear that certain softwares have coalesced into an insidious force to…piss me off. Using the rss feed I am using to view Digg stories takes me to the page where the comments are shown, and the comments as I have blogged are filled with such schlock that I am inclined to become rather insensed when reading them.

Never fear, programming will save the day.

I am a long time (as long as can be expected with such new things) Greasemonkey fan. and what better way to get rid of the comments on Digg than to override the CSS there. I give you, my script, The Anti Depressant:


// ==UserScript==
// @namespace     http://nathanpowell.org
// @name               fix digg
// @description     messing around
// @include            http://digg.com/*
// ==/UserScript==
 
document.title = "Digg...greased!";
 
var newCss =    '#comments {' +
                           'display: none;' +
                            '}';
 
function overRideCSS( newCss ) {
    var head = document.getElementsByTagName("head")[0];
    var styleTag = document.createElement("style");
    styleTag.setAttribute("type", 'text/css');
    styleTag.innerHTML = newCss;
    head.appendChild(styleTag);
}
 
overRideCSS( newCss );
 

Digg

So Digg.com is slowly gathering momentum. And from what I am hearing at the expense of slashdot. Digg is nice, I use it. Generally speaking they have stories on there that slashdot may or may not have (and if the story will appear on both…it’s always on Digg first).

The idea is to get the editors out of the process and have the user base rate the articles. Thereby, the good articles will float to the top. However it has one drawback that is also evident at slashdot…namely the user community. If you have a little free time and want to test your blood pressure medicine, take a look at some of the comments from the users (at either site). Proof positive that an internet connection does not make you smart.

Usually I chock up comments like these to 14 year old boys with nothing better to do. However there can’t be that many 14 year olds in this world. So some of those comments must be from people over the age of 18. It’s pitiful. Ant any rate, if your tired of feeling optimistic about the human race, have a look.

Yahoo

I should probably give some props to Yahoo. I have been using their rss reader for about 6 months now and I really like it. One cool thing is that you can make a link to allow people to add a feed from your site. So for the yahoos out there…here.

The actual feed page is pretty simple, but really, what is so difficult about listing rss feeds. IMO most readers try to do too much and fall down on one simple requirement. The purpose of a rss news reader, is to be more effecient then surfing around from site to site trying to find something worthwhile to read. You get your headlines and if there is an article that seems worthwhile, you click a link and go read it. Well it would seem to me that it makes the most sense then to have a web based rss reader. I just click what I want to read and it opens in a new tab. I usually go through all the feeds and open tabs for everything of interest, then go through one by one and…well…read them.

Note I do not give this endorsement lightly. Anyone who knows me knows I hate software. It usually never fits all my needy requirements. So when I say I find this highly usable, I mean It sucks a lot less then some other garbage I have tried.

more on google widgets

If you are new to web programming I urge you to take a look at the widget documentation for the google widgets. I think the instant gratification of seeing these things in action will keep your interest high. I also think that there is an opportunity for you to release code (as google allows you to submit modules for others to use).

Even if you don’t have access to a publicly available web server, they have space for you to upload your modules. In addition, one of the cool things you can do is to use the content type ‘url’. Effectively this would allow you to write a little bit of code (in whatever web enabled language you’d like) and put the result into a widget. Below is my no nonsense guide to getting started :)

The module:

< ?xml version="1.0" encoding="UTF-8" ?>
<module>
  <moduleprefs title="My Wonderous Module" />
    <content type="url" href="http://mydomain.com/cgi-bin/wonderModule.pl"/>
</module>

Then the backend code (and feel free to use whatever web enabled language you like here, I am mearly using perl for the heck of it). Make sure that this file is named and located according to the url you put in the content type above. In our case we would name this file wonderModule.pl and it would be located in the $DOC_ROOT/cgi-bin/ directory of our publicly available webserver.

#!/usr/bin/perl -wT
use strict;
use CGI;
 
my $q = new CGI;
print $q->header();
print "Hello World!";

Then using the Developer Module from Google, add the url to the XML file (note, the XML file, not the cgi script)

Lastly refresh the Google personal homepage (as I have read elsewhere and experienced myself, if you uncheck the ‘cached’ box on the developer widget, it really only works about half the time. So if you have made a change to the file but it is not showing up, hit refresh a few times and it will come around). Our example would show up like so:

There is of course way more you can do then that, however that will get you up and running. Then using JavaScript and whatever language you use to generate the content for the url means there are very few boundries to what you can make your particualr widget do.

Happy hacking!

emacs

Ok, so I got emacs installed and working on Ubuntu. The problem I was having was that when I configured my xserver (one for the 40 or so times) I somehow managed to get the wrong font paths in there.

Emacs is fun if for no other reason than it is new to me. I have only been doing basic editing in it for a few minutes, but it is interesting to see my urge to use vim keystrokes in it. A problem I have gotten over in other editors. I think the problem is that I know there are quicker ways to do stuff in the edit area, but I can’t use them (because I don’t know them yet) and I also know that the typical GUI editor tricks won’t/don’t work. It’s kind of funny…like hitting your elbow off a table…it hurts, but it makes you laugh because you can’t use your arm anymore.

google widgets

So…you all tried out the new google homepage widgets right? :)


my google module

better late than never

There are all these AJAX libraries out there that help you add it to web apps, and that is great. However I am never one to use something without tearing off the hood and having a good look. So I decided that I wanted to make a simple webpage that updated itself with out a page reload. I figured that would be enough to put curiosity to rest on the subject. When you strip it all down, it’s not that hard to understand.

Some simple HTML:

<input type="button" value="Ajax is easy" onClick="sendRequest();"/>
 
<div id="thatDiv">
</div>

Some simple JavaScript:

requestObject = new XMLHttpRequest();
 
function sendRequest() {
    requestObject.open('get', 'http://localhost/cgi-bin/ajax.pl');
    requestObject.onreadystatechange = handleResponse;
    requestObject.send(null);
}
 
function handleResponse() {
    if(requestObject.readyState == 4){
        response = requestObject.responseText;
        document.getElementById('thatDiv').innerHTML = response;
    }
}

And a smattering of perl:

#!/usr/bin/perl -w
use strict;
use CGI;
 
my $q = new CGI;
my  $text =  $q->header();
$text .= "See I told you it was easy";
 
print $text;

…and well that is about it.

Interesting

Graph of distributions for web servers

I found this on netcraft obviously, thought it was interesting.

Next Page »