Power Failure Fosters Neighborhood Bonding

Last week we received a letter from the power company that there would be a scheduled power outage tonight starting at 11:00pm. Well, I put it on my calendar and promptly forgot about it. Krissy was already asleep when it happened, but I was listening to the FLOSS Weekly podcast when all the lights went out as far as I could see out the window. The electric company had brought their own lights to see what they were working on, and that was the only light around. Shortly after the lights went out I went on the balcony with a flashlight. I was not the only one who had this idea, however.

When I started flashing the flashlight onto the field across the way I saw another beam of light originating from another balcony in my building. When I moved my light, the other light followed. No matter where I went the other light tried to “catch” mine. I tried all sorts of silly little things. I spun the flashlight over my head like I was a lighthouse. That really seemed to confuse them. Just when they thought they knew what to expect, I started going the other direction. It all sounds so silly now, but when everyone in a neighborhood all experiences boredom simultaneously it’s like everyone’s a kid again.

You aren’t having fun? Make up a game!

Eerie light from the poer company workers.

Are Flash Ads More Fun than Real Games?

I’m sitting in the computer lab at Palomar College. I just witnessed something so ridiculous that I could hardly believe my eyes. Everyone already knows that 95.7% of computer lab usage is checking MySpace. Although that’s ridiculous, that’s not news. While I was reading digg doing my homework I was interrupted, as is so often the case, by the rapid mouse clicking associated with playing a stupid flash game. Rapid keyboard activity can indicate work (or blogging), but mouse clicks can only be one thing. Usually when this happens to me the person doing the clicking is in a position that doesn’t allow me to see what they are doing. This time was different.

The girl behind me was clicking furiously for about 15 seconds followed by hushed rejoicing in her rapid-fire mousing abilities. It was so annoying that I had to see what all the noise was about. When I turned around to look I was astonished. She wasn’t playing a game. She was on MySpace! For those of us with the AdBlock firefox extension installed: MySpace is covered with little flash ads that you can’t see. These ads promise things like free ringtones as rewards for winning virtual tug of war contests. You “win” by clicking a red button on the screen fast enough that the rope puller overtakes his opponent. I say “win” because your reward for participating in this game is a popup ad. That’s right, a popup. People are playing games where you click forever just to get to an advertisement. But it doesn’t end there.

It soon became apparent that this girl knew what she was doing. She was having so much fun that she would click until her reward came. She would then immediately click the close box on the popup, reload the page, and play the next “game.” Apparently there are multiple “click here a thousand times and get a popup” games. The gameplay is identical, but the animations are different.

This takes me back to my original question. I always assumed that no one ever fell for the old “get a free NAME_OF_PRODUCT by (swatting_the_fly | shooting_the_prairie_dog | mashing_the_mouse_button)” routine. By the looks of things, those games are so fun that people will endure the ads just to keep playing them.

What has the internet come to?

Viruses and Spyware Drive Mom to Consider Alternate OS

My Mom called me tonight with a question: how much does it cost to get a legal copy of Windows on my computer? She bought a computer from a guy who builds them for people out of his house. He apparently didn’t inform her that part of the cost-savings in this PC was due to the unpaid Windows Tax.

She is not eligible for an upgrade version and she does not have money to spend on software. I have used Slackware Linux for about three years on all of my machines. She trusts my judgement, and so she asked me what she needed to do to try Linux. I sent her a torrent to download the latest Ubuntu Live CD and told her how she can “test drive” Linux without having to lose any of her settings she’s got now.

She hasn’t had a chance to try it out yet, but she sounds interested. Assessing her needs, Ubuntu seems like a nice fit. I may have to customize it a bit for her so she can watch divx movies and listen to MP3s, but I think she will be happy with her new OS. I’ll update with more information as to how she likes it and what the shortcomings might be.

Japanese Band-Aid Ingenuity

Band-Aids just don’t work well for most things except for maybe on your back. Fingers are probably the worst though because we use our hands all day and the Band-Aid will eventually just stretch out and fall off or lose all adhesive properties.

Watch this video and learn the simple, almost magical, method for keeping a Band-Aid on all day long.


Watch on YouTube

No One is Immune to Browser Bugs

