版本号是1.13> 1.2?

时间:2022-05-13 14:09:24

I know from the .NET perspective that an assembly with a version of 1.13 is considered a newer release than version 1.2 because each number in the version is evaluated individually. However from a numerical point of view 1.13 is < than 1.2.

我从.NET的角度知道,版本为1.13的程序集被认为是比版本1.2更新的版本,因为版本中的每个数字都是单独计算的。然而,从数值的角度来看,1.13 <1.2。

The issue comes down to readability when publishing updates for customers. From .0 to .9 it's all the same but at .10 you have to differenciate. So, do you limit the number of point releases to 9 and then increment the major version when you reach .9?

问题归结为为客户发布更新时的可读性。从.0到.9它们都是一样的,但是在.10你必须区分。那么,你是否将点数发布的数量限制为9,然后在达到.9时增加主要版本?

Please don't assume that the end user has an understanding of typical development version numbering schemes.

请不要认为最终用户了解典型的开发版本编号方案。

Update:

Don't think of it like a decimal number. The (.) is a delimiter between the different fields. What each field means (for example):

不要把它想象成十进制数。 (。)是不同字段之间的分隔符。每个字段的含义(例如):

 MajorRelease.MinorRelease.BuildNumber

Absolutely! That'show I see it when I look at version numbers. But it's not how your average Joe reads the text '1.13'. I guess as programmers it's easy to project our understanding on our users. That's why I'm interested in responses on experience with confusion on the numbers. It may not be a real issue, or perhaps it's just been ignored.

绝对!当我查看版本号时,我看到它。但这不是你的普通乔读取文字'1.13'的方式。我想作为程序员,很容易将我们的理解投射到我们的用户身上。这就是为什么我对数字混淆经验的回应感兴趣。这可能不是一个真正的问题,或者它可能只是被忽略了。

Update 2: Response to "provide documentation" or "explain it to users" type solutions: they don't work! :) If you have to explain a version number to the user you've already made it more complex than it needs to be. While the primary audience for a piece of technology may be developers in many companies the actual procurement and management of software is handled by secretaries and clerical staff who have no development or technology background at all. If their manager asks them "Is there a new version available from 1.9" and they see "1.11" they may not register it as a newer release.

更新2:响应“提供文档”或“向用户解释”类型的解决方案:它们不起作用! :)如果你必须向用户解释版本号,你已经使它变得比它需要的更复杂。虽然一项技术的主要受众可能是许多公司的开发人员,但软件的实际采购和管理由没有开发或技术背景的秘书和文职人员处理。如果他们的经理问他们“是否有可用的新版本”,他们看到“1.11”他们可能不会将其注册为新版本。

11 个解决方案

#1


16  

Version numbering can be confusing if the version numbering looks like a numeric decimal, but the (.) is actually a delimiter between independent fields which should be read something like this:

如果版本编号看起来像数字小数,版本编号可能会令人困惑,但(。)实际上是独立字段之间的分隔符,应该读取如下内容:

MajorRelease.MinorRelease.BuildNumber

Each number is independent of the rest, so version 1.12.99 might be be followed by version 1.12.100 (for example). So you end up with:

每个数字都独立于其余数字,因此版本1.12.99可能会跟随版本1.12.100(例如)。所以你最终得到:

In release 1, Minor Release 12... build 100 comes after build 99.

在第1版中,次要版本12 ...版本100在构建99之后。

So in your example (v1.13 > v1.2): minor release "13" would have come some time after release "2".

所以在你的例子中(v1.13> v1.2):次要版本“13”将在发布“2”之后出现一段时间。

#2


7  

This is standard practice, and anyone paying attention to version "numbers" really ought to be aware of this anyway. The only reason there might be any misconception is if your version "number" only has a single dot, e.g. "1.13", in which case it might potentially be confused with a decimal number (by an unaware reader), which is unfortunate because they represent quite different things although using the same notation. Do you use revision numbers? If so, this makes it a lot more clear that the versions aren't decimals, e.g. "1.13.2". I would tend to recommend this practice anyway from a design point of view.

这是标准做法,无论如何,任何关注版本“数字”的人都应该意识到这一点。可能有任何误解的唯一原因是你的版本“数字”只有一个点,例如“1.13”,在这种情况下,它可能与十进制数字(由不知情的读者)混淆,这是不幸的,因为它们代表了完全不同的东西,尽管使用相同的符号。你使用修订号吗?如果是这样,这使得版本更加清晰,不是小数,例如“1.13.2”。无论如何,从设计的角度来看,我倾向于推荐这种做法。

