Thursday, December 04, 2008
Slight progress on 101 list
Sunday, November 16, 2008
Updated 101 things list
Thursday, November 13, 2008
#*@%ing keyboard
Recently, our keyboard had a stroke, as Holly put it. All of a sudden, typing became impossible. Your words would be highlighted, deleted, rearranged, programs would start up and shut down, all while you were trying to type your name.
After some careful experimentation, it appeared that some of the keys had fused with other keys. For example, pressing "a" or "home" meant that both "a" and "home" seemed to be pressed - i.e. the cursor would go to the start of the line, and an "a" would appear there. So "a" and "home" were fused, "d" and "print screen" were fused, and "f" and "caps lock" were fused. I think there were a few more, but I forget what they were.
So as long as we weren't typing anything with "a", "d", or "f", it wasn't too bad, but ... well heck, I have a soft spot for all the letters of the alphabet, and I wasn't willing to continue in this hobbled manner. Leave no alphanumerical behind, and all that. Off I went (in the rain, I might add - stupid keyboard) to Future Shop (stupid keyboard) to buy a brand new unit.
[start rant] Keyboards these days are ridiculous. All curvy and bent and extra-button-laden and rearranged for optimium STUPIDNESS and holy cow, who's designing these? Morons. All I want is my standard 101-key keyboard where the keys line up like they're supposed to, and there aren't any surprise buttons anywhere. I haven't imprinted this design on my brain in permanent marker for nothing, people! It's bad enough I couldn't find the uber-simple keyboard I wanted - it has the Windows keys and whatever the heck that stupid menu key is - but it also has those stupid media and launcher buttons on each side. Stupid. [end rant... for now]
Once we got the new keyboard plugged in, it all worked like a charm again. The only thing left to do was to dismantle the old keyboard, be amazed by all the dust and detritus lodged amongst the keys, and pop the individual keys off for use in crafts or similar. If you want a ring with a "5" on it, let me know. I'll hook you up.
kdesudo vs. gksudo
Anyway, the point is that to achieve downloading goodness, my script needs root access in order to successfully talk to the camera. But it's a GUI - a visual point and click interface. With buttons! How to run sudo to give my camera-talking commands the power they need?
The answer is that there are a handful of graphical sudo tools out there - commands that will pop up a little window to accept your password and authenticate that way. The first one I tried was kdesudo, which seemed to work great. However, I noticed that when the camera downloaded, it would hack up a hairball on about every 16th image. The output for each image was 64 characters long, which when multiplied by 16 is 1024 - a common limit for some shell-related stuff, although not one I've run into in a while. Dead giveaway that something was hoopy somewhere.
After trying to pin this on Python's commands.getstatusoutput() for a while, I did some simple tests that showed that it was only a problem when run through kdesudo! It seems there's something in there with some kind of limit on output - not exactly sure what, because it would get so far, then choke, then continue with the next image on the next fresh line. Very odd.
Long boring story short, I swapped it out for gksudo, and my problems evaporated. gksudo ftw!
Tuesday, October 28, 2008
101 Things In 1001 Days (2008-2011)
Oh, and I'm starting tomorrow, so by my calculations (hooray for writing quick Python scripts!), I have until end of day, July 27th, 2011.
Here's my list, broken up into arbitrary categories:
(Progress: 60 done out of 101. 41 to go. Most recently done: 101, 100, 69, 67, 31.)
Travel - 5/10
1. Go to Tofino in storm season.
2. Take the train out of Vancouver and back. (Update: Looks like the only trains that go towards the interior go overnight.)
3.
4.
5. Go overnight backpack hiking with Holly and Sophie.
6.
7.
8. Go to the top of Mt Prevost.
9.
10. Spend a few days in the San Juan islands.
Health/Exercise - 11/14
11.
12.
13.
14.
15.
16.
17.
18.
19. Try indoor rock climbing.
20. Tube down the Cowichan River.
21.
22.
23.
24. Take Holly 10-pin bowling.
Family - 6/7
25.
26.
27.
28. Give Holly a group of tangled-up necklaces to sort out.
29.
30.
31.
Entertainment - 11/18
32.
33.
34.
35.
36. Ask five friends/family members what their favourite books are, and read them. (Update: Have asked for recommendations and have received replies. List contains:
- Song of the Dodo - David Quammen (Davo)
The Mists of Avalon - Marion Zimmer Bradley(Alissa)The Absolutely True Diary of a Part-Time Indian - Sherman Alexie(Janet)In a Sunburned Country - Bill Bryson(Trish)The Book Nobody Read - Chasing the revelations of Nicolaus Coprenicus - Owen Gingerich(Erik)
37. Read 3 books from Handy's book list:
Joseph Heller's "Catch-22"
John Milton's "Paradise Lost" (Started reading this, and I'm vaguely worried that this may be my Achilles' heel... Seems like a tough read.)
38.
39. Take Holly to the opera or symphony.
40.
41.
42. Get to level 50 in n0tpr0n, documenting the steps required to get there. (Update: Getting closer. Stuck on level 30. All steps documented so far.)
43.
44. Lose $27.50 at a casino.
45.
46. See an Imax or Omnimax film.
47.
48.
49. Send something unexpected and stupid to Trish in the mail. (Update: Bwa ha ha! Ha ha! Snicker. Haven't sent anything yet, but found a good possibility.)
Creative - 2/11
50. Write a short story including 20 snippets of conversations overheard while walking along the seawall.
51. Write a text-based adventure game, make it available on the Internet.
52. Plan, film, and produce a short film (final format: watchable DVD with menus), possibly starring Sophie.
53. Draw five episodes of a webcomic and put it online.
54.
55. Enter a photo in a photo contest.
56. Go outside somewhere and either sketch or paint an interesting scene.
57. Plan (but don't execute) an elaborate heist.
58. Finish that darned soapstone owl.
59.
60. Make a list of 20 predictions for the future, seal the envelope, and put it in a safety deposit box for 20 years.
Work - 1/4
61.
62. Design and create a website (for money) for two small businesses not related to me through friends/family.
63. Create a web design company with a website and small portfolio.
64. Write a treatise on the evils of video games.
Computers - 4/8
65.
66. Make media player (music and video) completely runable from remote control.
67.
68. Finish Remindomatic V2.
69.
70. Write a Rubix-cube solving program that doesn't blow up my computer.
71. Digitize our VHS tapes and get rid of them.
72.
Home - 9/12
73.
74. Have bathroom renovated - new shower, towel rack, shelves.
75.
76.
77.
78.
79.
80.
81.
82. Paint one of our rooms something other than off-white.
83.
84. Fix (properly) the broken bit of wall that's currently held together with duct tape.
Social/Volunteer - 3/7
85. Volunteer for three different charities or non-profit organizations.
86.
87. Give blood at least twice.
88.
89. Write a letter to my MP about the deficiencies in our electoral system.
90.
91. Clean up the garbage in a park, or along one block of a street, or along a stretch of beach.
Self - 8/10
92.
93.
94.
95. Take a course.
96.
97.
98.
99. Write a fan letter to a favourite author or TV star or something.
100.
101.
There we go. I'll try to update the list as I do stuff, and I'll add commentary as appropriate.
Wish me luck, especially on the stuff I'll need Holly's permission to do! :D
Man, the last 7 pounds, er, items on my 1001-things list are the hardest! I'm up to 94, and I'm having trouble thinking up more. Holly's helping, though, so I'm sure I'll have them all thought up in no time, even if a bunch of them are like "get rid of my university textbooks" and "get rid of my childhood toys".
Have I mentioned lately how much I loathe Windows? I had a whole big annoying morning which started with Windows' brand new inability to read DVD-R disks (e.g. all of our backups), progressing to reading all about similar problems of the general populace of the Interwebs, leading to following one person's instructions on removing Service Pack 2, and culminating in the complete borkedness of my computer - it won't even boot. (The Windows half, at least - Ubuntu is not only still working great, but has now completely taken over the video editing from Windows. Take that, Windows!)
Now I'm just hoping Wine will be good enough to let me install and play Diablo II. Then I'll be happy never to boot into anything Microsoft again.
Friday, October 24, 2008
This is a test of gnome-blog (a.k.a. Blog Entry Poster), a Linux application that runs directly from the desktop. I'm typing this in a little window that popped up from an icon on my desktop - it gives me a place to put a title, content, and I can add links and do simple text formatting. The downsides are that I can't do images, and I can't easily choose who I am / what blog I'm writing for. Still, pretty cool!
Dean out.
Update: Looks like you can do images, but it's not intuitive - you can drag and drop them from Nautilus. Also annoying is that it doesn't heading-ify my title. Boo.
Thursday, October 23, 2008
1 thing to do in 7 or so days
a) to show a certain stupidhead that my blog is updated regularly, and
b) to motivate myself.
The aforementioned stupidhead somehow stumbled upon a neat idea, this 101 Things in 1001 Days fad. While I openly mock her list (except the bit where I get to make her read a terrible book, that's awesome!), the idea itself appeals to me, so I've been working on my own list. So far, I have 64 items out of the required 101. When I'm done, I'll post it here, and then keep you (my enormous global audience) informed as to my progress.
If I can't get to 101 ideas, I'll ask my studio audience for suggestions, most of which I will discard with much derision. If you pay me, I may consider your ideas more seriously.
Stay tuned. I hope to have this list sorted out within the week.
Friday, September 12, 2008
Nuclear dream
I consulted a dream book about it, and it says that I'm anxious for the new season of 24 to start.
Wednesday, September 10, 2008
Bad Day
http://www.youtube.com/watch?v=g6LOhkzknGQ&NR=1
And if you're wondering where you've heard this song before, it might be from this viral video hit, starring jammed printers and other office frustrations.
http://www.youtube.com/watch?v=D4a1z7NLnNk
** It actually wasn't a completely bad day, as we went over to Janet's for an amazing dinner, complete with easy, ego-refurbishing tech support questions. :)
Friday, June 13, 2008
Lucky 13
Thursday, June 05, 2008
The T-Rex salute
I tell you, when you're biking in the cold, drizzly weather, nothing cheers you up like a random dinosaur encounter. Rooowwwwrrr!
Sunday, May 18, 2008
Happy birthday Holly, from your nerd

Hint 1: I'm a computer programmer by trade.
Hint 2: Next year, she'll only get one candle. (And it'll be way over on the left.)
Hint 3: Read the candles as "11111".
Solution: It's in binary - she's 31 years old. My inspiration was that her age, plus one year, is a perfect power of two. Therefore, her current birthday would be represented as all ones. Here's roughly how it works, in binary (2-based counting that computers use) as compared to decimal (our regular, 10-based counting).
(X^Y means X to the power of Y.)
11111 (decimal, "regular"):
Each 1 means 10^X, where X is the position from the right, minus one.
10^4 + 10^3 + 10^2 + 10^1 + 10^0 = 10,000 + 1,000 + 100 + 10 + 1 = 11111
11111 (binary):
Each 1 means 2^X, where X is the position from the right, minus one.
2^4 + 2^3 + 2^2 + 2^1 + 2^0 = 16 + 8 + 4 + 2 + 1 = 31
Next year, she (and I) will turn 32 = 100000 in binary. When I said I wished I could hit six figures by my early thirties, this isn't what I had in mind...
Sunday, March 16, 2008
A quest for Oscar
Since the stereo had been repaired before, and was (in our opinions) too far gone for further repair, and because we can now recycle electronic equipment, I was given permission to disassemble the Oscar-eating stereo and go on a recovery mission.
Here's what it looked like to begin with (sans speakers):

