Saturday, April 28, 2007

Insanity



I just finished writing my formula sheet for CS320. I decided that instead of memorizing anything, it might save time if I just try to squeeze a semester of course work onto a single A4 piece of paper. Well... I ran out of room :(. It is now 1am and there are 11 hours left until the final. I better get back to studying.

Tuesday, April 24, 2007

Motivational Comics

Calvin offers his views on the world of academia:




... yes, I should really be studying right now since I have three exams within the next four days. Instead I find myself reading Calvin and Hobbes and learning how to play Go. I am actually proud of my progress learning Go since I can now beat the GNU Go artificial intelligence on its hardest difficulty level. I find that procrastination actually makes me more productive (except, of course, on the task I am procrastinating).

Sunday, April 08, 2007

Easter Riddle


Since there was relatively low participation for my last riddle, the first person to correctly decode my Easter egg will win a mystery prize!

Saturday, April 07, 2007

Laptop Theft

I found out yesterday that Nath's laptop and passport were stolen while he was on the overnight bus from Banda Aceh to Medan. In an attempt to identify the thief, I decided that it would be helpful if I could log an IP address when the laptop connects to the Internet. The laptop is set to automatically log on to MSN, so I set up a buddy pounce to send a message as soon as the laptop connects. I don't think it is possible to trace an IP address directly through MSN because the packets travel through the MSN servers before heading towards their destination, so I set up the buddy pounce to send an irresistible URL to a webpage with a web tracker instead.

Today the thief actually logged onto MSN. The buddy pounce sent the link, and then he/she logged off a few seconds later. Unfortunately the thief did not take the bait, and didn't click on the link. I set up another buddy pounce just in case he/she decides to log on to MSN again, although I think that would be extremely unlikely. If I had succeeded in getting the IP address it probably would have been possible to track down the location of the connection... oh well :(

Thursday, March 29, 2007

Cryptomni Version 1.1 Released

Changes in this release include improved source code quality, as well as the ability to encrypt/decrypt multiple files from a single key file.

http://sourceforge.net/projects/cryptomni/

Tuesday, March 20, 2007

Crossing the Rubicon

For the last two weeks I have been contemplating what I consider to be the most important decision of my life. I have been offered an internship position at Microsoft, as well as a summer research position here at UBC. Both of the positions are related to artificial intelligence, but the Microsoft position will probably be more focused on software development. The research position will involve working on a program called CIspace (http://www.cs.ubc.ca/labs/lci/CIspace) funded by a NSERC USRA (Natural Sciences and Engineering Research Council of Canada Undergraduate Student Research Award).

To me this decision represents much more than just what I plan on doing this summer, but what I plan on doing for the rest of my life. On one hand I can do research on fascinating topics directly related to what I am interested in, but on the other I can start a career as a software developer with a much higher salary but work on something which I don't find as fulfilling. Choosing the Microsoft position would probably open many career opportunities within the software development industry, but I fear life as a code monkey will be stressful and unsatisfying. Today I was forced to choose between the two positions, and I have decided to go with CIspace. I really hope that I don't end up regretting this choice later in life.

Saturday, March 03, 2007

FoxTrot

Windows Vista Business


Since I get a free copy of Windows Vista Business thanks to MSDNAA, I decided to install it on a partition this morning. I definitely think its an improvement over XP. The Aero interface looks awesome, and a lot of the features available in XP have been tweaked and improved. My only real complaint about it is the User Account Control, which displays an annoying dialog message requesting security permission way too often. I will continue to use Ubuntu as my main desktop environment, but may occasionally boot to Vista if I need to use software which doesn't run on Linux.

Cryptomni Version 1.0 Released


Cryptomni is a program which can encrypt and decrypt files using the one-time pad cipher. A key file is created using the cryptographically strong random number generator SecureRandom. If a key is truly random, kept secret, and never reused, this encryption algorithm can be proven to be unbreakable.

This project is hosted at SourceForge.net, and can be found at http://sourceforge.net/projects/cryptomni.

Tuesday, February 20, 2007

PDFTron Interview

I had an interview for a summer internship position with a local software company called PDFTron this morning. I think the interview went pretty well. There were some typical questions asking about my experience and job expectations, as well as some more technical questions involving programming concepts. They also gave me four programming tasks which I had to implement using C++ (writing out code on a piece of paper):

1) Write a function which converts a string to a positive integer. Ignore the '+' and '-' characters, return 0 if the string is empty, and return any interpreted digits if a non-numerical character is encountered. Here was my solution:

int atoi (char * string)
{
if (*string=='\0') return 0;
int value = 0;
while (*string!='\0')
{
if (*string=='0') value+=0;
else if (*string=='1') value++;
else if (*string=='2') value+=2;
else if (*string=='3') value+=3;
else if (*string=='4') value+=4;
else if (*string=='5') value+=5;
else if (*string=='6') value+=6;
else if (*string=='7') value+=7;
else if (*string=='8') value+=8;
else if (*string=='9') value+=9;
else if (*string=='+') value/=10;
else if (*string=='-') value/=10;
else return value/10;
value*=10;
string++;
}
return value/=10;
}

2) Swap positions of the nibbles in a byte:

