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

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++学编程如何锻炼耐力

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/392053.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

python处理文本数据

处理文本数据,主要是通过Seris的str访问。遇到NaN时不做任何处理,保留结果为NaN,遇到数字全部处理为NaN。 str是Seris的方法,DataFrame不能直接使用,但是通过索引选择DataFrame中的某一行或者某一列,结果为…

Java系列笔记(4) - JVM监控与调优【转】

Java系列笔记(4) - JVM监控与调优【转】 目录 参数设置收集器搭配启动内存分配监控工具和方法调优方法调优实例 光说不练假把式,学习Java GC机制的目的是为了实用,也就是为了在JVM出现问题时分析原因并解决之。通过学习,我觉得JVM监控与调…

Maven打包排除某个资源或者目录

最近在spark streaming本地调试的时候&#xff0c;引入了一些资源文件&#xff0c;打包的时候需要给排除掉。所以就考虑使用maven的方式 详细参考官方文档&#xff1a;https://maven.apache.org/plugins/maven-jar-plugin/examples/include-exclude.html 排除某个资源文件 <…

android发送网络请求没反应,Android无法使用HttpURLConnection发送GET请求

我正在尝试在我的应用程序中使用HttpURLConnection.我将我的请求方法设置为’GET’,但是当我尝试检索输出流时,该方法将更改为’POST’&#xff01;我不确定是什么原因,但是当我使用’POST’发送请求时,我的JSON服务器(我使用JAX-RS)会返回一个空白页面.这是我的代码片段&#…

地图 c-suite_C-Suite的模型

地图 c-suiteWe’ve all seen a great picture capture an audience of stakeholders.我们所有人都看到了吸引利益相关者听众的美好画面。 Let’s just all notice that the lady in the front right is not captivated by the image on the board (Photo by Christina wocin…

框架和库的区别_框架和库之间的区别

框架和库的区别Developers often use the terms “library” and “framework” interchangeably. But there is a difference.开发人员经常互换使用术语“库”和“框架”。 但是有区别。 Both frameworks and libraries are code written by someone else that is used to he…

Java—多线程实现生产者消费者模型

采用线程实现“生产者-消费者”编程的基础模型 源代码 消费者代码&#xff1a; public class Consumer implements Runnable {BlockingQueue<Integer> blockingQueue;int n;CountDownLatch countDownLatch;public Consumer(BlockingQueue<Integer> blockingQueue…

动态链接库.so和静态链接库.a的区别

静态链接库&#xff1a; •扩展名&#xff1a;.a  •编译行为&#xff1a;在编译的时候&#xff0c;将函数库直接整合到执行程序中&#xff08;所以利用静态库编译生成的文档会更大&#xff09; •独立执行的状态&#xff1a;编译成功的可执行文件可以独立运行&#xff0c;不…

华为鸿蒙系统封闭,谷歌正式“除名”华为!“亲儿子”荣耀表示:暂不考虑,鸿蒙OS处境尴尬...

我们都知道&#xff0c;目前智能手机最常用操作系统就是IOS和安卓&#xff0c;占据手机系统超过99%的市场份额。由于IOS系统的封闭性&#xff0c;国内手机厂商基本上都是使用谷歌的开源安卓系统。当然华为也不例外&#xff0c;一直使用的都是安卓系统。可以说&#xff0c;安卓系…

使用vue-cli脚手架搭建简单项目框架

1.首先已经安装了node,最好版本6以上。 2.安装淘宝镜像 大家都知道国内直接使用 npm 的官方镜像是非常慢的&#xff0c;这里推荐使用淘宝 NPM 镜像。这样就可以直接使用cnpm了。 npm install -g cnpm --registryhttps://registry.npm.taobao.org如果过程出差&#xff0c;是否安…

sap中泰国有预扣税设置吗_泰国餐厅密度细分:带有K-means聚类的python

sap中泰国有预扣税设置吗Hi! I am Tung, and this is my first stories for my weekend project. What inspired this project is that I have studied to become data scientist for almost two years now mostly from Youtube, coding sites and of course, Medium ,but my l…

自动化yaml文件_从YAML到TypeScript:开发人员对云自动化的看法

自动化yaml文件The rise of managed cloud services, cloud-native, and serverless applications brings both new possibilities and challenges. More and more practices from software development processes like version control, code review, continuous integration,…

SQL SERVER-Extendevent系统视图

--获得扩展事件的事件select name,description from sys.dm_xe_objects where object_typeevent order by name--获得各事件的字段 select c.name,c.description from sys.dm_xe_object_columns c inner join sys.dm_xe_objects o on o.namec.object_name where o.name…

Java—简单的注册页面

根据所提供的界面&#xff0c;编写 register.html 文件 源代码 empty.jsp <% page contentType"text/html;charsetUTF-8" language"java" %> <html> <head><title>error</title> </head> <body> <H1><…

【深度学习系列】用PaddlePaddle和Tensorflow实现经典CNN网络AlexNet

上周我们用PaddlePaddle和Tensorflow实现了图像分类&#xff0c;分别用自己手写的一个简单的CNN网络simple_cnn和LeNet-5的CNN网络识别cifar-10数据集。在上周的实验表现中&#xff0c;经过200次迭代后的LeNet-5的准确率为60%左右&#xff0c;这个结果差强人意&#xff0c;毕竟…

图片获取像素坐标html,HTML5画布Canvas图片抽取、像素信息获取、命中检测

今天主要介绍canvas中比较强大的功能比如将画布内容抽取为图片获取、修改画布的像素信息以及画布的命中检测首先我仍然需要创建画布图片抽取首先要明确的一点是toDataURL()是canvas对象自身的方法而不是环境对象的这个方法会将canvas的内容抽取为一张图片(base64编码)我们来看一…

CentOS6 下Samba服务器的安装与配置

原地址&#xff1a;http://www.cnblogs.com/mchina/archive/2012/12/18/2816717.html 一、简介 Samba是一个能让Linux系统应用Microsoft网络通讯协议的软件&#xff0c;而SMB是Server Message Block的缩写&#xff0c;即为服务器消息块 &#xff0c;SMB主要是作为Microsoft的网…

傅里叶变换 直观_A / B测试的直观模拟

傅里叶变换 直观Many of us have heard, read, or even performed an A/B Test before, which means we have conducted a statistical test at some point. Most of the time, we have worked with data from first or third-party sources and performed these tests with ea…

tableau for循环_Tableau for Data Science and Data Visualization-速成课程

tableau for循环Tableau is software that can help you see and understand your data. It is used for data science and data visualization. Tableau allows you to connect to almost any database, drag and drop to create visualizations, and share with a click.Tabl…

请求接口时使用时间戳

&tnew Date().getTime()转载于:https://www.cnblogs.com/Glant/p/11271960.html