Category Archives: for fun

Trying to install MAC OSX on my new PC

This post is for logging my process of installing Moutain Lion on my new PC. Just start reading things, but I will try to record every single steps of this process. Maybe somebody or some of my friends gonna need it later.

First of all, the following is some basic information about my system.

CPU – Intel Core i3 2120.

Mainboard – Gigabye B75M-D3H , Chipset Sandy Bridge

Memory – DDR3 – Corsair  1x4GB

HDD Sata3 Seagate 500 GB

Current status: I’m reading about Chameleon, by Voodoo team, our great heroes in MACOSX86 world !!!!

First thing I was doing is to try install Hackintos on Virtualbox to use Disk Utility in Mac, so that I can create a bootable disk

on my USB stick for installing.

But, the fucking .dmg file had no way to convert into .iso file. I have tried so many ways to convert .dmg file into .iso file, but it’s no use. Fuck that >”<

I’m gonna do some searching for a already-install virtualbox disk image, then just atttach it to my Virtualbox. So messy now.


Beautiful graph for big-O notation :x

Top coder

Top coder

The programmer, like the poet, works only slightly removed from pure though-stuff. He builds his castles int he air, from air, creating by exertion of the imagination.

— Frederick P. Brooks.

Some funny quotes about programming and CS stuffs.

Glory sunday, wake up early and enjoy some tea, see the sun rising, and sing my favourite song 🙂

Accidentally , I find out these ROFL-quotes 🙂

There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.

C.A.R. Hoare, The 1980 ACM Turing Award Lecture


The computing scientist’s main challenge is not to get confused by the complexities of his own making.

— E. W. Dijkstra


One of my most productive days was throwing away 1000 lines of code.

Ken Thompson


When in doubt, use brute force.    >>>>>> I love this idea, and in fact , I use it many time 🙂  LOL

Ken Thompson


Deleted code is debugged code.  >>>>>>>>>>> yes , sure !

— Jeff Sickel


Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

Brian W. Kernighan and P. J. Plauger in The Elements of Programming Style.


The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.

Brian W. Kernighan, in the paper Unix for Beginners (1979)


Controlling complexity is the essence of computer programming.

— Brian Kernigan


A data structure is just a stupid programming language.

— R. Wm. Gosper


Life is too short to run proprietary software.

— Bdale Garbee


You can find out more here :

Some interesting questions known as Google interview questions

These are really wierd-est question I have ever met. Then I found some pieces of information about the reason why Google suggested  these questions. They really don’t care much about the truth or falsity from your answer, but rather about the way you reason to have that answer.

No more talk, let jump in some of them.

The first question, suppose you are shrunk to the height of a nickel , your mass is proportionally reduced so as to mantain the original density.You are then thrown into an empty glass  blender. The blades will start moving in 60s . What do you do ? 

So, in this case there’s no way out, and to save my ass is the most important thing to do now, I’ll jump right on the shaft of the blades, this postion will have least motion and you can avoid the blades . That’s it.

The second question, You need to check that your friend, Bob, has your correct phone number , but you cannot ask him directly. You must write the question on a card which and give it to Eve who will take the card to Bob and return the answer to you. What must you write on the card, besides the question, to ensure Bob can encode the message so that Eve cannot read your phone number? 

This is really an easy question ( at least I can do it ) , in term  of a programmer, I’ll use some hash function to compute the value of my number, in this way, I can check if Bob has the right number. So I’ll write some kind of hash function on card, then give Eve to take the card to Bob, then Bob will use this function to compute the value of the number he has , give that value back to me. I’ll check that and I can determine if he has got my right number. As easy as pie.

Haha, I don’t know if my answer satisfy Google employers  LOL