2004-10-30

DeathStar Speakers

I have a 60GB IBM [Death]DeskStar hard drive that died a while back. I finally decided to make use of it by making it into a speaker. I used audioblogger to post a sound clip of the speaker quality. It is actually pretty good quality. As my dad put it, the quality is similar to that of a radio in the 60s and 70s, which isn't that bad.

The link for making the hd speaker has been sitting in the links menu on my blog for a while now as a reminder and I've left it there for anyone who is interested. It was very easy to make the speaker. The instructions are loosely written and they don't have to be followed step-by-step. Basically, the most important thing is that the magnet is on the coil and the ends of the coil are de-laminated (burnt) and that the ends actually touch the wires that you use. You will have to use a stereo that uses sockets where twiested wires can be put and locked in with a little lever. This means that you will have to use a stereo or some form of an adapter to get the speaker hooked up to a computer or another device that uses plugs.
Building your own speaker box

   

The sound quality sounds degraded over the phone. It is actually better than this.
this is an audio post - click to play

2004-10-28

GLAT

I've made two perl scripts to solve problems 1 and 17 on the Google Labs Aptitude Test. I found out about the GLAT from a picture of a billboard containing a puzzle on the Google Blog. If you haven't heard of the Google Blog... well now you have.

Here are the perl scripts I made (Don't use these to cheat!):
glat-1.pl
glat-17.pl

2004-10-25

A Real Live Doomsday Device

I just had to post this... Here it is.

Supo

The Peculiar Ways of Sourceforge and Perl

I finally got the RSS feeds for my SourceForge group, SandTrap, integrated into the SandTrap website which is hosted on SourceForge. I used the Simple RSS Agreggator perl script. Since SourceForge doesn't have the XML::Simple module installed I had to rely on the usage of my own copy of XML::Simple. I couldn't get the script working through HTTP access but it worked fine through ssh access. I knew it had something to do with XML::Simple. I recently solved the problem by removing the following lines from the build_tree_xml_parser() subroutine in XML::Simple:
if($filename) {
# $tree = $xp->parsefile($filename); # Changed due to prob w/mod_perl
local(*XML_FILE);
open(XML_FILE, '<', $filename) || croak qq($filename - $!);
$tree = $xp->parse(*XML_FILE);
close(XML_FILE);
}
else {
$tree = $xp->parse($string);
}

I do not know why this worked or why the problem occurred in the first place but if any one else runs into a similar problem I hope this helps solve it. Note: the error message that made me realize the problem said something about too many arguments when calling open(), referring to $filename I assume. Maybe I should report this as a bug in XML::Simple.

2004-10-24

MySQL and Perl DBI

I am trying to use the Perl DBI module to access a MySQL database used for the website for TPIT Club at school. I have never used MySQL before and I didn't even know if could be used with Perl until recently. The server I am using supports perl MySQL access but I am getting a weird bug in my scripts which I cannot test on my computer since I haven't set up MySQL access from perl on my own computer. The code that has the error is:
print "test";

$dbh = DBI->connect($dsn, $user, $pass)
or die "Can't connect to DBI";
print "test2";
$user = $dbh->prepare('SELECT * FROM `TPIT_users` WHERE username = "$username"')
or die "Couldn't prepare statement: " . $dbh->errstr;

@user = $user->fetchrow_array();
if($password eq $user[2])
{
return "true";
}

$dbh->disconnect();


The error is that after I instantiate the $dbh variable anything printed after that is not actually printed. This means that test2, which should be printed as output, is not. If I remove the $dbh line it works fine. The three variables used ($dsn, $user, $pass) are defined correctly.

Calling all perl developers: What is wrong with my code?

2004-10-19

Clear Channel Sucks

Clear Channel Communications Inc owns over 60% of all rock radio stations in the United States. They own a large portion of radio and television stations in the United States and worldwide. One-sixth of the population on Earth listens to ClearChannel radio stations. Two popular radio stations in San Diego, California are 91x and 93.3.

The reason Clear Channel sucks is because they have a monopoly on an international level and they use evil marketing tactics. They marketing company, Critical Mass Media, has found a loophole in our legal system allowing them to call people on the Do Not Call list for marketing purposes because they do not sell a product. Clear Channel bans artists they don't like from stations they own and they control a huge portion of the media in the United States. Talk about censorship.

On top of that their servers run on SCO OpenServer Unix... not that SCO isn't a bad company or anything.

More info: Clear Channel Sucks

2004-10-18

I've Changed My Dating System

I have decided to change my dating system out of convenience. I am not going to write the date in a YY-MM-DD format rather than the American MM-DD-YY format. An article in 2006 magazine has finally made me firmly decide to change my dating system. Markus Kuhn at Cabridge University in England has a International Standard Date and Time Notation page which explains the logic behind this format. Basically 75% of the world is already using this format and it is convenient when alphabetically sorting files on the computer because files should be sorted by year, month, and then day.

At the moment you may notice that the dates on my blog don't have hyphens in them. I may change this for readability purposes, but it looks so cool without hyphens.

2004-10-17

Google SMS

Google has a new free service available for mobile phones. It allows you to text message GOOGL (46645) using one of the query types listed on the How To Use page. You can find ice cream parlors near you, phone book listings, prices of products, definitions, and more.

Quoted from Google SMS
Google SMS: "What is Google SMS?

Google SMS (Short Message Service) enables you to easily get precise answers to specialized queries from your mobile phone or device. Send your query as a text message and get phone book listings, dictionary definitions, product prices and more. Just text. No links. No web pages. Simply the answers you're looking to find."

2004-10-16

My Many RSS Feeds

I currently have three RSS feeds that rss-freaks may be interested in. The first feed is my blog's, the second is my favorite bookmarks (del.icio.us), and the third is a list of my favorite items at ThinkGeek.

  1. My blog feed
  2. del.icio.us fav. bookmarks
  3. ThinkGeek Wishlist

2004-10-05

Get Firefox Now

If you don't already have Firefox get it. I don't know why I didn't post about this before, but now I am.

Get Firefox!

Click here to get a firefox banner for your website/blog

Speaking of censorship

You may or may not have heard about Google news "supporting China in their quest for censorship" (aka fixing broken links on Google News China)

Here is some censorship you may find interesting: A search on Google Russia for capitalism that renders no results. Here is the search

(I have faked this search. See if you can find how I did it.. hint: its in Google Hacks)


Creative Commons License
This work is licensed under a Creative Commons License.