- // summary:
// Class used to work around Richard being a
// fucking idiot
//
// remarks:
// The point of this is to work around his poor
// design so that paging will
// work on a mobile control. The main problem is the
// BindCompany() method,
// which he hoped would be able to do everything.
// I hope he dies. - // I dedicate all this code, all my work, to my wife,
// Darlene, who will
// have to support me and our three children and the
// dog once it gets
// released into the public. - // Magic. Do not touch.
- return 1; # returns 1
- /*
* This is O(scary), but seems quick enough
* in practice.
*/ - /*
* You may think you know what the following code does.
* But you dont.
* Fiddle with it, and youll spend many a sleepless
* night cursing the moment you thought youd be clever
* enough to "optimize" the code below.
* Now close this file and go play with something else.
*/ - // When I wrote this, only God and I understood what
// I was doing
// Now, God only knows - // This is craptacular!
- And finally, there is no one comes as close as this. The only comments in a big chunk of complicated codes are:
...
// Trust me
Showing posts with label Computer. Show all posts
Showing posts with label Computer. Show all posts
Friday, May 15, 2009
Comments in Source Codes
Reading source codes is a lot of fun, especially when you are reading other guys' codes...
Sunday, May 3, 2009
Microsoft Windows 98 比较烦
最近比较烦,比较烦,比较烦总觉得日子过的有一些极端,
我想我还是不习惯,从 Beta1 到中文正式版。
最近比较烦,比较烦,比较烦,总觉得启动一天比一天变慢,
朋友常常有意无意调侃,我也许有天该去找找微软。
最近比较烦,比较烦,比较烦,我看那帮助怎么也看不到岸,
看看系统莫名其妙的警告,找个不占资源的菜单是越来越难。
最近比较烦,比较烦,比较烦,陌生的界面哪个是我的期盼,
离开了提示的菜单,现在的我更觉得头脑简单。
最近比较烦,比较烦,比较烦,系统说你的 200 该换成 P3,
我问老段说没钱该怎么办,他说基本上这个很难。
最近比较烦,比你烦,也比你烦,我梦见和比尔·盖茨一起晚餐,
梦中的餐厅灯光太昏暗,我偏寻不着想扔他的臭鸡蛋。
人生总有远的近的麻烦,98 总嫌我的芯片太慢,
朋友说你的配置现在太烂,虽然我已换了两次主板。
管它什么天大麻烦,久而久之我会习惯,天下没有不死机的微软。
有天发现我的文件变的很短,原来它在吞噬我的硬盘,
内存太少运行起来很慢,任务太多死机变的频繁。
麻烦,麻烦,麻烦,麻烦,麻烦,我很麻烦,麻烦,麻烦,麻烦。
最近比较烦,比较烦,比较烦,我的硬盘只有原来的一半,
想装的程序排的太满,推荐的配置有些高不可攀。
最近比较烦,比较烦,比较烦,我不仅心烦还有点混乱,
发热的机箱让我觉得温暖,内存不够是我最大的负担。
我想我还是不习惯,从 Beta1 到中文正式版。
最近比较烦,比较烦,比较烦,总觉得启动一天比一天变慢,
朋友常常有意无意调侃,我也许有天该去找找微软。
最近比较烦,比较烦,比较烦,我看那帮助怎么也看不到岸,
看看系统莫名其妙的警告,找个不占资源的菜单是越来越难。
最近比较烦,比较烦,比较烦,陌生的界面哪个是我的期盼,
离开了提示的菜单,现在的我更觉得头脑简单。
最近比较烦,比较烦,比较烦,系统说你的 200 该换成 P3,
我问老段说没钱该怎么办,他说基本上这个很难。
最近比较烦,比你烦,也比你烦,我梦见和比尔·盖茨一起晚餐,
梦中的餐厅灯光太昏暗,我偏寻不着想扔他的臭鸡蛋。
人生总有远的近的麻烦,98 总嫌我的芯片太慢,
朋友说你的配置现在太烂,虽然我已换了两次主板。
管它什么天大麻烦,久而久之我会习惯,天下没有不死机的微软。
有天发现我的文件变的很短,原来它在吞噬我的硬盘,
内存太少运行起来很慢,任务太多死机变的频繁。
麻烦,麻烦,麻烦,麻烦,麻烦,我很麻烦,麻烦,麻烦,麻烦。
最近比较烦,比较烦,比较烦,我的硬盘只有原来的一半,
想装的程序排的太满,推荐的配置有些高不可攀。
最近比较烦,比较烦,比较烦,我不仅心烦还有点混乱,
发热的机箱让我觉得温暖,内存不够是我最大的负担。
Friday, April 10, 2009
Three principles learned from Coding Gurus
The practical lore of good coding is often passed down slowly in the ritualistic tribal dances of software architects, project leads, analysts, and more experienced programmers. However, these three handy principles serves all the programmers who want a comprehensive, easy-to-use guide to software development:
- Don't trust retellers, get hold of the original sources - Importance of Original Knowledge
A new monk arrived at the monastery. He was assigned to help the other monks in copying the old texts by hand. He noticed, however, that they were copying copies, not the original books. The new monk went to the head monk to ask him about this. He pointed out that if there were an error in the first copy, that error would be continued in all of the other copies.
The head monk said, 'We have been copying from the copies for centuries, but you make a good point, my son.' The head monk went down into the cellar with one of the copies to check it against the original.
Hours later, nobody had seen him, so one of the monks went downstairs to look for him. He heard a sobbing coming from the back of the cellar and found the old monk leaning over one of the original books, crying.
He asked what was wrong.
"The word is 'celebrate,' not 'celibate'!" sobbed the head monk. - A real programmer always takes care of both "if" and "else" cases. So should we - The knowledge of What if "else"
Before going to bed a programmer puts on his night stand two glasses: one with water and one empty. When his wife asked him "why?" he said:
"One with water is there in case I wake up at night and I feel thirsty".
"How about the other one?" - still not getting the point asked his wife.
"Oh! This is in case I wake up at night and I am not thirsty!" - replied the programmer. - Don't get trapped in infinite loops. Always provide an exit condition - Knowledge to know where to stop
A programmer didn't show at work on Monday. After three days of not having any news from him his colleagues started to worried and have decided to go visit his place to see what could happen.
After 30 minutes of ringing the bell and knocking the door, they broke into his house and found him in a bath tub, sitting in cold water, absolutely bold staring at an empty shampoo bottle that he held in his hand. He didn't reply any question his friends were asking him, nor even noticed their presence. He simply was continuing looking at the shampoo bottle label in a manner of zombie.
When his friends managed to take this bottle out of his stark hands, they could read the following instruction: "Pour a small amount of shampoo on a palm of your hand, work through wet hair. Rinse. Repeat."
Theory and Practice in I.T.
In theory, theory and practice are the same. In practice, they are not.
- In Theory: everything is clear, but nothing works;
- In Practice: everything works, but nothing is clear;
- Sometimes Theory meets Practice: nothing works and nothing is clear.
Subscribe to:
Posts (Atom)