The first roadblock I hit was getting the faceplate off. It had 12 or so screws holding it in place, most of which I could get out, no problem. But three of them were in this crazy-recessed holes, and I didn't have any screwdrivers long/skinny enough to get in there. I went as far as going to the hardware store to buy a new screwdriver, but the head on the one I got was too thick for the screws. Curses. Luckily, I had a stupid idea that actually turned out to work. I taped a Phillips-head bit onto the end of a long flathead screwdriver, and presto!

Once those tricky screws were out, it was a simple matter of taking out about a hundred more screws, in a very particular order. Every piece removed exposed more screws to enable me to take out the next part.

At this point, the CD was in sight! Still not even close to accessible, but it was nice to know that it was actually in there.

By now, the CD-changing mechanism was separated from the rest of the stereo, but the CD itself was still surrounded by many intricate, interlocking parts. Time for the smaller screwdrivers.

Huzzah! The parts have all been taken off, and now the CD is free! Sadly, the now-defunct stereo had one last nasty secret. It had not only hidden the Oscar Peterson CD, it had broken it in the process. Boo-urns...

The last step was to put it back together. I'm going to offer it up for sale on eBay. $250 obo, some assembly required.
Sunday, February 10, 2008
Remote control on Linux
The motivation:
We listen to music and watch videos and DVDs on our computer, on Linux, using a couple little PyQt media apps I wrote, basically to wrap around mplayer. Trouble is, especially with a baby in the room, yelling over top of key dialogue, you have to have someone sitting at the computer to be able to pause and go back to find out what Bob said to Doug. (If you're wondering, it was "Take off, eh?".)
The proposed solution:
Remote control! Sit on the couch in comfort, pause, rewind, crank the volume up to 11, just like regular people with their fancy television machines. What could be better? So I went to the local computer store, and (high on my inflated sense of Linux's superiority) I cockily picked out a remote control that claimed to only work with Windows (boo) Media Center, and only on machines that came with this remote. ("For distribution only with a new computer" - hogwash!)
The problem:
Although Linux is, in fact, superior, it nevertheless takes an average of two weekends to get any new piece of hardware working with it. Whereas Windows lets you plug the thing in and start using it right away (most likely to cause Windows to crash), Linux often requires you to (a) know what you're doing, and (b) have the extreme patience required to do it.
The details:
- Microsoft/Philips Media Center Remote (Alt), Version 2, Model 1039 (the one in the middle) with a USB infrared receiver
- Linux (Fedora Core 7, kernel 2.6.23.14-64.fc7)
- mplayer 1.0rc2
The procedure:
Bear in mind both that I've had some small amount of previous experience with Linux infrared remote control (lirc) before (thanks, Claude!), and also that I went down a few wrong roads (this is just the condensed list)...
1. Place the receiver in an accessible spot, and plug it into a spare USB slot. Check dmesg to see that it was recognized:
usb 2-1: new full speed USB device using ohci_hcd and address 4
usb 2-1: configuration #1 chosen from 1 choice
2. Use lsusb to find out (doesn't say on it anywhere) that it actually is a Philips remote:
Bus 002 Device 004: ID 0471:0815 Philips
3. Search Google for "mplayer 0471:0815 Philips" to get this useful page.
4. Download the latest version of lirc, using the instructions on that page:
cd /usr/src
wget http://lirc.sourceforge.net/software/snapshots/lirc-0.8.2pre2.tar.bz2
bunzip2 lirc-0.8.2pre2.tar.bz2
tar -xvf lirc-0.8.2pre2.tar
cd lirc-0.8.2pre2
5. Run ./setup.sh, choose Driver Configuration "8 USB devices" / "o Windows Media Center Remotes (new version, Philips et al.)", leave Software Configuration on default "1 Compile tools for X-Windows", then "3 Save configuration & run configure".
6. When it's done being configured, run make.
7. Panic when it refuses to compile, but then calm down and remember that I compile things for a living. Search Google, discover that a function return value changed (sacrilege!), and edit /usr/src/lirc-0.8.2pre2/drivers/lirc_dev/lirc_dev.c to not bother checking the (now-void) return value of unregister_chrdev(). Re-run make, then make install (as root) when it's done.
8. Copy the lircd.conf into the place my distro wants it, rather than the place specified in the webpage:
cp remotes/mceusb/lircd.conf.mceusb /etc/lircd.conf
9. Load the new lirc_mceusb2 module, and when that works, add it to /etc/rc.local so it'll run on startup:
modprobe lirc_mceusb2
10. Start lircd, and when that works, add it to /etc/rc.local so it'll run on startup:
/etc/init.d/lirc restart
11. Test that the remote control buttons work - run irw and then start hitting buttons on the remote. It should come back with output something like this:
000000037ff07bee 00 VolDown mceusb
000000037ff07bee 01 VolDown mceusb
000000037ff07bef 00 VolUp mceusb
000000037ff07bef 01 VolUp mceusb
000000037ff07be9 00 Play mceusb
000000037ff07be9 01 Play mceusb
12. Now, to get mplayer working. I didn't have the source kicking around, so - download the latest version of mplayer.
13. Unzip and untar the source, and check out the configure options with:
./configure --help
14. Configure mplayer with the GUI and lirc support enabled:
./configure --enable-gui --enable-lirc
15. Once that finishes, run make, and then when that finishes, make install (as root).
16. Read mplayer's manpage to determine that the default lirc configuration file is assumed to be ~/.lircrc, or that you can specify another path with -lircconf <filename>.
17. Google search for mplayer lirc configuration, and find this other helpful page.
18. As mentioned on that page, run mplayer -input cmdlist to get a list of commands that mplayer accepts. For example:
quit [Integer]
pause
volume Float [Integer]
mute [Integer]
19. Combine these commands with the output from your remote (from step 11) in your ~/.lircrc file in this format:
begin
prog = mplayer
button = VolDown
repeat = 1
config = volume -1
end
begin
prog = mplayer
button = VolUp
repeat = 1
config = volume 1
end
begin
prog = mplayer
button = Pause
config = pause
end
begin
prog = mplayer
button = Mute
config = mute
end
begin
prog = mplayer
button = Stop
config = quit
end
20. Play something in mplayer, and feel like a Linux god when you can actually turn the volume up and down. Strut around the place, take elaborate bows, say stuff like "yes, I am great" until Holly gets tired of it.
And there you have it. A Linux triumph in less than a day. w00t!
Wednesday, January 09, 2008
Shopkeepers are weird
First, I was in a high-tech store, call it "Shop of the Future", buying a shiny new Adobe software package. When I brought it up to the counter, the guy gave me a bit of a hard time about it - "I don't see many of these up here anymore," he said, "I guess you don't know how to download stuff?" This is a Shop of the Future salesperson, ragging on me (albeit somewhat good-naturedly) for buying something from the store he works at, rather than pirating it. Before this, I have described Shop of the Future employees as "useless", "annoying", "dumber than a bag of really dumb rocks", and "barely able to read the back of the box to you in answer to your questions". I guess I'll add "tactless" and "unable to make logical connections between sales and paycheques". Bizarre.
Second, I was in a hockey store, picking up a few items necessary for me to continue my reign of supremacy (i.e. accidentally running headfirst into people) during morning hockey games. I needed a new stick, as the one I'm using actually belongs to my wife, and is also partially disintegrating. When I had made my choice, the comment the guy made was something along the lines of, "Whoa. You're going old school, eh?" This is because I chose a hockey stick made of wood, which I note are increasingly hard to find these days. (For you youngsters who haven't heard of wood, it's the same thing they make trees from. A wooden hockey stick is basically a whittled-down tree.) The majority of sticks there are composite sticks, the kind you regularly see shattering during key plays in NHL games. Add to that, the fact that they're 3-4x the price, then yeah, I'll go "old school". I'm bummed enough that I have to pay $28 for a stick, I'm not likely to go over the $100 mark.
Grumble. I think I'll stay out of the stores for another few months.