Krissy has not been able to access the Primary manuals on the Church’s webpage for the last couple of weeks, so I thought I ought to look into the problem and see if there might be a solution. What follows is the email I sent to lds.org.

There seems to be a problem with at least some versions of Firefox. I haven’t had time to extensively test it in anything but Linux. Anyhow, the backslash in the this URL is not parsed correctly and returns an error page. If I remove the backslash or the %5C (that’s the ascii character code for the backslash that Firefox translates the “\” into) then the page loads normally. I don’t have access to MSIE at present, so I can’t test if it works there as well.

It works in Opera no matter whether it’s a backslash, a forward slash, or completely omitted. But it only works in Firfox if I replace that %5C with a “/” or nothing at all. I don’t know what the standard says is the right way to handle backslashed in URLs, so I don’t know if this is a bug that should be filed against Firefox or if it’s a problem on your end.

Good luck getting it ironed out. Keep up the good work!

Blow Up or Explode: Does it Matter?

In my grammar explode is an intransative verb. I would never say “He exploded the dynamite.” or “She exploded the bridge.” I would say, “She blew up the bridge, or in other words, the bridge exploded.”

Only recently have I found that I am in the minority, although I think most people use blow up more often than explode in their everyday speech. I seem to hear explode used much more often now than I used to. I suppose it’s to avoid ambiguity. I still don’t like the transitive use of explode.

I think I’ve always had this bias, but I think it was strengthened considerably while I lived in Germany. in German explodieren is intransitive, and translates to mean explode in English. If you want a transitive verb, you would use sprengen which, not surprisingly, means blow up. More research needs to be done to determine if the English transitive usage of explode is new or old.

In any case, I don’t like it.

Update: Transitive usage of explode goes back at least 400 years according to the Oxford English Dictionary.

The Lesser Light

Just two days after heavy rain and hail there is a beautiful moonrise just opposite the golden sunset.

Moonrise

I’m Never Peeling Another Potato Again

The Japanese seem to be lightyears ahead of everyone else on the technological front. It may not be so, but it certainly appears that way when there are such evidences for everyone to see. Check out this video to see just what I mean.


Watch on YouTube

Not Suitable for Curling Eyelashes

Caution, this product can burn your eyes.Krissy is going to be attending a gala put on by the company she works for. She decided that she wanted to curl her hair, and so she bought herself a curling iron. I’d have to say that this is the strangest warning I’ve seen in a while. I mean, if I’m worried about getting burned, my eyes are not the first thing I’d be worried about. I’ve never burned my eye before… ever. Whenever I see warnings like this I always wonder how many people it takes that complain that this specific warning was never stated anywhere with the product before they cave and just tie on a tag or stick a little sticker on it like this.

Curling irons are hot. hot things can burn you. If something says it can burn you, then it can burn you anywhere it touches your body. This obviously includes the eyes, although if you have a curling iron in your eye, then burning is not your only concern.

I’m not even going to go into the details of just how rediculously unhelpful that drawing would be to anyone who couldn’t read the text under it. When I covered up the text and showed it to Krissy, she thought it was a warning to watch the iron while it was plugged in because it is hot.

Record Streaming Audio with Linux: Part II

I said I was looking into getting FIFOs working so that the filesize requirements would be reduced. It’s also more efficient this way. I was heavily influenced by the two scripts created by Daniel Howard.

So here’s how it works. You get to create two scripts. The first one is for recording. It’s an all-purpose script that I called record.sh. Here is the code:

#!/bin/bash
#
# record.sh
#
# Use mplayer to capture the stream
# at $STREAM to the file $FILE
#
# example: record.sh my_radio_show 60 mms://someserver.com/stream

DIR=/home/shawn/PodCasts #directory where to save the file
TEMPDIR=/tmp

# Don't edit anything below this line
#######################################################
DATE=`date +%d-%b-%Y`  # Save the date as DD-Mmm-YYYY
YEAR=`date +%Y` # Save just the year as YYYY
NAME=$1
DURATION=$2 # enough to catch the show, plus a bit
STREAM=$3
TEMPFILE=$TEMPDIR/$NAME-$DATE
FILE=$DIR/$NAME-$DATE # Where to save it

