c++学编程如何锻炼耐力

by Amy M Haddad

通过艾米·M·哈达德(Amy M Haddad)

我如何学习编程:这是一项耐力运动 (How I’m learning to program: it’s an endurance sport)

为什么我的编程学习轨迹反映了我作为跑步者的训练方式 (Why my learning trajectory for programming mirrors my training regime as a runner)

I’ve read stories about people trying to learn programming at breakneck speed — programming daily for a dozen-plus hours for a few months in order to learn programming fast. I’ve also read about the aftereffects of this approach: feeling burned out and taking a long break from programming.

我读过一些有关人们试图以惊人的速度学习编程的故事-为了快速学习编程,每天都要进行几十个小时以上的编程。 我还读到了这种方法的后遗症:感觉疲倦,并且在编程上花了很长时间。

There’s nothing quick about learning to program, at least in my experience. It not only takes time to learn — and really understand — the vast amount of material involved. But it also takes time to learn to think like a programmer.

至少从我的经验来看,学习编程并没有很快。 学习并真正理解所涉及的大量材料不仅需要时间。 但是学习像程序员一样思考也需要时间。

That’s why I see learning to program as an endurance sport. As a former long-distance runner, that’s one reason why I enjoy it so much. In fact, my learning trajectory for programming mirrors my training regimen as a runner. It’s about having a plan, setting a steady pace, and persevering.

这就是为什么我将学习编程视为一项耐力运动。 作为一名前长跑运动员,这就是我非常喜欢它的原因之一。 实际上,我的编程学习轨迹反映了我作为跑步者的训练方式。 这是关于制定计划,设定稳定的步伐和坚持不懈的方法。

通过计划建立耐力 (Build Endurance with a Plan)

My first half-marathon was memorable for all of the wrong reasons. The running conditions weren’t great: it was unusually warm May day in Indiana and the route offered little shade. But these were the least of my concerns. With my face flushed, heart pounding, and my legs like steel poles, I felt completely out of shape — because I was. I hadn’t followed a training plan, like most runners do.

由于种种错误的原因,我上半场马拉松令人难忘。 行驶条件不是很好:印第安纳州五月天气异常温暖,路线几乎没有阴影。 但这是我最不担心的。 脸红了,心脏跳动,双腿像钢管一样,我感觉完全不舒服-因为我是。 我没有像大多数跑步者那样遵循训练计划。

I learned my lesson, and used a training plan for every race thereafter. These training plans provided several months of workouts that prepared me for the race ahead. They also got me the results I wanted: I dropped dozens of minutes from my race time and felt great doing it.

我吸取了教训,然后为每场比赛使用了训练计划。 这些训练计划提供了几个月的锻炼,这使我为接下来的比赛做好了准备。 他们也给我带来了我想要的结果:我从比赛时间里摔了几十分钟,感觉很棒。

Today, I follow a different training plan: one for learning to program. It gives my studies structure, holds me accountable, and helps me get the most out of my programming hours.

今天,我遵循另一种培训计划:一种学习编程的计划。 它为我提供学习结构,让我负责,并帮助我充分利用编程时间。

It all starts with a quarterly plan, which guides my learning for the next few months. When I ran, I followed different training plans based on the race I was running or the time I was after. Now I create and follow quarterly plans with a specific learning objective. This quarter, for example, it’s learning computer science fundamentals using Python.

这一切都始于一个季度计划,该计划将指导我接下来的几个月的学习。 跑步时,我会根据自己参加的比赛或比赛的时间遵循不同的训练计划。 现在,我创建并遵循具有特定学习目标的季度计划。 例如,本季度将使用Python学习计算机科学基础知识。

Once a plan is in place, I identify resources to help me achieve my goals. Then, I make it happen by creating weekly and daily plans, which help me budget my time and identify my focus for the day ahead. That way, I enter each programming session with purpose and know exactly what I need to do.

一旦制定了计划,我就会确定可以帮助我实现目标的资源。 然后,我通过创建每周和每日计划来实现这一目标,这有助于我预算时间并确定未来的工作重点。 这样,我有目的地进入每个编程会话,并且确切地知道我需要做什么。

