打通编程的任督二脉【The Key To Accelerating Your Coding Skills】

原文地址:The Key To Accelerating Your Coding Skills

When you learn to code, there is a moment when everything begins to change. At Firehose, we like to call this the inflection point of coding. After this phase, the way you operate as a developer will be dramatically different. Building up to the inflection point is the process of becoming self-sufficient in programming, to the point where you no longer need any hand-holding. It can be a frustrating experience, but once it’s behind you, it is incredibly empowering.

学习编程的过程中,你会经过一个特殊的时刻,然后一切都变得不太一样。在Firehose(一个教育机构),我们通过叫它编程拐点。超越编程拐点之后,你的编程感受将发生巨大的变化,你将不再依赖他人的帮助,你能够独立编程。超越拐点是一个令人沮丧的过程,但是你一旦超越它,你将获得超乎寻常的能力。

At Firehose, our goal isn’t just to teach you Ruby, how to build web applications, or how to write tests. Although we do teach these skills and more, our primary goal is to accelerate students past the inflection point so they gain the ability to solve any problem they encounter. We believe that being able to problem solve on your own is an invaluable skill, and this method of teaching will take you much further than simply learning how to build a set of apps.

在Firehose我们的目标不只是教会你使用Ruby去构建一个网站或是写一些测试案例。虽然我们确实教授这些技能,但我们最主要的目标是加快学生走过拐点,使他们有能力解决他们遇到的任何问题。我们坚信教会大家获得自己解决问题的能力是无价的,远比简单的教会大家构建一些应用程序有价值得多。

The Tutorial Phase (3-8 weeks of serious coding)

教程阶段(三到八周高强度编程训练)

When you start out learning to code, there’s a lot of information that you don’t know yet. This information is called domain-specific knowledge. Examples include: knowing how to write a loop in ruby or how to extract something from a database using Ruby on Rails. Domain-specific knowledge encompasses the protocols unique to a certain programming environment.

当你开始学习编程,有很多特定领域的知识是你未曾了解过的。比如:怎么用Ruby写一个循环,或者怎么使用Ruby的Rails从数据库查询信息。特定领域的知识是依赖于特定编程环境下的特殊约定。

The first step to becoming a self-sufficient developer is learning how to do specific tasks. Once you master certain tasks, the broad strokes of how the pieces fit together will start to become apparent. Over time, you’ll begin to recognize patterns and eventually, the things that initially seemed confusing and foreign will become second nature.

要成为一个能独立编程的人,第一步要做的就是学会完成特定的任务。当你成为某些方面的能手,你就能渐渐掌握如何将零散的知识组织运用。随着不断的练习,最终你会发现一些固有的模式,那些一开始看上去迷惑不解的东西就开始变得习以为常、理所当然了。

For students starting out, the most important skill to acquire is attention to detail.

当你开始学习编程,注意细节是你首先需要掌握的基本功

Paying close attention to detail is important when going through materials like documentation or tutorials. Even the most minor typos and misspellings will result in error messages or bugs. Seeing error messages is a frustrating experience at first, but it’s a crucial step in the learning process. Dealing with error messages and problems in this phase teaches you one of the most important skills of programming within a safe environment: being detail-oriented.
在根据文档或是教程学习的阶段,关注细节显得尤为重要。哪怕是最简单的拼写错误也会导致报错或产生bug。根据错误信息排查异常是极其重要的过程,即使一开始会让你感到异常沮丧。在这个阶段面向细节编程是你处理错误信息和解决问题时学会的最重要的安全环境下编程技能之一。
Debugging error messages is incredibly important. The fact of the matter is, error messages are just a part of programming: they are seen by inexperienced and very experienced developers alike. The only difference is, the more experience you have dealing with error messages, the less time you’ll need to spend trying to fix them. Here’s why:
调试异常信息是极其重要的。事实上,无论是新手还是老手都会遇到异常,异常是编程的一部分。区别在于,拥有丰富经验的开发者会用更少的时间去修复这些异常。究其原因,如下:

  • Over time, you will learn how to read error messages and extract the relevant details of the problem quickly. The first time you see an error message, it will take you a while to decode what it actually means. But after you’ve seen hundreds of error messages (and you will see hundreds!), you will be able to pinpoint the problem’s location and the relevant details you need in order to fix it.

  • 随着经验越来越丰富,你将学会如何快速阅读异常信息并提取解决问题需要的相关详细信息。你肯定会需要花一些时间去理解你遇到的第一条异常信息它究竟想表达什么意思。当你见过成百上千的异常信息后(事实上你可能会遇到更多),你将能快速定位问题出在哪里,并且提取修复问题所需要的重要信息。

  • You should learn from each error message that you resolve. Don’t just fix the error and be done with it; understand what is wrong with the code you’re fixing. By learning from each of your errors, the next time you make the same mistake, you’ll be able to fix it much faster.

  • 每解决一个异常你都应该有所收获。不要把问题解决了就算完事了,你应该多想想是什么导致的问题。从每个异常中去思考学习,能够让你以后快速的解决类似的问题。

  • Initially, you will probably ask for help on each error message you see. Over time, you’ll learn to ask for help less frequently by double-checking your code and conducting smart Google searches.

  • 起初,你每遇到一个异常都需要寻求他人的帮助。随着时间的推移,你更多的是反复检查代码和高效的使用Google来解决问题,而不是向他人寻求帮助。

