Monday, December 26, 2005

Merry Christmas!

I finished my last exam at 11:00 on Wednesday, and my mom picked me up from residence the morning of Thursday. I've been home since, but haven't bothered signing on to MSN yet (my brother rules the computer at the house). Christmas was good, the family finally upgraded computer monitors (courtesy of my grandparents). The computer here at the house went from a 15" CRT, where the reds were shifted right by one pixel, up to a 19" LCD, where everything is crystal clear, and the VGA cable isn't even plugged in. Boy is it sweet. On a whim, I took a look at the installation manual (it's a Samsung SyncMaster 920T), and what did I see, but a section on how to set up Linux to use the monitor. The instructions are kind of ambiguous, and you would need to know what you're doing with X before following the instructions, but seeing Linux having a section in the installation manual is a step in the right direction. The instructions are as follows:

To execute X-Window, you need to make the X86Config file, which is a type of system setting file.
1)Press Enter at the first and second screen after executing the X86Config file.
2)The third screen is for setting your mouse.
3)Set a mouse for your computer
4)The next screen is for selecting a keyboard.
5)Set a Keyboard for your computer.
7)First of all, set a horizontal frequency for your monitor. (You can enter the frequency directly.)
8)Set a vertical frequency for your monitor. (You can enter the frequency directly.)
9)Enter the model name of your monitor. This information will not affect the actual execution of X-Window.
10)You have finished setting up your monitor. Execute X-Window after setting other requested hardware.


Of course, there is the X86Config file, which is in /etc/X11/, but it is apparent they want you to run the x86config program, in which case, it should have been lowercase letters. It as also obvious they are using the old XFree86 project instead of the newer x.org. They obviously have some work to do, but it joys me to see they have a Linux section on installing the monitor, right after the listing for Windows NT, and Macintosh isn't even on the page. I checked out the box, but there is no Tux on it, unlike the Lexar USB thumb/stick/jump drives, which actually have a Tux symbol on the store packaging for all consumers to see.

Tuesday, December 20, 2005

Mongolian BBQ

Yesterday (Monday) a bunch of the guys who lived on 4th Nootka last year met up and went out for lunch at Great Wall Mongolian BBQ, on Broadway West. Steve, who has been on exchange for the past semester in Quebec, was in town for two days before going home for the holidays, so we tried to get as many people as possible together for lunch. Most of us met at the UBC bus loop and headed in via the 99-B, getting off at the Safeway on MacDonald, then heading back West one block. It wasn't the best decorated restaurant (not bad on the outside, but so-so on the inside), but the food was pretty good. The whole thing is done in an interesting buffet style, where you grab a bowl, put in frozen strips of chicken/lamb/beef/pork, layer on some vegetables and noodles, and apply your own combination of sauces from twelve choices. When you are satisfied with your concoction, you put the bowl in a queue and the chef will fry the contents of your bowl. Each bowl is done separately to prevent mixing, and you can see the setup in the pictures below. While you wait for your bowl to be cooked, you go sit down and the waitress will bring your bowl to you, hopefully remembering whose was whose. We ended up staying there for about two hours, just reminiscing on everything we had done last year. It was quite a good time, and for $11 for all you can eat, it was a pretty good deal. Pictures are, as always, on my webserver.

Saturday, December 17, 2005

Here Comes The Sun

Harrison

Chorus

Little darling
It's been a long cold lonely winter
Little darling
It seems like years since it's been here

Chorus

Little darling
The smiles returning to the faces
Little darling
It seems like years since it's been here

Chorus

Bridge

Little darling
I see the ice is slowly melting
Little darling
It seems like years since it's been clear

Chorus

--------