char nibbleSwap (char byte)
{
char nibble1 = byte&0xF0;
char nibble2 = byte&0x0F;
return ((nibble1/16)|(nibble2*16));
}

3) Write a function which computes x to the power of n using O(log n) multiplications.

int power (int base, int n)
{
if (n == 0) return 1;
if (n == 1) return base;
int half = n/2;
int value = power(base, half);
if (n%2==0) return (value*value);
else return (value*value*base);
}

This has a recurrence relation of T(n) = T(⌊n/2⌋) + Θ(1) for n>=2 and T(n) = Θ(1) for n<2. T(n) is ∈ Θ(log n).

4) Implement a function which draws a line, given coordinates for a start point, coordinates for an end point, and a two dimensional array representing grayscale pixels (8 bits per pixel). I didn't get around to attempting this question since I ran out of time.

Tuesday, February 06, 2007

PlayStation Emulation


I recently installed custom firmware version 3.03 OE-A on my PSP (thanks Dark_AleX!). This allows nearly flawless PlayStation emulation without having to use the official PlayStation Network service for the PS3. I have been spending way too much time replaying FFVII instead of studying for my impending midterms...

Saturday, February 03, 2007

Robotics Conference


I spent the last two days attending the "Robotics for Society: New Directions in Cognitive Science" conference. It took place at Robson Square (downtown Vancouver). Invited speakers included:

James Little (UBC): Space for interaction with a robot
Gordon Cheng (ATR): Humanoid robotics perspective to neuroscience
Richard Vaughan (SFU): Assault and batteries: on the utility of robot aggression, competition and violence
Rodney Brooks (MIT): Robotics and everyday life
Alan Mackworth (UBC): You, robot, do no harm!
Hideki Kozima (NICT): A social robot in the wild world; practices in therapeutic and pedagogical applications
Stefan Schaal (USC): Computational motor control, humanoid robotics, and their societal relevance
Masaaki Honda (Waseda): Talking robot mimicking human speech production
Richard Rosenberg (UBC)

