深度学习去燥学习编码_当我学习如何编码时,我希望别人告诉我的事情

深度学习去燥学习编码

by Cecily Carver

塞西莉·卡佛(Cecily Carver)

当我学习如何编码时,我希望别人告诉我的事情 (Things I Wish Someone Had Told Me When I Was Learning How to Code)

我从教别人中学到的东西 (And what I’ve learned from teaching others)

在你学会代码,想想你要什么 (Before you learn to code, think about what you want to code)

Knowing how to code is mostly about building things, and the path is a lot clearer when you have a sense of the end goal. If your goal is “learn to code,” without a clear idea of the kinds of programs you will write and how they will make your life better, you will probably find it a frustrating exercise.

知道如何编码主要与构建事物有关,当您对最终目标有所了解时,路径会更加清晰。 如果您的目标是“学习编码”,但对您将编写的程序类型以及如何使您的生活变得更好的认识不清,您可能会发现它令人沮丧。

I’m a little ashamed to admit that part of my motivation for studying computer science was that I wanted to prove I was smart, and I wanted to be able to get Smart Person jobs. I also liked thinking about math and theory (this book blew my mind at an impressionable age) and the program was a good fit. It wasn’t enough to sustain me for long, though, until I found ways to connect technology to the things I really loved, like music and literature.

我有点as愧地承认,我学习计算机科学的部分动机是,我想证明自己很聪明,并且希望能够获得聪明的人工作。 我也喜欢思考数学和理论( 这本书在一个令人印象深刻的年龄就让我大吃一惊),并且该程序非常适合。 但是,这还不足以维持我很长一段时间,直到我找到将技术与我真正喜欢的事物(例如音乐和文学)联系起来的方法。

So, what do you want to code? Websites? Games? iPhone apps? A startup that makes you rich? Interactive art? Do you want to be able to impress your boss or automate a tedious task so you can spend more time looking at otter pictures? Perhaps you simply want to be more employable, add a buzzword to your resume, or fulfill the requirements of your educational program. All of these are worthy goals. Make sure you know which one is yours, and study accordingly.

那么,您想编码什么? 网站? 游戏? iPhone应用程序? 一家能让您致富的创业公司? 互动艺术? 您是否想打动老板或完成繁琐的任务,以便您可以花更多时间看水獭图片? 也许您只是想提高自己的就业能力,在简历中加个时髦的字眼,或者满足教育计划的要求。 所有这些都是值得的目标。 确保您知道哪个是您的,并相应地学习。

没什么神秘的 (There’s nothing mystical about it)

Coding is a skill like any other. Like language learning, there’s grammar and vocabulary to acquire. Like math, there are processes to work through specific types of problems. Like all kinds of craftsmanship and art-making, there are techniques and tools and best practices that people have developed over time, specialized to different tasks, that you’re free to use or modify or discard.

编码是一项与其他技术一样的技能。 就像语言学习一样,语法和词汇也要学习。 像数学一样,有些过程可以解决特定类型的问题。 像所有的手Craft.io和艺术制作一样,随着时间的推移,人们已经开发出专门针对不同任务的技术,工具和最佳实践,您可以自由使用,修改或丢弃。

This guy (a very smart guy! Whose other writings I enjoy and frequently agree with!) posits that there is a bright line between people with the True Mind of a Programmer and everyone else, who are lacking the intellectual capacity needed to succeed in the field. That bright line consists, according to him, of pointers and recursion (there are primers here and here for the curious).

这个人 (一个非常聪明的人!我喜欢并经常与他人分享的其他作品!)认为,拥有程序员“真心”的人与其他人之间缺乏明晰的界限,他们缺乏成功实现编程的知识能力。领域。 根据他的观点,这条亮线包括指针和递归( 这里这里有一些好奇的入门书)。

I learned about pointers and recursion in school, and when I understood them, it was a delightful jolt to my brain — the kind of intellectual pleasure that made me want to study computer science in the first place. But, outside of classroom exercises, the number of times I’ve had to be familiar with either concept to get things done has been relatively small. And when helping others learn, over and over again, I’ve watched people complete interesting and rewarding projects without knowing anything about either one.

