文学编程文学

2023-09-04 07:54:27 作者:软萌味的小萝莉

文学编程是开发软件的方式,其中的文档是第一位的,然后是编码。一个写了code段的文档,然后写段的执行情况。的软件源$ C ​​$ C的外观将是一个普通的文件,如Word,在它code段。

Literate programming is a way of developing software where documentation comes first, then the coding. One writes the documentation of a code snippet, and then writes the implementation of the snippet. The visual appearance of the software source code would be a plain document like word, with code paragraphs in it.

我想dev的店我的工作只用编程书籍进行转换,因为它带来了巨大的优势,code可读性和维护。然而,由于缺乏工具的唱片的用法是有限的公司。例如,编程有文化理想的方法是编写使用文字标记一个段落,然后插入与实施分段。但我似乎无法找到任何好的工具VS200x与执行LP。

I am trying to convert the dev shop I work to use only literate programming, as it brings great advantages to code readability and maintenance. However, due to the lack of tools the LP usage is limited in the company. For example, the ideal way to program literate is to write a paragraph using word markup, and then insert a subparagraph with the implementation. But i cannot seem to find any good tools for VS200x to perform LP with.

在理想情况下,这样的工具看起来就像Word 2007中,而是集成到IDE中。当codeR设置在code款光标,将所有的功能提供的,就像我们现在在我们的IDE。

Ideally, such a tool would look just like Word 2007, but integrated into the IDE. When the coder sets the cursor on a code paragraph, it would have all the functionality provided just like we have now in our IDE.

什么是LP的好工具,与.NET和VS200x特别?

What are good tools for LP, with .NET and VS200x in particular?

推荐答案

荣誉给你想提高你的团队的工作方式。只要你想做到这一点,你必须优于那些没有。

Kudos to you for trying to improve the way your team works. As long as you're trying to do that, you have an advantage over those that do not.

我用文学编程一次一个项目。这真的很难,而且效果还非常好。似乎是一个合理的折衷。

I used Literate Programming for a project once. It was really hard, and the results were really good. Seemed like a reasonable tradeoff.

不过,今天我宁愿采取不同的方法:不是散文对人类和$ C $下机,我宁愿写code,它是如此的明显,人们不介意阅读它。当我觉得自己的冲动,写评论,我想我能做出这样code更清晰。这意味着我少写文档,而不是更多。

However, today I'd rather take a different approach: instead of prose for humans and code for machines, I'd rather write code that is so clear that humans don't mind reading it. When I feel the urge to write a comment, I think "I could make this code clearer". That means I'm writing less documentation, not more.

嗯,好运气的任何路径选择。

Well, good luck with whatever path you choose.