Brad Abrams关于Naming Conventions的演讲中涉及到的生词集解

abbreviation : [ə.bri:vi'eiʃən]n. 缩写 

该单词出现的语境:In general, avoid abbreviations, but where you have to use abbreviations, we have kind of a special rule there, of most of the time abbreviations should just be case like words, just treat it as a word.  If the abbreviation is so common that you’re using it in a public API, then you could probably case it as a word.  And one of the crypto algorithms was the first letter of these people’s names that made it up, that kind of came up with the algorithm and the pushback for this was, well the other guys wouldn’t like to have their names lower cased, but you know, the truth is we can send those guys an apology letter.  Like the platform has a casing guidance and when developers take a glance and look at our platform, they say our platform is so much more consistent than WIN32 or even the JAVA platform, and some of it is because of this, some of the kind of at a glance complexity of the platform is because the platform just feels nice.  So don’t make exceptions to this casing rule.  

arbitrarily : [.ɑ:bə'trerəli]adv. 任意地, 武断地, 专横地 

该单词出现的语境:So one point is to use US English where there’s some kind of debate.  I realize we live in a worldwide culture, we localize Visual Studio to like 20 some languages.  We have developers all over the planet.  I got that, but we have to pick one consistent kind of naming and spelling style.  And so we arbitrarily picked one, kind of arbitrarily picked one and went with US English and I actually was involved with a GUI framework.  And almost everybody on the team was from England and so it was this GUI framework, and so obviously color was an important thing.  And so very close to shipping we had had this argument about the correct spelling of color as one might for some time, but very close to shipping we finally made the call to go change it to be the US English one, because it fit in better with the rest of all of Microsoft’s technologies.  So I encourage you to save that kind of pain that kind of huge breaking change and just spell things the US English way from the beginning just for consistency.

arbitrary : ['ɑ:bi.trəri]adj. 任意的, 专制的, 武断的, 霸道的 

该单词出现的语境:For one and two letter abbreviations, like I for Interface, which we’ll talk about later, and things like I/O, we felt like that was kind of tipping point where it made more sense to leave those in all upper case.  You wouldn’t have one letter abbreviation of the lower case, it kind of wouldn’t stand out enough.  So we felt like the two letters were the tipping point.  Arguably it was arbitrary, but that’s where we ended up, so we should just follow through on it.

ballpark : ['bɔ:lpɑ:k]棒球场活动领域 

该单词出现的语境:So I mentioned earlier about avoiding abbreviations, and you are just an amazing expert in your area.  We do these API reviews, we do almost six hours of API reviews every week with different people across WinFX and they come in and they know like about a million times more about their space than I do.  But I’m reviewing their APIs and they have some abbreviation that I’ve never heard of before.  And I ask is that a common name?  Of course that’s a common name everybody knows that.  Well the 10 other people kind of understand your technology know that, but is it really common to mainstream developers?  And so I don’t claim to be the ultimate authority on it, I don’t know what every mainstream developer knows, but luckily there’s this engine that catalogs a large percentage of the world’s information called Google and you can search it very quickly.  So we do what we call the Google test and it’s not 100 percent accurate, but it gives you a ballpark idea.  Type in the unadorned abbreviation that you want to use and see if the appropriate meaning is in the top few hits that Google brings back.  If it is, okay, continue the debate.  Maybe that’s a good one.  But if you put in the abbreviation and it’s like nowhere to be found, then I think that gives you a clue that maybe you understand what that is, but maybe your users don’t.  And so you might need to think of another way, a creative way to express the concept that doesn’t use the abbreviation.

competence : ['kɔmpətəns]n. 能力, 管辖权, 技能 

该单词出现的语境:And then the last thing is prior art, I think prior art is super important as we have a large existing body of code in the .NET framework that’s already shipped, and the industry and Microsoft have shipped many other frameworks in the past.  It’s important to look for that prior art.  Lots of our developers have used those other systems and have used the .NET framework so you should look for that.  So just as an example, I actually had a debate with somebody one time about whether they were doing a collection, and they had a property called number of items.  Like, “Well, what’s wrong with number of items?  It’s more expressive, it tells people exactly what they want?”  Well, there’s kind of nothing wrong with number of items except for that’s not how every other collection in the world does it.  Every other collection in the world uses a property called count.  And so because everybody else does it, you should just do that as well.  So I think Microsoft has this very strong competence culture where we want to always do the thing that is absolutely the right thing in my smaller view of the world, and sometimes that’s actually the worst thing for our customers.  So I encourage you to kind of pop up a level and look at how your code fits into the overall platform and how you can make the overall platform more consistent rather than less consistent.  

completion : [kəm'pli:ʃ(ə)n]n.完成, 结束 

该单词出现的语境: A: Yep, yep, it should be camel case, so lower case c here instead of capital C and just get rid of that I altogether.  It’s not adding any value.  So how about tag name, this property?  Yeah, capital N instead of the lower case N on name, that’s good, the kind of two separate words pushed together.  So how about use I/O completion port?

complexity : [kəm'pleksiti]n. 复杂(性), 复杂的事物 

该单词出现的语境:In general, avoid abbreviations, but where you have to use abbreviations, we have kind of a special rule there, of most of the time abbreviations should just be case like words, just treat it as a word.  If the abbreviation is so common that you’re using it in a public API, then you could probably case it as a word.  And one of the crypto algorithms was the first letter of these people’s names that made it up, that kind of came up with the algorithm and the pushback for this was, well the other guys wouldn’t like to have their names lower cased, but you know, the truth is we can send those guys an apology letter.  Like the platform has a casing guidance and when developers take a glance and look at our platform, they say our platform is so much more consistent than WIN32 or even the JAVA platform, and some of it is because of this, some of the kind of at a glance complexity of the platform is because the platform just feels nice.  So don’t make exceptions to this casing rule.  

compliant : [kəm'plaiənt]adj. 服从的, 顺从的 

该单词出现的语境: A: Okay.  Hold on, why do you say it’s not CLS compliant?

compound : ['kɔmpaund]n. 混合物, 复合词adj. 复(混)合的, 合成的vt. 混合, 调合, 妥协vi. 混合, 妥协 

该单词出现的语境: A: Yeah, so his question is around compound words like file name and things like that, so yes we actually do have a definitive list, the FXCop guys put it out.  I think it’s on their website, if it’s not we can get it up there, it’s essentially the FXCop custom dictionary, it’s the approved casing of everything and some of them we’ve had to go with because prior art because the framework has done it this way, so we should just keep on, and some of it, yeah, we looked up in a dictionary and kind of made a call on.  So anything else on this core set value guy?

compression : [kəm'preʃ(ə)n]n. 压缩, 压榨, 缩小 

该单词出现的语境:Okay.  So noun and noun phrases make the most sense for types, you should not use if you find yourself using an action word for a type, you might want to go back and look, “Well, why do I think a verb makes more sense here?”  And see if maybe the type isn’t modeled exactly the right way.  And then there’s a set of core types that we own in the BCL that you should just follow if you subclass stream, you have a stream suffix, that kind of thing, I invite you might have that same pattern in your domain.  Monad has commandlets, anytime you create a command let, it suffixes with command let, whatever the example might be.  And in addition, think of the reverse.  We were at an API review recently and somebody had a FooStream, I can’t even remember what it did now.  But it had a FooStream.  Now just it took me forever to look at it and realize that it didn’t inherit from system.I/O.stream, it was a totally different kind of stream.  And that may be a fine name in isolation, but if you put that in the context of most of our developers understand what system I/O stream is, what a file stream is, and a network stream, and a crypto stream, and a compression stream, what all those kinds of streams are, and you throw this other stream in and if it’s not that, that confuses them.  So they ended up picking a different name for that particular class.

condensed : [kən'denst]v. 浓缩vbl. 浓缩 

该单词出现的语境:So are you very familiar with Hungarian notation?  Yeah, a few of you.  So I was actually at the 2000 PVC when we launched the .NET framework and it gave us a one-hour condensed version of this class, and I was very nervous about telling a couple of thousand of our closest developers that Microsoft was abandoning Hungarian notation.  And I had my flack jacket on and I had this speech ready for why we thought it was such a good idea.  I expected to get beaten up.  But it was the first time in that presentation where I got spontaneous applause when I said we were getting rid of Hungarian notation.  I think Hungarian notation was great at the time.  It was really needed, but I think it’s outlived its usefulness and developers are very happy to see it go.  So don’t use Hungarian notation at all in your public APIs.  What you do in your private implementation, it’s up to you, but not in the public APIs.

conventions : n. [港台]常规[大陆]常规约定协定会议 

该单词出现的语境: Session: Naming Conventions

definitive : [di'finitiv]adj. 决定性的, 权威性的, 确定的, 限定的n. 限定词 

该单词出现的语境: A: Yeah, so his question is around compound words like file name and things like that, so yes we actually do have a definitive list, the FXCop guys put it out.  I think it’s on their website, if it’s not we can get it up there, it’s essentially the FXCop custom dictionary, it’s the approved casing of everything and some of them we’ve had to go with because prior art because the framework has done it this way, so we should just keep on, and some of it, yeah, we looked up in a dictionary and kind of made a call on.  So anything else on this core set value guy?

derived : [di'raivd]adj. 衍生的 

该单词出现的语境:So we’ve talked a little bit about this already, the prefix codes, although there is a good document that describes them, in practice, they turned out to be arbitrary, and that means the developers couldn’t predict what the meaning of this variable was going to be.  And as the languages have gotten more strongly typed and the IDEs have gotten better, now you hover over a field or a variable in Visual Studio and it can tell you the type based on the source code that’s there.  So that kind of information is not needed.  It can be derived from the platform more easily.

emphasizing : n. 强调 

该单词出现的语境:Okay.  Naming patterns, so all identifiers, so any type name, name space name, method name, property name, all those identifiers--we don’t use underscores at all, they kind of break the readability flow, and we don’t use all caps.  Again, all caps is actually harder to read than mixed casing.  So people think, well, I’m emphasizing it and making it easier to read and it actually kind of stands out and screams so it’s actually harder to read.  And as I mentioned, we don’t use Hungarian.

enforce : [in'fɔ:s]vt. 加强, 强迫, 执行 

该单词出现的语境: A: That’s fair.  That’s fair.  So in an effort to save Microsoft money, that’s the only reason we did it, we do have a set of fairly complete coding conventions that are up on the Longhorn API site.  If somebody sends mail to the alias, I’m sure one of the speakers will respond with a link to where that is.  And I actually don’t remember what it would say about this.  But there is one there, but we don’t actually enforce it, it’s up to teams to do what they want.

enforcement : [in'fɔ:smənt]n. 厉行, 执行, 强制 

该单词出现的语境: A: Why don’t we enforce naming conventions for private members?  Well, it’s because I am coming at the world from a platform mentality, from what are our third party developers going to be coding against?  And they’re not going to be coding against the private members.  So it is purely a pick my battles, it’s like, frankly, if I could have it my way, I certainly would do that, but I got to spend the enforcement resources I have kind of where it will be the most bang for the buck.  Yeah.

expedient : [iks'pi:diənt]adj. 权宜的, 有用的n. 权宜之计, 临时手段 

该单词出现的语境: A: Yeah, it’s private.  So it’s private so we’re not going to concern ourselves with it.  Developers can do whatever is the most expedient implementation, the best implementation, they should do that there.

flack : [flæk]n. 广告(高射炮) 

该单词出现的语境:So are you very familiar with Hungarian notation?  Yeah, a few of you.  So I was actually at the 2000 PVC when we launched the .NET framework and it gave us a one-hour condensed version of this class, and I was very nervous about telling a couple of thousand of our closest developers that Microsoft was abandoning Hungarian notation.  And I had my flack jacket on and I had this speech ready for why we thought it was such a good idea.  I expected to get beaten up.  But it was the first time in that presentation where I got spontaneous applause when I said we were getting rid of Hungarian notation.  I think Hungarian notation was great at the time.  It was really needed, but I think it’s outlived its usefulness and developers are very happy to see it go.  So don’t use Hungarian notation at all in your public APIs.  What you do in your private implementation, it’s up to you, but not in the public APIs.

hover : ['hɔvə]vi. 盘旋, 翱翔, 徘徊n. 盘旋, 翱翔, 徘徊 

该单词出现的语境:So we’ve talked a little bit about this already, the prefix codes, although there is a good document that describes them, in practice, they turned out to be arbitrary, and that means the developers couldn’t predict what the meaning of this variable was going to be.  And as the languages have gotten more strongly typed and the IDEs have gotten better, now you hover over a field or a variable in Visual Studio and it can tell you the type based on the source code that’s there.  So that kind of information is not needed.  It can be derived from the platform more easily.

hungarian : [hʌŋ'gɛəriən]adj. 匈牙利的, 匈牙利人的, 匈牙利语的n. 匈牙利人, 匈牙利语 

该单词出现的语境:So are you very familiar with Hungarian notation?  Yeah, a few of you.  So I was actually at the 2000 PVC when we launched the .NET framework and it gave us a one-hour condensed version of this class, and I was very nervous about telling a couple of thousand of our closest developers that Microsoft was abandoning Hungarian notation.  And I had my flack jacket on and I had this speech ready for why we thought it was such a good idea.  I expected to get beaten up.  But it was the first time in that presentation where I got spontaneous applause when I said we were getting rid of Hungarian notation.  I think Hungarian notation was great at the time.  It was really needed, but I think it’s outlived its usefulness and developers are very happy to see it go.  So don’t use Hungarian notation at all in your public APIs.  What you do in your private implementation, it’s up to you, but not in the public APIs.

inaudible : [in'ɔ:dəbl]adj. 听不见的 

该单词出现的语境: A: Okay.  So you’re right in that we should get rid of (inaudible) underscore, but you’re right for the wrong reasons.  It’s not design guidelines compliant; I mean CLS-wise we say that that’s in the set of allowable identifiers.  So it’s CLS compliant, but I’m pretty sure, but yeah, you should get rid of the underscore.  Anything else?  Yeah, what, back there?

increment : ['inkrimənt] [ 自动跳转自: incrementally ] n. 增加(增加物, 增量, 余差) 

该单词出现的语境: A: Yeah, that’s a good question.  So what do we mean, easy to use, so his question is what do we mean by easy to use, there’s different meanings for that.  Is it as you first approach it or is it after you’ve been using it for a while?  So we’re actually going to have a couple of talks on that, but my personal opinion on it is that you do have to--it’s easy to use for the target that you’re addressing and different APIs have different targets, so we’re not going to get a very stock answer.  But I think that there are some general principals that apply to everybody.  It turns out that everybody likes consistent naming.  I mean, we’ve had C++ people in and talked to them about people with 20 years C++ experience, and I’m sure we’ve probably had some people with 20 years C++ experience in the room.  I mean, and I think you people might say, “Yeah, I would like it if things were consistently named.”  And then I bet we have some people that are more kind of our VB kind of application developer types, those people, they like that as well, so that’s good.  The other, I think, key principle is this notion of a scalable API.  We want to have an entry point for the API that people that are brand new to that area can get going easily.  But then there’s no cliff you fall off of.  I mean, I love Visual Basic, I love VB6, it was by far the most successful development environment on the planet, but it had this really key problem in that as you got into things, you eventually fell off a cliff, right?  Okay, yeah, oh, setting up this form’s great.  Oh, putting menus on, easy.  Okay, now I want to put an icon on the menu, oh, you fell off a cliff.  You can’t do incrementally more work and get incrementally more benefit.  You have to do huge more work to go understand the vastness of the WIN32 API and the VB to Win13 marshalling rules to get your declare statements right, dah, dah, dah, to get the owner draw menus.  But what we’re striving for is the same kind of entry level thing, yeah, creating forms easy, creating menus are easy, putting images on the menu is a little bit harder, but only a little bit harder because you only got a little more benefit.  So I think the key to what we mean by useable is this progressive API design thing.  Are there other questions?  Yeah.

intellisense : 智能感应 

该单词出现的语境:So anyway, how do we use these?  So I think we have a very simple naming pattern, essentially, all types and all publicly exposed members, methods, properties, events, are all Pascal cased.  So almost everything that you expose publicly is Pascal cased.  That includes protected members.  They’re Pascal cased, and then parameter names, because they kind of match with local variables, parameter names are camel cased.  So a lot of times developers give me grief about parameter names, but those things do show up in public APIs.  They show up in Intellisense when you’re typing in the ID, it actually explains what the next parameter is.  It gives you the parameter name.  And if you call that thing I, then you didn’t help the developer at all, you missed an opportunity to use a channel of communication with the developer, if you don’t use a meaningful name there.

lexicon : ['leksikən]n. 辞典, [语言]词汇 

该单词出现的语境:Okay.  Should we come back together and go through this?  So I just want to go through it, kind of top to bottom.  So this first line HTML and coding, any problems with that?  HTML is an abbreviation, is it an okay abbreviation?  Yeah, I would kind of argue that HTML has entered the common lexicon as a word.  I mean, I don’t know, somebody with a laptop might do the Google test on HTML, you think it will come back right?  It will probably pass.  So okay, this next one, this default name.  Somebody want to raise their hand--anyone?  Yeah.  

localize : ['ləʊkəlaiz]vi. 集中, 局部化vt. 使地方化, 使局部化 

该单词出现的语境:So one point is to use US English where there’s some kind of debate.  I realize we live in a worldwide culture, we localize Visual Studio to like 20 some languages.  We have developers all over the planet.  I got that, but we have to pick one consistent kind of naming and spelling style.  And so we arbitrarily picked one, kind of arbitrarily picked one and went with US English and I actually was involved with a GUI framework.  And almost everybody on the team was from England and so it was this GUI framework, and so obviously color was an important thing.  And so very close to shipping we had had this argument about the correct spelling of color as one might for some time, but very close to shipping we finally made the call to go change it to be the US English one, because it fit in better with the rest of all of Microsoft’s technologies.  So I encourage you to save that kind of pain that kind of huge breaking change and just spell things the US English way from the beginning just for consistency.

mechanic : [mi'kænik]adj. 手工的n. 技工, 机修工 

该单词出现的语境:Okay.  So that’s kind of the mechanic side, but naming is actually a lot harder than that, and we have FX cop rules for everything I just mentioned.  The real difficulty in naming is coming up with the exact right terms.  Just yesterday I was in a design meeting for some of the BCL and we spent hours arguing about what the naming for this one method should be, what would convey the best meaning for developers.  So one thing I encourage you to do is, that’s a good place to invest your time in that kind of discussion.  You have to be as meaningful as possible, but also brief, kind of get the point across quickly.  

modeled : vbl. 形成模式 

该单词出现的语境:Okay.  So noun and noun phrases make the most sense for types, you should not use if you find yourself using an action word for a type, you might want to go back and look, “Well, why do I think a verb makes more sense here?”  And see if maybe the type isn’t modeled exactly the right way.  And then there’s a set of core types that we own in the BCL that you should just follow if you subclass stream, you have a stream suffix, that kind of thing, I invite you might have that same pattern in your domain.  Monad has commandlets, anytime you create a command let, it suffixes with command let, whatever the example might be.  And in addition, think of the reverse.  We were at an API review recently and somebody had a FooStream, I can’t even remember what it did now.  But it had a FooStream.  Now just it took me forever to look at it and realize that it didn’t inherit from system.I/O.stream, it was a totally different kind of stream.  And that may be a fine name in isolation, but if you put that in the context of most of our developers understand what system I/O stream is, what a file stream is, and a network stream, and a crypto stream, and a compression stream, what all those kinds of streams are, and you throw this other stream in and if it’s not that, that confuses them.  So they ended up picking a different name for that particular class.

nixed : [nikst][美俚]被禁止 的 

该单词出现的语境: And this is the casing that it popularized, and each identifier begins with a capital letter and then every word is a capital letter.  And then there’s camel casing, and camel casing kind of looks like the hump on a camel if you squint a little bit, and that’s where the initial letter is lower case and then each word is upper case.  True that we also had one we called screaming caps, didn’t even include it because it didn’t survive at all and that’s all upper case with underscores.  We essentially nixed that altogether.  

notation : [nəu'teiʃən]n. 记号法, 表示法, 注释[计算机] 记法 

该单词出现的语境:So are you very familiar with Hungarian notation?  Yeah, a few of you.  So I was actually at the 2000 PVC when we launched the .NET framework and it gave us a one-hour condensed version of this class, and I was very nervous about telling a couple of thousand of our closest developers that Microsoft was abandoning Hungarian notation.  And I had my flack jacket on and I had this speech ready for why we thought it was such a good idea.  I expected to get beaten up.  But it was the first time in that presentation where I got spontaneous applause when I said we were getting rid of Hungarian notation.  I think Hungarian notation was great at the time.  It was really needed, but I think it’s outlived its usefulness and developers are very happy to see it go.  So don’t use Hungarian notation at all in your public APIs.  What you do in your private implementation, it’s up to you, but not in the public APIs.

notion : ['nəuʃən]n. 观念, 想法, 主张 

该单词出现的语境: A: Yeah, that’s a good question.  So what do we mean, easy to use, so his question is what do we mean by easy to use, there’s different meanings for that.  Is it as you first approach it or is it after you’ve been using it for a while?  So we’re actually going to have a couple of talks on that, but my personal opinion on it is that you do have to--it’s easy to use for the target that you’re addressing and different APIs have different targets, so we’re not going to get a very stock answer.  But I think that there are some general principals that apply to everybody.  It turns out that everybody likes consistent naming.  I mean, we’ve had C++ people in and talked to them about people with 20 years C++ experience, and I’m sure we’ve probably had some people with 20 years C++ experience in the room.  I mean, and I think you people might say, “Yeah, I would like it if things were consistently named.”  And then I bet we have some people that are more kind of our VB kind of application developer types, those people, they like that as well, so that’s good.  The other, I think, key principle is this notion of a scalable API.  We want to have an entry point for the API that people that are brand new to that area can get going easily.  But then there’s no cliff you fall off of.  I mean, I love Visual Basic, I love VB6, it was by far the most successful development environment on the planet, but it had this really key problem in that as you got into things, you eventually fell off a cliff, right?  Okay, yeah, oh, setting up this form’s great.  Oh, putting menus on, easy.  Okay, now I want to put an icon on the menu, oh, you fell off a cliff.  You can’t do incrementally more work and get incrementally more benefit.  You have to do huge more work to go understand the vastness of the WIN32 API and the VB to Win13 marshalling rules to get your declare statements right, dah, dah, dah, to get the owner draw menus.  But what we’re striving for is the same kind of entry level thing, yeah, creating forms easy, creating menus are easy, putting images on the menu is a little bit harder, but only a little bit harder because you only got a little more benefit.  So I think the key to what we mean by useable is this progressive API design thing.  Are there other questions?  Yeah.

popularize : ['pɔpjuləraiz] [ 自动跳转自: popularized ] v. 普及, 使流行, 使通俗化 

该单词出现的语境: And this is the casing that it popularized, and each identifier begins with a capital letter and then every word is a capital letter.  And then there’s camel casing, and camel casing kind of looks like the hump on a camel if you squint a little bit, and that’s where the initial letter is lower case and then each word is upper case.  True that we also had one we called screaming caps, didn’t even include it because it didn’t survive at all and that’s all upper case with underscores.  We essentially nixed that altogether.  

prefix : ['pri:fiks]n. 前缀vt. 加...作为前缀, 置于前面adj. 前缀的 

该单词出现的语境:So we’ve talked a little bit about this already, the prefix codes, although there is a good document that describes them, in practice, they turned out to be arbitrary, and that means the developers couldn’t predict what the meaning of this variable was going to be.  And as the languages have gotten more strongly typed and the IDEs have gotten better, now you hover over a field or a variable in Visual Studio and it can tell you the type based on the source code that’s there.  So that kind of information is not needed.  It can be derived from the platform more easily.

prefix : ['pri:fiks] [ 自动跳转自: prefixed ] n. 前缀vt. 加...作为前缀, 置于前面adj. 前缀的 

该单词出现的语境:So drill in a little bit more class and interface naming.  The NFC world prefixed everything with a C, all classes with a C, and we evaluated that and decided that because classes were so common in the system, that we could essentially drop the C and we wouldn’t lose any meaning because we felt like class was the default.  So we don’t begin with C.  But interestingly enough we do for interfaces keep the I prefixed that COM kind of popularized the I for interface.  And some of it I think you should just view as us a head nod to COM and it’s place in the world, and the fact that many of the developers on our platform are very familiar with that.  So a lot of that was our motivation.  But recently in the last couple of months I did some playing around with JAVA a little bit.  And JAVA doesn’t have the I prefix and I found myself having to look up a couple of times for particular types if they were interfaces or not, so I actually think that this is a good net benefit to the system that all interfaces are prefixed with an I.

progressive : [prə'gresiv]adj. 前进的, 渐进的n. 进步人士 

该单词出现的语境: A: Yeah, that’s a good question.  So what do we mean, easy to use, so his question is what do we mean by easy to use, there’s different meanings for that.  Is it as you first approach it or is it after you’ve been using it for a while?  So we’re actually going to have a couple of talks on that, but my personal opinion on it is that you do have to--it’s easy to use for the target that you’re addressing and different APIs have different targets, so we’re not going to get a very stock answer.  But I think that there are some general principals that apply to everybody.  It turns out that everybody likes consistent naming.  I mean, we’ve had C++ people in and talked to them about people with 20 years C++ experience, and I’m sure we’ve probably had some people with 20 years C++ experience in the room.  I mean, and I think you people might say, “Yeah, I would like it if things were consistently named.”  And then I bet we have some people that are more kind of our VB kind of application developer types, those people, they like that as well, so that’s good.  The other, I think, key principle is this notion of a scalable API.  We want to have an entry point for the API that people that are brand new to that area can get going easily.  But then there’s no cliff you fall off of.  I mean, I love Visual Basic, I love VB6, it was by far the most successful development environment on the planet, but it had this really key problem in that as you got into things, you eventually fell off a cliff, right?  Okay, yeah, oh, setting up this form’s great.  Oh, putting menus on, easy.  Okay, now I want to put an icon on the menu, oh, you fell off a cliff.  You can’t do incrementally more work and get incrementally more benefit.  You have to do huge more work to go understand the vastness of the WIN32 API and the VB to Win13 marshalling rules to get your declare statements right, dah, dah, dah, to get the owner draw menus.  But what we’re striving for is the same kind of entry level thing, yeah, creating forms easy, creating menus are easy, putting images on the menu is a little bit harder, but only a little bit harder because you only got a little more benefit.  So I think the key to what we mean by useable is this progressive API design thing.  Are there other questions?  Yeah.

rationale : [.ræʃə'nɑ:li]n. 基本原理, 基础理论 

该单词出现的语境: Brad Abrams: Okay.  Yep, okay, all right.  So that’s all good introduction material.  Let’s start drilling in, so the class starts easy.  So Naming Conventions.  So essentially, the only goal in this one is just to explain what the guidelines are for naming and the rationale.  And again, we’re focused on publicly exposed identifiers, so what do I mean by publicly exposed?  It’s anything that’s public or protected.  Anything you can get from outside the assembly.  Anything inside the assembly it may make sense there’s some logical rules you could follow based on what I’m going to tell you, but it’s not kind of part of the scope that I’m going to concern myself about for this class.

scalable : ['skeiləbl]adj. 可测量的, 可伸缩的, 可攀登的 

该单词出现的语境: A: Yeah, that’s a good question.  So what do we mean, easy to use, so his question is what do we mean by easy to use, there’s different meanings for that.  Is it as you first approach it or is it after you’ve been using it for a while?  So we’re actually going to have a couple of talks on that, but my personal opinion on it is that you do have to--it’s easy to use for the target that you’re addressing and different APIs have different targets, so we’re not going to get a very stock answer.  But I think that there are some general principals that apply to everybody.  It turns out that everybody likes consistent naming.  I mean, we’ve had C++ people in and talked to them about people with 20 years C++ experience, and I’m sure we’ve probably had some people with 20 years C++ experience in the room.  I mean, and I think you people might say, “Yeah, I would like it if things were consistently named.”  And then I bet we have some people that are more kind of our VB kind of application developer types, those people, they like that as well, so that’s good.  The other, I think, key principle is this notion of a scalable API.  We want to have an entry point for the API that people that are brand new to that area can get going easily.  But then there’s no cliff you fall off of.  I mean, I love Visual Basic, I love VB6, it was by far the most successful development environment on the planet, but it had this really key problem in that as you got into things, you eventually fell off a cliff, right?  Okay, yeah, oh, setting up this form’s great.  Oh, putting menus on, easy.  Okay, now I want to put an icon on the menu, oh, you fell off a cliff.  You can’t do incrementally more work and get incrementally more benefit.  You have to do huge more work to go understand the vastness of the WIN32 API and the VB to Win13 marshalling rules to get your declare statements right, dah, dah, dah, to get the owner draw menus.  But what we’re striving for is the same kind of entry level thing, yeah, creating forms easy, creating menus are easy, putting images on the menu is a little bit harder, but only a little bit harder because you only got a little more benefit.  So I think the key to what we mean by useable is this progressive API design thing.  Are there other questions?  Yeah.

scope : [skəup]n. 范围 

该单词出现的语境: Brad Abrams: Okay.  Yep, okay, all right.  So that’s all good introduction material.  Let’s start drilling in, so the class starts easy.  So Naming Conventions.  So essentially, the only goal in this one is just to explain what the guidelines are for naming and the rationale.  And again, we’re focused on publicly exposed identifiers, so what do I mean by publicly exposed?  It’s anything that’s public or protected.  Anything you can get from outside the assembly.  Anything inside the assembly it may make sense there’s some logical rules you could follow based on what I’m going to tell you, but it’s not kind of part of the scope that I’m going to concern myself about for this class.

squint : [skwint]v. 使变斜视眼, 斜视, 眯眼看, 偏移, 窥视n. 斜视, 斜孔小窗adj. 斜视的, 斜的 

该单词出现的语境: And this is the casing that it popularized, and each identifier begins with a capital letter and then every word is a capital letter.  And then there’s camel casing, and camel casing kind of looks like the hump on a camel if you squint a little bit, and that’s where the initial letter is lower case and then each word is upper case.  True that we also had one we called screaming caps, didn’t even include it because it didn’t survive at all and that’s all upper case with underscores.  We essentially nixed that altogether.  

striving : ['straiviŋ]n. 努力, 奋斗动词strive的现在分词 

该单词出现的语境: A: Yeah, that’s a good question.  So what do we mean, easy to use, so his question is what do we mean by easy to use, there’s different meanings for that.  Is it as you first approach it or is it after you’ve been using it for a while?  So we’re actually going to have a couple of talks on that, but my personal opinion on it is that you do have to--it’s easy to use for the target that you’re addressing and different APIs have different targets, so we’re not going to get a very stock answer.  But I think that there are some general principals that apply to everybody.  It turns out that everybody likes consistent naming.  I mean, we’ve had C++ people in and talked to them about people with 20 years C++ experience, and I’m sure we’ve probably had some people with 20 years C++ experience in the room.  I mean, and I think you people might say, “Yeah, I would like it if things were consistently named.”  And then I bet we have some people that are more kind of our VB kind of application developer types, those people, they like that as well, so that’s good.  The other, I think, key principle is this notion of a scalable API.  We want to have an entry point for the API that people that are brand new to that area can get going easily.  But then there’s no cliff you fall off of.  I mean, I love Visual Basic, I love VB6, it was by far the most successful development environment on the planet, but it had this really key problem in that as you got into things, you eventually fell off a cliff, right?  Okay, yeah, oh, setting up this form’s great.  Oh, putting menus on, easy.  Okay, now I want to put an icon on the menu, oh, you fell off a cliff.  You can’t do incrementally more work and get incrementally more benefit.  You have to do huge more work to go understand the vastness of the WIN32 API and the VB to Win13 marshalling rules to get your declare statements right, dah, dah, dah, to get the owner draw menus.  But what we’re striving for is the same kind of entry level thing, yeah, creating forms easy, creating menus are easy, putting images on the menu is a little bit harder, but only a little bit harder because you only got a little more benefit.  So I think the key to what we mean by useable is this progressive API design thing.  Are there other questions?  Yeah.

suffix : ['sʌfiks]n. 后缀vt. 添后缀 

该单词出现的语境:Okay.  So noun and noun phrases make the most sense for types, you should not use if you find yourself using an action word for a type, you might want to go back and look, “Well, why do I think a verb makes more sense here?”  And see if maybe the type isn’t modeled exactly the right way.  And then there’s a set of core types that we own in the BCL that you should just follow if you subclass stream, you have a stream suffix, that kind of thing, I invite you might have that same pattern in your domain.  Monad has commandlets, anytime you create a command let, it suffixes with command let, whatever the example might be.  And in addition, think of the reverse.  We were at an API review recently and somebody had a FooStream, I can’t even remember what it did now.  But it had a FooStream.  Now just it took me forever to look at it and realize that it didn’t inherit from system.I/O.stream, it was a totally different kind of stream.  And that may be a fine name in isolation, but if you put that in the context of most of our developers understand what system I/O stream is, what a file stream is, and a network stream, and a crypto stream, and a compression stream, what all those kinds of streams are, and you throw this other stream in and if it’s not that, that confuses them.  So they ended up picking a different name for that particular class.

suffix : ['sʌfiks] [ 自动跳转自: suffixes ] n. 后缀vt. 添后缀 

该单词出现的语境:Okay.  So noun and noun phrases make the most sense for types, you should not use if you find yourself using an action word for a type, you might want to go back and look, “Well, why do I think a verb makes more sense here?”  And see if maybe the type isn’t modeled exactly the right way.  And then there’s a set of core types that we own in the BCL that you should just follow if you subclass stream, you have a stream suffix, that kind of thing, I invite you might have that same pattern in your domain.  Monad has commandlets, anytime you create a command let, it suffixes with command let, whatever the example might be.  And in addition, think of the reverse.  We were at an API review recently and somebody had a FooStream, I can’t even remember what it did now.  But it had a FooStream.  Now just it took me forever to look at it and realize that it didn’t inherit from system.I/O.stream, it was a totally different kind of stream.  And that may be a fine name in isolation, but if you put that in the context of most of our developers understand what system I/O stream is, what a file stream is, and a network stream, and a crypto stream, and a compression stream, what all those kinds of streams are, and you throw this other stream in and if it’s not that, that confuses them.  So they ended up picking a different name for that particular class.

unadorned : ['ʌnə'dɔ:nd]adj. 没有装饰的(不加渲染的, 原来的, 自然的) 

该单词出现的语境:So I mentioned earlier about avoiding abbreviations, and you are just an amazing expert in your area.  We do these API reviews, we do almost six hours of API reviews every week with different people across WinFX and they come in and they know like about a million times more about their space than I do.  But I’m reviewing their APIs and they have some abbreviation that I’ve never heard of before.  And I ask is that a common name?  Of course that’s a common name everybody knows that.  Well the 10 other people kind of understand your technology know that, but is it really common to mainstream developers?  And so I don’t claim to be the ultimate authority on it, I don’t know what every mainstream developer knows, but luckily there’s this engine that catalogs a large percentage of the world’s information called Google and you can search it very quickly.  So we do what we call the Google test and it’s not 100 percent accurate, but it gives you a ballpark idea.  Type in the unadorned abbreviation that you want to use and see if the appropriate meaning is in the top few hits that Google brings back.  If it is, okay, continue the debate.  Maybe that’s a good one.  But if you put in the abbreviation and it’s like nowhere to be found, then I think that gives you a clue that maybe you understand what that is, but maybe your users don’t.  And so you might need to think of another way, a creative way to express the concept that doesn’t use the abbreviation.

underscore : [.ʌndə'skɔ:]vt. 划线于, 强调, 提供伴奏乐n. 下划线, 影片伴奏乐 

该单词出现的语境: And this is the casing that it popularized, and each identifier begins with a capital letter and then every word is a capital letter.  And then there’s camel casing, and camel casing kind of looks like the hump on a camel if you squint a little bit, and that’s where the initial letter is lower case and then each word is upper case.  True that we also had one we called screaming caps, didn’t even include it because it didn’t survive at all and that’s all upper case with underscores.  We essentially nixed that altogether.  

underscore : [.ʌndə'skɔ:] [ 自动跳转自: underscores ] vt. 划线于, 强调, 提供伴奏乐n. 下划线, 影片伴奏乐 

该单词出现的语境: And this is the casing that it popularized, and each identifier begins with a capital letter and then every word is a capital letter.  And then there’s camel casing, and camel casing kind of looks like the hump on a camel if you squint a little bit, and that’s where the initial letter is lower case and then each word is upper case.  True that we also had one we called screaming caps, didn’t even include it because it didn’t survive at all and that’s all upper case with underscores.  We essentially nixed that altogether.  

vastness : ['vɑ:stnis]n. 巨大, 广大, 广漠 

该单词出现的语境: A: Yeah, that’s a good question.  So what do we mean, easy to use, so his question is what do we mean by easy to use, there’s different meanings for that.  Is it as you first approach it or is it after you’ve been using it for a while?  So we’re actually going to have a couple of talks on that, but my personal opinion on it is that you do have to--it’s easy to use for the target that you’re addressing and different APIs have different targets, so we’re not going to get a very stock answer.  But I think that there are some general principals that apply to everybody.  It turns out that everybody likes consistent naming.  I mean, we’ve had C++ people in and talked to them about people with 20 years C++ experience, and I’m sure we’ve probably had some people with 20 years C++ experience in the room.  I mean, and I think you people might say, “Yeah, I would like it if things were consistently named.”  And then I bet we have some people that are more kind of our VB kind of application developer types, those people, they like that as well, so that’s good.  The other, I think, key principle is this notion of a scalable API.  We want to have an entry point for the API that people that are brand new to that area can get going easily.  But then there’s no cliff you fall off of.  I mean, I love Visual Basic, I love VB6, it was by far the most successful development environment on the planet, but it had this really key problem in that as you got into things, you eventually fell off a cliff, right?  Okay, yeah, oh, setting up this form’s great.  Oh, putting menus on, easy.  Okay, now I want to put an icon on the menu, oh, you fell off a cliff.  You can’t do incrementally more work and get incrementally more benefit.  You have to do huge more work to go understand the vastness of the WIN32 API and the VB to Win13 marshalling rules to get your declare statements right, dah, dah, dah, to get the owner draw menus.  But what we’re striving for is the same kind of entry level thing, yeah, creating forms easy, creating menus are easy, putting images on the menu is a little bit harder, but only a little bit harder because you only got a little more benefit.  So I think the key to what we mean by useable is this progressive API design thing.  Are there other questions?  Yeah.

whereas : [(h)wɛər'æz]conj. &n. 然而, 却, 鉴于 

该单词出现的语境: A: Yeah, it is true that value is a reserve word, at least in C# and I think VB, so technically you can.  It’s an interesting question about whether you should or not.  The difference between a keyword and a reserved word, is a keyword you can never--Int always means Int and whereas value it’s context sensitive.  In some places it means something special.  And so I’m personally conflicted about it.  If there really is no inherent meaning in what the value is, I think value’s an okay name.  But if this value is actually the version of the HTML encoder to use or something like that, then you should call it an HTML encoder instead of value.


原文地址:https://www.cnblogs.com/cuipengfei/p/1603021.html