There were also various poster presentations outside of the theater. I found the conference very enjoyable because it provided exposure to a large variety of robots currently being researched and developed. My favorite presentation was by Rodney Brooks. Not only was he an excellent speaker, but he is also very well known in the field of robotics (I read a book by him in high school, as well as some of his research papers). He also founded the iRobot Corporation (well known for the Roomba robots). Unfortunately, attending the conference has put me way behind on my homework, so I am going to be spending the next 24 hours trying to catch up :(.

Dilbert

Friday, January 26, 2007

Mélange

High-definition Video:

I just acquired an amazing HD version of The Matrix. This is the first movie that I actually have to downscale in order to display on my monitor (its resolution is 1920x1080, while my monitor is only capable of 1280x1024). Here is a screenshot of the video playing in its original resolution, spanning across multiple desktops on my Beryl cube:


Mysterious Function Update:

It turns out that the graphs I made in my previous post were actually bifurcation diagrams of the logistic map. Wikipedia has a great explanation of the equation and how it is related to chaos theory.

Summer Internship:

I have been very busy looking around for summer internship positions. So far I have been applying to the big tech companies like Google, IBM, and HP. I am not very happy however, because most of these positions do not sound very interesting. I do not want to become a code monkey. What I really want is to be able to work on some interesting AI research. Unfortunately after examining the job market these sorts of positions seem to be rare. I also attended a career fair on Thursday, and applied for an internship position at Microsoft.


Das Experiment:

This afternoon I participated in a psychology study. It had the following experiment description: "This study will explore the manner in which an herbal extract, 'Salin', can affect memory." The experiment involved drinking a glass of iced tea flavored liquid, and then filling out some surveys. I soon realized that the forms were doing a terrible job at actually testing any of my memory skills, and I became suspicious. After handing in my forms the experimenter asked some questions - one of them being "did you notice anything unusual about the experimenter?" I answered no. He then let me know that he was actually a different person then the original experimenter. Half way through the study they actually switched people without me noticing. This was the real purpose of the experiment, to see how I reacted to a change that I didn't expect or consciously notice. The purpose of the forms was to determine if the switch might have had some sort of subconscious effect. The drink they gave me was a placebo. I wanted an actual memory enhancing drug!

Magic:

This evening I went to a magic show at Norm Theatre. I was disappointed since it seemed mediocre, and I knew how *every* trick performed actually worked. After the show they played the movie The Prestige. I think this was the best of the three big magic movies of 2006 (the other two being Scoop and The Illusionist). I thought the best aspect of the movie was its plot, and how it kept the viewer constantly guessing at how the magicians performed their feats.

Sunday, January 21, 2007

Mysterious Function

A few days ago in my COGS401 class our professor wrote a formula on the board. I hadn't been paying attention up until that point in the lecture, so I have no idea why he wrote the formula, or how it was related to psychology in any way. He seemed pretty excited about it however, so I wrote it down in my notebook:

Yi+1 = a * (1-Yi) * Yi

i+1 and i are both subscripts to the variable Y.

I just finished a small Java program to plot the formula to see what it looks like. 'Yi' is on the y-axis and 'a' is on the x-axis. My program could only plot the function between 1 < a < 4:


Here is 3.5 < a < 3.75:


and 3.75 < a < 4:


Very mysterious...

Friday, December 29, 2006

Children of Men

I just got back from watching Children of Men at a theater. Incredible movie. Brings up some very interesting issues, and has some breathtaking scenes. I was also impressed with the sense of realism achieved (the movie takes place in the year 2027). I was considering giving it a 10/10 on IMDb, but ended up giving it a 9 instead. Perhaps I will change my vote later when I get a chance to see it again.

So far I have given a 10/10 to the following movies:
American Beauty (1999)
Donnie Darko (2001)
The Lord of the Rings: The Fellowship of the Ring (2001)
The Lord of the Rings: The Return of the King (2003)
The Lord of the Rings: The Two Towers (2002)
The Matrix (1999)
Memento (2000)
Schindler's List (1993)
The Shawshank Redemption (1994)

I have voted on a total of 260 movies (I own 206 of them). A list of my movies can be found at http://www.imdb.com/mymovies/list?l=10374685.

Tuesday, December 26, 2006

Christmas Sickness

I had a pretty terrible Christmas, waking up feeling really sick. I spent the entire day lying down in a semi-conscious daze watching TV (12 hours of MythBusters). The sickness seemed to correspond exactly to the 24 hours of Christmas, since I was feeling normal the day before, and I am feeling fine right now. Other than Christmas, I have been having a great time at Stanford so far.

On Friday we went to Silicon Valley and spotted some of the major tech companies. We went to Intel and got a free tour around their museum. We then headed to TheTech Museum of Innovation in San Jose. The museum had some really cool exhibits. I also got to ride a Segway which was very fun. After touring around the museum for a few hours we went to an IMAX theater and watched Happy Feet. Although the movie had some good cinematography (which can be appreciated in an IMAX theater), I didn't really like the plot. I was hoping it would be more like March of the Penguins (which has less singing/dancing). That night I finally got a chance to play on a PS3. Although the game I was playing had great graphics and physics, I was disappointed since it had a noticeably slow frame rate.

On Saturday we went to San Francisco. It seemed like a very dense city, with lots of traffic and many steep hills. We first went to the San Francisco zoo. Although it was fun, I think I have been spoiled by recently going to the Singapore zoo, which is much better in my opinion. We then visited various places around the city such as Sutro Tower, the beach, and the Golden Gate Bridge. There were some great views while walking along the Golden Gate Bridge (including Alcatraz). That night we went to a decent dim sum restaurant for supper.

Wednesday, December 20, 2006

Stanford

I will be spending two weeks with my brother at Stanford over Christmas. My residence (Place Vanier) does not allow anyone access to their rooms from December 19th to January 7th. I just arrived at Stanford last night, and encountered a few annoying problems on the trip:

1) While packing I realized I didn't have any plane tickets. Since this seemed like a fairly major problem, I spent about an hour checking and rechecking through all my papers looking for them. I had purchased the tickets over a month ago, so I assumed that I somehow lost the tickets. After doing some research online I finally realized that I had purchased electronic tickets, and all I needed was a reservation number in order to board the plane!

