- 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
Admin
A colleague had a script that looked at all the changes he had submitted and came up with a line count. It was something like -100000 LOC. Of course, it also generated a lines changed and that was in the millions...
Admin
lol, i laught megabytes. it isnt even visual basic nor csharp some kind of visual sharp perhaps.
Admin
But the code actually works and does something. Ok, it relies on you not having Option Strict set on (and I prefer my languages to be very strict), but
Dim i As Integer = 2 Dim o As Object = MakeLong (i)
and o is actually a Long now..... The functions implicitly convert the parameter to the correct type and give a return value of the same type as the parameter.
Of course Dim i As Integer = 2 Dim l As Long = MakeLong (i)
is not better than Dim i As Integer = 2 Dim l As Long = i
I'm not understanding why you want functions to convert types (instead of using built-in conversions), when you're going to allow the compiler to do implicit conversions anyway...
Admin
Admin
"Counting program development by lines of code is same as counting airbus construction by weight" Bill Gates "Everty time you try to measure development eficiency by code count (independently if it is function point or lines of code, or whatever) the programmers will game with it." (dont remenber who said)
Admin
Admin
Please tell me its a joke :-) nnnnnnnnnnnnoooooooooooooooooooooooooooooooo wwwwaaaaaaaaaaaaaayyyyyyyy !!!! That would a good WTF post.
Admin
This is a joke, right ? :-) Please tell me its a joke.
If its not, please make a WTF post for this :-)
Admin
Exactly. How many lines would the quoted code come out to?
Admin
Zing, sir!
Admin
no no no, it's very simple to add useless LOC
if (false) { // add whatever you want here bool thisMetricIsStupid = true; // infinite loops just for fun for (;;) while(true) {;} }
Admin
Admin
Believe it or not, this is necessary in Hyderabad. They're implementations of several programming languages removes several features, so you have to make sure your program works correctly by adding seemingly redundant code. You get the added bonus of being able to charge by line of code, but I'm sure the poor fool who wrote this (looking at you Nagesh) didn't realize he was getting paid by the hour.
Admin
We aren't all guys here :)
Admin
Open a file in Programmer's Notepad (make sure the option to display line numbers is enabled), hit Ctrl-End, read the line number of the last line. There, you know how many lines of code are in the file [if you're a manager].
Admin
In the early days of Apple, they had the same metric. Until one of their star programmers went to have fun with it and removed 2,000 lines of code. He put in -2000 as the number of lines he wrote.
http://www.folklore.org/StoryView.py?project=Macintosh&story=Negative_2000_Lines_Of_Code.txt&sortOrder=Sort%20by%20Date&detail=medium&search=-2000%20lines
Admin
Uh, that's not true. Besides, you should never need to do casts without using a new variable anyways.
Admin
Admin
Admin
So basically, I'm pretty sure the GP's comment about being pretty sure the GGP's story is bullshit is bullshit.
Admin
Not good enough to prevent you being passed through the makeSingle function, I expect.
Admin
Admin
I take that your convincing skills wouldn't be able to convince anyone that umbrellas help you not get wet when you're out in the rain either.
Admin
Actually, that is EXACTLY the point.
Admin
QFT +1001
Admin
Sure, then you just double-casted, as the function argument still casts.
Admin
Shit. Shit. Tell me you just made that syntax up. I don't want to live in a world where freaking Visual Basic has generic types!
Admin
No VB'er worth their salt will code without 'Option Explicit On'
Admin
It's main effect, when used on me, is to be immediately suspicious of any complement from a manager.
Admin
From 2010 forwards, all major language features will be introduced in both VB and C# at the same time. The teams have been merged at Microsoft.
Admin
Stupid VB programmers.. what else do you expect?
Admin
Admin
But it's nobody ever gets ads for makeUShort. I smell a business opportunity here!
"Tired of hitting your head when you walk through a door frame? Sick of telling people no, you don't play basketball? Well, now there's a solution! Introducing the all new makeUShort function! Only eleven easy payments* of only nineteen-ninety-nine-ninety-nine-ninety-nine-ninety-nine! That's right, only eleven easy payments of only $19.999999*!! Just call 1.80056E9!
Admin
Just ask for Procrustes, he'll take care of you.
Admin
Even a two's complement?
Admin
Yeah, what ever happened to that effeminate asian dude? Never before have I met someone as funny and angry at the same time as him...
Admin
FTFY
Admin
Again, TRWTF is Java. Carthago delendam esse!
// Voila! template <typename T> inline T make(T foo) { return foo; }
But wait... Compiler isn't paid for units of software!
Admin
Don't see the problem here. Code works as specified.
Admin
Being paid for lines of code is like being paid for bugs found.
Thank you, Dilbert: http://dilbert.com/strips/comic/1995-11-13/
Admin
If you're a manager you use Word to open the file and hold the down arrow until you get to the bottom. Then you read the line number.
Bonus wages for wrapped lines.
Admin
You can spell. Good for you.
Admin
Is me a spam?
Admin
And you can't, so much the worse for you. It makes you come across as even more ignorant than you actually are, which for you is saying something.
Admin
Oh, I'm sorry. I must have missed the string of mind-blowing enlightenment coming from "Matt Westwood". I'll stay tuned from now on. That way I'll learn how to snobbishly correct others' spelling mistakes and not contribute a single interesting comment.
Admin
YHBT etc.
Admin
Riiiight
Admin
All this whining ! Yuo KNOW you are going to need a UShort - at least now you have a way to get one ! And it's a reusable, standard way !
Geez ....
Admin
"It will take too long to get the umbrellas in place." "We've always worked in the rain, why should we change?" "What if an umbrella breaks and stabs a customer in the eye?" "Rain is stable." "Real programmers don't mind rain." "Umbrellas are for those big fancy companies."
Also see: "Why don't you/yes but."