Skip to content

Learn Python The Hard Way #4

Open
microacup opened this Issue Mar 24, 2013 · 0 comments

1 participant

@microacup
Owner

最近得知一个很好的在线学习Python等的网站:http://learnpythonthehardway.org/ 中文名叫《笨办法学Python》

以动手实践为荣 , 以只看不练为耻;
以打印日志为荣 , 以单步跟踪为耻;
以空格缩进为荣 , 以制表缩进为耻;
以单元测试为荣 , 以人工测试为耻;

以模块复用为荣 , 以复制粘贴为耻;
以多态应用为荣 , 以分支判断为耻;
以Pythonic为荣 , 以冗余拖沓为耻;
以总结分享为荣 , 以跪求其解为耻;

何为“ Hard Way ”?有这么三点:

1. Go through each exercise.
2. Type in each sample exactly.
3. Make it run.

刚开始会有些困难,但要坚持下去,打好基础,学到的不仅仅是这本语言而已。

尤其重要的一点:

Do Not Copy-Paste!

必须逐字逐句手工敲打,如果复制粘贴很容易想当然,练习的要点是锻炼你的手指,大脑和思维。学会如果去读、写、看代码。如果你复制粘贴,你就是在欺骗自己。

比胖子更可恶的是懒惰的胖子!!!

牢记python哲学:
import this

Beautiful is better than ugly. 
Explicit is better than implicit. 
Simple is better than complex. 
Complex is better than complicated. 
Flat is better than nested. 
Sparse is better than dense. 
Readability counts. 
Special cases aren’t special enough to break the rules. 
Although practicality beats purity. 
Errors should never pass silently. 
Unless explicitly silenced. 
In the face of ambiguity, refuse the temptation to guess. 
There should be one– and preferably only one –obvious way to do it. 
Although that way may not be obvious at first unless you’re Dutch. 
Now is better than never. 
Although never is often better than *right* now. 
If the implementation is hard to explain, it’s a bad idea. 
If the implementation is easy to explain, it may be a good idea. 
Namespaces are one honking great idea — let’s do more of those! 

– by Tim Peters

@microacup microacup was assigned Apr 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.