Side point: If you want to compare versions of assemblies programmatically, you can just use the Version class, which overloads the comparison operators so you can check easily which is more recent just by evaluating versionA > versionB.

要点:如果要以编程方式比较程序集的版本,可以使用Version类,它会使比较运算符重载,这样您只需通过评估versionA> versionB就可以轻松检查哪个更新。

#3


5  

I prefer to always zero pad version numbers to avoid confusion and allow them to sort properly in "version unaware" applications. In this case I would number 1.13 > 1.02

我更喜欢始终零填充版本号以避免混淆并允许它们在“版本未知”应用程序中正确排序。在这种情况下,我的数字是1.13> 1.02

The advantage is that it sorts properly both numerically and alphabetically.

优点是它在数字和字母顺序上都能正确排序。

#4


5  

1.13 > 1.2

1.13> 1.2

If you think that it might confuse customer, dodge the problem - start numbering from 1.10 :)

如果您认为它可能会使客户感到困惑,请回避问题 - 从1.10开始编号:)

#5


3  

For example: 3.1, 95, 98, Me, XP, Vista, 7

例如:3.1,95,98,Me,XP,Vista,7

Just make up something new, the client isn't worrying about it as much as you think. Explain the new features, not the version number.

只要想出新的东西,客户就不会像你想象的那样担心它。解释新功能,而不是版本号。

#6


2  

This issue has bothered me for a while too. Zero-padding for ‘reasonable’ string sorting seems like a good idea (I wish more source tarballs followed this; it can be very difficult to spot the most recent among dozens of releases otherwise).

这个问题也困扰了我一段时间。 “合理”字符串排序的零填充似乎是一个好主意(我希望更多的源代码压缩包跟随这一点;否则很难发现最新的数十个版本)。

I’ve recently noticed developers saying “1.13” as “one dot thirteen”, rather than “one point one three”, which is a practice I think I will adopt. It makes it clear that the version number is a string of numbers, not a decimal. Perhaps we should have settled on, say, dash or slash instead of dot as the separator, to make the written form less ambiguous.

我最近注意到开发人员说“1.13”为“一点十三”,而不是“一点一三”,这是我认为我会采用的做法。它清楚地表明版本号是一串数字,而不是小数。或许我们应该先使用破折号或斜线来代替点作为分隔符,以使书面形式不那么模糊。

If you did treat them as decimals, you would probably end up with version numbers like “1.999999” as you approach a new major version! (I remember BASIC dialects with line-numbering having a similar issue.) It also reminds me of Knuth’s numbering schemes for TeX and METAFONT (converging toward pi and e respectively, which I think is brilliant: it suggests that software with a well-defined purpose should converge towards an ideal state, rather than constantly expanding).

如果您确实将它们视为小数,那么当您接近新的主要版本时,您最终可能会得到类似“1.999999”的版本号! (我记得BASIC方言的行号有类似的问题。)它也让我想起了Knuth的TeX和METAFONT编号方案(分别向pi和e汇合,我认为很棒:它表明定义明确的软件目的应该趋向理想状态,而不是不断扩大)。

#7


0  

I only increment the different versions numbers based on the importance of the release and its qualifications as a major/minor release. I guess I don't really care too much about readability of version numbers.

我只根据发布的重要性及其作为主要/次要版本的资格来增加不同版本号。我想我并不太关心版本号的可读性。

#8


0  

no. In every software versioning for delopers i've seen, 1.13 > 1.2

没有。在我见过的delopers的每个软件版本中,1.13> 1.2

#9


0  

However from a numerical point of view 1.13 is < than 1.2.

然而,从数值的角度来看,1.13 <1.2。

I don't think so.

我不这么认为。

So, do you limit the number of point releases to 9 and then increment the major version when you reach .9?

那么,你是否将点数发布的数量限制为9,然后在达到.9时增加主要版本?

no. My numbers go into the tens. Larger projects go into the hundreds, for the interim builds.

没有。我的数字进入了数十。对于临时版本,较大的项目进入数百个。

#10


0  

I don't consider the version number to be one numeric number, but rather an array of numerical elements. As such I have always found it natural that 1.13 > 1.2. I would not increment the major version just because the previous minor was 9 and somebody might think (even though I find it unlikely) that 1.9 is later than 1.10.

