如何成为一个优秀的程序员_如何成为一名优秀的程序员

如何成为一个优秀的程序员

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.mzph.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…