Wow, Just Wow
-
var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);
That is a REALLY long method name.
If it's not broken, fix it until it is
How about stating it as below
GetAllCompanyScheduledContactInfo(schedule.Id) or
GetAllCompanyScheduledContactInfoByScheduleID(schedule.Id)Thanks,
-
var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);
That is a REALLY long method name.
If it's not broken, fix it until it is
That's somebody who doesn't like comments. He or she has bought into the idea that code should be self commenting.
-
How about stating it as below
GetAllCompanyScheduledContactInfo(schedule.Id) or
GetAllCompanyScheduledContactInfoByScheduleID(schedule.Id)Thanks,
-
var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);
That is a REALLY long method name.
If it's not broken, fix it until it is
That's kind of the opposite naming principle to my examples below. Nearly as bad.
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
-
var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);
That is a REALLY long method name.
If it's not broken, fix it until it is
-
var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);
That is a REALLY long method name.
If it's not broken, fix it until it is
The longest one I have seen was about 1000 characters long. Abbreviated. With a Namespace of ~1300 characters (excluding the '.') and a class name of ~700 characters. I remember this as I was going to use the library this was in. I quickly decided to use a different library instead (this library had a whole host of other things that would belong here, if I could remember the name of the library [it was a weird, unpronounceable, seemingly randomly generated name] I would post a link to it.)
What do you get when you cross a joke with a rhetorical question?
-
var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);
That is a REALLY long method name.
If it's not broken, fix it until it is
What a stupid beginner! What does
Engine
mean? Is that aApplicationProgrammingInterfaceProxyEngine
? That's still not meaningful enough. And thatAPIProxy
, that also needs a better name! I cannot understand that line of code because of that bad naming. -
var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);
That is a REALLY long method name.
If it's not broken, fix it until it is
What the developer really meant to do was:
var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoScheduleContacts()
.Where (p => p.ScheduleHeaderId == schedule.Id)
.OrderBy (p => p.CompanyInfo);/ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Probably someone taking the Aggregate Root concept to the extreme. Also, a horrible use of var.
Vark111 wrote:
Also, a horrible use of var.
I know what you mean!
List<CompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeader> scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);
would have been so much clearer!!! :-DMy programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!
-
How about stating it as below
GetAllCompanyScheduledContactInfo(schedule.Id) or
GetAllCompanyScheduledContactInfoByScheduleID(schedule.Id)Thanks,
Ranjan.D wrote:
...GetAllCompanyScheduledContactInfo(schedule.Id) or...
The problem with that is that you don't get to get even for outrageously long names by making them even longer and more confusing.
-
var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);
That is a REALLY long method name.
If it's not broken, fix it until it is
Looks like someone has just read something about Domain Driven Development and was fiddling around a bit. :-D