Thursday, June 18, 2009

I Am Special: Cron Edition

I've been running Gentoo Linux for at least four years now. I used to use the vixie-cron daemon to run scheduled tasks like keeping installed software and a directory database up to date until I bought a new computer over a year ago. When I set up the new computer I decided to switch from vixie-cron to fcron because the machine is primarily a desktop system and fcron apparently is more suited to systems that aren't always on.

It wasn't long before I realized that my scheduled tasks were not running when they should. I did some cursory explorations at the time to figure out what was wrong. The daemon was starting up and running fine and the scripts were properly installed in the cron directories. I was busy with other things at the time and so I put solving the problem on the back burner until today when it finally bugged me enough that I wanted to fix it. I dug a little deeper and checked the system cron scheduling file (/etc/crontab) which is where I found this message:
# fcron || dcron:
# This is NOT the system crontab! fcron and dcron do not support a system crontab.
# to get /etc/cron.{hourly|daily|weekly|montly} working with fcron or dcron do
# crontab /etc/crontab
# as root.


Duh.

Sunday, March 1, 2009

On the music of JC

Jonathan Coulton is a talented singer/songwriter who specializes in what I will call nerd folk rock. Or folk nerd rock. Or rock folk nerd. I don't know; I'm still working on what to call it.

I first heard about him when he was doing a year long project, releasing a new song, for free, on the internet, every week and releasing most of it under a Creative Commons license. He made some waves with his unusual project and a particularly good song, Code Monkey. The song really typifies Jonathan's style.


He has found a little more fame recently and if you've beaten Portal or played Rock Band, you've probably heard some of his work. He wrote "Still Alive" for the Portal closing credits which was also featured in Rock Band.


He also wrote "RE: Your Brains" which is a song about zombies. How frickin' cool is that? It's even better live when he gets the audience to join in and shout out the chorus "We just want to eat your brains."


Did I mention that Jonathan Coulton is going to Toronto April 23rd and 24th (2009) to play the Lula Lounge? Well, I'm planning a trip down to see him and I'm really looking forward to it. If you want to hear more of his music, check out YouTube or go to his website. For tickets to the show, check out the shows section. Hope to see you there!

Monday, February 9, 2009

Failing Headphone Cables

I usually run into lots of problems with my headphone cables. I leave them plugged into my player as I move around all day: walking, sitting and standing up again and then shove the phones into my pocket when I remove them. This usually doesn't bode well for the cable's well-being as it usually begins to fray just outside of the plug after about a year or so. The frayed cable manifests itself by cutting out the audio in one or both of the phones that can be temporarily remedied by wiggling the plug around.

The frayed cable struck my favourite pair of headphones last week. I could go out and buy another pair of these cheapo $40 headphones and you may tell me that this situation can be avoided by being a little more careful with the phones but there's an easy fix.

Materials Needed

  • soldering iron
  • solder
  • multimeter (with ohmmeter functionality)
  • needle nose pliers
  • wire cutters
  • new earphone plug
  • optional: lighter
  • optional: utility knife
  • optional: cleaning solution (vinegar)
Most of these should be relatively easy to find. A soldering iron is a tool that everyone should own and know how to use. A lot of electronics fail because a plug or a jack has been abused and you can save yourself some money and some waste with a soldering iron. A multimeter is great for troubleshooting said electronic problems. The earphone plug is probably going to be the most difficult item to obtain. Find an electronics hobby store in your area and ask if they have any 1/8" stereo (earphone) plugs in stock. You should be able to get them for under $2.

Fixing the Phones
Clip off the existing plug as close to the plug as possible then strip back the outer plastic using either the utility knife or wire cutters. You should see three or four separate wires with individual insulation surrounding them sticking out the end of the wire. Check to make sure that these wires were not cut when the outer insulation was stripped. The insulation now needs to be removed from the inner wires and the wire cutters can be used again here. The lighter can be also be used to burn off the inner insulation without damaging the conductor too much. If you do use the lighter, I recommend putting a little cleaning solution on the conductors to clean off the oxidized metal.

With the ends of the wire bare, use the multimeter to figure out which wires are connected to which speaker. Listen to the phones while measuring the resistance across two wires. You should be able to determine which wire is common or ground and then which connects to each ear. Remember this. On my earphones, I found that the red wire carries the right channel, the blue wire carries the left channel and the two gold wires are the grounds for each channel.

Once you know which wire is which, slide the wire the jack cover and start soldering the wires to the proper connection. If you forget to put the jack cover on the wire before soldering you will waste a lot of time; make sure you do it. The right wire goes to the ring, the left wire goes to the tip and the ground wire goes to the sleeve. If you are unsure, check the wikipedia article.

When you're soldering, make sure you don't apply too much heat for too long or you could melt the insulator between the contacts which will render your jack useless. If you know how to solder and are using good solder and tools, you shouldn't have too much difficulty.

Cleaning Up and Testing
Before putting everything back together, check the connections with a multimeter. I find it easiest to set the multimeter to resistance testing mode with a maximum resistance in the 50 Ohm range (headphones tend to have a DC resistance of around 32 Ohms). Put the headphones on and place the ground clip of the multimeter on the ground sleeve of the jack. When you touch the hot clip to the ring of the jack, you should hear a pop in your right ear and likewise for the left ear with the tip of the jack. If you don't hear anything, make sure that you didn't accidentally short one of the channels to ground and that that there is enough solder connecting the wire to the pin.


Now put the jack cover on the jack and plug your headphones into your favourite music player. Everything should be working fine so enjoy the tunes.

Thursday, February 5, 2009

The Keene Act & YOU (1977)

I could not contain my excitement when I saw this Keene Act PSA video show up on YouTube (thanks Patrick). Interesting side note: the user comments are actually readable which makes me wonder whether people are using the audio preview feature.


After watching that, I had to go back and find the Watchmen movie trailers that were released a while ago. Now I think I have Watchmen fever and will not be able to work for the rest of the day. I was poking around for more content and stumbled across the website for The New Frontiersman, which has some background media and some photos, and the Watchmen Wiki. Nope, I'm definitely not getting any work done today. I've even started looking at the Uncyclopedia article for Watchmen.