|
"I don't think I've ever read a class name with 30 characters before."
I find that hard to believe. They seem a common occurrence to me.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Did you at least bury it way down deep in a long namespace?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
It is in Namespace Azure.File
It's not even close to being the longest named class - I think that is "InMemoryIdentifierGroupSnapshotReaderFactory"
|
|
|
|
|
We have one called "EstimatedYearlyCreditOpportunityImportDataSaver"
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
personally I don't see what's wrong with that - too short, its not descriptive enough, at least that says what the class is/does - even if you said "FESStreamProviderFactory", would you remember what acronym FES stood for, 2 years from now, without re-examining the source ?
..as a friend oft quotes "naming things is one of the hardest things in programming"
|
|
|
|
|
It is pointless to question the nonexistent...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Duncan Edwards Jones wrote: I just created a module ...
If you're creating a module[^], then there's no question of you having any sanity left.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
It's just syntactic sugar over
public static class ...
|
|
|
|
|
Not quite. It's more like a combination of public static class and using static - the members of a Module don't need to be qualified with the module name.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Was wondering why one of my unit tests was passing even when nonsense values were passed in...found:-
if (row != null)
{
if (!row.IsNull(fieldName))
{
double fieldValue = (double)row[fieldName];
}
}
What indeed....
|
|
|
|
|
Be fair: we've all had days like that. Granted, one usually fixes it the next day...
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Yeah - it's probably existential despair at what the code has to do - it is a filter function run on the client side that would be much more healthy if implemented as an SQL WHERE clause.
|
|
|
|
|
Not always. I've had the following in one of mine for years:
else
{
}
|
|
|
|
|
Like one of my classmates from Purdue who wrote a NotImplementedExceptionEx which threw itself in the constructor.
He never figured out why trying to throw one caused his program to abruptly exit.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Did he find help on StackOverflow?
|
|
|
|
|
More importantly: did he ever give help on StackOverflow?
Software Zen: delete this;
|
|
|
|
|
Nah...he couldn't earn enough points to answer a question!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Probably not. Every time I've tried I get blocked even if the answer is correct.
|
|
|
|
|
|
I'm guessing he was a dual major - CS / Philosophy - and was attempting to express existentialist nihilism through code.
|
|
|
|
|
AFAIK, he ended up switching to the hardware aspect of computing and has done much better.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
You clearly need to write some unit tests for your unit test
|
|
|
|
|
The project I'm currently working on has been developed by four people, including myself, over the course of the past two years. While looking through some code yesterday, I saw many instances like this:
var someInt = model.SomeIntProperty;
SomeMethod(param1, param2, someInt != null && someInt.HasValue ? someInt.Value : (int?)null);
Why? Is that really necessary, to check the value, pass the Value if it has one, and otherwise pass 'null' cast as a nullable int?
This project also utilizes Entity Framework for the data access layer. The same contractor (contract was not renewed, for several obvious reasons) also wrote some data access code at one point. No, he didn't use EF with LINQ - he called "context.Database.ExecuteSqlQuery" methods, using const string variables for the queries. The majority of them are pretty basic select statements.
private const string SomeSqlQuery = "select * from table1 where field1 = {0} and field2 = {1}";
var field1 = model.SomeField;
var field2 = model.SomeOtherField;
context.Database.ExecuteSqlQuery<SomeType>(SomeSqlQuery, field1, field2);
The problem? We discovered, by chance that the "format string" construct for the SQL query is supported - until SQL Server 2008 R2. If the target DB is ever upgraded from SQL Server '08 to '08 R2, this application would not work in several cases. We had to convert all of these so that they take "@field1" type parameters, and then pass SqlParameter objects to the ExecuteSqlQuery methods. But I don't understand why he didn't use EF with LINQ queries, as the rest of the data access code does?
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
Matt U. wrote: someInt != null && someInt.HasValue ? someInt.Value : (int?)null Well, that's pretty clear: those guys feared a NullReferenceException when someInt was null and they call someInt.HasValue ...
Why would they assume a magician added by the compiler to handle that?
|
|
|
|
|
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|