Skip navigation

Sign up | Lost password? | Help

Green Beret(绿色贝蕾帽)

【转】My Top Ten Tips on how to become a Rockstar Programmer

说的经典啊

You will notice that there are no micro coding tips&tricks below. No info on how to make a fast for loop or such. The tips I post is what I think you should do to learn how to learn those tricks for yourself. In all, this list is a little softer around the edges and goes mostly for the background things.

Most noticeably you will see things that are totally opposite to what most recognized people say about how to code. This is probably because there is actually a difference in target audience. This is about you , and how you should become a great coder, maybe even a rock star coder! They often say how you should do to write good and portable code that other coders can understand and maintain.

#1 Do development on a fast computer
Wicked fast even. Compiling should take at most a couple of seconds so that you do this often. In fact what is most important is how long it takes from you hitting that Run Project short key until your application shows up. The lesser the time the more you will run the application and the more keen you will be to try new things, which is how you learn. If running takes too long you will go for, not safer, but code you know to work, and you will evolve more slowly. A good advice is also to keep a crappy computer around for testing. Your GUI might feel snappy on your super fast developer monster machine, but your customers might not be so lucky as to have one of those.
#2 Use a big TFT screen
Code is talking to you in more than characters. With a bigger screen you will get more overview and this helps your right side brain into the game. You will see patterns more clearly and you can see the structure of a whole method and not just parts of it. You should have such a big screen that your methods will fit, in most cases, on one page. Eyes move fast, editor scroll panes do not. I use a 30 inch Apple CinemaDisplay and a 20 inch Dell rotated 90 degrees as a second debugging monitor.
#3 Learn your IDE
It matters less what IDE you use, today they are all above the good enough bar. Be ashamed every time you do something in a way you know you can do faster another way. Learn a new feature of your IDE until you have learned them all, or at least learned enough. Use short keys but don't over exaggerate. Be super lazy and create short cuts for everything you do. All to keep down the waiting time and minimizing the most important code-to-show time.
#4 Don't learn APIs too well
The APIs might change and/or you might start to use another API. Learn how to find information about the APIs really fast. Use your IDE for this where appropriate. Use JavaDoc for your own code and mount the JavaDocs in your projects for imported APIs. Knowing how to find information is good for everything, storing APIs in brainRAM is bound to get old. If for instance you don't use some sort of parameter help/completion you have a long walk ahead.
#5 Write smart cool compressed code constructs
And test them thoroughly! You will learn what works and what don't. You will evolve, not to use the smartest and coolest code, but in terms of knowing that smart code constructs is seldom the way of the rock star programmer, other than for showing off. Less code, in a smart way, means less to maintain. Over-smart code that is just for show will make your fellow code maintainers put "fart bags" on your chair just when the new super-hottie from the Rocket Scientists Department comes over to ask you a question (which would be a bad thing).
#6 Read books
You might be good at what you do, but knowing only that, whatever it may be, is seldom enough to really shine. Knowing enough about more fields than the field you are about to shine in is golden. Take for instance a GUI coder that knows nothing about databases. He might be almost useless since he can't interact with the guy doing the backing store, and so on. It takes as much effort to be 90% good in five fields than to be 99% good one one.
#7 Go back and enhance your old code
Not that it is sound from an economical point of view but because you learn oodles of things reading you own crap, which old code always is. Code gets rotten after a couple of years, it really does, since you evolve. If you can't find bad things in your old code you either already are a rock star programmer, or maybe more probable, hasn't evolved much lately.
#8 Eat your own dog food!
If you create APIs, create some applications using that API. If you create applications, ask your friends/wife(s)/husband(s)/children to try it. Don't say you did it; say that your crappy no-good overpaid work mate did it, so you get some honest feedback. Honest feedback is golden.
#9 Don't ask people for advice
Learn how to get that answer yourself instead, it is way more useful. Finding out how to get information about something is a value in itself and may pay you back more than the solution to the problem in the first place. Ask only if you must or if the question in itself is more a discussion and you are actually spreading information. Of course you shouldn't take this too literally, but I see lots of people asking pointless questions they could have found out faster by ten seconds of googling.
#10 Do micro benchmarks
But know that they are useless for almost all purposes in the real world. It will increase your knowledge about performance though, and next time you have a higher probability of choosing the fastest construct for new code. Don't do premature code optimization but learn how to write fast code from the start, without sacrificing readability.
#11 And last...
Eat right, exercise more, don't drink too much coffee, and all that other crap that matter more than you think, but you won't do because I said so. :smile:


Have you got things to share?

Cheers,
Mikael Grev

[转贴]Google被封的事实与猜测

大事记录!!!


摘自:
http://www.zhongguotese.net/2009/google%E8%A2%AB%E5%B0%81%E7%9A%84%E4%BA%8B%E5%AE%9E%E4%B8%8E%E7%8C%9C%E6%B5%8B.html



2009年6月24日夜晚,从Twitter上传来Google被封的消息,当时我还在地铁上,只能用手机确认,cmwap连接下,www.google.com (以下简称google)无法访问。

回到家后立刻进行了测试,结果如下:

1.google无法访问
2.本地(广州电信)DNS无法解析google域名,返回null
3.经过GFW,从国外一DNS也无法得到google的IP,返回也是null
4.使用已知的Google IP (74.125.127.160) 直接访问正常
5.使用已知的IP修改Hosts文件,google无法访问
6.同时,mail.google.com 在ssl连接下访问正常,域名解析正常
7.打开VPN后,除了2,其他的都回归正常。并且在百度搜索 www.google.com 被重置连接。
由以上事实可以推断:此次对Google的屏蔽是URL黑名单和DNS投毒并举。

=========== 猜测从这里开始 ===========

此次对Google的封锁是GFW自主学习的结果。
关于GFW的自主学习坊间早有传言,证据之一是经常有流量突增的国外站点被屏蔽掉。
Google原本享受的屏蔽就比较高级,撞墙以后要5分钟才会恢复。此次误封(存疑),一方面是因为六四刚过,GFW的警戒等级尚未调低,另一方面因为CCTV曝光谷歌事件导致原来一部分谷歌的流量转向了Google,加之上Google搜索敏感词的人比率不低,所以Google被GFW自动屏蔽了。
至于说误封,因为在一个小时之内,我从广州电信又能解析到Google的域名,而且可以正常访问。但也不能排除是GFW工作人员手欠或是试探民意。

=========== 猜测到这里结束 ===========

DNS投毒?
DNS投毒和URL或IP黑名单比起来,算是比较新的封锁技术。
通过返回一个TTL长达一天的假IP,该技术可以保证即使在开了代理的情况下,用户仍然无法访问到正确的网站。即便使用openDNS,GFW仍可能伪造解析结果,并且它甚至不需要保证100%成功。因为一般正常的TTL不会太久,Twitter的TTL就只有30秒(可能是平衡负载的需要)。因此,即使你这30秒能访问twitter,也许下次就会收到一个TTL长达一天的假IP。然后你的电脑缓存此结果,正巧,Windows的默认设置最长的TTL也是一天。如果你什么都不做,那么一天以内你就别想登录twitter了。

DNS缓存?
DNS缓存有很多层级的。仅从本机来看,都不是一层那么简单。
Hosts文件可以看成最基础的DNS缓存,只要是在这个文件中记录的域名,系统就不会向网络上的DNS请求解析,因此在这里设置正确的域名解析结果是万无一失的办法,只是十分麻烦。
往上一层是DNS Cache,Vista下可以看到这个服务。重启该服务可以清空DNS缓存,在命令行下进行ipconfig /flushdns 也是一样的效果。
有的应用程序会有自己的DNS缓存,如Firefox的about:config有一项为network.dnsCacheEntries,这个控制缓存的数量,设为零后会清空。(有人反映没有这一项,可以自己新建一个试试。)

今天晚上9点过左右,google.com及其相关域名全被河蟹!

上来记录历史事件!

今天晚上9点过左右,
google.com及其相关域名全被河蟹!
google.cn可以用。

破网发现,google.com可以搜出大量敏感词语,这在以前是不行的
google.cn还是老样子

ps:给party致以最纯正的鄙视!:down:

2009年高考江苏零分作文《品味时尚》

再贴一片,写的很时尚!

我承认当我看到这个题目时,我湿了,我慢慢的背过脸用手偷偷轻轻地擦掉眼角的泪水。因为我知道,人人都要参加高考,不是因为高考适合自己的兴趣,而只是因为大家都是如此。眼泪是为大家流的。
不知道哪个可爱的老师出的这个题目,我们猜了几个月题,从去年的奥运会、5.12,直到邓玉娇、立交桥、70码、公交车......我思绪翻滚,又回到了每个猜题的夜晚。"我猜,我猜,我猜猜猜",在全班88名同学近乎疯狂的呐喊中,我们在语文老师的带领下象买彩票一样,精心的挑选着每一个作文题目。老师说要猜对了,多十几分,"本一"就可能向我们扬起它可爱的小手。

