如何成為一個優秀的程序員_如何成為一名優秀的程序員

如何成為一個優秀的程序員

by Amy M Haddad

通過艾米·M·哈達德(Amy M Haddad)

如何成為一名優秀的程序員 (How to be a great programmer)

What sets apart the really great programmers?

是什么使真正出色的程序員與眾不同?

As we all know, great programmers build amazing features, websites, apps, and the like. But what do they have in common?

眾所周知,優秀的程序員會構建出色的功能,網站,應用程序等。 但是它們有什么共同點?

In my research, it’s not just about knowing a language really well or having a particular educational background. It’s that the really talented programmers have mastered the fundamentals. That foundation is what enables them to build great things and come up with breakthrough ideas.

在我的研究中,這不只是真正了解一種語言或具有特定的教育背景。 才華橫溢的程序員已經掌握了基礎知識。 這個基礎使他們能夠構建偉大的事物并提出突破性的想法。

Think of a pyramid. It has a large base, but gradually gets smaller and thinner toward the top. Learning the fundamentals of programming forms that base. Everything takes off from there.

想想一個金字塔。 它的底面很大,但逐漸向頂部變小變細。 學習編程基礎的基礎。 一切都從那里起飛。

So what are those fundamentals? Based on my experience and the programmers whose backgrounds I’ve researched, I see programming fundamentals as a two-part approach.

那么這些基本原理是什么? 根據我的經驗以及研究過背景的程序員,我將編程基礎知識分為兩部分。

問題解決者非凡 (Problem Solver Extraordinaire)

First, you have to be an effective problem solver. This is an important place to start since programming is problem-solving.

首先,您必須是有效的問題解決者。 這是一個重要的起點,因為編程可以解決問題。

Although there are many ways to solve a problem, there are a few parts of the process that stand out to me. Programmers who are also great problem solvers distill a problem to its essence, in order to identify their overall aim and begin a problem with purpose. Then, they break each problem into small, manageable parts — attacking each part in turn, and sometimes in visual terms by drawing a picture to make it “real world.”

盡管有很多方法可以解決問題,但是過程中的一些部分對我很突出。 也是偉大的解決問題者的程序員,從本質上講問題,以便確定他們的總體目標,并從目的著手解決問題。 然后,他們將每個問題分解成可管理的小部分–依次攻擊每個部分,有時還通過繪制圖片使其成為“真實世界”來以視覺方式進行攻擊。

The process is harder than it sounds. When I started to program, I hit a wall: like many others, I never learned how to problem solve in school; it’s a skill that’s not readily taught. I was given a problem set in math class and just dove in, which is what I did when I started to program. Unsurprisingly, I was spinning my wheels unnecessarily and hitting roadblocks on the simplest of problems.

這個過程比聽起來困難。 當我開始編程時,我遇到了麻煩:像許多其他人一樣,我從未在學校學習過如何解決問題的方法; 這是一項不易教授的技能。 我在數學課上遇到了一個問題,只是開始學習,這就是我開始編程時所做的。 毫不奇怪,我不必要地打了個轉輪,就最簡單的問題打了障礙。

Things began to change when I began learning about the problem solving process, and how to problem solve effectively. I now begin a problem with intent. I have George Polya’s book, How to Solve It, to thank for that bit of advice.

當我開始學習問題解決過程以及如何有效解決問題時,事情開始發生變化。 我現在開始意圖問題。 感謝George Polya的書《 如何解決它》

I’ve adapted some of Polya’s ideas to programming, like understanding the problem. “The problem must be understood,” Polya writes. This includes being able to “point out the principal parts of the problem, the unknown, the data and the condition.” For each problem, I pull out a sheet of paper and write answers to these questions: what am I solving for or trying to find? (unknown); what am I given? (data); and what constraints or details do I need to be aware of? (condition).

我已經將Polya的一些想法應用于編程,例如理解問題。 “必須理解問題,” Polya寫道。 這包括能夠“指出問題的主要部分,未知,數據和狀況。” 對于每個問題,我都會抽出一張紙并寫下以下問題的答案:我要解決或試圖找到什么? (未知); 我得到什么? (數據); 我需要注意哪些約束條件或細節? (健康)狀況)。

Understanding the problem may seem obvious, but the obvious is easily overlooked. On more than one occasion, I’ve poured hours into a problem only to realize much later that I missed a small, but critical detail in the problem statement. Writing out problem details slows me down mentally, and helps me think through exactly what I need to do, which is half of the battle.

理解問題似乎很明顯,但顯而易見的事實很容易被忽略。 在不止一次的情況下,我花了很多時間解決問題,但后來才意識到我錯過了問題陳述中一個很小但很關鍵的細節。 寫出問題的詳細信息會使我的思想減慢,并幫助我仔細考慮需要做的事情,這是成功的一半。