我在学校里了解了指针和递归,当我理解它们时,这真是令人振奋的激动-一种智力上的愉悦,使我首先想学习计算机科学。 但是,在课堂练习之外,我必须熟悉这两个概念才能完成工作的次数相对较少。 当我一遍又一遍地帮助他人学习时,我已经看到人们在不了解任何一个项目的情况下完成了有趣而有意义的项目。

There’s no point in being intimidated or wondering if you’re Smart Enough. Sure, the more complex and esoteric your task, the higher the level of mastery you will need to complete it. But this is true in absolutely every other field. Unless you’re planning to make your living entirely by your code, chances are you don’t have to be a recursion-understanding genius to make the thing you want to make.

被吓到或想知道自己是否足够聪明毫无意义。 当然,您的任务越复杂和深奥,您完成任务所需的掌握水平就越高。 但这绝对在其他所有领域都是如此。 除非您打算完全依靠代码来谋生,否则您不必成为了解递归的天才就可以创建自己想要的东西。

第一次没用 (It never works the first time)

而且可能不会第二次或第三次 (And probably won’t the second or third time)

When you first start learning to code, you’ll very quickly run up against this particular experience: you think you’ve set up everything the way you’re supposed to, you’ve checked and re-checked it, and it still. doesn’t. work. You don’t have a clue where to begin trying to fix it, and the error message (if you’re lucky enough to have one at all) might as well say “fuck you.” You might be tempted to give up at this point, thinking that you’ll never figure it out, that you’re not cut out for this. I had that feeling the first time I tried to write a program in C++, ran it, and got only the words “segmentation fault” for my trouble.

刚开始学习编码时,您会很快遇到这种特殊的体验:您认为已经按照应有的方式设置了所有内容,已经检查并重新检查了代码,而且仍然如此。 不。 工作。 您没有从哪里开始尝试进行修复的线索,并且错误消息(如果您很幸运地拥有一个)可能会说“操您”。 在这一点上,您可能会想放弃,以为您永远都不会想出来,因为您没有为此而努力。 第一次尝试用C ++编写程序并运行它时,我有种感觉,因为遇到麻烦,我只得到了“ segmentation fault”字样。

But this experience is so common for programmers of all skill levels that it says absolutely nothing about your intelligence, tech-savviness, or suitability for the coding life. It will happen to you as a beginner, but it will also happen to you as an experienced programmer. The main difference will be in how you respond to it.

但是这种经验对于所有技能水平的程序员都是如此普遍,以至于它完全没有说明您的智能,技术娴熟或对编码寿命的适用性。 作为一个初学者,它会发生在您身上,但作为一个经验丰富的程序员,它也会在您身上发生。 主要区别在于您对此的React方式。

I’ve found that a big difference between new coders and experienced coders is faith: faith that things are going wrong for a logical and discoverable reason, faith that problems are fixable, faith that there is a way to accomplish the goal. The path from “not working” to “working” might not be obvious, but with patience you can usually find it.

我发现,新编码人员和经验丰富的编码人员之间的最大区别是信念:对因逻辑和可发现的原因而出错的信念,对问题可以解决的信念,对实现目标的方法的信念。 从“不工作”到“工作”的路径可能并不明显,但是通常您可以耐心地找到它。

有人会总是告诉你你做错了 (Someone will always tell you you’re doing it wrong)

Braces should go on the next line. Braces should go on the same line. Use tabs to indent. But tabs are evil. You should use stored procedures, but actually you shouldn’t use them. You should always comment your code. But good code doesn’t need comments.

大括号应该放在下一行大括号应该在同一行上使用制表符缩进但是标签是邪恶的 。 您应该使用存储过程 ,但实际上不应该使用它们 。 您应该始终注释您的代码 。 但是好的代码不需要注释

There are almost always many different approaches to a particular problem, with no single “right way.” A lot of programmers get very good at advocating for their preferred way, but that doesn’t mean it’s the One True Path. Going head-to-head with people telling me I was Wrong, and trying to figure out if they were right, was one of the more stressful aspects of my early career.