我本是一个有文化有素质有修养的非著名三好学生,尊师重教一直在我身上得到充分发扬,这次我忍不住了,我想问候老师您一下,当然只是问候您一个人,不包括呕心沥血教育我们的老师。亲爱的出题老师:

我不知道"三点一线"的高中生活能有多少时间去品味时尚?我想大概也许出这个题目的我们尊敬的老师你的脑袋让门挤了?让驴踢了?进水了?结冰了?短路了?不管怎样,肯定是脑残了。莫非脑残也成为了一种时尚?

政治课上邓爷爷一直对我们说要"实事求是"。尊敬的出题老师,我实事求是地对你说:你的题目让我很纠结,纠结!纠结到蛋疼!蛋疼你明白吗?这也是一种时尚。

你让我们整天埋头苦读,面对着一堆堆模拟试卷的孩子去"品味时尚",打个比方,这不是和让太监去看A片一样?A片你懂吗?东京热,一本道......这个都不懂,你还谈什么时尚?

我们也想时尚,可没钱没时间怎么时尚?难道我们忍心从辛辛苦苦供我们上学的爹娘哪里一次次讨钱,去买阿迪王?

2009年北京高考作文 《我有一双隐形的翅膀》

高考被给了零分,渴望自由的人都会给此文满分!


我曾是一只鸽子,是千万鸽群中的一只。

这一年,我有一对洁白的羽翼,日渐茁壮,眼看就快要长成,开始了扑翅。每次稚嫩的扑腾都是向天空倾诉飞翔的渴望。那一天呵,跃跃欲试的我和伙伴们聚在金色的广场上,期待着去探索蓝色海洋的首次飞行。

那一夜,自称是养育我们的主人来了,带着那些可怕的工具。他们轻而易举地,用鸟枪和渔网,捉住了我们,剪去了我们的翅膀,让大地上落下无数洁白飞羽。从此我们无法离开沉重的地面,只能做他们玩赏的点缀。我们身体孱弱,我们步履艰难。我们失去了自由,只能任人宰割。可是我高傲的羽族呵,我苦难的兄弟,你又怎么能被剥夺最珍贵的----自由?

看哪,时光流逝,我们中有的堕落成了鹦鹉,他们竟向主人赏的玉米粒唱赞歌;另一些兄弟们沉沦了,忘记了自己曾经有过飞翔的双翼,到处和母鸡调情。还有一些同类在主人的淫威底下,已经像呆鹅一样麻木;最令我伤心的,有的同类在各种意外中被失去了年轻的生命,多少次被一辆辆跑车碾得毛羽纷纷。而我只能傻傻地看着,默默流泪。如果我们还有翅膀呵,怎会不摆脱这一切,高高翱翔?

你看,最后甚至我自己,目睹了这一切之后,如蚂蚁一般沉默地死去了。想要飞翔,然而结果却是爬到死去为止,这就是我们的命运!我还看明白了,我的尸体将成为主人的盘中美餐。懂得这一切之后,我祈祷自己来生要化为鹰隼,振翼高飞罗网之外,乘风远翔黑云之上,我要请神赐予我利喙和尖爪,让我呼啸着,扯破这不可忍受的暗夜!一个声音对我说:要飞翔,要飞翔,要让大家自由地飞翔!

对飞翔的渴望让我重生,但没有变成鹰隼,也非别的羽族,而居然变成一只蜘蛛。最可怕的是,我再也不能够飞翔,只能躲在角落里结网。我绝望了,也放弃了。可是一天,一个朋友出现了,他从另一张网上传来波动。轻轻地说:你好!

呵!看哪,千千万万只转生为蜘蛛的昔日鸽儿呵,现在在编织着同一张连接整个世界的网络。从丝缕脉动中,我能听到大地的心跳,也能知晓小草的呼吸,能感到大洋彼岸的涛声,也知道世界屋脊上的雪落。而只要敲击同一张网络上我们编织的节点,我们也能向世界发出自由网络自身的呼喊:wir sind!