In the tutorial phase, you will follow instruction. At first, you’ll find it challenging to follow instructions and error messages will happen frequently. Over time, you’ll develop the skill to debug errors and pay better attention to small details, and you’ll be able to make progress much quicker. As you’re wrapping up the tutorial phase, you’ll notice you’re able to write code at a much more rapid pace.

在教程阶段,你将按部就班遵照说明一步一步的做。一开始,你会发现即使是遵照指导一步一步操作也是极具挑战的,这个阶段错误频出。慢慢的,你学会了如何调试错误并且更多的关注小细节,并且很好的提高开发效率。当你完成教程阶段的学习后,你会发现你拥有较好的代码编写能力。

At this point, some people feel confident– like they’re ready to ditch the training wheels and start building things without structured guidance– and will happily dive into the deep end. Other students will reach for more tutorials, trying to obtain more domain-specific knowledge in search of a “full understanding.” Unfortunately, tutorials will only take you so far, and true confidence isn’t found in tutorials or guides. True confidence comes from struggling through a problem you have no idea how to solve, and discovering a solution on your own.

完成教程阶段后,很多更自信的家伙便不再愿意循规蹈矩,开始不再依赖于那些结构化的指导并尝试自己构建一些东西,并且他们非常乐意去挑战一些非常有难度的内容。而另外一些学生则希望学习更多的教程,掌握更多特定领域的知识,以达到“完全理解”。非常可惜的是,教程只能引导他们至此,在教程和指导手册中是找不到真正的自信的。只有通过努力思考那些没有思路的难题,努力寻求解决之法,并最终通过自己的努力与坚持将问题解决,这样才能走到更远的地方并获得真正的自信。

The dirty little secret of programming is…
编程的肮脏小秘密是...

You will never know everything you need to know to solve all your problems. Going into the journey, you probably envisioned yourself eventually learning everything you need to learn, and then being squared away. This moment will never happen.

你不可能掌握所有问题的解决方法。当你开启编程之旅,你计划学会所有你需要掌握的知识,然后所有难题都化为乌有、不复存在。然而,这样的想法是永远不可能实现的。

Programming is a life-long learning experience. Experienced software engineers seek to find solutions to problems they haven’t solved yet because it gives them the opportunity to learn more. If you find yourself waiting for the moment when you finally feel like you know everything there is to know about coding, know this: the day you’re waiting for will never come. And that is a wonderful thing.

编程是一个终生学习的过程。经验丰富的软件工程师总是在寻求那些他们还没有解决的问题的解决之道,他们可以在这个过程中学习到更多。如果你发现你自己在期待有一天能够掌握关于编程的所有细节,事实上,你的期待终究只能是期待,这一天永远不会到来。学无止境,这是一件多么美妙的事呀。

You will be ready to jump into the next phase of your journey when:
如果你已经做到下面这些,那说明你已经可以准备你的下一段编程之旅了:
You’ve seen enough error messages that they no longer startle you. Instead, you know how to decipher what they mean and where to look for the problems in your code.
当你见识了足够多的异常,那些千变万化的异常信息不再让你错愕。你能够清晰的理解异常信息的涵义,并能快速的定位到哪些代码出现了问题。