From there, I make a plan, which is another of Polya’s suggestions. It makes sense. I write an outline before I write an article. An artist makes a sketch of the painting before working on the painting itself. A builder uses drawings and blueprints to build a house. It’s no different with programming. Instead of rushing into doing, I need to start by thinking about what I’m setting out to do and make a plan of attack.

從那里,我制定了一個計劃,這是Polya的另一個建議。 這說得通。 在寫文章之前,我先寫大綱。 在進行繪畫本身工作之前,藝術家會先繪制繪畫草圖。 建筑商使用圖紙和藍圖建造房屋。 編程沒有什么不同。 我不必急著去做 ,而是要開始思考我打算做的事情并制定進攻計劃。

There are many ways to go about this. Sometimes I outline the steps I need to take in numerical order: first do this, second do that. Other times I make the problem visual. When I was learning about for loops, I pulled out a handful of almonds and physically iterated through the pile. It’s a silly example, but it helped me think through the problem.

有很多方法可以解決此問題。 有時,我會按數字順序列出需要采取的步驟:首先執行此操作,然后執行此操作。 其他時候,我將問題可視化。 當我學習循環時,我抽出了少數杏仁,并在堆中進行了物理迭代。 這是一個愚蠢的例子,但是它幫助我思考了這個問題。

I’ll also draw pictures or diagrams. For a recursive problem, I’ll draw a diagram of what’s happening on each recursive call until I hit the base case. Almost always, however, I find a way to simplify the problem to make it more manageable and to help me spot a pattern. Above all, the aim for me is to enter a problem with purpose, and maintain that sense of purpose throughout.

我還將繪制圖片或圖表。 對于遞歸問題,我將畫出每個遞歸調用發生的情況的圖表,直到找到基本情況為止。 但是,幾乎總是可以找到一種方法來簡化問題,使其更易于管理,并幫助我確定模式。 最重要的是,對我來說,目的是解決有目的的問題,并始終保持這種目的感。

Despite the best made plans, problems are still hard and I still get stuck. Becoming a great problem solver takes time; it’s a skill I’m still working on and it’s definitely worth the effort. It’s a difference you can see.

盡管制定了最好的計劃,但問題仍然很棘手,我仍然陷入困境。 成為一個出色的問題解決者需要時間。 這是我仍在努力的一項技能,絕對值得付出努力。 您可以看到差異。

When I read code written by a great problem solver, it’s clean and easy to understand. Variables are well named. Functions are short and crisp. Each line of code has a specific purpose; the fluff is removed. The clarity of the code mirrors the programmer’s thought-process: I can read the program from top to bottom and know exactly what’s going on. That’s great problem solving, and that’s what I’m striving for.

當我閱讀由出色的問題解決者編寫的代碼時,它很干凈而且易于理解。 變量是很好的命名。 功能簡短。 每行代碼都有特定的用途。 絨毛被去除。 代碼的清晰性反映了程序員的思想過程:我可以從上至下閱讀程序,并確切地知道發生了什么。 那是解決問題的好方法,而這正是我所追求的。

那你的電腦呢? (What about your Computer?)

Learning computer science is the second programming fundamental. I recently started learning computer science, and love it because I’m moving beyond surface level. I’m going “behind the scenes” to learn what happens when I use a built-in function, for example. I’m also learning about memory and run time, among many other topics. In short, I’m learning why a computer does the things it does.

學習計算機科學是第二個編程基礎。 我最近開始學習計算機科學,并喜歡它,因為我已經超越了表面層面。 例如,我將“在幕后”學習使用內置函數時會發生什么。 我還正在學習有關內存和運行時間的許多其他主題。 簡而言之,我正在學習為什么計算機可以完成其工作。

Knowing the “why” enhances my contextual knowledge and makes me a more informed programmer. As a result, I’m more thoughtful with the code I write. Now that I know a bit about run time, for instance, I’ll opt to use a binary search instead of iterating through each element in a list.

知道“為什么”會增強我的上下文知識,并使我成為一個更有見識的程序員。 結果,我對編寫的代碼更加體貼。 例如,現在我對運行時有所了解,我將選擇使用二進制搜索而不是遍歷列表中的每個元素。

It’s also enriching my understanding of how core programming concepts work. For example, I was working on a recursive problem and I wasn’t getting the solution I anticipated. After close examination, I learned why: it had to do with the execution of the call stack, an idea that would’ve escaped me just a few months ago.

這也豐富了我對核心編程概念如何工作的理解。 例如,我正在處理一個遞歸問題,但沒有得到我期望的解決方案。 經過仔細檢查,我了解了原因:它與調用堆棧的執行有關,這種想法在幾個月前就沒能對我產生作用。

