- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Can't you get in trouble for posting diebold source code?
Admin
public void First() { //Yeeeay! } refactored to
public void AlmostFirstIfOnlyIWasAFewSecondsEarlierThenItWouldntBeSoLong_MaybeNextTime() { //Booo }
Admin
I thought it was funny.
Admin
How to do self-documenting code right: Write your comment for the method, remove the spaces, and then make it the method name. WorksEveryTime()
Admin
ThisIsAVeryLongCommentThatIsAllOneCallFromThatCode(orWouldBeExceptICan,tBeBotheredToWriteThatMuch);
Admin
At least when this eventually crashes, the stack trace will be unusually descriptive.
Admin
private void RigTheResultsSoThatTheBushiesWinAgain() { }
code.
Admin
Use of the m_ prefix combined with German-style agglutination - is this Austro-Hungarian Notation?
Admin
Buy yourself a fedora.
Admin
WhoNeedsCommentsAnyway?
Admin
ThisIsTheBeginningOfTheFunctionNameWhichYouHaveJustFinishedReading();
Admin
max identifier/function name length increased in compilers + auto-completion + camel case = headache
ok, this comment is not LongMethodName(TM) compliant...
Admin
I love that they abbreviated check in the first occurance:
chkApplyUpdateToMainAndFutureRecords.Checked
Admin
This must be a Diebold/Seqouia coder. Check for
if (CandidateIsARepublicanAndWeNeedToWin()){
AddRandomExtraVoteToRepublican(); SendExtraPennyToRandomOffshoreCodingFirm(); }
Admin
Admin
Hey, look on the bright side, at least you don't have to read comments to figure out what it's doing! Oh wait.. 0_o
Admin
At least they're descriptive... when unsure use a method/class name generator: http://www.classnamer.com/
Admin
I call shenanigans! Given the amount of bad code this guy presumably has to encounter every day, long method names CAN'T be the thing that annoys him the most.
Admin
This is why I insist on a "Maximum 3 letters for function names" code standard.
Admin
I love that you have no idea why.
Admin
Admin
Better too long than too short, as the ladies say (not mine, unfortunately).
Admin
Fortunately Visual Studio has refactoring so you can change those to something "a bit" better. But still, takes a lot of time...
Admin
Use of uninitialized value in concatenation (.) or string interpolation at TalesFromTheLongMethodNameGenerator(int maxLength) line 1.
Admin
This is code from a Diebold voting machine, right?
Admin
Ah, the prose (but not pros) way to code.
Admin
I should probably mention Diebold, just to be with the in crowd. Also, I like sounding political.
Admin
Cool. A nice way of not having to comment the code.
Admin
I worked with one of these guys.
Admin
I lol'ed
Admin
At work, we have the ThunderCougarFalconBird rule: If a class, variable or method name is as long as ThunderCougarFalconBird, it's way too long.
Admin
while( LongVariableNamesCanBeHelpfulInUnderstandingCode && //YouCanDefinitelyGoTooFarTheOtherWayAndMakeAcronymsOutOfEachVariable
ycdgtftowamaooev ) { ThisDoesNotMeanThatYouCanMakeUpFor( Design.Unintelligible | Design.AbsolutelyNone ); //ByMeansOfLongVariableNames }
Admin
Admin
Well, I don't know about anybody else, but I went blind before I could read to the end of the first method name.
Don't they have goggles for this sort of thing?
I'm intrigued by the parameter name, however. "electionDate?" It's not very descriptive under the circumstances, is it?
Did the guy get RSI, or is it just that every single election occurs on the same date?
Admin
What use would that be?
Admin
I wouldn't be able to start my day as a developer without my trusty fedora.
Then there's the guy I used to work with who'd write code with The Raiders March blaring in the background.
Admin
Okay, the real WTF(R) is migrating from VB .NET to C#. What's the point?
Admin
private void shouldntYouBeUsingLowerCaseInTheBeginningOfTheMethodName(String yes) { }
Now I know why no-one trusts Diebold voting machines... ;)
Admin
One word.... ThunderCougarFalconBird.
Futurama FTW.
Admin
What a lovely thought. This code is used in election systems. No wonder people don't have faith in them...
Admin
how about this one
public theBestThingAboutThisMethodNameIsThatByTheTimeYouFinishReadingItYouRealizeThatItSaysNothing (int variable){ }
Admin
I've read carefully throughout all the comments on this peculiar post. Didn't anybody notice that the developers of this beautifully titled method aren't even aware of the abundant use of boolean logic in this code? Maybe it's because I'm a bit authistic, but if people write code like this:
I just have to refactor it. Just can't leave this poor method like this. I would suggest the following line of code.
Admin
I think removing the spaces from a descriptive comment to generate a method name is a wussy weinie way to go. REAL programmers name a method by extracting the alphanumeric characters from the CODE:
-Harrow.
Admin
Don't tell me... this is code from a Diebold voting machine isn't it?
See if it has the "GeorgeWalkerBushGuaranteedVictoryForThe2004ElectionsByWayOfVoteRedistributionAndDiscounting ofPeopleWithUnAmericanNames" method.
Be sure of the result as well:
{ ... //return McCain; //return Obama; return Darth_Vader; }
Admin
Trust me. It's quite relaxing.
You can lie on the couch and tell me about it later. My rates are reasonable.
Admin
Or are you just suggesting that Diebold machines might have the occasional technical glitch?
Admin
Sooooo. Tell me. Who was it that went to prison for stuffing the ballot box in St. Louis? What party did they belong to?
Democrat? Right in one.
Sooooo. Who was it that won the governor race in Washington by 300 votes? Which county was it that found extra votes for the Democrats several times in the most unlikely of places? And the party of the election officials in that county?
Democrat? Right in one.
Stop being a dumbass. So far this place is fairly non-political. But if you want to turn this into a political fight then I'm more than pleased to start jacking your idiot ass right on up.
Admin
As in the english language, this is an error. It's called a run-on sentence. Variable names or functions should not be a whole sentence in themselves, they are only part of the whole sentence.
Admin
I like letter + number combinations.
Who can't tell what function A0921 does?
Admin
Unfortunately?
So your lady says "better too short than too long"??