针对特定问题,几乎总是有许多不同的方法,而没有单一的“正确方法”。 许多程序员擅长倡导他们偏爱的方式,但这并不意味着这是唯一的道路。 与人们面对面地告诉我我错了,并且试图弄清楚他们是否正确,这是我早期职业生涯中压力最大的方面之一。

If you’re coding in a team with other people, someone will almost certainly take issue with something that you’re doing. Sometimes they’ll be absolutely correct, and it’s always worth investigating to see whether you are, in fact, Doing It Wrong. But sometimes they will be full of shit, or re-enacting an ancient and meaningless dispute where it would be best to just follow a style guide and forget about it.

如果您与其他人一起在团队中编码,那么几乎可以肯定有人会对您正在做的事情产生疑问。 有时它们是绝对正确的,值得一查,看看您实际上是否做错了。 但是有时它们会变得无所适从,或者重新制定古老而毫无意义的争议,在这种情况下,最好只是遵循样式指南,而不必理会它。

On the other hand, if you’re the kind of person who enjoys ancient but meaningless disputes (grammar nerds, I’m looking at you), you’ve come to the right place.

另一方面,如果您是那种喜欢古老却毫无意义的争论的人(我喜欢语法书呆子,我在看着您),那么您来对地方了。

有人会总是告诉你你不是一个真正的编码员 (Someone will always tell you you’re not a real coder)

HTML isn’t real coding. If you don’t use vi, you’re not really serious. Real programmers know C. Real coders don’t do Windows. Some people will never be able to learn it. You shouldn’t learn to code. You’re not a computer programmer (but I am).

HTML不是真正的编码如果您不使用vi,那么您就不是很认真真正的程序员知道C。 真正的编码员不使用Windows。 有些人将永远无法学习它您不应该学习编码您不是计算机程序员(但我是)

“Coding” means a lot of different things to a lot of different people, and it looks different now from how it used to. And, funnily enough, the tools and packages and frameworks that make it faster and easier for newcomers or even trained developers to build things are most likely to be tarred with the “not for REAL coders” brush. (See: “Return of the Real Programmer”)

“编码”对许多不同的人而言意味着许多不同的事物,并且现在看起来与以前不同。 而且,很有趣的是,使新手甚至受过培训的开发人员构建起来更快,更容易的工具,软件包和框架很可能会被“不适用于REAL编码器”刷掉。 (请参阅:“ 真正的程序员的回报 ”)

Behind all this is the fear that if “anyone” can call themselves a programmer, the title will become meaningless. But I think that this gatekeeping is destructive.

所有这些背后的原因是担心, 如果“任何人”都可以称自己为程序员,那么标题将变得毫无意义 。 但是我认为这种看门是破坏性的。

Use the tools that make it easiest to build the things you want to build. If that means your game was made in Stencyl or GameMaker rather than written from scratch, that’s fine. If your first foray into coding is HTML or Excel macros, that’s fine. Work with something you feel you can stick with.

使用最容易构建想要构建的东西的工具。 如果那意味着您的游戏是用Stencyl或GameMaker制作的,而不是从头开始编写的,那很好。 如果您第一次尝试编码是HTML或Excel宏,那很好。 处理您认为可以坚持的东西。

As you get more comfortable, you’ll naturally start to find those tools limiting rather than helpful and look for more powerful ones. But most of the time, few people will ever even look at your code or even ask what you used — It’s what you make with it that counts.

随着您变得更加舒适,您自然会开始发现那些限制而不是有用的工具,并寻找功能更强大的工具。 但是在大多数情况下,很少有人会看您的代码,甚至不问您使用了什么,这是由您创造出来的。

担心“怪胎信用”会慢慢杀死你 (Worrying about “geek cred” will slowly kill you)

See above. I used to worry a lot, especially in school, about whether I was identifying myself as “not a real geek” (and therefore less worthy of inclusion in tech communities) through my clothing, my presentation, my choice of reading material and even my software customization choices. It was a terrible waste of energy and I became a lot more functional after I made the decision to let it all go.