You’re a pro at Googling for solutions. When you’re working to add a feature or see a confusing error message, you know what to search for to find the information you need.
你已经成为一个“Google搜索”专家。当你需要新增一些技术特性或是遇到令人疑惑的异常信息,你知道如何搜索收集你需要的关键信息。

You’re able to reference code you’ve written in other parts of your application and follow patterns within them, rather than always seeking out step-by-step instructions.
你能够重用你其他应用中的某些代码和模式,而不是每次都根据指导手册一步一步操作。

The Inflection Point (2-4 weeks with the right mentality)
拐点(保持良好的心态:2-4周)

The inflection point stage is one of the most frustrating stages of learning to code, but in many ways, it’s the only stage that matters. It’s the point when you phase out of using tutorials and begin solving problems for which no one has lined up a solution for you.
在学习编程的诸多阶段中,拐点是最重要的阶段,也是最令人沮丧的阶段。当你不再依赖教程,并且能够在没有人指导的情况下独立解决问题,那么你就到拐点了。

At some points, you will feel like you aren’t ready to tackle this phase and like you want to return to building something with an outline of exactly what to do. Don’t fall prey to this mentality. The reason you’ll feel frustrated is:
在这个阶段,你经常会感觉自己仿佛还没有准备好,经常想跟之前一样根据教程或是指导手册上的一二三步构建一些应用。千万不要被这种心理打败了。之所以有如此强的挫败感,主要是因为:

During the inflection phase, you will be coding 10-20 times SLOWER than in the previous phase.
在拐点阶段,你的编程速度要比之前满了十到二十倍。
You may start questioning yourself and wondering if you are actually capable of becoming a programmer. Feelings of insecurity and doubt are common in this stage.
在这个阶段,你会感觉缺乏安全感并充满疑惑。你开始反问自己并且想知道,自己是否真的具备成为一名程序员的能力。

Despite the fact that you’ll feel like you’re learning and accomplishing things at a much slower rate, in reality, you are achieving the things that matter the most. While your domain-specific knowledge is screeching to a putter, everything you’re learning will be about procedural knowledge.
尽管你觉得学习和做事的效率非常低,但是你完成的都是极其重要的事情。这个阶段总是会想着掌握更多特定领域的知识,但是你要明白所有你学习的内容都是这个过程中必须要学习的知识。
Procedural knowledge is the ability to teach yourself what you don’t know along the way. When you need to implement a new feature, what type of Google search should you do? At this point in time, you’ll feel like you’re “in the dark” when it comes to many of the things you want to accomplish. Learning how to find the light on your own is critical because you can never know everything there is to know, so you need to be able to teach yourself how to solve the problem at hand.
实践性知识能够让你知道在整个过程中有哪些是你不知道的。当您需要实现一个新功能时,应该如何进行Google搜索?在这个时间段,当你需要去完成那些事情的时候,你会觉得自己“深陷于黑暗中”。学习如何自己找到出路是至关重要的,因为你永远不会知道所有要知道的事情,所以你要能够自己解决手头的问题。

Most people do not realize that in order to learn to code, you need to learn both domain-specific and procedural knowledge.
大部分的人都意识不到学习编程需要学习专业知识和实践性知识两部分。

For the rest of your life, go outside your limits every single day
在余生中,每天都应该让自己有所进步

Some software engineers stay inside their comfort zone once they find their footing. These types of programmers are known as maintenance programmers– not something you should strive to be. Instead, you should strive to go outside your limits every single day. The most common reason programmers quit their jobs is because “it’s not challenging anymore since I’ve solved all the interesting problems.”
一些程序员一旦找到稳定的工作就停留在舒适区。我们称这些程序员为维护型程序员--这不应该是你努力的方向。相反,你每天都应该让自己有所突破。程序员离职的最常见原因是“所有感兴趣的问题都被解决了,工作不再具有挑战性”。

Rather than trying to pull coding projects into your comfort zone, you should be seeking out problems that are outside your current skill set. This is the only way to build on and expand your skills.
你应当寻找超出当前能力范围的问题,而不是在你的舒适区内编程。这也是组建和拓展你技能的唯一方法。

In the words of a Firehose student upon passing his inflection point:
一个经过拐点的Firehose的学生感慨到:
I still feel like I’m in the deep end! I’m just getting more comfortable knowing that’s where I’ve got to be!
虽然依然感觉困惑,自己也意识这种状态就是常态,也能更自在的应对。

