Earlier quoted context omitted.
In 16 years as a developer, I have never seen this beyond the scope of a single project/language. Once things cross boundaries it stops.
What boundary would be involved in the handleClick example? Or are you speaking more generally about renames across API contracts?
How Developers Choose Names
121–130 of 157 posts
Re: How Developers Choose Names
#122Earlier quoted context omitted.
In 16 years as a developer, I have never seen this beyond the scope of a single project/language. Once things cross boundaries it stops.
What boundary would be involved in the handleClick example? Or are you speaking more generally about renames across API contracts?
I have a C# .net MVC web project. All of the JS, .cshtml templates and C# controllers are in the same visual studio solution. So it has complete vision into the code.
So the boundary is from cshtml template to javascript function and then another one from the js function (ajax call) to C# controller.
Visual studio has complete vision, but loses the connection at each boundary, so intellisense says that the C# controller function is never called.
I am not criticizing Visual Studio, it is a great tool, but this is a hard problem.
Re: How Developers Choose Names
#123No one is going to confuse e7693160-b5cf-4761-9202-de019cfd0fc9 with c3d8b9ac-d0da-4bbc-912b-025ce4e47f62
Re: How Developers Choose Names
#124I just use a UUID for every variable name to make sure the codebase never has any ambiguity. No one is going to confuse e7693160-b5cf-4761-9202-de019cfd0fc9 with c3d8b9ac-d0da-4bbc-912b-025ce4e47f62
Re: How Developers Choose Names
#125I thought you just added "ly" and called it a day?
You watch your program buzz, But don't know what anything does. How do you name things so they're obvious to the eye? Descriptively, descriptively, descriptive... L-Y!
Re: How Developers Choose Names
#126I just use a UUID for every variable name to make sure the codebase never has any ambiguity. No one is going to confuse e7693160-b5cf-4761-9202-de019cfd0fc9 with c3d8b9ac-d0da-4bbc-912b-025ce4e47f62
Re: How Developers Choose Names
#127Say what you want, but it's better than how mathematicians choose names imho.
For example in graph algorithms, I used to write descriptive names like:
weight = adjacenyMatrix[node][neighbor]
Nowadays I write it as: w = G[u][v]
Because in graph theory, an edge is usually (u, v), weight is usually w, graph is usually G, etc.It's basically the same reason why people don't name their indices "index" and instead use "i", "j", "k". And instead of point.first and point.second, you use point.x and point.y.
Naming conventions are awesome when people can agree on them.
Re: How Developers Choose Names
#128I just use a UUID for every variable name to make sure the codebase never has any ambiguity. No one is going to confuse e7693160-b5cf-4761-9202-de019cfd0fc9 with c3d8b9ac-d0da-4bbc-912b-025ce4e47f62
A good name has maximal information density. If the string is compressible, you're wasting your reader's time. That's why I use all utf-8 glyphs to render my uniformly random and highly informative (from an information theory standpoint) variable names.
Re: How Developers Choose Names
#129Say what you want, but it's better than how mathematicians choose names imho.
Re: How Developers Choose Names
#130I find that I am remarkably internally consistent with how I name things. I sometimes forget about a filename, class or function that I wrote months ago (thats another problem in itself). But when I go to name the new thing I am about to write I realize that it already exists. I then pat myself on the back.