2) While boarding the bus to Seattle the bus driver couldn't find my reservation number on her list. She wouldn't let me board the bus if I wasn't on the list. After carefully going through the list for around 5 minutes, she realized that she misread one of my numbers, and that I was actually on the list after all.

3) My original flight from Seattle was scheduled to start boarding at 2:10pm. With no real explanation, they delayed the flight by an hour, and we started boarding at 3. After everyone was in the plane and it started heading down the runway, the airplane stopped and just waited there for about 10 minutes. Finally the pilot explains to us that there was some sort of problem with the rudder, and we had to head back towards the gate. After a full hour waiting in the plane while mechanics tried to fix the problem, they decided to cancel the flight. At least they found out about the problem before we were actually in the air. I got a booked on another flight that was supposed to leave at 8:30pm, but this flight also got delayed an entire hour without any explanation. I have decided that I will avoid flying with Alaska Airlines in the future.

One interesting fact about my trip is that I was playing music on my PSP nonstop for the entire 16 hour duration (on what should have been a 9 hour trip). I believe this may have broken some sort of PSP battery life record, since I was reading an article at IGN which claimed less than 11 hours of MP3 playback on the PSP [link]. Even after the trip the battery level was still at 9%. By the end of the 16 hours I was very sick of listening to the same Yoko Kanno songs over and over again.

I left my computer on in my room so I can use it for remote computing. Stanford and UBC share an Internet2 connection, so I get an excellent network connection to my remote desktop. My only worry is that they might power down my building's electricity over Christmas, which would prevent me from accessing my computer :(.

Saturday, December 09, 2006

Xgl and Beryl on Edgy Eft


I spent most of the day installing and configuring Xgl and Beryl on my computer. Beryl is a compositing window manager for the X Window System which takes advantage of OpenGL acceleration. It has some incredible features such as wobbly windows, "the cube" (each virtual desktop becomes a face on a cube), and a new task switcher. Beryl is extremely customizable, and after tweaking some of the settings I bet that these features could actually lead to an increase in productivity. All of the new 3D effects also run really well on my graphics card (NVIDIA GeForce 6600 256MB). Although it was tough to set up, I think Beryl (and Compiz) will have an incredible impact on the future of Linux. While Mac OS X and Windows Vista boast about their new user interface features, I think Beryl proves to be superior in almost every way.