# Capture Stream
mkfifo $TEMPFILE.wav
mkfifo $TEMPFILE-silenced.wav

# The lame settings below are optimized for voice encoding
# The sox command below strips out any silent portions
lame -S -a -m m --ty "$YEAR" --vbr-new -V 9 --lowpass 13.4 --athaa-sensitivity 1 \
    --resample 32 $TEMPFILE-silenced.wav $FILE.mp3 >/dev/null &
sox $TEMPFILE.wav -c 1 $TEMPFILE-silenced.wav \
    silence 1 0.2 0.5% -1 0.2 0.5% >/dev/null&
/usr/bin/mplayer -quiet -cache 500 \
    -ao pcm:file="$TEMPFILE.wav" -vc dummy -vo null \
    -noframedrop $STREAM >/dev/null&

sleep 5
# get the pid of all processes started in this script.
PIDS=`ps auxww | grep $TEMPFILE | awk '{print $2}'`

# the & turns the capture into a background job
sleep `echo ${DURATION}*60 | bc`  # wait for the show to be over
kill $PIDS # kill the stream capture
rm $TEMPFILE.wav
rm $TEMPFILE-silenced.wav

This script takes three args:

  1. the name of the show you’re recording. This will be used in the final filename with the current date appended.
  2. the length of the show in minutes
  3. the URI of the stream (often mms:// or http://)

This integrates very well with another script that will hold all the data for the shows we want to record and automatically set the start times for us. Here is my script that I called today.sh

#!/bin/sh
#
# today.sh -- schedule what programs you want to rip today using the
# recorder script.

# Non-obvious paths
RECORDER=$HOME/bin/record.sh
RECORDER_HI=$HOME/bin/record-hi.sh

# Set up stations
KFI="http://a814.l1977144512.c19771.g.lm.akamaistream.net/D/814/19771/v0001/reflector:44512?MSWMExt=.asf"
WXNT=mms://wmc1.liquidviewer.net/WXNT
WPGB="http://84.53.144.36:80/D/1046/20063/v0001/reflector:43803?MSWMExt=.asf"
KOZZ=mms://lotusradio-kozz.wm.llnwd.net/lotusradio_kozz

# What day is it?
TODAY=`date +%a`

# EVERY DAY
#everyday() {}

# WEEKDAYS
weekday() {
	# "Record John_Ziegler for three hours, starting at 7:00pm."
	echo $RECORDER John_Ziegler       180  $KFI | at  7:00pm
	echo $RECORDER Glenn_Beck         180 $WPGB | at  6:00am
}

# MONDAY
if [ $TODAY = "Mon" ]; then
	# everyday
	weekday
fi

# TUESDAY
if [ $TODAY = "Tue" ]; then
	# everyday
	weekday
fi

# WEDNESDAY
if [ $TODAY = "Wed" ]; then
	# everyday
	weekday
fi

# THURSDAY
if [ $TODAY = "Thu" ]; then
	# everyday
	weekday
fi

# FRIDAY
if [ $TODAY = "Fri" ]; then
	# everyday
	weekday
fi

# SATURDAY
if [ $TODAY = "Sat" ]; then
	# everyday
	echo $RECORDER Handel_On_The_Law   300 $KFI | at  6:00am
	echo $RECORDER Dr_Dean_Edell        60 $KFI | at  2:00pm
fi

# SUNDAY
if [ $TODAY = "Sun" ]; then
	# everyday
	echo $RECORDER Jesus_Christ_Show   180  $KFI | at  6:00am
	echo $RECORDER Glenn_Beck          180 $WPGB | at 10:00am
	echo $RECORDER_HI Dr_Demento       120 $KOZZ | at 10:00pm
fi

Using this as a template you might notice another script being referred to. record.sh has audio processing optimized for talk radio. For higher quality and stereo, you need to change a few things. You can download all of the scripts mentioned here at the bottom of this post.

To finish off this solution you need to run today.sh at some point after 12:00am and before the start of the earliest program you wish to record. I set mine to run daily at 1:00am.

# Schedule recordings for today from radio streams
0 1 * * * /home/shawn/bin/today.sh >& /dev/null

Downloads: