Alex's profileAlexPhotosBlogLists Tools Help

Blog


    December 15

    About Dr. H

    Dec 8, 9:00 am - noon

    In the morning, Dr. H brought his "chainsaw" into the room.
    Right at 9:00 am, he started to "slaughter" everyone in the room.
    Nobody managed to leave the room early before noon.
    If you leave early, you die.
    If you cheat, you die.
    Only fighting until the last second and without even having skimmed through half of the questions, you might survive.
    May 01

    Last Day In Grenfell Tower

    人生的第一份正式工作就随着8个月的work term结束而告一段落。在这段时间,经历了漫长而黑暗的冬天,艰难但仍死守到底的课程。每天出门的时候,天是黑的;下班回来的时候,天也是黑的,在公车上每张疲惫和落寞的脸时刻提醒着自己其实同他们一样平凡,为生活而奔波。其间家里发生了点事情,当其他人满怀希望地去准备他们的圣诞礼物的时候,我却冒着大雪去中国店买了香和纸元宝以表孝心。前4个月的工作不算太忙,按步就班地坚持了下来。
     
    第二个学期自己决定选一门课。白天告别刻板的工作,晚上就直奔实验室。甚至我的实验课老师NOVA 跟我开玩笑说:"You just look like the Pacman eatting the dots!! When it's done, it's done, never look back." 的确,后来的那4个月太忙了。其实我自己真的一点也不介意用几个小时去理解实验资料而只用5到10钟去写代码,因为IT人都明白就算只有1K的代码也都是有血有肉。每当自己能力去到瓶颈极限的时候,Nova都能在关键时候给我一点提示,有时是一个单词,有时基至只有4个字母,就可以化腐朽为神奇。同时也惊叹她这位人肉字典处理问题的手法是如此高明。这种影响也令到自己后来做Project遇到棘手的问题的时候,也会好自然的联想如果Nova是自己,她会怎样做。整个学期的项目就是在这样跌跌碰碰的情况下也坚持下来了,虽然不算完美,但是实现了连环PIPE,Singnal Handling和后台进程,以至整个toyshell看上去不会太豆腐渣。确实好多时候处理问题不是需要多点IQ,而是需要多点guts. 
     
    工作方面,好幸运地可以在结束前那两天出一次差。在遥远的路途上我忍不住问我的supervisor为什么当初面试的时候选了我,他说我是他第四个面试的学生,而之前面试的那三位他并不十分满意。不过,我更相信这是一种缘分。就好像有一次,如果不是因为facebook,我可能永远不知道我其中一位同事和Nova是相交甚久的好朋友。从而也联想到离散数学和six degrees of separation。昨天最后一天farewell lunch中,自己接过老顶赠送的笔和大家签名的farewell card,看着各位同事,感动同时我除了说thank you之外真的不知道说什么好。想起一路以来照顾自己的supervisor,头痛时毫不犹豫地给我Advil的Darcy和其他帮助过我的同事以及他们充满办公室爽朗的笑声,特别是农历新年的时候意外地收到同事们的贺卡;不舍得也没办法,只能叹惜自己一直太匆忙而没好好地和大家交流。跟supervisor交待完所有事情后,在下班最后一次离开时,我终于可以停下来细心地仰望这座因为自己每天来去匆匆而没有端详的Grenfell Tower。"也许痛快地离开公司就是COOP学生的专利,正式职员就应该有正式职员的样子,好好辅助公司"(改自日剧外派职员)。

    Image002

    April 09

    If you were Chinese and you were a Linux fan...

    If you were Chinese and you were a Linux fan, please add your plan and "finger" yourself like the attached image... 

    March 01

    OSing...

    上330, 我才知道:

    1. 在unix下,一个文件可以有两个不同的名字。( ln command )

    2. 在unix里,不用借助第三方我可以知道当前其它用户的IP地址。( who command )

    3. 在unix里,我可以查出当前其它用户现实世界中的真实名字。( finger command )

    4. 在unix下,不用messenger也可以向当前其它用户收发信息。( write, wall commands )

    5. 在unix下,我也可以打dir;  但dos下,不可以用ls。( alias command )

    6. 在unix下,我可以知道当前其它用户在做什么。( ps command )

    7. unix的terminal背景可让你随意设置。

    hey, Gates!! 我们的unix早就有透明terminal了,你是不是应该在退休前为你的dos再装修一番啊?


    November 22

    杂作

    趁supervisor最近没有新任务给我,就利用这几天阅读完4章Java资料。它们分别是Recursion, Exception Handling, Java Socket, 和 Binary I/O
     
    Recursion和C++的大同小异,都是围绕那几个不朽的问题做例子(n! , Fibonacci , Hanoi)
     
    对Exception Handling 印象最深算是ArrayIndexOutofBound Exception,因为写数据结构时不小心会遇到,有点的收获的就是finally statement
     
    Socket 对我来说是新概念。概括地说就是Stream / Datagram Socket问题,TCP / UDP 问题,输油管 / 运油车 问题.
     
    关于Binary I/O,在这本Java秘笈中提到了几种读写心法。但最感兴趣是BufferedInput/OutputStream和writebyte,在机上将copy例子中语句修改了一下,Java竟也可以实现类型为.jpg, .rmvb,  和 .mp3 的文件复制,且复制的文件可正常打开。不过,别高兴得太早,在netbeans上调试,Java还未那么神通广大到识别中文文件名并将其复制。由于写方式的不同,与C++对比,怀念的同时,脑子也不禁浮现对刷写文件阅读的充要条件问题。
     
     
    读得越多就会越怀念C++ 的特性,但毕竟时代无时无刻在变,就让自己继续中毒。   

     


    September 27

    Rigor

      老总今天浏览了一下自己做的网页,大致上满意.不过,由于部分外部链接是用当前浏览窗口打开,所以所有这些链接被要求重新设定用新窗口打开;不然,就视为偷.昨天看CS100的旧课本时,里面介绍FRAME,也提到同样的问题.当时并不为然,不过现实总是严谨的.在一网页设两个frame窗口,在其一设一链接并可在当前frame打开该链接指向的网页,如果法律上允许,那就不需用到Asp, JSP, 更不用劳烦tomcat它老人家.当然,不能否认JSP和ASP给网页带来的强大动态效果,也正因为技术含量高,才特显原创.我缺的就是280的概念.
      无聊时,自己试用google的网页翻译功能翻译UR的主页.文本部分还OK,但一涉及到动态部分就无能为力了.相信是主页的创建者将所有的Javascript和CSS都用独立的文件写,然后在网页中用语句包含了分开写的那些文件,并调用该要调用的那部分代码,从而实现封装.暂时来看google还没神通广大到可以翻译网页相关连的那些代码文件.不过,也佩服google(不是在帮GOOGLE卖广告)带来越来越多,越来越快的惊喜.不知道现在还有没有人在用东方快车和东方快译.
    September 21

    Lunch

         之前因为自己将任务做得太快,所以这两天变得好清闲.于是昨天上UR的CS的主页浏览了一番,找到一个名叫Qiong Wu的CS传奇女生的资料. 唯一一次见她真人是在公车上,但当时并不认识她;不过,给人的第一感觉就是,看上去好阳光的一个女孩;所以至今印象仍深.
         中午的时候跟SUPERVISOR一起去吃午餐.一开始大家都好拘束,不知说什么好,就如两个断背男在相睇一样.不行,要找点话题;于是就问他其中一个同事经常出差,如果用公司的车违规,边个交罚款;他就话当然是职员自己掏钱交啦. 不过他说他认识一人,那人出差时将公司的车全毁了,自己也没有麻烦;点解?因为那人就是他哥哥,他哥哥是警察,所以追犯人时可以"奉旨撞车".听后我心里就在想如果自己可以当机师的话,岂不也可以像911那班鸟人一样,"奉旨撞机"?
         吃完回来已经足足迟了半个小时,虽然感觉顶头上司被我俩忽悠了.但他见到我们俩迟到,也爱理不理的.整个办公室的工作环境好轻松,只有真正做技术层面的那几个勤快一点之外,其他人就是开一下邮箱,发一下E-MAIL,打一下文件,签一下名字,听一下电话,开一下玩笑,一天就这样下来了.
    September 14

    Work

    今天上班,和同事的关系有了突破性进展.部门里一个叫Darcy的网管见我成日都唔出声就来试探我究竟是不是哑的.没办法,自己手头上的任务枯燥,头脑一不清楚就好容易出错,唯有少点聊天防止自己走神.不过,趁着LUNCH的时间我还是有机会了解了一下Darcy的工作.第一次见到Oracle Discoverer,相信在一般的市场无法买到,可能要到厂家直接订才能弄到手.听他介绍说原理是通过一种类似triger的方式来访问数据库.其实就是一个功能强大的数据库管理系统,一点也不需要CODING,不过也要知道一点语法去设置里面的内容.看着那些界面就想起上372时,其它组的PROJECT,特别是Sort和Search,这两个不朽的安钮似乎无处不在.一个小时的break实在太短了,还未过足瘾的同时,发现还没来得及吃完的spaghetti已经变得冻冰冰的.
    August 19

    Helicopter

       A helicopter was flying around above Seattle yesterday when an electrical malfunction disabled all of the aircraft's electronic navigation and communications equipment. Due to the clouds and haze, the pilot could not determine the helicopter's position and course to steer to the airport. The pilot saw a tall building, flew toward it, circled, drew a handwritten sign. and held it in the helicopter's window. The pilot's sign said "WHERE AM I?" in large letters. People in the tall building quickly responded to the aircraft, drew a large sign. and held it up in the buildings window. Their sign said "YOU ARE IN A HELICOPTER." The pilot smiled, waved, looked at his map, determined the course to steer to Seattle/Tacoma airport, and landed safely. After they were on the ground, the co-pilot asked the pilot how the "YOU ARE IN A HELICOPTER" sign helped determine their position. The pilot responded "I knew that the tall building had to be MICROSOFT headquarters because they gave me a technically correct, but completely useless answer."
     
    May 13

    22 hrs ago to 4 hrs ago

    10个钟头前,在互联网上偶然受一网页启发,决定一定要设好家里的VISTA和XP网上邻居共享网络。一条重要而几乎被遗忘的网络协议NetBEUI被重新注入生命。说它重要是因为它从未用过,在那两个统系中也没有捆绑,所以珍贵。至于在哪找到,是在XP安装盘VALUEADD的目录中找到。说它几乎被遗忘是因为自XP起,微软不再继续开发和应用它。虽然在网上有不少信息快餐教人如何设共享网络,但经过四个几月的道听途说和小道消息,始终找不到合适的方法直到昨晚。网上看到的信息,情况就如手中有一电视遥控器给你去自动搜台,但从来没有指南教你究竟安哪个安扭。同时也感慨微软的道行这么高,自己唔知如何接它招。到底微软是不是觉得所有的电脑用户都是电脑白痴,还要因为要信息保密而将图型界面封装得这么紧要。VISTA搜索界面相对于XP有所改变无可厚非,但竟无法直观地找到类似“search a computer or person”这样的安扭就有点过火了。复制文件再添加协议后,两台机都可以互相访问并复制文件。昨天本来看中了ACER的一台DESKTOP,但想了想,算了,拉倒。
     
    兴奋之余,进入了梦乡。梦中见到自己在机场CHECK IN,点知发现自己的银包被人偷了,然后是老爸找回它,打开一看,现金和信用卡都还在,但偏偏PHOTO ID不见了,傻愣同时便醒过来了。
     
    下午的时候约朋友一起出外吃饭,为什么?想想今天是什么日子,HOMESTAY和她儿子佳人有约了。吃饭时,同朋友聊起了电脑问题,但电脑不是主要问题,英语交流能力才是主要问题。工作也好,做PROJECT也好,听不明白可以问,但未必每个外国人都那么好耐心回答和教自己。朋友和自己都有同感,当学又学不会,问又问不清楚,听又听不明白,大概或多或少都会被回敬一些不屑的眼神。郁闷......
     
    October 21

    To love or not to love, that is the question

    void love(char Say_yes)
    {
       if (Say_yes != 'y' && Say_yes != 'Y')
       {
          cout<<"i still love you,";
          cout<<"Could you give me one more chance, please!!? (y or n): ";
          cin>>Say_yes;
          love(Say_yes);      //function calls itself
       }
    }
    October 08

    Monkey && Coco

    (The Monkey and the Coconuts.) After a plane crash, 5 men found themselves stranded on a desert island. The only food source on the island was coconuts, which were plentiful, and the only other inhabitant of the island was a monkey. The men spent their first day gathering coconuts, which they put into a large pile. They were so tired after gathering coconuts, they decided to leave the problem of dividing them until the next day. However, in the middle of the night, one of the men woke up and decided to take his share. He found that the pile of coconuts divided evenly into five with one coconut left over. He stashed his fifth, gave the leftover coconut to the monkey, left the rest of the coconuts in a pile for the others, and went back to sleep. However, a second man woke up afterwards, and also decided to do the same thing. Coincidentally, when he divided the remaining pile into five, there was again one left over for the monkey. He stashed his fifth. Each of the other three men went through the same process at some time during the night, each time with one leftover coconut for the monkey. In the morning when they woke up, none of them admitted to taking a portion already, so they divided the remaining pile into fifths, this time with none left over for the monkey. How many coconuts did they originally gather?
    September 03

    Happy Birthday!!! Ana

    Someone tells me very few bored guys are qualified admirers. Maybe he's right. We never argue, but you feel i  have no romance sense at all and always treat my laptop more like my sweet heart than you. That's me. All i know to do is locking myself in the room, reading the computer bible and typing the Da Vinci code. However, i do have passion on you. If you really prefer a noble encomium to my sincere regards, i can only say "you are much more sexier than the LCD monitor". But anyway, at this right moment, please allow me to say " Happy Birthday, Ana!!! "
    March 06

    Gift

    i was so surprised and excited that i finally received my gift from sun microsystem after i came back home from school today.  It has been more than 2 months since i applied for the free T- shirt and i thought i'd lost it and almost forget it. For me, it comes at the right moment since i am gloomy these days. Moreover, it's so important and meaningful for me that i sense i still have a heart in IT. 
    March 03

    Friday

    What a desirable Friday finally comes! Even though this is the first weekend after the break, myself seem to be suffering more than before. It is known that after this semester, most of us' GPA will be sucked. However, after wiriting Michael's midterm today, for me, it's kind of revenging those horrible acsc midterms. Will and i thought it's easy. Jamie and Kenny, what do you think about it? For sure, Michael's leature is clear and understandable, but he is also extremly defensive and aggressive to students.  He did not take action at this time. Next time must be much tougher.
     
    Personally speacking, i am slightly disappoined to hear Kenny to transfer to Vancouver somehow. After all, there are not as many Chinese as before to attend our major. But anyway, kenny, you are smart. i believe you can handle your future.
    January 01

    tech toy-solaris 10

    拥有solaris10其实早是上年spring时的事情, 但因诸多原因到现在才安装. 我想到现在为止, 还没有一间公司可以像sun一样, 提供免费的操作系统下载并完全公开代码. solaris 10除了拥有java desktop system界面, 还可以选择common desktop environment(CDE), 操作环境同学校的cs110机房操作系统一模一样. 内附的即时通讯软件gaim可以监控对方何时关闭与用户当前的对话窗口, 并显示在线但隐身的用户群. 我个人认为,这有损对方私隐, 但的确是一大特点. StarOffice除了支持本身的文档类型还支持windows的doc.说到底是linux,所以对媒体的支持比较逊色,  但因为是通过terminal的命令行和参数操作方式实现自由度极高的操控功能, 就如不用安装其他软件即可实现定时自动关机.  
    November 19

    try to solve acsc using cpp

    做到作业最后一题结果得出个一元6次方程, 计算器没法计, 没法, 只能编程取近似值算了.
    到目前为止还未是不是自己计错数.
     
    //solve the acsc problem's question for the equation:
    //
    //  0=-120-5(1-1/((1+i)(1+i)(1+i)(1+i)(1+i)))/i+50(1-1/((1+i)(1+i)(1+i)(1+i)))/i(1+i)
    //
    //Take the nearest result, so set 0.00000000000001 almost equal to 0
    //

    #include <iostream>
    #include <cstdlib>
    #include <cmath>
    using namespace std;
    const float min=0.00000000000001;
    int main()
    {
       float i,tempResult,absVal;
     
       for (i=0.1;i<0.12;i=i+0.0000001)
        {
         tempResult=-120-5*(1-pow((1+i),-5))/i+50*(1-pow((1+i),-4))/(i*(1+i));
         if (tempResult==0)
           {
             cout<<"The yield rate is: "<< i <<endl;
             return 0;
           }
         else
           {
             absVal=abs(tempResult);
             if (absVal<=min)
               cout<<"The yield rate is: "<< i <<endl;
           }
        } 
       
        return 1;
    }
     
    Script started on Sat Nov 19 20:56:54 2005
     
    news: EMACS FTP CSSS
     
    Script on hercules[1]% acsc
    The yield rate is: 0.113387
    Script on hercules[2]% exit
    exit
    script done on Sat Nov 19 20:57:06 2005
    November 17

    Not a bad day

    cs的MIDTERM成绩今天终于公布了.  之前自己估计不会好得去哪, 而且当导师将成绩统计的数字列出来时, 已有43人是低于50分, 班平均分才53.  当老师点名叫每位学生上前取回试卷时, 整个班像沦陷了的大陆, 等着"希特勒"去瓜分.
     
    终于听到自己的名字了,在我用右手通过试卷和他间接接触的一秒瞬间,奇迹发生了.我还没来得及看自己到底多少分,我的INSTRUCTOR对着全班人跟我说了一句"GOOD WORK".再看一下分数,MY GOD!80多分....
     
    我已经有N年没听过这种鼓励的话语,即使平时我的INSTRUCTOR态度多严肃,眼神和话语透露他的治学多严谨.当他说那句话时,他还是有几点人情味和另类的温柔,甚至有几分像ANGEL.
     
    以前在中国大一时,班主任第一个学期已对计算机系降分录取我们的那届学生表示失望,甚至在班上发过牢骚.我并不聪明,去到那个阶段,也并不奢求会有什么成就,但不止是我,至少有好多人是出于对计算机还有兴趣和热情才能支持到现在.即使只有1K大小的原代码都是有血有肉.因为大家都坚信努力去修补伤痕累累的屋顶,即使不能避免狂风暴雨,也不至于在烈日当空下被太阳灼得无处可逃.

    October 17

    Ture

    === Ryan Cabrera – True ===

    I won't talk
    I won't breathe
    I won't move till you finally see
    That you belong with me

    You might think I don't look
    But deep inside the corner of my mind
    I'm attatched to you
    mmmm

    I'm weak, it's true
    Cause I'm afraid to know the answer
    Do you want me too?
    Cause my heart keeps falling faster

    [chorus]
    I've waited all my life to cross this line
    To the only thing that's true
    So I will not hide
    It's time to try anything to be with you
    All my life I've waited
    This is true

    You don't know what you do
    Everytime you walk into the room
    I'm afraid to move

    I'm weak, it's true
    I'm just scared to know the ending
    Do you see me too?
    Do you even know you met me?

    [Chorus]
    I've waited all my life to cross this line
    To the only thing thats true
    So I will not hide
    It's time to try anything to be with you
    All my life I've waited
    This is true

    I know when I go
    I'll be on my way to you
    The way that's true

    [chorus]
    I've waited all my life to cross this line
    To the only thing thats true
    So I will not hide
    It's time to try anything to be with you
    All my life I've waited
    This is true

    August 14

    8月15日 1:01