Or take classes. I struggled immensely with classes for the longest time, and was terrified to use one. I knew how to write a class, but wasn’t confident when and why I’d use one. That changed when I learned what actually happens in my computer when I create instances and call methods. It finally clicked, once I had some context. For both recursion and classes, computer science bridged gaps in my knowledge.

或參加課程。 我花了很長時間在課堂上苦苦掙扎,并為使用一個而感到恐懼。 我知道如何寫一堂課,但是我不確定何時以及為什么要使用一堂課。 當我了解創建實例和調用方法時計算機中實際發生的情況時,情況發生了變化。 一旦我有了一些上下文,它終于點擊了。 對于遞歸和課堂,計算機科學彌合了我的知識空白。

All too often, the fundamentals get pushed aside. Progress can be slow, and people tend to pick more “fun” stuff to work on when given the option. That’s a shame. Programmers who master the fundamentals seem to code with confidence: they know the “how” and “why” of their programming choices, which improves their work and builds their credibility with others.

很多時候,基本面被拋在一邊。 進展可能會很慢,并且如果有選擇,人們會傾向于選擇更多的“有趣”東西來進行工作。 真可惜 掌握基礎知識的程序員似乎對代碼充滿信心:他們知道編程選擇的“方式”和“原因”,從而改善了工作并建立了與他人的信譽。

Plus, a solid grasp of the fundamentals makes learning new languages and technologies easier to do. For example, taking the time to really understand core concepts like iteration, recursion, and abstraction with one language will help when learning another. Simply put, there’s a lot to gain and little to lose by mastering the fundamentals.

另外,扎實的基礎知識使學習新語言和新技術變得更加容易。 例如,花點時間真正了解一種語言的核心概念,例如迭代,遞歸和抽象將對學習另一種語言有所幫助。 簡而言之,掌握基礎知識可以帶來很多收獲,而沒有損失。

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

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

翻譯自: https://www.freecodecamp.org/news/how-to-be-a-great-programmer-34939494996d/

如何成為一個優秀的程序員

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/391568.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/391568.shtml
英文地址,請注明出處:http://en.pswp.cn/news/391568.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

pymc3使用_使用PyMC3了解飛機事故趨勢

pymc3使用Visually exploring historic airline accidents, applying frequentist interpretations and validating changing trends with PyMC3.使用PyMC3直觀地瀏覽歷史性航空事故,應用常識性解釋并驗證變化趨勢。 前言 (Preface) On the 7th of August this yea…

視頻監控業務上云方案解析

摘要:阿里云針對安防監控服務在傳統IT架構下面臨的上述問題,基于阿里云存儲服務,提供視頻監控解決方案。從2015年推出視頻監控存儲與播放解決方案以來,幫助大量的視頻監控企業解決了上云的過程中遇到的問題,針對不同的…

leetcode 341. 扁平化嵌套列表迭代器(dfs)

給你一個嵌套的整型列表。請你設計一個迭代器,使其能夠遍歷這個整型列表中的所有整數。 列表中的每一項或者為一個整數,或者是另一個列表。其中列表的元素也可能是整數或是其他列表。 示例 1: 輸入: [[1,1],2,[1,1]] 輸出: [1,1,2,1,1] 解釋: 通過重復…

爬蟲結果數據完整性校驗

數據完整性分為三個方面: 1、域完整性(列) 限制輸入數據的類型,及范圍,或者格式,如性別字段必須是“男”或者“女”,不允許其他數據插入,成績字段只能是0-100的整型數據,…

go map數據結構

map數據結構 key-value的數據結構,又叫字典或關聯數組 聲明:var map1 map[keytype]valuetype var a map[string]string var a map[string]int var a map[int]string var a map[string]map[string]string備注:聲明是不會分配內存的&#xff0c…

吳恩達神經網絡1-2-2_圖神經網絡進行藥物發現-第2部分

吳恩達神經網絡1-2-2預測毒性 (Predicting Toxicity) 相關資料 (Related Material) Jupyter Notebook for the article Jupyter Notebook的文章 Drug Discovery with Graph Neural Networks — part 1 圖神經網絡進行藥物發現-第1部分 Introduction to Cheminformatics 化學信息…

android初學者_適用于初學者的Android廣播接收器

android初學者Let’s say you have an application that depends on a steady internet connection. You want your application to get notified when the internet connection changes. How do you do that?假設您有一個依賴穩定互聯網連接的應用程序。 您希望您的應用程序在…

Android熱修復之 - 阿里開源的熱補丁

