- 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
makeString2 is indeed redundant.
Admin
If you measure software in the number of Pieces Of Software (POS) that's exactly what you get.
Admin
Are you kidding me? WTF!
Admin
You start paying by the line, you're gonna get more lines. What do you expect?
Admin
Are you seriously trying to pass this off as production code? That's first week of first semester of programming class mistakes (for those that have never looked at code prior to taking the class).
Admin
Admin
The optimist in me says this is fake, no one could possibly do this.
The realist says I have met people capable of this.
Admin
Reading this article caused me to make poo.
Clearly the more elegant solution would account for all future needs:
Admin
Reminds me of the manager whose metric was a ratio of number of defects to lines of code. He offered a bonus to the programming staff if they could get the ratio below a certain threshold.
The programming staff worked one weekend to attack the problem. They inserted blank lines between all lines of code; in effect, they cut the ratio in half.
The manager was pleased with the result and convinced himself that he was a management genius.
Admin
We can do better guys.
(I don't actually know VB, so I might have mixed some c# in there, but who cares if it's valid syntax. It's more lines!)
Admin
Not paid to argue
Are you not having weekly defect prevent meetings, where you do peer review of code?
Admin
If the policy resulted in programmers actually commenting their code that would have been genius (provided they were real comments).
Admin
Clearly Visual Basic does implicit type casting for such calls, and this is just a weirdly convoluted way of explicit type casting.
Admin
It is possible that the functions listed here are for the explicit purpose of creating new references, though it wouldn't be required for the value types and it would not work properly for the strings (due to interment).
Admin
I don't know, the MakeULong function might be useful. If it really works, that is.
Admin
If it takes a team of programmers an entire weekend to add blank lines to their code, they're probably not the greatest programmers. Also, I know of nothing that includes blank lines when counting LoC. So basically, I'm pretty sure your story is bullshit.
Admin
I get emails advertising that makeULong function every day. It must be good code.
Admin
It took a whole weekend to add line breaks to the source code? Now THAT is a WTF!
Admin
Shouldn't those be static functions? I think that's "Shared" in vb.
Admin
That's easy, don't count LoC. Just count line breaks. I'm sure it'd easy to get that past this "manager".
Admin
what about this instead of empty lines (added benefit: it makes the program run for longer, so it must be doing mode things, mustn't it!):
system ('echo "$random_string" >/dev/null');
captcha: genitus (genial I knew it..)
Admin
Yes. Yes we are not having those.
Admin
Admin
Except that the return from all of these functions is of type Object
Admin
Public Function makeFristComment(ByVal u As Comment) Return frist End Function
Public Function makeRegularComment(ByVal u As Comment) Return embededSystem End Function
Admin
I think I'm going to cry.
Admin
Assert#1: in C, LoC is measured by ";". Rule #2: ";" by itself is a no-op. Silly Target: double number of LoC.
Solution:
Admin
fixed
Admin
These would get more effective (or possibly break everything forever if) you moved the right parenthesis a bit leftward.
Admin
As a peer reviewer, I am a peer. I will prove it by peeing all over it.
Admin
It took them a whole weekend to do something which a s/\n/\n\n/ style regex could have done in seconds?
Regardless.. the issue you highlight is exactly why people start using function point counts rather than line counts for their metrics, and this in turn is what drives people to do things such as this particular WTF
Admin
Admin
In VB 6 this was the only way of doing casts, apart from creating another variable in the body of the code.
Admin
It's a bit like a piece of serial music.
It goes: "diddle-diddle-diddle-diddle-diddle-diddle-diddle-diddle-diddle ..." for ages, then suddenly does: "diddle-diddle-doodle-diddle ..." and then goes back to "diddle-diddle-diddle-diddle ..."
Utter genius.
Admin
Admin
The real WTF is that there are known defects in the code which are not being addressed. You can drastically reduce the number of defects in the code by fixing them when they come to light. Call me boring and old-fashioned but if (as that manager) I were to find what had been done (and if it were me, I would) then heads would roll. Granted, I would not use this metric in the first place, but that's not the point.
Admin
I love makeString2 :)
Admin
Someone told me this WTF had a cast of thousands.....I had no idea.
Admin
There, I Pink Floyded that for you...
Admin
No, that is the point. If you are the sort of manager that uses useless metrics of the "defects per KSLOC" sort, you are likely also the sort of manager who won't look too closely (or even know how to look) at what your reports did to meet your useless metric.
Admin
Yep, better to keep his mouth shut.
Admin
DirectCast()
Frist time I've been hit by Akismet. Am I now "one of the guys"?
Admin
marcus should do job with complete and total dedication. maybe he rise up and above in organization.
Admin
Everyone knows that more lines of code makes the software better, more stable and faster and more maintainable and ... well it is just better, Okay!
Admin
Akismet love to hit me daily. In every post I make, I offer a small sacrificial post to Akismet.
Admin
Love sarcasm comment here.
Admin
This reminds me of a story from a former boss. In his days working for a large defense contractor, management followed the well trodden, broad path (and we all remember where that path paved with good intentions leads, right? :-) ) to counting lines of code. However, they wanted to add a level of sophistication to the count. Since:
and
are equivalent modulo formatting, they wanted to find a LOC metric that considered those equivalent. The method they hit on was counting semicolons (since this was C).
Subsequently, the development team's productivity soared... until the first external code review, which revealed that statements like the above had been replaced by the syntactically correct:
So much for that metric.
Admin
What you do is, you put your criticism in a sh*t sandwich.
Nice tasty complimentary (and ultimately non-nourishing) piece-of-bread comment to start with "What wonderfully neatly laid out code this is! I approve!"
Then give the sh*t: "... but surely we can accomplish this in an even more streamlined and enterprise-friendly manner by deleting the entire module."
Then the nice tasty complimentary (and ultimately non-nourishing) piece-of-bread comment to end with: "And how wonderfully bug-free it seems to be - no doubt it passed all its unit tests? Can we see the unit tests?"
You'll be rocketing up the promotion chain so fast you'll achieve escape velocity.
Admin
I know very little about VB / VB.NET, so could someone explain how this isn't largely equivalent to a) casting (e.g. (unsigned long) x); or b) forcing a type for an integer literal (e.g. 42lu); in C?
Admin