程序员必须/应该知道的模式和原则列表是什么?
我已经编码了几年,但仍然觉得我的知识还不够广泛,不足以成为一名专业人士。我研究过一些与设计模式相关的书籍,但我知道还有很多其他的。
那么有人可以列出您认为有利于成为更好、更专业的程序员的模式和原则吗?
我使用的编程语言:C#、Ruby、Javascript。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
设计模式的百科全书式知识不会让你一事无成。大量的经验应用它们将会。这将教您何时使用它们以及何时不使用它们。
也就是说,最初的设计模式书仍然是我的最爱之一。在进行过程中选择其他模式。
Encyclopedic knowledge of design patterns will get you nowhere. Plenty of experience applying them will. This will teach you when to use them and when not to.
That said, the original Design Patterns book is still one of my favorites. Pick up other patterns as you go along.
原则是我开始的地方,模式紧随其后。
原则:有一个完整的木筏,但这些是我从中获得实际里程的:
其中很多(当组合在一起时)被称为SOLID(面向对象设计)。
模式:
维基百科有一个非常好的软件设计模式列表,假设您还没有见过它然而。
最后要记住的是,存在三种基本类型的模式(加上第四类多线程/并发);了解这些类别并在做某事时牢记它们会有所帮助,它们是:
The principles is where I'd start, with the patterns being a close second.
Principles: There's a whole raft, but these are the ones I get practical mileage from:
A lot of these (when grouped together) are known as SOLID (object-oriented design).
Patterns:
Wikipedia has a pretty good list of Software design patterns, assuming you haven't seen it yet.
A final thing to keep in mind is that there are three basic types of patterns (plus a fourth category for multi-threaded / concurrency); it can help just to know about these categories and to bear them in mind when you're doing something, they are:
我目前正在学习/努力提高我的整体编码能力的一些更独立于语言的技能。
一些书籍推荐问题的链接@SO:
是最好的设计模式书籍
你读过吗?
我选一本关于设计模式的书,
重构和/或测试
将涵盖 TDD、DDD 和设计
.NET 中的模式
有关 TDD 的书籍
设计模式书
C# 单元测试书籍
当然,还有前面评论中提到的实用程序员书籍。
Some of the more language-independent skills that I'm currently learning/working towards to improve my coding as a whole.
Some links to book recommnendation questions @ SO:
are the best design patterns books
you have read?
me pick a book on design patterns,
refactoring, and/or testing
that will cover TDD, DDD and Design
Patterns in .NET
books about TDD
Design Patterns Book
C# Unit testing book
And of course, the Pragmatic Programmer books as mentioned in the earlier comment.
掌握工具(例如编程范例、模式、源代码控制、单元测试...)是必不可少的,但仅仅称自己为“专业”还不够:恕我直言,真正专业程序员的标志是能够理解她的客户需要。不幸的是,这种知识很难从书本上学到。
Mastering tools (e.g. programming paradigms, patterns, source control, unit tests...) is essential, but it's not enough to call yourself a "professional": IMHO, the mark of a truly professional programmer is the ability to understand what her client needs. Unfortunately, this kind of knowledge is very hard to learn from a book.
我认为最好的方法是学习大量的语言。
LISP、Scheme、Python、Smalltalk、Erlang、Prolog、Eiffel 等
并用它们构建东西。
I think the best way is to learn plenty of language.
LISP, Scheme, Python, Smalltalk, Erlang, Prolog, Eiffel and many others
And build stuff with them.
Martin Fowler 的企业应用程序架构模式,用于与其他开发人员建立共享词汇表(例如存储库、活动记录、领域模型、工作单元)。
Douglas Crockford 的 Javascript:优秀部分,真正了解 Javascript 的工作原理。
我真的建议进入 TDD(测试驱动开发)。有很多很好的 TDD 书籍,但如果您正在进行棕地开发(我们大多数人都是这样),那么我真的会推荐 Michael Feather 的 有效处理旧代码。
最后,这本书向您展示了如何重构和干净的代码:
Bob 叔叔的简洁代码。
Martin Fowler's Patterns of Enterprise Application Architecture to build up a shared vocabulary with other developers (e.g. Repository, Active Record, Domain Model, Unit of Work).
Douglas Crockford's Javascript: The Good Parts to actually understand how Javascript works.
And I'd really recommend getting into TDD (Test Driven Development). There are a bunch of good TDD books but if you are doing brownfield development (which most of us are) then I'd really recommend Michael Feather's Working Effectively with Legacy Code.
And finally the book that shows you just how refactored and clean code can be:
Uncle Bob's Clean Code.
除了编写代码之外,您还应该尝试阅读代码。例如,从开源项目下载代码,尝试修改它并了解它在做什么以及为什么。
或者尝试查看您自己以前项目中的代码。现在你会采取什么不同的做法?您还能理解为什么要这样做吗?
您可能还想研究敏捷社区中的一些实践。尤其是 测试驱动开发 是提高代码质量的好方法。
In addition to writing code you should also try reading code. For example, download code from open source projects, try to tinker with it and understand what it's doing and why.
Or try reviewing your own code from a previous project. What would you do differently now? Can you still understand why you built it the way you did?
You may also want to look into some of the practices that have come out of the agile community. Especially Test Driven Development comes to mind as a great way to improve the quality of your code.
我认为,
《Head First Design Pattern》一书中描述的所有模式都是设计师/程序员必须了解的最低限度。我建议从这本书开始学习设计模式。
另一本书《设计模式工作手册》也很好练习。
I think,
All the patterns described in the book Head First Design Pattern are the minimum that a designer/programmer must know. I suggest this book to start learning design patterns.
Another book, Design Pattern Work Book is also good to practice.