成为更好的程序员的路线图
人们总是说,编程越多,你就会变得越好。听起来不错而且很真实。 但我想知道是否有一条行之有效的途径可以成为一名更好的程序员。
类似于:
- 学习 a
- 学习 b
- 学习 c > “现在你可以燃烧引擎了”
- 根据你的学习尝试一些东西。
答案可能类似于计算机科学课程路线图,但我想听听成功的程序员的意见,他们可能想参与一些值得注意的事情。
谢谢
Its always said that more you program, the better you become. Sounds good and true.
But I was wondering if there is a proven route to becoming a better programmer.
Something like:
- Learn a
- Learn b
- Learn c > 'Now you are good to burn the engines'
- Try stuff around based on your learning.
The answer might be similar to a CS course roadmap, but I want to hear from successful programmers who might want to pitch in with something notable.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(22)
熟能生巧并不是真的。
只有完美的练习才能达到完美。
如果您所做的只是一次又一次地重复相同的不良做法,那么您只会更快地创建不良代码。
无论如何都要继续编码。但同时也要对你所做的一切持批评态度。始终保持一颗偏见的眼睛,寻找把事情做得更好的方法。广泛阅读以获得新想法。与其他人谈论他们如何做事。看看别人的代码,有好有坏。
没有“可靠”的方法来学习我所知道的任何东西。如果有的话,任何人都可以掌握这一点。
It's not true that practice makes perfect.
It's perfect practice that makes perfect.
If all you do is keep repeating the same bad practices again and again, you'll only make it possible to create bad code faster.
By all means keep coding. But at the same time be critical of everything you do. Always have a jaundiced eye that looks for ways to do things better. Read widely to get new ideas. Talk to others about how they do things. Look at other people's code, good and bad.
There's no "sure" way to learn anything that I know of. If there was, anyone could master this.
所有问题都是修辞性的,旨在激发思考。
技术部分:
流程部分:
软技能:
All questions are rhetorical and meant to stimulate thought.
Technical parts:
Process parts:
Soft skills:
我的主要建议是:不要害怕重写自己的代码。看看你一个月前写的东西,你就会发现缺陷并想要重写。
确保您了解一些基础知识:集合、相等、哈希码等。这些在几乎所有现代语言中都很有用。
根据您使用的语言 - 使用 lint 和度量工具并在您的代码上运行它们。并非他们的所有建议都适用,但了解哪些是重要的、哪些是不重要的。例如 Java 的 FindBugs、PMD 等。
最重要的是,完善并不断完善你的工作。不要将您的工作视为废弃软件!
My main piece of advice would be: don't be afraid to rewrite your own code. Look at stuff you wrote even a month ago and you will see flaws and want to rewrite stuff.
Make sure that you understand some fundamentals: collections, equality, hashcodes etc. These are useful across pretty much all modern languages.
Depending on the language you use - use lint and metric tools and run them over your code. Not all their suggestions will be applicable but learning which are important and which are not is important. E.g FindBugs, PMD etc for Java.
Above all refine and keep refining your work. Don't treat your work as abandonware!
诀窍是知道首先要学习什么:
在那之后,天空才是极限。
The trick is knowing what to learn first:
After that the sky is the limit.
我会大致按照这个顺序进行改进,在前一个构建的基础上进行迭代:
I would look at improving roughly in this order, in iterations with each building on the previous one:
学习编程语言在很多方面与学习口语相似。做好这件事的唯一方法就是尽可能多地这样做。在其他作品中
Learning a programming language is in many ways similar to learning a spoken language. The only way to get good at it is to do it as often as possible. In other works
花时间学习各种编码技术、工具和编程智慧。我发现这对我的发展至关重要。只需编写代码并感到高效,这非常容易。如果你有更多的知识/武器来敲击下一个小部件,会怎么样呢?
知识/诀窍是我们真正的货币。我们知道的越多,我们就越能更好地决定应该如何做某事并且做得更快。
例如,了解:
•开发实践、软件设计、估算、方法论、业务分析、数据库设计(有很多很棒的书籍和在线资源)
•阅读代码 - 开源项目是一个很好的地方。读
编程博客
•尝试参与开源
项目。
•寻找编程用户组
您所在的城镇和/或可以指导您的人。
是的,正如前面提到的练习。不要只是阅读、实践并观察你将如何进步。 :)
Take time to learn about all sorts of coding techniques, tools and programming wisdom. This I have found to be crucial to my development. It's to easy to just code away and feel productive. What about what could be if you just had some more knowledge / weaponry under your belt to bang out that next widget.
Knowledge/know how is our real currency. The more we know the more we can make a better decision about how something should be done and do it faster.
For example, learn about:
•Development Practices, Software Design, Estimation, Methodologies Business Analysis Database Design (there are a lot of great books out there and online resources)
•Read Code - Open Source Projects are a good place for this. Read
Programming blogs
•Try to participate on Open Source
Projects.
•Look for programming user groups in
your town and/or someone who can mentor you.
And yes, as mentioned practice. Don't just read, do and watch how you will improve. :)
练习,练习,练习。
一旦您克服了编程的基本障碍,您还可以阅读有用的书籍(即 Code Complete、Effective Java 或同等书籍等),以获取有关如何改进代码的想法。
Practice, practice, practice.
Once you're over the basic hump of being able to program, you can also read useful books (i.e. Code Complete, Effective Java or equivalents, etc.) for ideas on how to improve your code.
首先也是最重要的是编写代码。尽可能多地写。解决难题。如果你想成为一名真正优秀的程序员,你需要深入了解你正在做的事情。花大量时间在调试器上查看事情是如何工作的。如果您想成为一名真正了解正在发生的事情的优秀程序员,您需要脚踏实地并编写高度异步的代码,了解处理器的工作原理以及为什么 SSE 如此出色。了解线程原语并能够编写它们以及描述处理器中实际发生的情况。我可以继续这里,但你明白了。
其次,找到比你懂得多得多的人并学习。如果您已经深深地沉浸在编写大量代码中,这种关系将会发挥得更好。
第三,花一些时间研究大型高质量的开源代码库。我从 Quake I 和 Quake II 代码中学到了很多东西。帮助我成为一名更好的程序员。
第四,解决难题。挑战你的极限。建造你认为不可能的东西。现在我正在编写一个专门的编译器。在过去的几个月里,我在这方面学到了很多东西。
First and foremost write code. Write as much as you can. Tackle hard problems. If you want to be a really good programmer you need to get into the guts of what you are doing. Spend a lot of time in debuggers looking at how things work. If you want to be a good programmer who really understands what is going on you need to get down to the metal and write highly async code, learn about how processors work and why SSE is so awesome. Understand threading primitives and be able to write them as well as describe what is actually happening in the processor. I could keep going here but you get the idea.
Second find someone who knows a lot more than you and learn. This relationship will work better if you are already deeply immersed in writing lots of code.
Third, spend some time in a large high quality open source code base. I learned a ton from the Quake I and Quake II code. Helped me be a better programmer.
Fourth take on hard problems. Push your limits. Build things that you thought were impossible. Right now I am writing a specialized compiler. I have learned so much just working on this for the last couple of months.
当然,严格来说,你练习编程越多,你就越能更好地解决这类问题。但这是你真正想要的吗?
从本质上讲,编程是一项人类活动,而不仅仅是一项技术活动。提高你的计算机技能很容易,但提高你的人际交往能力却不那么难。
阅读 Hohmann 的《软件专业人士之旅》。霍曼描述的概念之一是“认知库”,其中包括编程技能和非编程技能。扩大你的认知库,你的编程技能也会提高。
还要阅读大量非编程书籍,并观察周围的世界。创建有用的隐喻是成功程序员的一项基本技能。为什么餐馆要这样做?当垃圾部门每隔几天而不是每天收垃圾时,他们在做什么权衡?规模扩张如何影响杂货店的经营方式?成为一个有好奇心的人才能成为更好的程序员。
Sure, strictly speaking, the more you practice programming, the better you become at solving those sorts of problems. But is that what you really want?
Programming is a human activity more than a technological one, at its heart. It's easy to improve your computer skills, not so hard to improve your interpersonal skills.
Read "Journey of the Software Professional" by Hohmann. One of the concepts the concepts Hohmann describes is the "cognitive library," which includes both programming skills and non-programming skills. Expand your cognitive library, and your programming skill will improve too.
Read a lot of non-programming books too, and observe the world around you. Creating useful metaphors is an essential skill for the successful programmer. Why do restaurants do things how they do? What trade-offs is the garbage department making when they pick up the garbage every few days instead of every day? How does scaling affect how a grocery store does business? Be an inquisitive human to be a better programmer.
对我来说,必须有一个学习新东西的理由……也就是说,除非我有一个项目或需要解决一些问题,否则就没有希望。如果满足这个先决条件,那么我通常会尝试让“Hello, world”工作,然后就没有极限了。现在的大部分开发工作都只是学习新的 API。偶尔会有某种范式转变让你大吃一惊,但这并不像人们想象的那么普遍,恕我直言。
For me, there has to be a reason to learn something new... that is, unless I have a project in mind or some problem I need to solve, there's no hope. If that prerequisite is met, then I usually try to get "Hello, world" working, and after that the sky's the limit. So much of development these days is just learning new APIs. Occasionally there's some kind of paradigm shift that blows your mind, but that's not as common as people like to think, IMHO.
找到一个让您感兴趣的程序,一个可以解决问题的程序,或者一个可以简化您的许多任务的程序。尝试写一些类似的东西。您将很快上手,同时享受其中的乐趣。
Find a program that intrigues you, one that solves a problem, or one that would simplify many of your tasks. Try to write something similar. You'll get up to speed very quickly and have fun doing it at the same time.
您可以尝试真正学好一件事,然后扩展到与您所学内容相关的编程领域,这样您就可以为客户提供完整的解决方案。
同时,花一部分时间探索舒适区之外的事物。
You can try learning one thing really well and then expanding out to programming areas that are associated with the things that you have learnt, so that you can offer complete solutions to customers.
At the same time, devote part of your time to explore things outside your comfort zone.
当你已经学到了一些东西时,尝试学习更难的东西。阅读并练习很多第一次看起来令人困惑的事情(lambda 函数、线程、数组操作等)。这需要时间,但一旦你练习得足够多,一开始看起来令人困惑的事情就会变得熟悉和容易。
One you have learned something, try to learn something a little harder. Read and practice a lot about things that seem confusing at first time (lambda functins, threading, array manipulation, etc). It will take its time, but once you have practiced enough, what seemed confusing at first, will be familiar and easy.
除了这里已经给出的其他很好的建议之外,不要害怕阅读有关编码和良好实践的内容,但也要对一切持保留态度,看看什么最适合你。很多建议都是意见。
值得阅读的好网站:
-thedailywtf.com
-joelonsoftware.com
-codinghorror.com
-blogs.msdn.com/oldnewthing
编程竞赛网站是一个获得练习的好地方。这些将帮助您学习如何编写好的算法,不一定是可维护的代码,但它们仍然是学习的好起点。
我以前用过的(当我有时间的时候)是:
http://uva.onlinejudge.org/
学习不止一种语言。当然,一次一个,但最终你应该能流利地使用几个。我认为这会给你一个更好的视角,并帮助你成为编程专家,而不是成为某种语言的专家。
了解各级计算机、硬件、操作系统等的详细信息。理想情况下,您应该能够构建自己的系统,在其上安装多个操作系统,并诊断几乎所有可能出现的问题。我知道许多程序员不是“计算机技术人员”,他们无法理解各个级别正在发生的事情,这成为诊断和修复异常错误或性能问题的主要障碍。
In addition to the rest of the great advice already given here, don't be afraid to read about coding and good practice, but also take everything with a grain of salt and see what works best for you. A lot of advice is opinion.
Good sites to read:
-thedailywtf.com
-joelonsoftware.com
-codinghorror.com
-blogs.msdn.com/oldnewthing
A great place to get practice is programming competition websites. Those will help you learn how to write good algorithms, not necessarily maintainable code, but they're still a good place to start for learning.
The one I used to use (back when I had time) was:
http://uva.onlinejudge.org/
Learn more than one language. One at a time, definitely, but ultimately you should be fluent in a couple. This will give you a better perspective I think, and help you to become an expert at programming, rather than being an expert at a certain language.
Learn the ins and outs of computers at all levels, hardware, os, etc. Ideally you should be able to build your own system, install multiple operating systems on it, and diagnose just about every problem that can arise. I know many programmers who are not "computer tech people" and their failure to understand what is happening at every level becomes a major hindrance in diagnosing and fixing unusual bugs or performance issues.
除了查看“上周代码”之外,还应在交付后与您的工作用户进行交谈 - 如果可能的话,您自己也可以。
这不是我的包,但我认识的一些最好的程序员已经花时间支持应用程序了。我确信这次经历改进了他们的产品。
As well as looking at 'last weeks code', talk to users of your work after delivery - be one yourself if possible.
Its not my bag, but some of the best coders I know have spent time supporting applications. The experience improved their product I'm sure.
吃呼吸梦想你使用的编程语言(不认真,它有帮助)
eat breath dream the programming language your using (no seriously, it helps)
学习有两种——
1. 非正式的(比如你如何学习如何在社会中发挥作用——通过与同龄人和家人的互动)
2. 正式培训(如高中培训 - 通过计划的指导)
如果您想要入门级编程工作,那么通过本科计算机科学/工程学位进行正式培训是不错的选择。然而,如果你想成为一名摇滚明星开发人员,最好通过非正式培训来完成——犯无意识的错误,让高级开发人员咒骂你,学习一种设计模式,因为你正在更新的应用程序使用它,因为一个糟糕的应用程序而几乎哭泣。开发人员编写了一个巨大而混乱的程序,缺乏文档和最佳实践,现在您必须尽快对其进行多次更新;这些性质的东西。
任何人都很难为您提供所有您需要知道的清单。它因领域而异(例如网络开发人员与桌面开发人员),并且因公司而异(例如销售软件的微软与主要在汽车中使用软件的通用汽车)。非正式培训和参与尝试学习在我看来,更好地完成工作并获得晋升是你最好的选择。
为了证明我的观点,这里的每个人都有很好的答案,但他们都有所不同。询问一位摇滚明星开发人员他是如何学到某些东西的,或者什么时候学到的,为什么;他们可能不知道——事情就这样发生了。
There are two kinds of learning -
1. Informal (like how you learned how to function in society- through interaction with peers and family)
2. Formal (like your high school training- through planned instruction)
If you want an entry-level programming job, formal training via an undergrad Computer Science/Engineering degree is the way to go. However, if you want to become a rock-star developer, it is best done by informal training- make unintentional mistakes and have senior developers curse at you, learn a design pattern because an app you are updating uses it, almost cry because a bad developer wrote a huge messy program lacking documentation and best practices and now you have to do several updates to it ASAP; thing of these nature.
It is hard for anyone to give you a list of all you need to know. It varies per area (e.g. a web developer vs. to a desktop developer) and it varies per company (e.g. Microsoft that sells software vs. General Motors that mainly just use it in their cars.) Informal traiing and being engaged in trying to learn to do your job better and get promoted is your best bet in my opinion.
To prove my point, everyone here has great answers but they all differ. Ask a rock-star developer how he learned something or when, why; they may not know- things just happen.
单独和集体练习
保持开放的心态,不断学习新事物,不要将自己局限于熟悉的事物。不仅仅是从技术角度来看,UI设计,人际交往能力,......不要害怕新事物
同行评审,与人们谈论你的代码,让人们与你谈论他们的代码,每个人都有独特的看待问题的方式,你将从同行那里学到很多东西
喜欢编码。如果您热爱自己正在做的事情,那么投入大量时间似乎毫不费力。每个编码员都需要动力!
Practice, individually and collectively
Keep an open mind, always learn new things, don't limit yourself to what's familiar. Not solely from a tech perspective, ui design, people skills, ... Don't be afraid of what's new
Peer review, talk to people about your code, let people talk to you about their code, everyone has a unique way of looking at a problem and you will learn a great deal from peers
Love coding. If you love what you're doing, putting in alot of time seems effortless. Every coder needs the drive!
对这些好答案的一点补充。当我处理别人的代码时,通常我会学到一些新东西。如果您有机会与具有同等或更高技能的其他人一起工作,那么注意他们的编程风格可以让您学到很多东西。
例如,在 C++ 中Javascript 我不再使用不带大括号的 if() 语句。原因是它太容易被错误地放置:
这是一个明显的拼写错误,但很容易引入,特别是在编辑现有代码时。在我看来,我只是称之为防御性编程,但像这样的小技巧对于让你变得更好很有价值。
因此,找到一位同行或导师,并研究他们的代码。
One small addition to these good answers. When I work on someone else's code, usually I pick up something new. If you have the opportunity to work with someone else that is of equal or greater skill, noticing their programming style can teach you tons.
For example, in C++ & Javascript I no longer use if() statements without braces. The reason is that it's just too easy to mistakenly put:
This is an obvious typo, but very easy to introduce, especially if you're editing existing code. I just call it defensive programming in my mind, but little tricks like this are valuable at making you better.
So, find a peer or mentor, and work on their code.
我不确定OP是否正在寻找有关如何成为一名优秀程序员的一般建议,而是寻找更具体的建议。
我知道我正在恢复这个帖子,但我发现它是因为我想看看是否有人已经问过这个问题。
我的想法是,我们能否提出一个类似于 Khan 所绘制的地图的编程概念“知识地图”学院使用。
作为一名程序员,我希望能够可视化不同想法之间的依赖关系和关系,以便我能够了解我目前处于什么技能水平;在解决具有挑战性的主题之前我需要了解什么;并能够直观地看到我的进步。
I am not sure if the OP was looking for general advice on how to be a good programmer, but rather something more specific.
I know I am reviving this thread, but I found it because I was trying to see if anyone asked this question already.
What I had in mind was, can we come up with a "knowledge-map" of programming concepts similar to the map that Khan Academy uses.
As a programmer, I want to be able to visualize the dependencies and relationships between different ideas, so that I can understand what skill level I am currently at; what I need to know before tackling a challenging subject; and be able to visualize my progress.
对路线图存在的信念本身就阻碍了通往完美的道路。
The very belief in the roadmap's existence blocks the road to perfection.