计算行业的骗局 [英] Computing Industry shams

查看:93
本文介绍了计算行业的骗局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我揭露另一个他妈的无用的Python文档部分,

Info Tech行业的手淫和无知的插图

性质。


关于正则表达式语法的官方Python文档(
http://python.org/doc/2.4/lib/re-syntax.html )说:


- 开头报价 -


" |"

A | B,其中A和B可以是任意RE,创建正则表达式

这将匹配A或B.任意数量的RE可以用|分隔

通过这种方式。这可以在组内使用(参见下面的
)。当扫描目标字符串时,从左到右尝试由|

分隔的RE。当一个模式完全匹配时,接受

分支。这意味着一旦A匹配,B将不会进一步测试
,即使它会产生更长的整体匹配。用

换句话说,|操作员从不贪心。要匹配文字|,

请使用\ |,或将其括在字符类中,如[|]。


- - 报价 -


注:a ??换句话说,|操作员从来都不贪心.a ??


注意需要注入高级术语?贪婪?在这里作为一个

锁定句子。


a ??从不贪婪???什么是贪婪的呢?


a?贪婪??当在计算环境中使用时,描述了算法的某些特征。当一个算法为
最小化/最大化问题时,无论何时它面临选择

它只选择最短路径,而不考虑是否这个

选择实际上会产生最佳解决方案。


问题是这样的策略通常无法在大多数问题中获得最佳结果。如果你从纽约去旧金山,并且总是选择最直接面向目的地的道路,那么你将永远不会获得




对于一个贪婪的算法,暗示它面临选择。在

regexregex1 | regex2 | regex3中的替代品的情况下,

确实没有涉及选择,但遵循给定的序列。


作者在关于贪婪时所想的是,

结果可能不是来自匹配最多的模式
子串因此它不是一个贪婪的人。这不是贪婪的Python

docer'的屁股。


这种盲目的行话投掷,如科技文档中随处可见,是一个

计算行业充满假意的重要原因

喜欢unix,Perl,编程模式,极限编程,

a?通用建模语言? ?,他妈的屎。


----

完整的正则表达式模块的更好的写作文档是:
http://xahlee.org/perl-python/python .. .module-re.html


另见:责任软件许可
http://xahlee.org/UnixResource_dir/w...e_license.html


Xah
xa*@xahlee.org

a ?? http://xahlee.org/

Let me expose one another fucking incompetent part of Python doc, in
illustration of the Info Tech industry''s masturbation and ignorant
nature.

The official Python doc on regex syntax (
http://python.org/doc/2.4/lib/re-syntax.html ) says:

--begin quote--

"|"
A|B, where A and B can be arbitrary REs, creates a regular expression
that will match either A or B. An arbitrary number of REs can be
separated by the "|" in this way. This can be used inside groups (see
below) as well. As the target string is scanned, REs separated by "|"
are tried from left to right. When one pattern completely matches, that
branch is accepted. This means that once A matches, B will not be
tested further, even if it would produce a longer overall match. In
other words, the "|" operator is never greedy. To match a literal "|",
use \|, or enclose it inside a character class, as in [|].

--end quote--

Note: a??In other words, the "|" operator is never greedy.a??

Note the need to inject the high-brow jargon a??greedya?? here as a
latch on sentence.

a??never greedya??? What is greedy anyway?

a??Greedya??, when used in the context of computing, describes a
certain characteristics of algorithms. When a algorithm for a
minimizing/maximizing problem is such that, whenever it faced a choice
it simply chose the shortest path, without considering whether that
choice actually results in a optimal solution.

The rub is that such stratedgy will often not obtain optimal result in
most problems. If you go from New York to San Francisco and always
choose the road most directly facing your destination, you''ll never get
on.

For a algorithm to be greedy, it is implied that it faces choices. In
the case of alternatives in regex "regex1|regex2|regex3", there is
really no selection involved, but following a given sequence.

What the writer were thinking when he latched on about greediness, is
that the result may not be from the pattern that matches the most
substring, therefore it is not a??greedya??. It''s not greedy Python
docer''s ass.

Such blind jargon throwing, as found everywhere in tech docs, is a
significant reason why the computing industry is filled with shams the
likes of unix, Perl, Programing Patterns, eXtreme Programing,
a??Universal Modeling Languagea??, fucking shits.

----
A better writen doc for the complete regex module is at:
http://xahlee.org/perl-python/python...module-re.html

See also: Responsible Software Licensing
http://xahlee.org/UnixResource_dir/w...e_license.html

Xah
xa*@xahlee.org
a?? http://xahlee.org/

推荐答案

" Xah Lee" < xa*@xahlee.org>写道:
"Xah Lee" <xa*@xahlee.org> writes:
A | B,其中A和B可以是任意RE,创建一个将匹配A或B的正则表达式。任意数量的RE可以是
由|分隔通过这种方式。这可以在组内使用(参见下面的
)。当扫描目标字符串时,从左到右尝试由|分隔的RE。当一个模式完全匹配时,接受该分支。这意味着一旦A匹配,B将不会进一步测试,即使它会产生更长的整体匹配。换句话说,|,|。操作员从不贪心。要匹配文字|,
使用\ |,或将其括在字符类中,如[|]。

--end quote -

注意:换句话说,|操作员永远不会贪婪。

请注意,需要在句子上注入高级术语贪婪作为句子上的闩锁。
A|B, where A and B can be arbitrary REs, creates a regular expression
that will match either A or B. An arbitrary number of REs can be
separated by the "|" in this way. This can be used inside groups (see
below) as well. As the target string is scanned, REs separated by "|"
are tried from left to right. When one pattern completely matches, that
branch is accepted. This means that once A matches, B will not be
tested further, even if it would produce a longer overall match. In
other words, the "|" operator is never greedy. To match a literal "|",
use \|, or enclose it inside a character class, as in [|].

--end quote--

Note: In other words, the "|" operator is never greedy.

Note the need to inject the high-brow jargon "greedy"here as a
latch on sentence.




有什么难以理解的?

即使是大学一年级也应该非常清楚。


至于贪婪即使是最少接触Djikstra的最短路径

算法也会让这个概念变得直观。而且从内存来看,

就是在计算101和数据结构中完成的那种事情和

算法101


它在我看来,你想要为蠢货编写Python文档。

这不是一个有效的投诉。



What is so hard to understand ?
Should be perfectly clear even to a first year undergraduate.

As for "greedy" even a minimal exposure to Djikstra''s shortest path
algorithm would have made the concept intuitive. And from memory,
that is the sort of thing done in Computing 101 and in Data Structures and
Algorithms 101

It seems to me that you want the Python doc to be written for morons.
And that is not a valid complaint.


Xah Lee写道:
Xah Lee wrote:
让我揭露另一个他妈的无能的Python文档部分,在Info Tech行业的手淫和无知的自然的插图中。
Let me expose one another fucking incompetent part of Python doc, in
illustration of the Info Tech industry''s masturbation and ignorant
nature.



老兄,去看医生,吃些药,然后冷静下来!


Stan



Dude, see a doctor, get some medication, and calm down!

Stan


vermicule< ra **** @ bigpond.net.au>写道:
vermicule <ra****@bigpond.net.au> writes:
" Xah Lee" < xa*@xahlee.org>写道:


[...]

在我看来,你想要为蠢货编写Python文档。
"Xah Lee" <xa*@xahlee.org> writes:
[...]

It seems to me that you want the Python doc to be written for morons.



不适合笨蛋,也适合巨魔。不要喂它们。


-

M?ns Rullg?rd
mr*@inprovide.com


这篇关于计算行业的骗局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