我不认为版本号是一个数字编号,而是一个数字元素数组。因此我总是发现自然1.13> 1.2。我不会因为之前的次要版本是9而增加主要版本而且有人可能会认为(即使我发现它不太可能)1.9比1.10更晚。

#11


0  

Versioning numbers is just for you to know what build you are working with and for the users to see what version they have.

版本号只是为了让您了解正在使用的构建版本以及用户可以查看它们具有的版本。

How you do it exactly is up to you.

你如何做到这一点取决于你。

You could do A.B.C or I.II.III or what ever you fancy.

你可以做A.B.C或I.II.III或你想要的。

I try to make it simple for the user to understand. Since I personally don't care how it is.

我试着让用户理解它很简单。因为我个人并不关心它是怎么回事。

I have three tiers. Major.Minor.Build

我有三层。 Major.Minor.Build

The build is optional, on projects that update often I attach the revision number on there to see where we are sitting.

构建是可选的,对于经常更新的项目,我会在那里附上修订号以查看我们所处的位置。

The numbers on Major and Minor are whole numbers, so 13 is larger than 2 but usually we never go so high in the Minor revisions, we rather tend to batch together minor builds and push those into 1 major one.

主要和次要的数字是整数,所以13大于2,但通常我们在次要修订中从未如此高,我们倾向于将次要构建批处理并将它们分成1个主要构建。

#1


16  

Version numbering can be confusing if the version numbering looks like a numeric decimal, but the (.) is actually a delimiter between independent fields which should be read something like this:

如果版本编号看起来像数字小数,版本编号可能会令人困惑,但(。)实际上是独立字段之间的分隔符,应该读取如下内容:

MajorRelease.MinorRelease.BuildNumber

Each number is independent of the rest, so version 1.12.99 might be be followed by version 1.12.100 (for example). So you end up with:

每个数字都独立于其余数字,因此版本1.12.99可能会跟随版本1.12.100(例如)。所以你最终得到:

In release 1, Minor Release 12... build 100 comes after build 99.

在第1版中,次要版本12 ...版本100在构建99之后。

So in your example (v1.13 > v1.2): minor release "13" would have come some time after release "2".

所以在你的例子中(v1.13> v1.2):次要版本“13”将在发布“2”之后出现一段时间。

#2


7  

This is standard practice, and anyone paying attention to version "numbers" really ought to be aware of this anyway. The only reason there might be any misconception is if your version "number" only has a single dot, e.g. "1.13", in which case it might potentially be confused with a decimal number (by an unaware reader), which is unfortunate because they represent quite different things although using the same notation. Do you use revision numbers? If so, this makes it a lot more clear that the versions aren't decimals, e.g. "1.13.2". I would tend to recommend this practice anyway from a design point of view.

这是标准做法,无论如何,任何关注版本“数字”的人都应该意识到这一点。可能有任何误解的唯一原因是你的版本“数字”只有一个点,例如“1.13”,在这种情况下,它可能与十进制数字(由不知情的读者)混淆,这是不幸的,因为它们代表了完全不同的东西,尽管使用相同的符号。你使用修订号吗?如果是这样,这使得版本更加清晰,不是小数,例如“1.13.2”。无论如何,从设计的角度来看,我倾向于推荐这种做法。

Side point: If you want to compare versions of assemblies programmatically, you can just use the Version class, which overloads the comparison operators so you can check easily which is more recent just by evaluating versionA > versionB.

要点:如果要以编程方式比较程序集的版本,可以使用Version类,它会使比较运算符重载,这样您只需通过评估versionA> versionB就可以轻松检查哪个更新。

#3


5  

I prefer to always zero pad version numbers to avoid confusion and allow them to sort properly in "version unaware" applications. In this case I would number 1.13 > 1.02

我更喜欢始终零填充版本号以避免混淆并允许它们在“版本未知”应用程序中正确排序。在这种情况下,我的数字是1.13> 1.02

The advantage is that it sorts properly both numerically and alphabetically.

优点是它在数字和字母顺序上都能正确排序。

#4


5  

1.13 > 1.2

1.13> 1.2

If you think that it might confuse customer, dodge the problem - start numbering from 1.10 :)

如果您认为它可能会使客户感到困惑,请回避问题 - 从1.10开始编号:)

#5


3  

For example: 3.1, 95, 98, Me, XP, Vista, 7

例如:3.1,95,98,Me,XP,Vista,7

Just make up something new, the client isn't worrying about it as much as you think. Explain the new features, not the version number.