In web development, there are actually two inflection points that will come together.
在web开发中,将迎来两个拐点。
The web development inflection point is the point when you become capable of building any database-driven application that you want. This means being able to build a web application with many pages that stores and retrieves information from a simple database. Web developers call this: “mastering CRUD.” At this phase, you should also be able to integrate with any 3rd party library (a ruby gem for example) simply by following the documentation provided on GitHub or a blog post.

web开发的第一个拐点是能够根据需要构建数据库驱动的应用。也就是能构建一个支持向数据库存储和检索数据的多页面web应用。也即我们常说的:“CRUD”。在此阶段,还应该能够通过GitHub或博客文章中提供的文档将任何第三方库(例如ruby gem)集成到自己的应用中。

The algorithm and data structures inflection point is a less superficial inflection point, but it is actually more important. Someone who has conquered this point will have mastered the programming language they’re working in, in addition to mastering the fundamentals of programming and having a depth of knowledge for solving complex coding challenges.

第二个拐点是:数据结构与算法,一个不那么容易却极其重要的拐点。当突破了数据结构与算法这个拐点,就可以精通你所使用的编程语言,可以巩固编程基础,并且拥有解决复杂问题的深度知识。

People who have conquered the algorithm and data structures inflection point will be able to:
通过了数据结构与算法拐点之后,可以拥有如下能力:

Write sorting algorithms
编写排序算法
Implement and reverse linked lists
实现链表和链表反转
Understand and write programs leveraging stacks, queues, and trees
理解和编写运用栈、队列和树的程序
Write computer programs using recursive or iterative solutions
运用递归和迭代思想编写代码
In short, once you pass this inflection point, you will have mastered data manipulation and will understand the performance implications of your code decisions. Traditional computer science degrees focus exclusively on getting students past the algorithm and data structures inflection point. Many universities teach this with programming languages that are generally not used in the industry, like Scheme, Racket, or LISP.
简而言之,一旦通过此拐点,将掌握数据操作并将了解代码实现对性能影响。传统的计算机科学学位专注于让学生超越算法和数据结构的拐点。许多大学都使用工业化生产中不使用的编程语言来教授这一点,例如Scheme,Racket或LISP。
In most technical interviews, the interviewer will assume you’ve passed the web development inflection point, given that’s easier to do, and focus their questions on evaluating your skill in algorithms and data structures. These questions will generally focus on the topics we mentioned above: sorting algorithms, reversing linked lists, and using stacks, queues, and trees.
在大多数技术面试中,面试官会假设您已经通过了Web开发拐点,因为这很容易,他们将问题更多集中在了解您算法和数据结构技能掌握情况。这些问题通常集中在我们上面提到的:排序算法,反转链表,以及堆栈,队列和树的使用。

Once a developer has passed both the web development inflection point and the algorithm and data structures inflection point, they hold the keys to the kingdom.
一旦开发者通过了web开发和数据结构与算法两个拐点,他们便拿到了进入web开发王国的金钥匙。
These developers will be able to solve challenges that intersect the two: complex algorithms that need to be built in the context of advanced web applications. This is at the heart of what professional web developers do every single day.
这些开发人员能够解决在高级Web应用程序环境中的复杂算法问题。这是专业Web开发人员每天的核心工作。

Consequences of the Inflection Point
The biggest consequence of the inflection point will sound a bit counterintuitive when you first hear it. Take a deep breath in:

When learning to code, domain-specific knowledge doesn’t matter in the grand scheme of things.
Yup. I’m not joking– it really doesn’t matter that much at all. Once you pass the inflection point, these concepts will fluidly translate with just a week or two of tutorials, maybe even days!

What ultimately really matters is:

You have a solid grasp on a web development framework
You have a solid grasp on writing algorithmically complex code in any programming language
Hiring managers want developers with solid web development and algorithm skills.
While I was working at PayPal, my team hired a Senior Rails Developer who had no experience in Rails– he had been coding a lot in Python, LISP, and Perl. Within a couple of days, he was already making a big impact. And within weeks: a huge impact. He quickly rose to become the technical team lead and was one of the best hiring decisions I’ve ever been involved in.

Don’t sweat the stack. Many people will say things like, “AngularJS is hot these days,” “JavaScript is on the rise,” or “the latest fad is…” My response to that is: “so?” When you’re learning how to program, your singular goal should be to find the inflection point and annihilate it. Once you do, learning that new, sexy fad won’t be a difficult task at all.