By following a running program, I knew how many miles I needed to run and how fast I needed to run them. It’s no different with programming. There was no guessing what I should do this morning when I opened up my laptop. I had those details figured out last night when I created a plan for the day ahead. As a result, I dove right into the problem set I needed to complete.

通过遵循一个正在运行的程序,我知道我需要运行多少英里,以及运行它们需要多快。 编程没有什么不同。 今天早上我打开笔记本电脑时,没有任何猜测。 昨晚我为前一天创建计划时,已经弄清了那些细节。 结果,我完全了解了我需要完成的问题集。

This planning process is not just a nice feature to have — it’s a necessity for me. My time is limited because I work full time and am learning to program outside of work hours. So I need every minute spent programming to count. My programming plan helps make that happen.

这个计划过程不仅是一个不错的功能,而且对我来说是必需的。 我的时间有限,因为我全职工作并且正在学习在工作时间以外编程。 所以我需要花每一分钟来编程。 我的编程计划有助于实现这一目标。

你的步伐是什么? (What’s your Pace?)

It was a crisp, sunny November morning when I toed the line for a half-marathon. Before the race began, I noticed a group of runners huddled together; one was holding a flag with their race pace on it. “I’ll stick with that group,” I said to myself, and off I went. I should’ve known better.

十一月是一个清脆,阳光明媚的早晨,我参加了半程马拉松比赛。 在比赛开始之前,我注意到一群跑步者挤在一起。 一个人拿着旗帜,上面标着他们的比赛节奏。 “我会坚持那个小组的。”我对自己说,然后离开了。 我应该知道的更好。

This group was going far faster than I’d trained for. My time was looking great at the five-mile mark, but my energy was soon sapped. I couldn’t keep the group’s sprint-like pace for the next 8.1 miles. But by the time I slowed down the damage was done. I had started out way too fast and exerted a lot of energy in the process, making the remainder of the race long and laborious.

这个小组的进度比我训练的要快得多。 在五英里处,我的时间看上去很棒,但是我的精力很快就耗尽了。 在接下来的8.1英里比赛中,我无法跟上小组冲刺般的步伐。 但是到我放慢脚步的时候,伤害已经完成了。 我起步太快,并且在此过程中投入了大量精力,使得比赛的其余部分漫长而费力。

Starting off in a sprint will give you a dramatic head start, as I learned from that race. But it’s not sustainable for the long-term if you’ve got a lot of ground to cover. Consistency is crucial. It mattered when I was running long distances and it still matters now as I’m learning to program.

正如我从那场比赛中学到的那样,以短跑起步将带给您戏剧性的领先优势。 但是,如果您有很多方面需要解决,那么从长远来看,这是不可持续的。 一致性至关重要。 当我长跑时很重要,现在当我学习编程时仍然很重要。

At 5:25 each morning my alarm startles me awake. I head for my standing desk, where I spend the next few hours programming. These precious hours are mine to chisel away on my daily programming goal before my day job begins. No all-nighters. No 16-hour days spent programming on the weekend. Instead I pour a few hours of focused effort each day, six days per week, into becoming a better programmer.

每天早上5:25,我的闹钟惊醒我。 我前往自己的站立式办公桌,在接下来的几个小时中,我将在其中进行编程。 在我的日常工作开始之前,这些宝贵的时间可用来消除我的日常编程目标。 没有通宵。 周末无需花16个小时的时间进行编程。 取而代之的是,我每天(每周六天)投入数小时的精力来成为一名更好的程序员。

It’s not just the number of hours I spend programming, but how I spend them. Again, it’s a question of pace. Society pressures us to move fast in just about everything we do. However, I’ve found that approach doesn’t work — especially when it comes to learning. If I move too quickly, I overlook small but important concepts or get concepts mixed up. Plus some things, like recursion, take time to understand.

