mfc单文档绘制世界坐标系

tech2023-12-05  33

mfc单文档绘制世界坐标系

You’re working on a software project, probably not a new situation if you’re reading this, and happen upon specific functionality you need for your project. Being the efficient (and lazy) developer that you are, you recognize that this functionality is general enough that it’s probably been needed by someone before and a library of some sort has been written for it. Why reinvent the wheel?

您正在开发一个软件项目,如果正在阅读此书,可能并不是一个新情况,并且会遇到项目所需的特定功能。 作为一名高效的(懒惰的)开发人员,您会意识到此功能足够通用,以前可能有人需要过此功能,并且为此编写了某种库。 为什么要重新发明轮子?

So you jump on your preferred search engine, find a likely candidate, skim over the landing page, and conclude that this library meets your requirements. You then locate a link to documentation and click it. After all, you need to figure out how to install it, configure it, and actually start using it in your project. There’s just one problem: the page linked to by the documentation link contains nothing but generated API documentation. You immediately think: where do I start?

因此,您跳上首选的搜索引擎,找到了可能的候选者,略过着陆页,然后得出结论,该库满足您的要求。 然后,您找到指向文档的链接,然后单击它。 毕竟,您需要弄清楚如何安装,配置和在项目中实际开始使用它。 只有一个问题:通过文档链接链接到的页面仅包含生成的API文档。 您立即想到: 我从哪里开始?

You may take a step back, search the version control repository, and find a file named something like README, INSTALL, or maybe even EXAMPLE that gives you a smidgen of information on what to do next. Even if you manage to get the library installed and configured, where do you go from there? Which specific piece of code provides an entry point into the library’s logic? Do you need to do something specific to load or bootstrap it? Is there anything else you need to do before using it aside from dropping it into your project’s directory structure and changing a few configuration settings?

你可以退一步,搜索版本控制库,并找到一个名字类似文件README , INSTALL ,或者甚至EXAMPLE ,让你的信息,下一步该怎么做一点点。 即使您设法安装和配置了库,您从那里去哪里呢? 哪段特定的代码为库的逻辑提供了切入点? 您需要做一些特定的事情来加载或引导它吗? 除了将其放入项目的目录结构并更改一些配置设置以外,您还需要做其他事情吗?

You may fumble around for a short time, scanning the API docs for information more substantial than names of classes and methods or types of parameters and return values. You may make educated guesses and try things just to get a foothold into getting the library to work. If you’re unsuccessful, a point will come where you’ll throw your hands in the air and move on to the next option.

您可能会在短时间内闲逛,扫描API文档以获取比类和方法名称或参数类型和返回值更重要的信息。 您可能会做出有根据的猜测,并尝试做一些事情以立足于使图书馆正常工作。 如果不成功,将出现一个问题,您将把手举到空中,然后转到下一个选项。

If you’re writing code that will be shared with others, put yourself in their shoes. Don’t let your project lose potential users, community members, and possible contributors all because of insufficient documentation.

如果您正在编写将与他人共享的代码,请置身于他人之内。 不要因为文档不足而让您的项目失去潜在的用户,社区成员和可能的贡献者。

内容为王 (Content is King)

“Content is king” is a predominant principle in SEO (search engine optimization). The same applies to your documentation: it has to be chock-full of information with common use cases, example code, warnings about potential pitfalls, and so forth. Sadly, rubber ducking isn’t as effective as it is with debugging because the duck provides no feedback and this isn’t the type of problem where solutions are very likely to be revealed in your explanations.

“内容为王”是SEO(搜索引擎优化)的主要原则。 这同样适用于您的文档:它必须充斥着常见用例,示例代码,有关潜在陷阱的警告等信息。 令人遗憾的是, 橡皮鸭无法像调试一样有效,因为橡皮鸭无法提供反馈,这也不是在您的解释中很可能会发现解决方案的问题类型。

Make a first attempt at what you believe is good documentation and then do what all good developers do: beta test it. Have several people read it, try to use the library, and provide feedback. Ask them what parts weren’t clear or could be stated or organized in a better way, where information was lacking, what additional information might have been useful, etc. Iteratively apply improvements prior to your project’s launch so that most potential issues are resolved beforehand or soon afterward.

首先尝试您认为是好的文档,然后再做所有优秀的开发人员要做的事情:对它进行beta测试。 有几个人阅读它,尝试使用该库,并提供反馈。 询问他们哪些部分不清楚或可以用更好的方式陈述或组织,哪些地方缺少信息,哪些其他信息可能有用,等等。在项目启动之前反复应用改进,以便提前解决大多数潜在问题或不久之后。

打开它 (Open It Up)

Cranking out quality content is a lot of work, especially in the beginning, but it’s also a large part of what attracts early adopters. Once a project is off the ground, people may be willing to contribute to documentation if they don’t have time or skills to commit to the source code. If they don’t have a way to get changes to you, though, it can be very off-putting to contributions. You don’t want that.

制定高质量的内容是一项艰巨的工作,尤其是在一开始的时候,但这也是吸引早期采用者的很大一部分。 一旦项目启动,如果人们没有时间或技能来提交源代码,人们可能会愿意为文档做出贡献。 但是,如果他们没有办法改变您的想法,那可能会影响您的贡献。 你不要那样

There are two major methods of opening up documentation to help your users help you keep it current and sufficient for their needs: using a wiki or maintaining it in a version control repository.

