|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Coding Standards - We need a heroto say about "Hungarian Notation" thread above. It seems that with her work in "Code Generation" she'd be well qualified to offer input. I think the VB.NET community needs to address this. It's about time! Other developer communities have settled on standards... why can't the VB community? We look stupid for not having done so after all this time. It seems to me that (radical strays notwithstanding... like using p_ to prefix parameters) there are only two contraversies left remaining. 1) naming locally dim'd variables (either local to a method or class level) 2) naming controls Everything else is covered well in Microsoft's OM Naming Guidelines. We can also learn from their MS's Patterns & Practices frameworks VB source code as well! In MS's Application Blocks they use camelCase for all local variables (from what I've seen). They also use it for UI controls!... which I don't exactly like but I see the rationale... they're not properties... they're really class variables. I personally like to treat them as properties nowadays.... but this is exactly why we need a good standard! By developing a standard maybe the VB community will shed a lot of the stigmatism and the body of our work might be easier to maintain and not be seen as a thing to be derided. Every time I open a VB project that someone else wrote, I shouldn't have to hold my breath in anticipation of the horrors that await or adapt to one persons peculiar coding standard. CMM,
One of the nice things from Visual Basic is that it gives the user a lot of free things to do it in the way we self decide it the best. If somebody does not like that, than languages as C# are probably better tools for them. Although he is still young can I assure you that in a discussion about this Herfried likewise Armin have proven always to have very good view on it, for that we don't need Kathleen. There where it makes sense I follow them. (Although Kathleen is welcome in a discussion like that). However keep in mind that not every person is the same and often has different cultural background. I am from a culture "Holland" that as soon as a rule is made people starts to find out how it can be done better without it. Without a rule we do it probably mostly all the same. Herfried and Armin are from cultures (both different) from where people often don't understand why we have that behaviour. (By the way I have never seen written from one of them that something should be done, only that they did not understand why people did not do that). So please let us free and don't give us all kind of policeman who us tell that all inventions should stop. You know by instance that there are (or have exist) in the US a lot of (wartime) rules that made them impossible to create better cars. Cor My friend I am only trying to help. I do not espouse any one standard. I
only say that there should be *some* sort of standard. Truth be told I was totally surprised by the "hungarian notation" thread that I started. I thought EVERYBODY was using modern standards and was surprised and aghast that "MVP's" were doing stuff like CamelCasing locals... something not even seen in the old days of VB3 hobbiest programmers.... And, you know what? If the "norms" in the community was to CamelCase locals, I'd be doing it too! For this reason: I don't know about you... (and I'm not tryng to "preach") but I have had to maintain and upgrade (or rewrite) many large financial Wall Street applications and business objects in my career (snce the middle of college - 1994/VB3/Windows 3.1). One thing I've learned is that consistency is KEY.... not just in a company (you might not be there forever) but in the community as a whole. VB has developed a very bad rep in many corporate circles (especially now that they have a VERY GOOD alternative in C#)... and for good reason. Maybe it should stay an immature, standard-less, language like some people consider it. But, I don't think so. I don't believe that. Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:%23gq5onwJGHA.964@tk2msftngp13.phx.gbl... > CMM, > > One of the nice things from Visual Basic is that it gives the user a lot > of free things to do it in the way we self decide it the best. If > somebody does not like that, than languages as C# are probably better > tools for them. > > Although he is still young can I assure you that in a discussion about > this Herfried likewise Armin have proven always to have very good view on > it, for that we don't need Kathleen. There where it makes sense I follow > them. (Although Kathleen is welcome in a discussion like that). > > However keep in mind that not every person is the same and often has > different cultural background. > > I am from a culture "Holland" that as soon as a rule is made people starts > to find out how it can be done better without it. Without a rule we do it > probably mostly all the same. Herfried and Armin are from cultures (both > different) from where people often don't understand why we have that > behaviour. (By the way I have never seen written from one of them that > something should be done, only that they did not understand why people did > not do that). > > So please let us free and don't give us all kind of policeman who us tell > that all inventions should stop. You know by instance that there are (or > have exist) in the US a lot of (wartime) rules that made them impossible > to create better cars. > > Cor > > > CMM,
As I wrote in the original thread, this is a discussion which started almost on the first day of the introducion of the symbolic languages about 45 years ago. After a while people were glad that they could pronounce themselves in a way as the behaviour of a natural language and others did like languages more based on mathimetical standards. Maybe strange is that those which are based on the first named rules exist both consistently for decenia now and are therefore very consistent in the way they are written. From the mathimetical ones from which much are made, don't almost all not longer exist than 10 years and even less, they die or get a kind of hidden life. Those strict written programs would in your sample have been a much harder job to convert. See this great schema http://www.levenez.com/lang/history.html#01 Just my thought, Cor CMM wrote:
> My friend I am only trying to help. I do not espouse any one standard. I Not seen by you maybe. But one person's experience - however diverse -> only say that there should be *some* sort of standard. > > Truth be told I was totally surprised by the "hungarian notation" thread > that I started. I thought EVERYBODY was using modern standards and was > surprised and aghast that "MVP's" were doing stuff like CamelCasing > locals... something not even seen in the old days of VB3 hobbiest > programmers.... always misses something. Anecdote is not the singular of data. > And, you know what? If the "norms" in the community was to CamelCase locals, That's PascalCasing; and how do you know what the norms in the> I'd be doing it too! community are or aren't? -- Larry Lard Replies to group please "Larry Lard" <larryl***@hotmail.com> wrote in message Yes... I meant to say PascalCasing.news:1138791556.706188.5440@g43g2000cwa.googlegroups.com... > That's PascalCasing > and how do you know what the norms in the Um, judging from samples all over the place and other developers that I've > community are or aren't? had the pleasure of working with (I live and work in New York City.... HUGE developer community!). If anything I still see a lot of VB.Classic notation (s, i, b, or str, int etc.) but definately not pure PascalCase for locals. Perhaps the overseas community do things differently. >Not seen by you maybe. But one person's experience - however diverse - Man, I've been coding since BASIC on the Commodore 64/128... sorry... but >always misses something. Anecdote is not the singular of data. there's no way you can make me demure on what I have or have not seen. But, sure... you're right. Anything is possible. I'm sure there's also still people using $ to dimension a string (Dim A$), which still works in .NET. Oops.. did I say "CamelCasing?".... I meant PascalCasing "locals" was a
shock. See now I'm confused! Show quoteHide quote "CMM" <cmm@nospam.com> wrote in message news:OR2YQhxJGHA.4068@TK2MSFTNGP10.phx.gbl... > My friend I am only trying to help. I do not espouse any one standard. I > only say that there should be *some* sort of standard. > > Truth be told I was totally surprised by the "hungarian notation" thread > that I started. I thought EVERYBODY was using modern standards and was > surprised and aghast that "MVP's" were doing stuff like CamelCasing > locals... something not even seen in the old days of VB3 hobbiest > programmers.... > > And, you know what? If the "norms" in the community was to CamelCase > locals, I'd be doing it too! For this reason: I don't know about you... > (and I'm not tryng to "preach") but I have had to maintain and upgrade (or > rewrite) many large financial Wall Street applications and business > objects in my career (snce the middle of college - 1994/VB3/Windows 3.1). > One thing I've learned is that consistency is KEY.... not just in a > company (you might not be there forever) but in the community as a whole. > > VB has developed a very bad rep in many corporate circles (especially now > that they have a VERY GOOD alternative in C#)... and for good reason. > Maybe it should stay an immature, standard-less, language like some people > consider it. But, I don't think so. I don't believe that. > > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message > news:%23gq5onwJGHA.964@tk2msftngp13.phx.gbl... >> CMM, >> >> One of the nice things from Visual Basic is that it gives the user a lot >> of free things to do it in the way we self decide it the best. If >> somebody does not like that, than languages as C# are probably better >> tools for them. >> >> Although he is still young can I assure you that in a discussion about >> this Herfried likewise Armin have proven always to have very good view on >> it, for that we don't need Kathleen. There where it makes sense I follow >> them. (Although Kathleen is welcome in a discussion like that). >> >> However keep in mind that not every person is the same and often has >> different cultural background. >> >> I am from a culture "Holland" that as soon as a rule is made people >> starts to find out how it can be done better without it. Without a rule >> we do it probably mostly all the same. Herfried and Armin are from >> cultures (both different) from where people often don't understand why we >> have that behaviour. (By the way I have never seen written from one of >> them that something should be done, only that they did not understand why >> people did not do that). >> >> So please let us free and don't give us all kind of policeman who us tell >> that all inventions should stop. You know by instance that there are (or >> have exist) in the US a lot of (wartime) rules that made them impossible >> to create better cars. >> >> Cor >> >> >> > > CMM wrote:
> Other developer communities have settled on standards... why can't Yes, standards please, and plenty of them so we can pick and mix the parts > the VB community? of each we like <g>. Andrew |
|||||||||||||||||||||||