Last night I had my Math 221 exam, and had planned on watching a movie after I got back to give me a chance to unwind. The person I was going to watch the movie with was busy, so we decided to delay the screening until tonight, and I climbed into bed early (around 11:00). I decided I would get up early this morning to try out a little experiment. Getting up at 5:30 in the morning, I went through my standard routine, then got my camera set up to do some time lapse photography of the Sun rising in the South-East. I set up my tripod in front of my window facing the approximate direction that I have noted the Sun coming up over the past couple days, and made sure my battery was charged and my flash memory empty. Starting at around 6:45 this morning, I pressed the shutter button on my camera every 10 seconds until the Sun rose. A website on the Internet said the Sun would rise at 8:02 this morning, but due to local terrain and buildings, the Sun didn't show its merry face until around 8:27. My intention was to start when it was still pitch dark outside, but the sky started to lighten sooner than I thought it would, so I kind of missed my starting time. All the pictures were taken on my Nikon CoolPix 5900, with the autofocus light assist turned on, though I should've turned it off to make my life easier, as the light was bouncing off my window (and, after reviewing the pictures, was probably throwing the focus off). I also clocked the resolution down to 3 megapixels (2048x1536) and medium JPEG compression. Wite balance, matrix metering, colour, contrast, image sharpening, iso sensitivity, and saturation control were all either default or auto. I turned the focus area and noise reduction off, as I knew that dark shots would have a lot of natural grain and such. The battery held up quite well, taking 611 pictures over a period of 1 hour and 45 minutes, with the lcd monitor on the whole time. I then took all the pictures, put them on my computer, and used MPlayer/MEncoder to encode a DivX video with resolution 1024x768 at 15 frames per second. The specific command line code, for the curious:
mencoder mf://*.jpg -mf w=2048:h=1536:type=jpg:fps=15 -vf scale=1024:768 -ovc lavc -lavcopts vcodec=mpeg4:mbd=1:vbitrate=2400 -oac copy -o sunrise_small.avi
I haven't been able to encode a full resolution 2048x1536 video, as the codec seems to give a Segmentation Fault at that resolution (I don't blame it), and I can't get other codecs to handle it either. The video turned out quite small, due to very little apparent motion, at only 12.4MB. You can grab it here.

In the beginning of the video, you can see Venus high and to the center. Around the 4 second mark, Mercury appears behind the bright tower in behind the trees on the left. Because I had to depress the shutter by hand and the lighting conditions were so low, some of the frames came out blurry, despite using a tripod. There were also times when I would shift my arm or press a button too hard and would move the camera, causing the wobble and shifts that happen sporadically. Around the 20 second mark, small black dots appear in individual frames that look like dirt on a traditional film strip, these are actually birds waking up at around 7:30 in the morning and flying in front of the camera. There was one cool point around 7:45 where a plane flew overhead, and the whole belly and wings of the aircraft was reflecting the Sun. I checked for this frame, but the aircraft is too small in the picture to be noteworthy. The Sun finally peeks around Promontory Estates at around 8:27, and the last frame of the video was taken at 8:30.

