I'm creating an API for a module and after I created several methods inside my classes, I asked myself this question.
Right now, and as an example, I'm doing this:
public Company GetMonitoredCompany( String companyName ) { ... }
public List<Company> GetMonitoredCompanies( ) { ... }
But I realize that for several times that I use othe...
In my experience, everyone names variables like this:
int *myVariable;
Rather than like this:
int* myVariable;
Both are valid. It seems to me that the asterisk is a part of the type, not a part of the variable name. Can anyone explain this logic?
...
When using Visual Studio (though ideally this can apply to the generic case) and double click on a button I've created, the event handler code that is auto generated uses the following signature:
Protected Sub btnSubmitRequest_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSubmitRequest.Click
End Sub
Is it best practi...
Is there a database term for "table or view"?
In my app, the table name I'm pulling data from is configurable using the configuration setting UserTableName
Now the DBA went and renamed the table but created a view using the original name.
So nothing changed on my side but now I feel that UserTableName is misleading and I would like to ch...
Not that it is seriously burdensome to type
:My_custom_foobar()
instead of just
:my_custom_foobar()
but it just feels odd considering how virtually every other aspect of Vim is so extensible. Some searching for an answer has not turned up much, but I know it's got to be possible without having to recompile Vim from source. Does a...
Can anyone point me to a site, or give me some wisdom on how you go about choosing names for interfaces, classes and perhaps even methods and properties relating to what that object or method does?
This is specifically for Microsoft development, so Java-esque "doGet" and so on isn't really used, however some general rules that cross lan...
In PHP, we (at least the good programmers) always start general variable names with a lower-case letter, but class variables/objects with an upper-case letter to distinguish them. In the same way we start general file names with a lower case letter, but files containing Classes with an upper case letter.
E.g:
<?php
$number=123;
$string...
In functional programming, it's often important to optimize any "looping" code to be tail recursive. Tail recursive algorithms are usually split between two functions, however - one which sets up the base case, and another that implements the actual loop. A good (albeit academic) example would be the reverse function.
reverse :: [a] -> ...
I'm just coming up the learning curve for Java SE & have no problem with the usual Java convention for package names, e.g. com.example.library_name_here.package_name_here
Except.
I've been noticing a failure to abide by this in some fairly well-known packages.
JLine: jline.*
JACOB: com.jacob.* (there is no jacob.com)
JNA: com.sun...
So I am working on this class that's suppose to request help documentation from a vendor through web service. I try to name it DocumentRetriever, VendorDocRequester, DocGetter, but they just doesn't sound right. I ended up browsing through dictionary.com for half an hour trying to come up with an adequate word.
Start programming with b...
When you are using placeholder names when programming (not necessary variable names, but labels, mockup names, etc) and foo and bar is not enough, what do you use?
I guess baz is rather common as third name, and the lorem ipsum for longer texts. But then what?
...
Let's for a moment assume that you're programming in a language that uses camelcase words for identifiers, by convention. All you Ruby types with your underscore-separated method names get to sit this one out.
What approach do you take to capitalising the letters after the first when your name contains an acronym? For example, would y...
I distinctly remember that, at one time, the guideline pushed by Microsoft was to add the "Base" suffix to an abstract class to obviate the fact that it was abstract. Hence, we have classes like System.Web.Hosting.VirtualFileBase, System.Configuration.ConfigurationValidatorBase, System.Windows.Forms.ButtonBase, and, of course, System.Col...
I'm looking for "schemes" for application version or milestone naming.
I'd like to find a naming scheme that suits my current project but I think we should gather here the more interesting schemes to share knowledge and ideas on the subject.
You also should provide the number of possible name with the proposed scheme or an estimate.
F...
Typically languages have keywords that you are unable to use directly with the exact same spelling and case for naming things (variables,functions,classes ...) in your program. Yet sometimes a keyword is the only natural choice for naming something. What is your system for avoiding/getting around this clash in your chosen technology?
...
Does anyone know the rationale behind this naming convention? I don't see any benefit. The extra prefix just pollutes the API.
I like Konrad Rudolph's response found in this related article
...
Which naming convention do you use and why?
I like to use employeeNameTextBox, because:
It seems more natural from an English language perspective.
I find it's easier to look up with Intellisense.
The convention is similar to the convention used for events (MouseClickEvent, MouseClickEventHandler) and dependency properties (VisiblityP...
Is there any standard, de facto or otherwise, for XML documents? For example which is the "best" way to write a tag?
<MyTag />
<myTag />
<mytag />
<my-tag />
<my_tag />
Likewise if I have an enumerated value for an attribute which is better
<myTag attribute="value one"/>
<myTag attribute="ValueOne"/>
<myTag attribute="value-one"/>
...
Let's assume, we create a stored procedure that is supposed to retrieve customer details and that will be used in some sort of dashboard view. Since there are a couple of other stored procedures relevant for the dashboard as well, one might think about visually grouping the SPs by naming them accordingly:
DASH_GetCustomerDetails
DASH_....
I was fooling around with some functional programming when I came across the need for this function, however I don't know what this sort of thing is called in standard nomenclature.
Anyone recognizes it?
function WhatAmIDoing(args...)
return function()
return args
end
end
Edit: generalized the function, it takes a variabl...