这不仅是我花费在编程上的时间,还包括我如何花时间。 同样,这是步调问题。 社会向我们施加压力,要求我们在所做的一切事情中都必须Swift采取行动。 但是,我发现这种方法行不通-尤其是在学习方面。 如果我移动得太快,我会忽略一些小而重要的概念,或者混淆一些概念。 再加上一些东西,例如递归,需要一些时间来理解。

So the hours I spend programming are steady. I make sure I really understand the material or problem before moving on. This process involves a lot of repetition, which means I move slower. I admit that it’s hard to hold back, so I constantly need to remind myself that I’m building a foundation of knowledge. If I rush the process now, I’ll regret it down the road.

因此,我花在编程上的时间很稳定。 在继续之前,我确保我真的了解材料或问题。 这个过程涉及很多重复 ,这意味着我移动得更慢。 我承认很难忍受,所以我经常需要提醒自己,我正在建立知识基础。 如果我现在着急进行此程序,那我会后悔的。

This pace is also sustainable for me. It’s a pace I’ve kept since I began learning to program and it’s helping me get where I want to go.

这个速度对我来说也是可持续的。 自从我开始学习编程以来,这就是我一直保持的步伐,它可以帮助我到达想要去的地方。

一致性事项 (Consistency Matters)

There’s a lot to like about consistency. For one, it makes learning manageable. Because I program a few hours each day, I’m focused on a just a small chunk at a time.

关于一致性,有很多令人喜欢的东西。 首先,它使学习变得易于管理。 因为我每天要编程几个小时,所以我一次只专注于一小部分。

Today that chunk was understanding a sorting algorithm and getting practice with it. Other times it’s getting a test or two to pass. These are manageable goals. They challenge me, but they’re definitely doable.

如今,那部分知识是了解排序算法并开始实践。 其他时候,它会通过一两次测试。 这些是可管理的目标。 他们挑战我,但绝对可行。

Consistency also helps me with recall. When I use various data structures on a regular basis, I remember when and how to use them. They’re fresh on my mind when I start a new problem. Not surprisingly, my confidence increases, too. The more I use regular expressions, for example, the more comfortable I get with them.

一致性也有助于我回忆。 当我定期使用各种数据结构时,我会记得何时以及如何使用它们。 当我提出新问题时,它们在我脑海中是新鲜的。 毫不奇怪,我的信心也增加了。 例如,我使用正则表达式的次数越多,对它们的使用就越舒适。

I see progress more quickly with consistent effort because small, incremental improvements add up over time. Take recursion as an example. I certainly didn’t “get it” on my first pass, or even on the second or third. In fact, I’d been struggling with this concept for a while. Each study session has helped me progress, albeit slowly, from understanding the basic idea, to completing very simple problems and eventually more challenging problems. The culmination of daily study and practice paid off because it’s finally clicked.

我看到通过不懈的努力可以更快地取得进展,因为随着时间的推移,小的,渐进的改进会累加起来。 以递归为例。 我的第一遍,甚至第二遍或第三遍,我当然都没有“得到”。 实际上,我已经为这个概念苦苦挣扎了一段时间。 每个学习环节都帮助我进步,尽管速度很慢,但从理解基本概念到完成非常简单的问题以及最终更具挑战性的问题。 每天的学习和实践的高潮得到了回报,因为它终于被点击了。

Perhaps most important of all, consistency is sustainable for the long-term. If I put in a few hours of quality programming today, then I know I’ll have the energy to do it again tomorrow, the next day, next week, next month, and for the remainder of the quarter, until a new plan begins and the process starts again.

也许最重要的是,一致性可以长期持续。 如果我今天投入几个小时进行质量编程,那么我知道明天,第二天,下周,下个月以及本季度的剩余时间里,我将有足够的精力去做,直到新计划开始然后该过程再次开始。

Consistent doesn’t mean easy. I feel comfortably challenged with my programming pace, though it’s taken some time to figure out the best pace for me. Going at a consistent pace, be it in running or programming, keeps a bit of energy in the tank. That way, when you’re really struggling you’ll have something in reserve to finish strong.