往上看。 过去,尤其是在学校里,我经常担心自己是否通过穿着,演讲,选择阅读材料甚至是将自己确定为“不是一个真正的怪胎”(因此不太值得融入科技社区)。软件定制选择。 这是一种可怕的能源浪费,在我决定放弃一切之后,我变得更加机能。

You need to internalize this: your ability to get good at coding has nothing to do with how well you fit into the various geek subcultures. This goes double if you know deep down that you’ll never quite fit. The energy you spend proving yourself should be going into making things instead. And, if you’re an indisputable geek with cred leaking from your eye sockets, keep this in mind for when you’re evaluating someone else’s cred level. It may not mean what you think it does.

您需要对此进行内部化:您擅长编码的能力与您对各种极客亚文化的适应程度无关 。 如果您内心深知自己永远不适合自己,那么它会翻倍。 您花在证明自己身上的精力应该用于制造事物。 而且,如果您是无可争辩的怪胎,并且信誉不佳,那么请在评估其他人的信誉水平时牢记这一点。 它可能并不意味着您认为的那样。

坚持比方法更重要 (Sticking with it is more important than the method)

There’s no shortage of articles about the “right” or “best” way to learn how to code, and there are lots of potential approaches. You can learn the concepts from a book or by completing interactive exercises or by debugging things that others have written. And, of course, there are lots of languages you might choose as your first to learn, with advocates for each.

关于学习编码的“正确”或“最佳”方法的文章不乏,而且有很多潜在的方法。 您可以从书中学习概念也可以通过完成互动练习调试其他人写的东西来学习这些概念。 而且,当然,您可能会选择许多语言作为初学者,每种语言都有倡导者。

A common complaint with “teach yourself to code” programs and workshops is that you’ll breeze happily through the beginner material and then hit a steep curve where things get more difficult very quickly. You know how to print some lines of text on a page but have no idea where to start working on a “real,” useful project. You might feel like you were just following directions without really understanding, and blame the learning materials.

“教自己编写代码”程序和研讨会的一个普遍抱怨是,您将愉快地学习初学者的内容,然后急转弯,使事情变得非常困难。 您知道如何在页面上打印一些文本行,但不知道从哪里开始着手“真正的”有用的项目。 您可能会觉得您只是在没有真正理解的情况下遵循指示,并且将学习材料归咎于此。

When you get to this stage, most of the tutorials and online resources available to you are much less useful because they assume you’re already an experienced and comfortable programmer. The difficulty is further compounded by the fact that “you don’t know what you don’t know.” Even trying to figure out what to learn next is a puzzle in itself.

进入这一阶段时,您可以使用的大多数教程和在线资源就没有多大用处了,因为它们假定您已经是一位经验丰富且经验丰富的程序员。 “您不知道自己不知道的事”这一事实进一步加剧了这一困难。 即使试图弄清楚接下来要学什么,这本身也是一个难题。

You’ll hit this wall no matter what “learn to code” program you follow, and the only way to get past it is to persevere. This means you keep trying new things, learning more information, and figuring out, piece by piece, how to build your project. You’re a lot more likely to find success in the end if you have a clear idea of why you’re learning to code in the first place.

无论您遵循哪种“学习代码”程序,您都会碰壁,而克服它的唯一方法就是坚持不懈。 这意味着您将继续尝试新事物,学习更多信息,并逐步了解如何构建项目。 如果您清楚地知道为什么要首先学习编码,那么最终更有可能获得成功。

If you keep putting bricks on top of each other, it might take a long time but eventually you’ll have a wall. This is where that faith I mentioned earlier comes in handy. If you believe that with time and patience you can figure the whole coding thing out, in time you almost certainly will.

如果您将砖块彼此叠放,可能会花费很长时间,但最终您将拥有一堵墙。 这就是我前面提到的信念派上用场的地方。 如果您相信只要有时间和耐心,就可以弄清楚整个编码过程,那么您几乎肯定会及时地找到答案。

翻译自: https://www.freecodecamp.org/news/things-i-wish-someone-had-told-me-when-i-was-learning-how-to-code-565fc9dcb329/

深度学习去燥学习编码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值