Learn PYTHON the HARD WAY

文章目录

翻译:
如何学习任何编程语言 我将教你如何学习大多数你将来可能想学习的编程语言。本书的组织基于我和许多其他程序员如何学习新语言。这是我通常遵循的流程:

  1. 获取一本书或一些关于该语言的介绍性文本。
  2. 通读本书并输入所有代码,使其运行。
  3. 在编写代码的同时阅读本书并做笔记。
  4. 使用该语言用另一种语言实现一小组您熟悉的程序。
  5. 阅读其他人的语言代码,并尝试复制他们的模式。

在这本书中,我强迫你非常缓慢地、小块地完成这个过程。其他书籍的组织方式不同,这意味着您必须根据我让您这样做的方式推断其内容的组织方式。最好的方法是轻松阅读本书并列出所有主要代码部分。把这个清单变成一套基于章节的练习,然后按顺序做,一次一个。

上述过程也适用于新技术,假设他们有你可以阅读的书籍。对于没有书籍的任何事情,您都可以执行上述过程,但使用在线文档或源代码作为您的初始介绍。

您学习的每一种新语言都会使您成为更好的程序员,并且随着您学习的更多,它们变得更容易学习。通过你的第三种或第四种语言,你应该能够在一周内学会类似的语言,而陌生的语言则需要更长的时间。既然您了解了 Python,那么通过比较,您就有可能很快地学习 Ruby 和 JavaScript。这仅仅是因为许多语言共享相似的概念,一旦您在一种语言中学习了这些概念,它们就会在其他语言中起作用。

学习一门新语言要记住的最后一件事:不要做一个愚蠢的游客。一个愚蠢的游客是去另一个国家然后抱怨食物和家里的食物不一样的人。“为什么我不能在这个愚蠢的国家吃到好汉堡!?”当你学习一门新语言时,假设它的作用并不愚蠢——它只是不同——并接受它,这样你就可以学习它。
但是,在您学习一门语言之后,不要成为该语言做事方式的奴隶。有时使用一种语言的人实际上会做一些非常愚蠢的事情,除了“我们一直都是这样做的”之外,没有别的原因。如果你更喜欢你的风格并且你知道其他人是怎么做的,那么请随意如果事情有所改善,就打破他们的规则。

我个人真的很喜欢学习新的编程语言。我认为自己是一个“程序员人类学家”,并且认为它们是对使用它们的程序员群体的一点见解。我正在学习一种他们都用来相互交谈的语言计算机,我觉得这很有趣。再说一次,我是一个奇怪的人,所以只要你想学习编程语言就行了。
享受!这真是有趣的东西。

原文:
How to Learn Any Programming Language I’m going to teach you how to learn most of the programming languages you may want to learn in the future. The organization of this book is based on how I and many other programmers learn new languages. Here’s the process that I usually follow:

  1. Get a book or some introductory text about the language.
  2. Go through the book and type in all the code, making it run.
  3. Read the book as you work on the code, taking notes.
  4. Use the language to implement a small set of programs you are familiar with in another language.
  5. Read other people’s code in the language, and try to copy their patterns.

In this book,I forced you to go through this process very slowly and in small chunks. Other books aren’t organized the same way and this means you have to extrapolate how I’ ve made you do this to how their content is organized. Best way to do this is to read the book lightly and make a list of all the major code sections. Turn this list into a set of exercises based on the chapters and then simply do them in order, one at a time.

The above process also works for new technologies, assuming they have books you can read. Foranything without books, you do the above process but use online documentation or source code as your initial introduction.

Each new language you learn makes you a better programmer, and as you learn more, they become easier to learn. By your third or fourth language, you should be able to pick up similar languages in a week, with stranger languages taking longer. Now that you know Python, you could potentially learn Ruby and JavaScript fairly quickly by comparison. This is simply because many languages share similar concepts, and once you learn the concepts in one language, they work in others.

The final thing to remember about learning a new language: don’t be a stupid tourist.A stupid tourist is someone who goes to another country and then complains that the food isn’t like the food at home."Why can’t I get a good burger in this stupid country!?"When you’ re learning a new language, assume that what it does isn’t stupid-it’s just different-and embrace it so you can learn it.
After you learn a language though, don’t be a slave to that language’s way of doing things. Some-times the people who use a language actually do some very idiotic things for no other reason than "that’s how we’ ve always done it."If you like your style better and you know how everyone else does it, then feel free to break their rules if it improves things.

I personally really enjoy learning new programming languages.I think of myself as a "programmer anthropologist"and think of them as little insights about the group of programmers who use them.I’m learning a language they all use to talk to each other through computers, and I find this fascinating. Then again I’m kind of a weird guy, so just learn programming languages because you want to.
Enjoy! This is really fun stuff.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值