只要想出新的东西,客户就不会像你想象的那样担心它。解释新功能,而不是版本号。

#6


2  

This issue has bothered me for a while too. Zero-padding for ‘reasonable’ string sorting seems like a good idea (I wish more source tarballs followed this; it can be very difficult to spot the most recent among dozens of releases otherwise).

这个问题也困扰了我一段时间。 “合理”字符串排序的零填充似乎是一个好主意(我希望更多的源代码压缩包跟随这一点;否则很难发现最新的数十个版本)。

I’ve recently noticed developers saying “1.13” as “one dot thirteen”, rather than “one point one three”, which is a practice I think I will adopt. It makes it clear that the version number is a string of numbers, not a decimal. Perhaps we should have settled on, say, dash or slash instead of dot as the separator, to make the written form less ambiguous.

我最近注意到开发人员说“1.13”为“一点十三”,而不是“一点一三”,这是我认为我会采用的做法。它清楚地表明版本号是一串数字,而不是小数。或许我们应该先使用破折号或斜线来代替点作为分隔符,以使书面形式不那么模糊。

If you did treat them as decimals, you would probably end up with version numbers like “1.999999” as you approach a new major version! (I remember BASIC dialects with line-numbering having a similar issue.) It also reminds me of Knuth’s numbering schemes for TeX and METAFONT (converging toward pi and e respectively, which I think is brilliant: it suggests that software with a well-defined purpose should converge towards an ideal state, rather than constantly expanding).

如果您确实将它们视为小数,那么当您接近新的主要版本时,您最终可能会得到类似“1.999999”的版本号! (我记得BASIC方言的行号有类似的问题。)它也让我想起了Knuth的TeX和METAFONT编号方案(分别向pi和e汇合,我认为很棒:它表明定义明确的软件目的应该趋向理想状态,而不是不断扩大)。

#7


0  

I only increment the different versions numbers based on the importance of the release and its qualifications as a major/minor release. I guess I don't really care too much about readability of version numbers.

我只根据发布的重要性及其作为主要/次要版本的资格来增加不同版本号。我想我并不太关心版本号的可读性。

#8


0  

no. In every software versioning for delopers i've seen, 1.13 > 1.2

没有。在我见过的delopers的每个软件版本中,1.13> 1.2

#9


0  

However from a numerical point of view 1.13 is < than 1.2.

然而,从数值的角度来看,1.13 <1.2。

I don't think so.

我不这么认为。

So, do you limit the number of point releases to 9 and then increment the major version when you reach .9?

那么,你是否将点数发布的数量限制为9,然后在达到.9时增加主要版本?

no. My numbers go into the tens. Larger projects go into the hundreds, for the interim builds.

没有。我的数字进入了数十。对于临时版本,较大的项目进入数百个。

#10


0  

I don't consider the version number to be one numeric number, but rather an array of numerical elements. As such I have always found it natural that 1.13 > 1.2. I would not increment the major version just because the previous minor was 9 and somebody might think (even though I find it unlikely) that 1.9 is later than 1.10.

我不认为版本号是一个数字编号,而是一个数字元素数组。因此我总是发现自然1.13> 1.2。我不会因为之前的次要版本是9而增加主要版本而且有人可能会认为(即使我发现它不太可能)1.9比1.10更晚。

#11


0  

Versioning numbers is just for you to know what build you are working with and for the users to see what version they have.

版本号只是为了让您了解正在使用的构建版本以及用户可以查看它们具有的版本。

How you do it exactly is up to you.

你如何做到这一点取决于你。

You could do A.B.C or I.II.III or what ever you fancy.

你可以做A.B.C或I.II.III或你想要的。

I try to make it simple for the user to understand. Since I personally don't care how it is.

我试着让用户理解它很简单。因为我个人并不关心它是怎么回事。

I have three tiers. Major.Minor.Build

我有三层。 Major.Minor.Build

The build is optional, on projects that update often I attach the revision number on there to see where we are sitting.

构建是可选的,对于经常更新的项目,我会在那里附上修订号以查看我们所处的位置。

The numbers on Major and Minor are whole numbers, so 13 is larger than 2 but usually we never go so high in the Minor revisions, we rather tend to batch together minor builds and push those into 1 major one.

主要和次要的数字是整数,所以13大于2,但通常我们在次要修订中从未如此高,我们倾向于将次要构建批处理并将它们分成1个主要构建。