Become self-reliant. Having the ability to learn new coding skills without structured guidance means you no longer need to wait for anyone to help you out. This means that for the majority of what you need to learn, you can simply search the internet and read the various material on what you need to know.

This doesn’t mean you immediately “know” everything, but just that everything is now “figure-out-able,” so in essence, you are unstoppable.

The Skills You Will Develop During the Inflection Point
As a software developer, the best reference material is similar code that you have already written. When you fully understand the code you’ve written, you don’t need to commit all the details to memory. This means that the first question you should ask yourself when building a new feature is: “Have I built something similar before?” If the answer is yes, revisit the code and walk through the code line-by-line in your head. Re-explain to yourself what it’s doing and ask yourself, “could I use the same approach now?”

Videos suck at explaining domain-specific details because they take so darned long to watch. Say you want to integrate with the Google Maps API. Once you’ve experienced doing so once, it can take less than a minute to open the code up in GitHub, copy the code, and paste it into a new project. Videos, on the other hand, can often take 10-30 minutes to re-watch.

Strategies for Passing the Inflection Point as Efficiently as Possible
Because passing the inflection point is the most important part of learning to code, you should set yourself up to make the process as smooth as possible. This means you should start preparing while you’re in the tutorial phase and maintain the right mindset during this period of time.

During the tutorial phase, take breaks from going over structured material and give yourself challenge problems along the way.

For every handful of lessons, try to do something that is outside the scope of the tutorial you’re following. If the tutorials you’re going through provide “challenges” or “self-directed” pieces, do all of them. Solving unguided challenges will give you the important experience of doing things without structured guidance.
Try to use tutorials as little as possible. At Firehose, we often walk students through how to integrate certain gems or do things using the provided documentation. Rather than simply following the instructions explained in tutorials that are geared towards people who are just starting out, many students will follow the documentation and use the tutorials as a back-up. Note that documentation will treat you like a developer who has passed the inflection point. Getting comfortable reading and following documentation on GitHub will give you a leg up when you’re on your own.
Focus on the essentials and use repetition. Learn how to do common things like spinning-up an application from scratch, pushing a new app to GitHub and Heroku, and building a database migration early on.
Pushing through the inflection point can be challenging. Here are some pointers to get you through it:

Understand that this is a difficult process and go easy on yourself. Also, set realistic expectations. You can’t compare your “superman”-level speed of going through tutorials to your “snail”-speed of learning things on your own. Keep in mind that you’re learning plenty, but at this phase, you’re learning a brand new skill of figuring new things out on your own.
If you’re struggling with self-confidence, know that what you’re feeling is completely normal. Keep working. If you continue to struggle, try talking to someone who has recently passed the inflection point. They will be able to relate to the position you’re in and will assure you that what you’re experiencing is only temporary. Work consistently, but don’t overwork yourself. At this phase of the game, know that you can only be productive for around 6 hours a day at the most. Working in an exhausted state will only prolong the time you spend building up to the inflection point.
The best way to gain confidence at this stage is to power through any doubts you have. Your emotions may start to feel like a roller coaster. At times, you’ll feel like you’re on fire, but after 15 hours of struggling on the same problem, it’s very common to feel the polar opposite.

It can be frustrating to have no idea if something will take you 5 minutes or 5 hours, but every time you power through and successfully implement a new feature, the rush of confidence will be everything you need. After solving a handful of hard problems without any help, you’ll be addicted to the feeling of building things outside your comfort zone.

How to know when you’ve passed the inflection point
The final stage of the inflection point process is acceptance. Acceptance that software development is a process of continuous learning. Acceptance that the feeling that you’ve successfully learned everything just means you should start thinking about solving more complicated problems.

Have you experienced the inflection point yet? Share this post and start a conversation with your friends– you would be surprised how many people have reached and surpassed this moment.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 162,050评论 4 370
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 68,538评论 1 306
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 111,673评论 0 254
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,622评论 0 218
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 53,047评论 3 295
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,974评论 1 224
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 32,129评论 2 317
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,893评论 0 209
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,654评论 1 250
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,828评论 2 254
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,297评论 1 265
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,619评论 3 262
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,326评论 3 243
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,176评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,975评论 0 201
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 36,118评论 2 285
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,909评论 2 278

推荐阅读更多精彩内容