一致并不意味着容易。 尽管我花了一些时间来找出最适合自己的速度,但我对自己的编程速度却感到很挑战。 无论是在运行还是在编程中,始终如一的步伐可以使储罐内保持一点能量。 这样,当您真正挣扎时,您将有一些储备来完成强项。

坚持不懈 (Persevere)

When you’re running 20-plus miles, your legs feel like lead. You’re tired and hungry, and ready to stop. And yet you forge on.

当您跑步20英里以上时,腿部感觉就像铅一样。 您又累又饿,准备停下来。 然而,你继续前进。

It takes time to build the physical endurance to run that much, not to mention the mental stamina to see it through. Programming is the same way. Rare is the day that I solve a problem in just minutes. Problems can take me weeks to solve, and I get more bugs and failed tests than I’d care to admit.

要花那么多时间才能建立起身体的耐力,更不用说精神耐力了。 编程是相同的方式。 难得的一天是我在短短几分钟之内解决了一个问题。 问题可能需要花费我数周的时间才能解决,而且我得到的错误和失败的测试超出了我所愿意承认的范围。

But I show up each day and persevere, realizing that small wins matter. My aim is to get incrementally better: get one more test to pass or get fewer error messages. Similarly, during a long run, I’d tell myself “ok, just one more mile.” And when I’d get to that mile marker I’d tell myself again “ok, just one more mile.” In both cases, despite the challenges or discomfort, I’m inching my way closer to the end goal through sheer willpower.

但是我每天都坚持不懈,意识到小小的胜利很重要。 我的目标是逐渐变得更好:再进行一次测试以通过或减少错误消息。 同样,从长远来看,我会告诉自己“好,再走一英里。” 当我得到到英里标记我会再告诉自己,“好了,只是一个英里。” 在这两种情况下,尽管面临挑战或不适,但我都将通过纯粹的意志力向最终目标迈进。

The feeling of accomplishment after solving a tough problem is like the one I got when I crossed the finish line of a race or finished a long, tedious run. All of that time, effort, and mental turmoil were worth it.

解决了一个棘手的问题后的成就感,就像我越过比赛的终点线或完成漫长而乏味的奔跑时得到的那种感觉。 所有这些时间,精力和精神动荡都是值得的。

There are some things in life that are quick to learn. Programming is not one of them, in my opinion. Once you get started, you realize how much there really is to learn — and it’s a lot! That makes it exciting, but it also makes consistency that much more important. I haven’t been programming too long. The race just started for me — and it’s a marathon, not a sprint.

生活中有些事情可以快速学习。 我认为编程不是其中之一。 一旦开始,您就会意识到真正需要学习的东西-很多! 这使它变得令人兴奋,但同时也使一致性变得更加重要。 我没有编程太久。 比赛对我来说才刚刚开始-这是一场马拉松,而不是短跑。

I’m a writer (amymhaddad.com), and a beginner programmer.

我是作家( amymhaddad.com )和初学者。

翻译自: https://www.freecodecamp.org/news/how-im-learning-to-program-it-s-an-endurance-sport-8bf8725cd38/

c++学编程如何锻炼耐力

