Gui Guan’s BLOG

There’s more than one way to do it

Archive for the ‘Journal’ Category

A small but very hard to find bug

Bug is a very disgusting thing in Computer Science. In one of my subjects project, I was required to write a Hearts card game robot player. I spent several hours finished the code, but it took me 2 days to debug it. :-(. A tiny bug found in the debugging process took me a whole night, which resulted to be mistyping variable Card as C, very embarrassed!

The funniest thing was that in order to find that tiny bug, I used a screen recording software recorded the whole playing process, then simulated the whole process by re-watching the recorded video again and again, but finally came to the conclusion that there was no bug in my program! I was nearly desperate, fortunately, an accidental warning msg “singleton variable” saved my life. 

Here is the video I recorded:

after playing for awhile, my robot(bottom one) stopped play.

Cities are an important testing ground for green technologies because urbanization is accelerating rapidly. More than half of the world’s population now lives in cities–and most population growth in coming decades will happen there, mostly in developing countries.

Will cities of the future look like Beijing, pictured here?

read all texts about Cities go green

  • 4 Comments
  • Filed under: Life
  • Make the Most of Taking Lecture Notes

    In many of your classes, your instructor lectures on or makes a presentation about a topic, usually one that’s related to the current subject you’re studying. During a class lecture, your job is to listen actively and to take notes to reinforce what you’ve heard and jog your memory about the key points being presented.

    Instead of writing down every word, listen — really listen — and put the information in perspective. What’s truly important to understand and remember? What’s not? Look for alerts from the lecturer, who may indicate significant information by repeating it, giving multiple examples, writing on the board, gesticulating or speaking forcefully, or giving word clues (”Two important reasons . . .” “Opposing viewpoints from . . .” “The result underscored . . .”). (more…)

  • 1 Comment
  • Filed under: Life
  • Upgraded to Wordpress 2.3

    Finally, I upgraded my Wordpress to 2.3. There is an error with Google XML Sitemaps 3.0b4 or below.

    WordPress database error: [Table 'yourdatabasetable.wp_categories' doesn't exist]
    SELECT cat_id, cat_name FROM wp_categories WHERE link_count >= 1

    For details, see here.

    At this stage, I wish myself upgraded as well. :-D

  • 1 Comment
  • Filed under: Website Log
  • Australian English

    Whilst Australians speak English, there are some words and expressions used that are unique to Australia. Here are some of them:

    A
    ANZAC — Australia and New Zealand Army Corps

    B
    barbie(BBQ) — barbecue
    bathers — word used in South Australia to refer to a swimming garment
    battler — someone who works hard but stills only just makes a living
    bikie — motorcyclist, usually a member of a motorcycle gang
    bloke — a man (more…)

  • 3 Comments
  • Filed under: Life
  • Watch BBC World online

    BBC World

    Because I haven’t gotten a TV set in my house, I was trying to watch BBC World via Internet. Without luck, the official site of BBC World didn’t put the video stream as a free service, and I also tried lots of online TV sites, all of them has a invalid stream feed for BBC World. :-( However, I finally found a p2p TV software written by Zhejiang University (China).

    TvAnts_thumbnail.png

    It’s called TvAnts, which is based on BT transfer technology and provide us an awesome quality of live BBC World, and I think it is the best online TV program I met up to now. For more information, please visit http://tvants.com/

    Now, I am just enjoying BBC World. Hoho :P

  • 4 Comments
  • Filed under: Life
  • 老师出书了,学生理应推荐。在Thin写这本书的时候,我有幸试看了第7章 设计时支持。写得非常的不错,十分精炼,pf pf!详情请访问http://www.cnblogs.com/thinhunan/archive/2007/08/13/853292.html

  • 2 Comments
  • Filed under: Life
  • Java simulation for Brownian motion

    RacingParticles

    Here is the Java program written by me to simulate the Brownian motion. In this prac, I tried to use double buffering to improve the performances, but actually it is triple buffering. That’s because the JPane has already implemented the double buffering, so plus mine own copy of buffer to store the background coordinate system and the path of particles, it is triple! Ho ho :P

  • 0 Comments
  • Filed under: Java, Life
  • Gui Guan’s Laboratory

    Gui Guan’s Laboratory
    There’s more than one way to do it

    Gui Guan's Laboratory Logo

    http://lab.guiguan.net

    发现Bluehost的服务器环境非常适合在学校和家里来测试PHP脚本,呵呵。同时为了更好的学习Internet Computing,弄了一个自己的实验室,有点Google’s Lab的感觉,但是差远老:P lol

    当你点击进入之后,便是我完成的IC的第二次作业啦(默认用户名:user 密码:password)。以下是这次作业的一些要点:

    • sticky form
    • input validation
    • POST
    • SESSION
    • mail

    (待续…)

  • 0 Comments
  • Filed under: Life, PHP, Website Log