有两种主要的打开文档的方法可以帮助您的用户使文档保持最新并足以满足他们的需求:使用Wiki或在版本控制存储库中进行维护。

Wikis like DokuWiki, MediaWiki, and (for larger companies) Atlassian Confluence are generally easy to set up and customize to suit your needs. You can allow anyone to edit them or require users to register first. Most wikis maintain a version history of each page, allowing users to revert malicious changes and review who made a revision and why it was made. There may be a slight learning curve with regard how to use the wiki, but browser-based interfaces are otherwise very accessible for prospective contributors.

像DokuWiki , MediaWiki和Atlassian Confluence (对于大型公司)这样的Wiki通常易于设置和自定义以满足您的需求。 您可以允许任何人编辑它们或要求用户先注册。 大多数Wiki维护每个页面的版本历史记录,允许用户还原恶意更改并查看谁进行了修订以及进行修订的原因。 关于如何使用Wiki可能会有一些学习上的弯路,但是对于潜在的参与者来说,基于浏览器的界面非常容易访问。

Using a version control repository allows documentation to be maintained right along side your source code. Experimental branches with additions or changes can easily be shared and reviewed by peers before being merged. Interfaces like those provided by GitHub can make tracking proposed contributions easy while limiting changes to a select number of contributors with merge rights to maintain quality assurance. Depending on the format and tool chain you choose (like Docbook and PhD for example), it’s also likely to be easier to make your documentation available in multiple formats like HTML, PDF, or ePub and integrate documentation into your build and continuous integration processes.

使用版本控制存储库可以使文档与源代码一起维护。 具有添加或更改的实验分支可以很容易地在合并之前由同级共享和查看。 像GitHub提供的界面一样,可以轻松跟踪拟议的贡献,同时将更改限制在具有合并权限以维护质量保证的部分贡献者中。 根据您选择的格式和工具链(例如Docbook和PhD ),使文档以HTML,PDF或ePub等多种格式提供以及将文档集成到构建和持续集成过程中也可能会更容易。

Whatever documentation you do make available should also be as accessible as possible. Don’t require a user to go through a registration process to access it. Host a public text or HTML copy for users to access in a browser rather than requiring them to download it in its entirety to view in a separate program. This has the added bonus of enabling search engines to index it. Make sections in HTML copies linkable using anchors to allow users to easily reference them individually.

无论您提供什么文档,都应该尽可能地易于访问。 不需要用户经过注册过程即可访问它。 托管公共文本或HTML副本,供用户在浏览器中访问,而不是要求他们完整下载它以在单独的程序中查看。 这具有使搜索引擎对其进行索引的额外好处。 使用锚使HTML副本中的节可链接,以使用户可以轻松地分别引用它们。

文档,文档,文档 (Documentation, Documentation, Documentation)

Steve Ballmer has become rather infamous for his “Developers, developers, developers” chant. This is, after all, representative of what people who begin software projects generally want: a community of developers to form around that project, contribute to it, and help to evolve it and make it better than you could alone. While it’s not the only means to that end, documentation is very unlikely to hinder you in that goal if it’s good and well thought-out.

史蒂夫·鲍尔默(Steve Ballmer)因其“开发人员,开发人员,开发人员”的赞誉而声名狼藉。 毕竟,这代表了开始软件项目的人们通常想要的东西:一个围绕该项目形成,为之贡献,并帮助其发展并使其比单独做得更好的开发人员社区。 尽管这不是达到此目的的唯一方法,但如果文档良好且经过深思熟虑,则文档不太可能妨碍您实现该目标。

Make it a point to seek out technical writing resources to help your documentation authoring skills. Such resources exist in many forms like a course at your local university, posts in Kathy Sierra’s now-defunct Creating Passionate Users blog, the “Communicate!” section of the book The Pragmatic Programmer, the Missing Manual author guidelines, and Rich Bowen’s presentation Write a Better FM. They may also come in less obvious forms like Garr Reynold’s book Presentation Zen, which covers creating provocative visual presentations – regardless of the end medium, the book teaches you how to present information in ways that make it interesting and informative to its consumer.

重点是寻找技术写作资源以帮助您的文档创作技能。 这些资源以多种形式存在,例如您当地大学的课程,在Kathy Sierra现已失效的“ 创建热情用户”博客“ Communicate!”中发布的帖子。 《实用程序员》 ,《 失踪手册》作者指南以及里奇·鲍恩(Rich Bowen)的演讲“ 写一个更好的FM”部分 。 它们也可能以不太明显的形式出现,例如Garr Reynold的书《 Presentation Zen》 ,该书涵盖了创建引人入胜的视觉演示的方法-不管最终的媒介是什么,该书都教您如何以使信息有趣并为消费者提供信息的方式呈现信息。

摘要 (Summary)

In short, make a substantial effort to document your project and make it usable for others. It might surprise you how much more support you receive in development simply because you put in that time and effort. Regardless, it will be time and effort well spent.

简而言之,请付出大量的努力来记录您的项目并使其可用于其他人。 仅仅因为投入了时间和精力,您可能会惊讶于您在开发中获得了更多的支持。 无论如何,将花费大量时间和精力。

翻译自: https://www.sitepoint.com/documentation-makes-the-world-go-round/

mfc单文档绘制世界坐标系

相关资源:jdk-8u281-windows-x64.exe
最新回复(0)