c++学编程如何锻炼耐力_我如何学习编程:这是一项耐力运动相关推荐

  1. 不会编程也文盲?盘点7种免费学习编程的方法开启浏览器javascr

    我们曾在一篇文章中讨论过不会编程算不算是文盲的问题,虽然有人认为这样有点说过头,但同时也不可否不会编程也文盲?盘点7种免费学习编程的方法开启浏览器javascr认如今编程确实显得越来越重要.比如作为设 ...

  2. 电脑编程从哪里开始学习_我想学习编程,但我不知道从哪里开始

    电脑编程从哪里开始学习 How and Where Should I Learn Programming? 我应该在哪里学习编程? Software development is a challeng ...

  3. 风变编程python 知乎_如何看待风变编程的 Python 网课?

    毕业感想 我是一名销售.自己本身对于编程对挺感兴趣的,但是兴趣也就停留在想去学编程,但是从来没有真正动手过,学过一段时间小程序.不过,后来放弃了.现在都在讲未来时ai的世界,所以,想通过学习pytho ...

  4. 从零开始学习编程_如何开始学习编程

    从零开始学习编程 最近有很多关于学习编程的话题. 与软件开发中的开放和待定职位相比,不仅人手不足 ,编程还是一种薪水 最高,工作满意度最高的职业 . 难怪有这么多人想要进入这个行业! 但是,究竟如何做 ...

  5. 零基础学java靠谱吗_零基础学习Java靠谱吗?

    零基础学习Java靠谱吗?作为信息时代的当下,我们看到太多"掌握XX技能,轻松月薪3万"."年薪30万,这个技能你必须懂得"."价值X万的写简历秘籍& ...

  6. python核心编程第三版_《Python核心编程(第3版)》

    <Python核心编程(第3版)>是经典畅销图书<Python核心编程(第二版)>的全新升级版本,本书适合具有一定经验的Python开发人员阅读,总共分为3部分.第1部分为讲解 ...

  7. 编程需要那些数学和计算机知识点,学习编程需要哪些基础?

    原标题:学习编程需要哪些基础? 随着互联网飞速发展,很多互联网人才需求越来越大,不论是大学生还是就业人士.不论是科班还是非科班,相继涌入互联网行业的大军中.很多非科班或学历不高的朋友通过计算机培训成为 ...

  8. 编程如何考上名校,以及如何学习编程

    会编程的孩子,被名校预定! 前段时间,一则新闻刷爆了朋友圈. 一名15岁的初三学生温铠瑞,被清华大学提前锁定,获得了高考加分60分. 他从小学开始接触编程,初三时参加了清华大学信息体验营活动. 因为成 ...

  9. 自学个JAVA编程有什么用_怎样自学java编程

    4 怎么学java 多线程需要理解机理 很多Java程序员热衷于多线程程序编写,认为是对逻辑能力的挑战.其实在大量应用中根本就不需要编写多线程程序,或者说大多数编写应用程序的程序员不会去写多线程程序. ...

最新文章

  1. 磁共振检查头部能检测出什么_什么是磁共振血管造影?检查价格贵吗?
  2. iOS开发异常错误总结之——wait_fences: failed to receive reply: 10004003
  3. TensorFlow应用实战-17-Qlearning实现迷宫小游戏
  4. Ubuntu12.04 搭建TFTP服务
  5. Android--Activity的跳转及Activity之间的数据传递
  6. Java 经典面试题 —— 性能与安全
  7. 开源cms系统We7插件开发准备工作全面就绪
  8. solr 配置多个entity_solr建索引优化
  9. 在Docker上搭建ELK+Filebeat日志中心
  10. 索引,用户授权,备份
  11. pe_xscan作了3点更新 1
  12. 形容词和指示代词-this、that、thses、those_31
  13. [NISACTF 2022]
  14. 使用NOKIA MMS LIBRARY发送中国移动彩信
  15. VC++6.0 Win32应用程序 如何添加窗体 ------阿冬专栏
  16. 如何申请百度API Key
  17. x86架构学习内存管理的单元
  18. 锦锐单片机开发工具_锦锐触摸MCU 单片机方案开发
  19. 【MATLAB第6期】基于MATLAB的粒子群及若干改进的粒子群算法原理介绍 持续更新
  20. 2022-2028全球与中国轨道检查车辆市场现状及未来发展趋势

热门文章

  1. 27岁技术总监,收入太高,心头慌得一比。。。
  2. 什么时候应该卖掉基金
  3. 计算机模拟多孔碳,华南农业大学刘应亮教授课题组:废弃板栗壳制备多孔碳材料,用于用于储能设备...
  4. 方正微型计算机U210,100款笔记本电脑年度总决赛 超便携篇
  5. (操作系统开发)从实模式---->保护模式---->IA-32e模式( 64位模式)
  6. [Ubuntu]vim中文乱码
  7. IDEA工具栏tools新增Push按钮(其他类推)
  8. 记宝塔使用webhook自动化同步gitee代码
  9. 手把手利用学校的教育邮箱
  10. 使用Matlab绘制三维空间中的任意圆(参数方程/坐标转换)