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.pswp.cn/news/392053.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/392053.shtml
英文地址,請注明出處:http://en.pswp.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