1.1 基本介紹     我們先去github上面了解它https://github.com/alibaba/AndFix 這里就有一個概念那就AndFix.apatch補丁用來修復方法,接下來我們看看到底是怎么實現的。1.2 生成apatch包      假如我們收到了用戶上傳的崩潰信息,我們改完需要修復…

leetcode 456. 132 模式(單調棧)

給你一個整數數組 nums &#xff0c;數組中共有 n 個整數。132 模式的子序列 由三個整數 nums[i]、nums[j] 和 nums[k] 組成&#xff0c;并同時滿足&#xff1a;i < j < k 和 nums[i] < nums[k] < nums[j] 。 如果 nums 中存在 132 模式的子序列 &#xff0c;返回…

seaborn分類數據可視:散點圖|箱型圖|小提琴圖|lv圖|柱狀圖|折線圖

一、散點圖stripplot( ) 與swarmplot&#xff08;&#xff09; 1.分類散點圖stripplot( ) 用法stripplot(xNone, yNone, hueNone, dataNone, orderNone, hue_orderNone,jitterTrue, dodgeFalse, orientNone, colorNone, paletteNone,size5, edgecolor"gray", linewi…

數據圖表可視化_數據可視化十大最有用的圖表

數據圖表可視化分析師每天使用的最佳數據可視化圖表列表。 (List of best data visualization charts that Analysts use on a daily basis.) Presenting information or data in a visual format is one of the most effective ways. Researchers have proved that the human …

javascript實現自動添加文本框功能

轉自&#xff1a;http://www.cnblogs.com/damonlan/archive/2011/08/03/2126046.html 昨天&#xff0c;我們公司的網絡小組決定為公司做一個內部的網站&#xff0c;主要是為員工比如發布公告啊、填寫相應信息、投訴、問題等等需求。我那同事給了我以下需求&#xff1a; 1.點擊一…

從Mysql slave system lock延遲說開去

本文主要分析 sql thread中system lock出現的原因&#xff0c;但是筆者并明沒有系統的學習過master-slave的代碼&#xff0c;這也是2018年的一個目標&#xff0c;2018年我都排滿了&#xff0c;悲劇。所以如果有錯誤請指出&#xff0c;也作為一個筆記用于后期學習。同時也給出筆…

傳智播客全棧_播客:從家庭學生到自學成才的全棧開發人員

傳智播客全棧In this weeks episode of the freeCodeCamp podcast, Abbey chats with Madison Kanna, a full-stack developer who works remotely for Mediavine. Madison describes how homeschooling affected her future learning style, how she tackles imposter syndrom…

leetcode 82. 刪除排序鏈表中的重復元素 II(map)

解題思路 map記錄數字出現的次數&#xff0c;出現次數大于1的數字從鏈表中移除 代碼 /*** Definition for singly-linked list.* public class ListNode {* int val;* ListNode next;* ListNode() {}* ListNode(int val) { this.val val; }* ListNode(…

python 列表、字典多排序問題

版權聲明&#xff1a;本文為博主原創文章&#xff0c;遵循 CC 4.0 by-sa 版權協議&#xff0c;轉載請附上原文出處鏈接和本聲明。本文鏈接&#xff1a;https://blog.csdn.net/justin051/article/details/84289189Python使用sorted函數來排序&#xff1a; l [2,1,3,5,7,3]print…

接facebook廣告_Facebook廣告分析

接facebook廣告Is our company’s Facebook advertising even worth the effort?我們公司的Facebook廣告是否值得努力&#xff1f; 題&#xff1a; (QUESTION:) A company would like to know if their advertising is effective. Before you start, yes…. Facebook does ha…

如何創建自定義進度欄

Originally published on www.florin-pop.com最初發布在www.florin-pop.com The theme for week #14 of the Weekly Coding Challenge is: 每周編碼挑戰第14周的主題是&#xff1a; 進度條 (Progress Bar) A progress bar is used to show how far a user action is still in…

基于SpringBoot的CodeGenerator

title: 基于SpringBoot的CodeGenerator tags: SpringBootMybatis生成器PageHelper categories: springboot date: 2017-11-21 15:13:33背景 目前組織上對于一個基礎的crud的框架需求較多 因此選擇了SpringBoot作為基礎選型。 Spring Boot是由Pivotal團隊提供的全新框架&#xf…

seaborn線性關系數據可視化:時間線圖|熱圖|結構化圖表可視化

一、線性關系數據可視化lmplot( ) 表示對所統計的數據做散點圖&#xff0c;并擬合一個一元線性回歸關系。 lmplot(x, y, data, hueNone, colNone, rowNone, paletteNone,col_wrapNone, height5, aspect1,markers"o", sharexTrue,shareyTrue, hue_orderNone, col_orde…