Feeds:
Posts
Comments

Archive for December, 2011

ref: http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=planApproach1

Here’s your first exercise: take any problem in the Practice Rooms that you
haven’t done. Fight through it, no matter how long it takes, and figure it
out (use the editorial from the competition as a last resort). Get it to
pass system tests, and then note how long you took to solve it. Next, clear
your solution out, and try to type it in again (obviously cutting and
pasting will ruin the effect). Again, get it to pass system tests. Note how
long it took you to finish the second time. Then, clear it out and do the
problem a third time, and again get it to pass system tests. Record this
final time.

The time it takes for your first pass is how long it takes you when you have
no expectations of the problem and no approach readily in mind. Your time
on the second pass is usually the first time minus the amount of time it
took you to understand the problem statement. (Don’t be surprised at the
number of bugs you’ll repeat in the second pass.) That final recorded time
is your potential, for you can solve it this fast in competition if you see
the correct approach immediately after reading it. Let that number encourage
you; it really is possible to solve some of these problems this quickly,
even without super fast typing ability. But what you should also learn from
the third pass is the feeling that you knew a working strategy, how the code
would look, where you would tend to make the mistakes, and so on. That’s
what it feels like to have the right approach, and that feeling is your goal
for future problems in competition.

In most martial arts, there’s a practice called kata where the martial
artist performs a scripted series of maneuvers in order, usually pretending
to defend (or sometimes actually defending) against an onslaught of fighters
, also scripted to come at the artist predictably. At first this type of
practice didn’t make any sense, because it didn’t seem realistic to the
chaotic nature of battle. Furthermore it seems to encourage the type of
pattern mining mentioned in the previous section. Only after triple-coding
many problems for a while can one comprehend the true benefit of this coding
kata. The kata demonstrates to its practitioners the mental experience of
having a plan, encouraging the type of discipline it takes to sit and think
the problem through. This plan of attack is your approach, and it carries
you through your coding, debugging, and submission.

非常好地揭示该怎么苦练。

Read Full Post »

 

– 即使你名花有主,我也要移花接木,行吗?

– 為什麼我這麼帥 難道是命運的安排?哦,我的天哪 每天都被自己帥醒 鸭梨真的好大!我急死了,我该怎么办?

– 住在我心里,你交房租了吗?

– 我颠倒了整个世界,只为摆正你的倒影。

– 等哥这次挣钱,咱买棒棒糖。买两根,一根你看着我吃,另一根,我吃给你看。

– 有福同享,有难同当。大大泡泡糖,迷你真知棒。

– 你不要这么悲观,用扯蛋的态度,面对操蛋的人生。那是行不通的。

– 如果不是哥长年潜水,变得这么有深度有内涵,早变成蝴蝶飞走了。

– 真相会让我们痛苦一阵,谎言会让我们痛苦一生。

Read Full Post »