windows 了解windows内部结构?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2002896/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 13:41:18  来源:igfitidea点击:

Knowledge of windows internals?

windows

提问by Tony The Lion

I wondered if any of you have knowledge of the internal workings of windows (kernel, interrupts, etc) and if you've found that you've become a better developer as a result?

我想知道你们中是否有人了解 Windows 的内部工作原理(内核、中断等),并且您是否发现自己因此成为了一名更好的开发人员?

Do you find that the more knowledge the better is a good motto to have as a developer?

您是否发现知识越多越好是作为开发人员的座右铭?

I find myself studying a lot of things, thinking with more understanding, I'll be a better developer. Of course practice and experience also comes into play.

我发现自己学习了很多东西,有了更多的理解,我就会成为一个更好的开发人员。当然,实践和经验也会发挥作用。

采纳答案by Terry Mahaffey

This is a no brainier - absolutely (assuming you're a developer primarily on the Windows platform, of course). A working knowledge of how the car engine works will make a lot of common programming tasks (debugging, performance work, etc) a lot easier.

这很简单 - 绝对的(当然,假设您是主要在 Windows 平台上的开发人员)。了解汽车引擎的工作原理将使许多常见的编程任务(调试、性能工作等)变得更加容易。

Windows Internalsis the standard reference.

Windows Internals是标准参考。

回答by Pavel Radzivilovsky

I believe it is valuable to understand how things work underneath. CLR/.NET to C++, native to ASM, ASM to CPU architecture, building registers and ops from logical gates, logical gates from MOSFETs, transistors from quantum physics and the latter from respective mathematical apparatus (group theory, etc).

我相信了解底层的工作原理是很有价值的。CLR/.NET 到 C++,ASM 原生,ASM 到 CPU 架构,从逻辑门构建寄存器和操作,来自 MOSFET 的逻辑门,来自量子物理学的晶体管以及来自相应数学装置(群论等)的后者。

Understanding low level makes you not only think different but also feel different - like you are in control of things, standing on the shoulders of giants.

了解低层次,不仅让你想的不一样,而且感觉也不一样——就像你在掌控事物,站在巨人的肩膀上。

回答by Kristopher Johnson

More knowledge is always better, and having knowledge at many levels is a lot more valuable than just knowing whatever layer of abstraction you are working at.

更多的知识总是更好,拥有多层次的知识比只知道你正在工作的任何抽象层更有价值。

A good rule of thumb is that you should have a good knowledge of the layer below the layer where you are working. So, for example, if you write a lot of .NET code, you should know how the CLR works. If you write a lot of web apps, you should understand HTTP. If you writing code that uses HTTP directly, then you should understand TCP/IP. If you are implementing a TCP/IP stack, then you need to understand how Ethernet works.

一个好的经验法则是,您应该很好地了解您正在工作的图层下方的图层。因此,例如,如果您编写了大量 .NET 代码,您应该了解 CLR 的工作原理。如果您编写了很多 Web 应用程序,那么您应该了解 HTTP。如果您编写直接使用 HTTP 的代码,那么您应该了解 TCP/IP。如果您正在实施 TCP/IP 堆栈,那么您需要了解以太网的工作原理。

Knowledge of Windows internals is really helpful if you are writing native Win32 code, or if OS performance issues are critical to what you are doing. At higher levels of abstraction, it may be less helpful, but it never hurts.

如果您正在编写本机 Win32 代码,或者如果操作系统性能问题对您正在做的事情至关重要,那么了解 Windows 内部知识真的很有帮助。在更高的抽象层次上,它可能不太有用,但它永远不会受到伤害。

回答by keithwarren7

I dont think that one requires special or secret knowledge of internals such as those that may be extended to members of the windows team or those with source access but I absolutely contend that understanding internals helps you become a better developer.

我不认为一个人需要特殊或秘密的内部知识,例如那些可以扩展到 Windows 团队成员或具有源代码访问权限的人,但我绝对认为了解内部结构可以帮助您成为更好的开发人员。

Take threading for instance, if you are going to build an application that uses threading in even a moderate way - understanding how windows works, how the threading works, how memory processes work are all keys to being able to do a good job with that code.

以线程为例,如果您要构建一个以中等方式使用线程的应用程序 - 了解 Windows 如何工作、线程如何工作、内存进程如何工作都是能够很好地处理该代码的关键.

I agree to a point with your edict but I would not agree that experience/practice/knowledge are mutually exclusive. That net-net of experience is that you have knowledge gained from that experience. There is also a wisdom component to experience and practice but those are usually intangible situational elements that you apply in the future to avoid mistakes. Bottom line knowledge is a precipitate of experience.

我同意你的法令的一点,但我不同意经验/实践/知识是相互排斥的。那个经验之网是你从那个经验中获得的知识。经验和实践也有智慧成分,但这些通常是无形的情境元素,您可以在未来应用以避免错误。底线知识是经验的沉淀。

Think of it this way, how many people do you know with 30+ years of experience in IT, think of them and take the top two. Now go into that memory bank and think of the people you know in the industry who are super smart, who know so much about so many things and pick the top two of those. You now have your final 4 - if you had to pick one to start a project with who would it be? Invariably we pick the super smart guy.

这样想一想,你认识多少拥有 30 多年 IT 经验的人,想想他们并排在前两名。现在进入那个记忆库,想想你在这个行业认识的那些超级聪明的人,他们对很多事情了解很多,然后选择其中的前两名。你现在有了最后的 4 个——如果你必须选择一个来开始一个项目,你会选谁?我们总是选择超级聪明的人。

回答by Lilith River

Yes, understanding Windows internals helped me to become a better programmer. It also taught be a lot of bad practices, bad ideas, and poor design concepts.

是的,了解 Windows 内部结构帮助我成为一名更好的程序员。它还教了很多不好的做法、不好的想法和糟糕的设计理念。

I highly suggest studying OS X or Linux internals as an alternative. It'll take less time, make more sense, and be much more productive.

我强烈建议学习 OS X 或 Linux 内部作为替代方案。这将花费更少的时间,更有意义,并且效率更高。

Read code. Read lots of code. Read lots of goodcode. jQuery, Django, AIR framework source, Linux kernel, compilers.

阅读代码。阅读大量代码。阅读很多好的代码。jQuery、Django、AIR 框架源代码、Linux 内核、编译器。

Try to learn programming languages that introduce you to new approaches, like Lisp, Ruby, Python, or Javascript. OOP is good, but .net and Java seem to take the brainwash approach on it, and elevate it to some kind of religious level, instead of it just being a good tool in your toolbox.

尝试学习向您介绍新方法的编程语言,例如 Lisp、Ruby、Python 或 Javascript。OOP 是好的,但 .net 和 Java 似乎对其进行了洗脑,并将其提升到某种宗教级别,而不仅仅是作为工具箱中的一个好工具。

If you don't understand the code you are reading, it likely means you are on the right track, and learning new techniques.

如果您不理解正在阅读的代码,则可能意味着您走在正确的轨道上,并且正在学习新技术。

I'd suggest getting a mac simply because you'll find yourself wanting to make your UIs simpler and easier. It's really important to have a good environment if you want to become a great programmer. Surround yourself with engineers better than yourself (if you can), work with frameworks and languages that take the 'engineer' approach vs. the 'experimenter' approach, and... use a operating system that contains code better than yours.

我建议您购买 mac,因为您会发现自己想让您的 UI 更简单、更容易。如果你想成为一名优秀的程序员,拥有一个好的环境真的很重要。与比自己更好的工程师(如果可以的话)一起工作,使用采用“工程师”方法与“实验者”方法的框架和语言,并且……使用包含比您更好的代码的操作系统。

I'd also reccomend the book "Coders at Work".

我还推荐《工作中的程序员》这本书。

回答by SpliFF

It depends. Many programmers who understand the internals of a system begin writing optimised code to exploit that knowledge. This has three very serious side-effects:

这取决于。许多了解系统内部结构的程序员开始编写优化的代码来利用这些知识。这有三个非常严重的副作用:

1.) It's harder for others without that knowledge to extend or support the code.

1.) 没有这些知识的其他人很难扩展或支持代码。

2.) System internals may change without notice, whereas interfaces are usually versioned and changes discussed publicly.

2.) 系统内部可能会更改,恕不另行通知,而接口通常是版本化的,并且会公开讨论更改。

3.) Interfaces are generally consistent across platform revisions and hardware, internals do not have this consistency.

3.) 跨平台版本和硬件的接口通常是一致的,内部没有这种一致性。

In short, There's a lot of broken, unsupportable code out there that's borked because it relies on an internal process that the vendor changed without notice.

简而言之,有很多损坏的、无法支持的代码被搁置了,因为它依赖于供应商在没有通知的情况下更改的内部流程。

回答by Ganesh K

Father of language C said that "you don't need to learn all features of language to write great codes. Better you understand the problem, better you write the code." Having knowledge is always better.

C 语言之父说:“你不需要学习语言的所有特性来写出伟大的代码。你越了解问题,你就能写出更好的代码。” 有知识总是更好。