My method for timing was basically to count to myself (I don't have any lit clocks that show seconds, and my computer monitor would cause too many reflections on the window), so the video isn't very accurate in any sense of the term. The ultimate system would be to have some sort of computer controlled remote shutter switch, so I can write a script or use a program to fire the shutter at exact time intervals without any risk. An AC adapter would also be nice, for those extended time lapse sessions (I figure my battery had about 15 minutes of juice left before it would have quit).

Monday, December 12, 2005

Attack of the Aluminum

That could also read "Attack of the Aluminium" if you live in the UK or Australia.

Friday the 3rd was the last day of classes here at UBC, and what remains of our semester is called "Exam Period". Of course, exams only being ~2 hours long, this leads to much time on one's hands, and after a full semester of working, doing essays, toiling over labs, and trying oh so hard to get up for 8 a.m. classes, some fun must be had. Bryce, immediately following classes on Friday, had left to go home for the weekend (to get some laundry done up), while his roommate, Ryan stayed here. Seeing a prime opportunity for mischief, Casey, who is lucky enough to have a single room, decided to pull a little prank on Bryce. As it turned out, this prank would not be so little after all. Starting at 6 in the evening on Sunday, aluminum foil was obtained in large quantities, both through the form of purchase, and through the form of legitimate donations by the managers of local food services companies (the Totem Cafeteria and Pie R Squared, the pizza store in Student Union Building, being the primary ones). An underestimate (a gross oversight in this case) of required amounts led to more supplies being acquired later in the evening, from the graveyard kitchen staff of the aforementioned Totem Cafeteria. When all was said and done, the amount of aluminum foil used would appropriately be measured in miles instead of the normal feet, and the author wishes he had invested money in Alcan and Reynolds. But for what could this amount of aluminum be used for?

In Greek mythology King Midas of Phrygia is granted his wish that everything he touched would turn to gold. For one long night our resident Greek and Middle Eastern Archeology student, Casey, wished that he could have an "Aluminum Touch", enabling everything on Bryce's side of the double room to turn to aluminum, and so it did. It took until around 2 in the morning, and required the help of many people (who mostly came and went as they wished), but everything in Bryce's room ended up wrapped like some demented Christmas present, all shiny and silver in colour. All we were missing was Burl Ives singing "Silver and Gold". If you are feeling brave enough, you can download a zip file of pictures that I have prepared, that weighs almost as much as the aluminum ball that could be found in the hallway the next day. Prepare your hard drives for a full 75MB, and download this file.

The next morning, when Bryce arrived with clean underwear in hand, all he could say was "Wow." With all the effort that had been put in, with all the love and care it took to wrap all his possessions, Bryce couldn't feel angry, but instead amazed. It only took about half and hour to unwrap the room and contents, which made for an aluminum ball about two feet across. Believe me, an aluminum ball two feet across is next to impossible to "hackey sack", but it sure was fun to wrap up an early Christmas for an unsuspecting receiver.

Friday, December 09, 2005

Can't Switch Mouse Buttons

Here's a problem that someone showed me today on Windows XP. The problem: can't switch primary/secondary mouse button functions (ie. can't switch mouse from right-handed to left-handed). The background: One Dell laptop with Synaptic TouchPad and PS/2 mouse plugged in with USB adapter dongle. The person has switched the layout of their room, putting their laptop on the other side of them, so now, after several years of using the laptop, they want to change the "handedness" of the mouse. Their level of ambidextrous abilities is beyond the scope of this post, and why any right-handed person would suddenly want to switch is not my point. Going into the mouse settings, as per Microsoft's instructions shows that the "Switch primary and secondary buttons" checkbox is disabled. Of course this Google search comes up with nothing. At first I thought this could be due to conflicting software, and perhaps he had Logitech or similar software overriding Windows' functions. He said he didn't have any such software, and the generic brand name printed on his mouse, combined with the lack of any such program in the Start menu confirmed this. My next thought was that Microsoft or some other software couldn't handle having the buttons switched with the Synaptic pad turned on, ie. switching the buttons then touching the pad would be counted as secondary click. Disabling the touch pad did nothing for the ability to switch mouse buttons. Then I remembered (with some refresher from Google) about the command "rundll32.exe user32.dll,SwapMouseButton" but according to this page, that command is not a toggle, and not reversible through the same command. Seeing as how I didn't want the "client" to be left stranded in lefty mode, I didn't follow through on the command. Then I thought maybe XP was having problems with the PS/2 to USB adapter (despite the fact that I have changed handedness on Windows 3.1 with the old serial mice). Grabbing my USB mouse (Microsoft brand, no less), we unplugged his mouse, plugged in mine, tried to do the switch, then restarted and tried again. Then we logged on as system administrator in Safe Mode (thinking, maybe he didn't have permissions somewhere), and still nothing. I have no idea why he can't switch mouse buttons, after having tried all that. I narrowed it down to one final problem: "You're using Windows."

Friday, December 02, 2005

Snowy Days

Last Monday, we had the first morning frost (at least it was the first as far as I could tell). This was expected, and probably past due, considering how late in the year it is. The great surprise came Tuesday when UBC awoke to see a couple centimeters of snow on the ground. After attending classes on Tuesday I took my camera out and went for a good hour long walk. The temperature was hovering around zero, so the snow was falling lightly, while the trees would be raining down water, which caused a neat effect. It has been a week now, and the snow is still around, which is quite unusual for these parts. It has at least partially melted, reducing the roads to a muddy mess. To see the pristine beauty that was one week ago, check out the pictures.