为了自由,我们宁愿选择作为蜘蛛而生存。无论什么力量,也无法阻拦无边网络的脉动,既那么细微,又那么澎湃。更重要的是,这也让我能发现昔日主人的恐惧,在无边网络中,他们看不见,也捉不住我们中的大多数。他们纵使出钳断蛛丝的河蟹,我们便将蛛网化为千万令人费解的绕指柔,让它无计可施;若派来蟑螂和婺蝥,我们便把它们粘死在网上。即使是主人,也会被万千迷网重重困住,精疲力竭。我们的未来,将像传说中的那位蜘蛛侠客那样,再也不会被地面束缚,而是用喷涌的蛛丝,拥抱着同一个世界,同一个梦想。在天地间自由翱翔,胜过了世间的君王。

是的,网络就是我隐形的翅膀。你有这双翅膀么?

freegate6.79发布

做个记录,现在封锁很紧,年关了呀。

2008年5月12日,死神来了!


时间:公元2008年5月12日14:28分
地点:家里
事件:地震洗礼

很多和我一起尽力过这次刻骨铭心的灾难的人,一定一辈子都不会忘记以上的“三要素”!:frown:
话说我正在专心致志的“研究”着股市行情p: ,突然听到门剧烈的响动:confused: ,偶第一反应是谁这么没礼貌,砸门啊?:furious: 我站起来正要去看门,就发现电脑屏幕,桌子开始晃动,awww ,随后感到地板也开始抖动,站立困难。:eek:
一个词飞快的闪过我的脑子 --“地震”:no: :ko: 苍天啊,成都居然会有地震?:faint: :faint:
抖动越来越强烈,我想跑来着,可是在七层啊,没准刚跑到楼梯中央就塌了,我岂不被活埋?:insane: 遂抓起一个座垫就往厕所里躲,蹲在地上,捂住头部,上帝啊,让这一切都快点结束吧:chef: :zzz: 。真是“心随地动”啊,可怕的剧烈震动持续了大概1分多钟,一切恢复平静,可家里早已是一片狼藉,已顾不得其他,穿上鞋子、披上外衣就冲到楼下。。。。。。。。。
额滴神呀,第一次被死神“轻吻”,足矣,足矣!!:faint:
比起重灾区,成都市区算是很幸运的了,有惊无险!
抗震救灾才刚刚开始,灾区朋友需要我们的帮助:knight: ,为他们做点力所能及的事,天佑中华,为他们祈福!:heart:

轻轻地我mark下,正如我轻轻地来,敲一敲键盘,不惊动每一位博友。飘走~bye

给大家拜年了

前些日子真是忙的不可开交,一直没有机会上来灌水,不知道大家过得可好呀。
快过年了,在此新春佳节之际,我仅代表我个人向各位坚守在opera blog的朋友们致以亲切的问候和崇高的敬意。
过年好,大家一帆风顺,恭喜发财!!
祝大家在2008年里有


"鼠"不尽的快乐!
"鼠"不尽的收获!
"鼠"不尽的钞票!
"鼠"不尽的笑容!
"鼠"不尽的幸福!
"鼠"不尽的朋友!
"鼠"不尽的喜气!
"鼠"不尽的财富!
"鼠"不尽的甜蜜!
"鼠"不尽的激情!
"鼠"不尽的活力!
"鼠"不尽的健康!
"鼠"不尽的荣誉!

“烧钱”的滋味

就在刚才,无聊时用手机收听了到了一个当地电台的叫什么《奥运猜猜猜》节目,说白了就是热线竞猜。我起初还是听着玩儿,后来听到一个题目,我知道答案就参加进去了。:chef: 手机拨热线,3元/分。连接到主持人哪儿还需要抢线,遂狂抢之,但一直失败。
那些抢先成功的人统统答错,奖金也一直累加!:eyes: 当累加到1500元,在主持人的不断提示下终于有人答对了,:sing: 此刻我的耳边也传来了移动小姐清脆的声音:“对不起,你的电话已欠费。”:no:
后来一查花费,烧了103元,-35块:cry: :cry: ,原来“败家”这么爽啊:faint:
看来真要好好BS自己一下了,叹哉 -- 我猜对了开头,却没有猜对结尾。:ko:

找到家的随写 (freegate破网无处不在)

国内的朋友苦于不能找到家,一个简单的方法常上来看看,不怕封锁,永远找到家:D


访问网页https://www.google.com/reader/view/feed/http://qxbbs.org/qxdailynews.xml点击任何一个加密代理



找到fg的家,然后下载破网软件,轻轻松松连上来。还有可以看看其他的破网软件和技术,做到触类旁通P:

ps:
web代理也可以上来,不过速度实在是有点慢,而且发帖经常出问题:faint: