Units of Software

« Return to Article
  • henke37 2011-04-21 09:01
    makeString2 is indeed redundant.
  • XXXXX 2011-04-21 09:02
    If you measure software in the number of Pieces Of Software (POS) that's exactly what you get.
  • Anon Too 2011-04-21 09:11
    Are you kidding me? WTF!
  • Your Name 2011-04-21 09:13
    You start paying by the line, you're gonna get more lines. What do you expect?
  • Machtyn 2011-04-21 09:16
    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).
  • Some guy 2011-04-21 09:16
    henke37:
    makeString2 is indeed redundant.

    It uses a completely different code path!
  • Pete 2011-04-21 09:17
    The optimist in me says this is fake, no one could possibly do this.

    The realist says I have met people capable of this.
  • frits 2011-04-21 09:17
    Reading this article caused me to make poo.

    Clearly the more elegant solution would account for all future needs:
    Public Function makeTypeObject(Of t)(ByVal arg As t)
    
    Return arg
    End Function

  • Bob 2011-04-21 09:17
    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.
  • vt_mruhlin 2011-04-21 09:24
    We can do better guys.

    Public Function makeBoolean(ByVal b As Boolean)
    
    if b is Boolean
    return b as Boolean
    else
    return null
    End Function


    (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!)
  • Nagesh 2011-04-21 09:24
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?
  • Dan 2011-04-21 09:28
    Bob:
    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.


    If the policy resulted in programmers actually commenting their code that would have been genius (provided they were real comments).
  • Bas 2011-04-21 09:28
    Clearly Visual Basic does implicit type casting for such calls, and this is just a weirdly convoluted way of explicit type casting.
  • Keith 2011-04-21 09:29
    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).
  • Bill's Kid 2011-04-21 09:31
    I don't know, the MakeULong function might be useful. If it really works, that is.
  • anon 2011-04-21 09:33
    Bob:
    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.


    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.
  • Bumble Bee Tuna 2011-04-21 09:34
    I get emails advertising that makeULong function every day. It must be good code.
  • Larrik 2011-04-21 09:35
    Bob:
    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.


    It took a whole weekend to add line breaks to the source code? Now THAT is a WTF!
  • Menno 2011-04-21 09:38
    Shouldn't those be static functions? I think that's "Shared" in vb.
  • Larrik 2011-04-21 09:38
    anon:


    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.


    That's easy, don't count LoC. Just count line breaks. I'm sure it'd easy to get that past this "manager".
  • m 2011-04-21 09:38
    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..)
  • akatherder 2011-04-21 09:42
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?


    Yes. Yes we are not having those.
  • anonymouser 2011-04-21 09:44
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?

    I work with a bunch of Indian contractors; so, I have no peers.
  • Option Strict, Please 2011-04-21 09:46
    Bas:
    Clearly Visual Basic does implicit type casting for such calls, and this is just a weirdly convoluted way of explicit type casting.


    Except that the return from all of these functions is of type Object
  • blarg 2011-04-21 09:47
    Public Function makeFristComment(ByVal u As Comment)
    Return frist
    End Function

    Public Function makeRegularComment(ByVal u As Comment)
    Return embededSystem
    End Function
  • pussywhipped 2011-04-21 09:47
    Bob:
    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.


    I think I'm going to cry.
  • Le Forgeron 2011-04-21 09:48
    Assert#1: in C, LoC is measured by ";".
    Rule #2: ";" by itself is a no-op.
    Silly Target: double number of LoC.

    Solution:
    1. duplicate each ";" which ends a LoC (beware of actual ";" in text)
    2. ...
    3. Profit
  • gogol 2011-04-21 09:49
    fixed


    Public Function makeBoolean(ByVal b As Boolean)
    if b is Boolean
    return b as Boolean
    else
    return Boolean.FILE_NOT_FOUND
    End Function
  • HonoreDB 2011-04-21 09:49
    These would get more effective (or possibly break everything forever if) you moved the right parenthesis a bit leftward.
  • pussywhipped 2011-04-21 09:49
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?


    As a peer reviewer, I am a peer. I will prove it by peeing all over it.
  • blarg 2011-04-21 09:50
    Bob:
    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.


    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
  • Nagesh 2011-04-21 09:54
    akatherder:
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?


    Yes. Yes we are not having those.

    No wonder poor quality of code.
  • Andy 2011-04-21 10:02
    In VB 6 this was the only way of doing casts, apart from creating another variable in the body of the code.
  • QJ 2011-04-21 10:04
    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.
  • SCSimmons 2011-04-21 10:05
    blarg:
    It took them a whole weekend to do something which a s/\n/\n\n/ style regex could have done in seconds?

    If you do it in seconds, the manager will get suspicious of the huge improvement in the metric and start digging for details. If you bring the whole department in to work on it for the weekend, the 50% reduction in errors per line looks at least plausible. The manager doesn't need to know that the 60 hours of overtime he paid out was 2 minutes of writing replace scripts and 59 hours and 58 minutes of playing Quake.
  • QJ 2011-04-21 10:12
    Bob:
    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.


    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.
  • szeryf 2011-04-21 10:12
    I love makeString2 :)
  • Wonk 2011-04-21 10:19
    Someone told me this WTF had a cast of thousands.....I had no idea.
  • just me 2011-04-21 10:22
    frits:
    Reading this article filled me with the urge to defecate.


    There, I Pink Floyded that for you...
  • Your Name 2011-04-21 10:22
    QJ:
    Bob:
    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.


    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.


    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.
  • boog 2011-04-21 10:27
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?
    Certainly you can't expect Marcus to point out the obvious asininity of this code in a formal peer review. He's sure to be labeled "that guy who hates on everyone else's code", and then he won't get invited to parties.

    Yep, better to keep his mouth shut.
  • Lockwood 2011-04-21 10:28
    DirectCast()

    Frist time I've been hit by Akismet. Am I now "one of the guys"?
  • Nagesh 2011-04-21 10:29
    boog:
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?
    Certainly you can't expect Marcus to point out the obvious asininity of this code in a formal peer review. He's sure to be labeled "that guy who hates on everyone else's code", and then he won't get invited to parties.

    Yep, better to keep his mouth shut.


    marcus should do job with complete and total dedication. maybe he rise up and above in organization.
  • Rodnas 2011-04-21 10:30
    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!
  • Nagesh 2011-04-21 10:30
    Lockwood:
    DirectCast()

    Frist time I've been hit by Akismet. Am I now "one of the guys"?


    Akismet love to hit me daily. In every post I make, I offer a small sacrificial post to Akismet.
  • Nagesh 2011-04-21 10:30
    Rodnas:
    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!


    Love sarcasm comment here.
  • Uncle Al 2011-04-21 10:32
    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:
     
    
    if (a) { b; }

    and
     
    
    if (a)
    {
    b;
    }

    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:
     
    
    if (a) { b;; }

    So much for that metric.
  • QJ 2011-04-21 10:34
    boog:
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?
    Certainly you can't expect Marcus to point out the obvious asininity of this code in a formal peer review. He's sure to be labeled "that guy who hates on everyone else's code", and then he won't get invited to parties.

    Yep, better to keep his mouth shut.


    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.
  • Anon 2011-04-21 10:37
    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?
  • cheap nfl trolls 2011-04-21 10:39
    Nagesh:

    Akismet love to hit me daily. In every post I make, I offer a small sacrificial post to Akismet.

    For this comment, inspired me, feeling this author words into my heart.
  • TW 2011-04-21 10:44
    just me:
    frits:
    Reading this article filled me with the urge to defecate.


    PFTFY


    FTFY
  • Oik 2011-04-21 10:48
    Public Function makeBoolean(ByVal b As Boolean)

    if b is Boolean

    return b as Boolean

    else

    return FILENOTFOUND

    End Function
  • boog 2011-04-21 10:48
    Bob:
    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.
    I heard a similar story once where a "smart" manager realized that LOC was a poor metric and came up with the brillant idea to secretly write a script that counts semicolons (in C) as a measurement of productivity. The programmers eventually realized he was doing this and started using semicolons as comment formatting. Productivity skyrocketed!
    /*;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ;; software_units.c ;;
    ;; ;;
    ;; Description: ;;
    ;; Library of useless code that converts between types, ;;
    ;; that way we look more productive. ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;*/

    But at least this manager realized the programmers were on to him. No more counting semicolons after that.
  • Anonymous 2011-04-21 10:50
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?

    Not paid to do QA. We have an entire department for that.
  • Meep 2011-04-21 10:50
    vt_mruhlin:
    We can do better guys.

    Public Function makeBoolean(ByVal b As Boolean)
    
    if b is Boolean
    return b as Boolean
    else
    return null
    End Function


    (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!)


    Amateurs. You're not checking for half the possible cases.

    Public Function makeBoolean(ByVal booleanPrimitive as Boolean)
    
    IBoolean booleanInterface = Factory.construct(CoercionClass.BooleanClass)
    Try
    If booleanPrimitive = True Then
    booleanInterface.setTrueValue(booleanPrimitive )
    return booleanInterface
    ElseIf booleanPrimitive is True Then
    booleanInterface.setObjectTrueValue(booleanPrimitive )
    return booleanInterface
    ElseIf booleanPrimitive <> True Then
    booleanInterface.setFalseValue(booleanPrimitive )
    return booleanInterface
    ElseIf booleanPrimitive is Not True Then
    booleanInterface.setObjectFalseValue(booleanPrimitive )
    return booleanInterface
    ElseIf booleanPrimitive = False Then
    booleanInterface.setFalseValue(booleanPrimitive )
    return booleanInterface
    ElseIf booleanPrimitive is False Then
    booleanInterface.setObjectFalseValue(booleanPrimitive )
    return booleanInterface
    ElseIf booleanPrimitive <> False Then
    booleanInterface.setTrueValue(booleanPrimitive )
    return booleanInterface
    ElseIf booleanPrimitive is Not False Then
    booleanInterface.setObjectTrueValue(booleanPrimitive )
    return booleanInterface
    ElseIf booleanPrimitive is Null Then
    booleanInterface.setObjectNullValue(booleanPrimitive )
    return booleanInterface
    Else
    booleanInterface.setIndeterminateValue(booleanPrimitive )
    return booleanInterface
    End If
    On Error FileNotFoundError e
    booleanInterface.setFileNotFound(e)
    return booleanInterface
    End Try
    End Function makeBoolean
  • hoodaticus 2011-04-21 10:51
    The generic version:
    Public Function MakeAnything(o)
    
    Return o
    End Function
  • boog 2011-04-21 10:52
    Nagesh:
    boog:
    Certainly you can't expect Marcus to point out the obvious asininity of this code in a formal peer review. He's sure to be labeled "that guy who hates on everyone else's code", and then he won't get invited to parties.

    Yep, better to keep his mouth shut.

    marcus should do job with complete and total dedication. maybe he rise up and above in organization.
    Who wants to promote the guy who makes you look bad?

    No, far better to be popular than be good at your job.
  • boog 2011-04-21 10:53
    QJ:
    boog:
    Certainly you can't expect Marcus to point out the obvious asininity of this code in a formal peer review. He's sure to be labeled "that guy who hates on everyone else's code", and then he won't get invited to parties.

    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.
    That's genius. Well said.
  • hoodaticus 2011-04-21 10:56
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?
    Peer review is for people who can't be trusted to write excellent code on their own.
  • Power Troll 2011-04-21 10:56
    I see this as a failure of F#. If it was easier to grok, you wouldn't have so many horribad VB submissions. Instead, you'd get really funny attempts at "functional" programming.
  • hoodaticus 2011-04-21 10:57
    frits:
    Reading this article caused me to make poo.

    Clearly the more elegant solution would account for all future needs:
    Public Function makeTypeObject(Of t)(ByVal arg As t)
    
    Return arg
    End Function

    YES! Although, this returns a T, not an Object as in the OP.

    Addendum (2011-04-21 11:09):
    Nevermind - it does return an object, since there is no "As T" at the end.

    I hate VB.
  • Jaime 2011-04-21 10:58
    Andy:
    In VB 6 this was the only way of doing casts, apart from creating another variable in the body of the code.

    Nope. VB6 had a number of built-in type conversion functions that are the equivalent of type casting. They include CInt, CStr, CCur, CDate, and others. They are much more limited than true type casting, but they were there and they cover all of the cases in the article.

    They are still there in VB.Net and are still better than the WTF in the article. Of course, VB.Net now has CType to expand the old pattern to support any type and DirectCast which is analogous to C style casting. CType is a little different from a traditional cast in that it will attempt to perform an implicit conversion if a cast is not possible (for example, integer to string).
  • frits 2011-04-21 11:06
    boog:
    QJ:
    boog:
    Certainly you can't expect Marcus to point out the obvious asininity of this code in a formal peer review. He's sure to be labeled "that guy who hates on everyone else's code", and then he won't get invited to parties.

    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.
    That's genius. Well said.


    It's usually called a "complement sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.
  • herp 2011-04-21 11:08
    This is obviously done for logging purposes.

    If you make sure that these functions are called for all variable initialisations and assignments, you can insert textfile logging into each function, thus ensuring that you have the best possible insight into why it runs so slow.
  • Nagesh 2011-04-21 11:09
    Power Troll:
    I see this as a failure of F#. If it was easier to grok, you wouldn't have so many horribad VB submissions. Instead, you'd get really funny attempts at "functional" programming.



    This is troll comment example

    I always tell people. If all programming in the world took place in java, we would be better off 100 times than before.

  • Nagesh 2011-04-21 11:10
    QJ:
    boog:
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?
    Certainly you can't expect Marcus to point out the obvious asininity of this code in a formal peer review. He's sure to be labeled "that guy who hates on everyone else's code", and then he won't get invited to parties.

    Yep, better to keep his mouth shut.


    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.


    Excellent comment. I make note of this!
  • iToad 2011-04-21 11:11
    frits:
    Reading this article caused me to make poo.

    Clearly the more elegant solution would account for all future needs:
    Public Function makeTypeObject(Of t)(ByVal arg As t)
    
    Return arg
    End Function



    We have reviewed your units of software count for the previous month. Unfortunately, although your units of software are elegant and correct, your count is less than the units of software count of your peers. Therefore, this company no longer requires your services.
  • hoodaticus 2011-04-21 11:12
    Nagesh:
    Power Troll:
    I see this as a failure of F#. If it was easier to grok, you wouldn't have so many horribad VB submissions. Instead, you'd get really funny attempts at "functional" programming.



    This is troll comment example

    I always tell people. If all programming in the world took place in java, we would be better off 100 times than before.

    It's hard to understand what you mean, but if you actually mean that the world would be better of if everything were written in Java, then you are insane.
  • Nagesh 2011-04-21 11:16
    hoodaticus:
    Nagesh:
    Power Troll:
    I see this as a failure of F#. If it was easier to grok, you wouldn't have so many horribad VB submissions. Instead, you'd get really funny attempts at "functional" programming.



    This is troll comment example

    I always tell people. If all programming in the world took place in java, we would be better off 100 times than before.

    It's hard to understand what you mean, but if you actually mean that the world would be better of if everything were written in Java, then you are insane.


    I made troll comment and you're first bite.
  • Wonk 2011-04-21 11:22
    Obligatory askimet bait:

    http://www.youtube.com/watch?v=ewIT_KAQQlU&feature=related
  • hoodaticus 2011-04-21 11:26
    Nagesh:
    hoodaticus:
    Nagesh:
    Power Troll:
    I see this as a failure of F#. If it was easier to grok, you wouldn't have so many horribad VB submissions. Instead, you'd get really funny attempts at "functional" programming.



    This is troll comment example

    I always tell people. If all programming in the world took place in java, we would be better off 100 times than before.

    It's hard to understand what you mean, but if you actually mean that the world would be better of if everything were written in Java, then you are insane.


    I made troll comment and you're first bite.
    Your parents must be so proud.
  • Complement Sandwich 2011-04-21 11:27
    Nagesh:
    hoodaticus:
    Nagesh:
    Power Troll:
    I see this as a failure of F#. If it was easier to grok, you wouldn't have so many horribad VB submissions. Instead, you'd get really funny attempts at "functional" programming.



    This is troll comment example

    I always tell people. If all programming in the world took place in java, we would be better off 100 times than before.

    It's hard to understand what you mean, but if you actually mean that the world would be better of if everything were written in Java, then you are insane.


    I made troll comment and you're first bite.


    Your ability to troll is, without a doubt, exquisite.

    Unfortunately, not a single person finds your tired act funny. For some special people, it's just a little more difficult illicit laughter from others. This is OK.

    I can tell by the number comments you make that you are a very hard worker. I believe that if you applied yourself, you could achieve anything.


  • riiiiiiight 2011-04-21 11:31
    Okay, I think we can establish now for sure that hoodactius and nagesh are the same person.
  • dohpaz42 2011-04-21 11:31
    boog:
    Bob:
    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.
    I heard a similar story once where a "smart" manager realized that LOC was a poor metric and came up with the brillant idea to secretly write a script that counts semicolons (in C) as a measurement of productivity. The programmers eventually realized he was doing this and started using semicolons as comment formatting. Productivity skyrocketed!
    /*;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ;; software_units.c ;;
    ;; ;;
    ;; Description: ;;
    ;; Library of useless code that converts between types, ;;
    ;; that way we look more productive. ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;*/

    But at least this manager realized the programmers were on to him. No more counting semicolons after that.


    Hrm. Maybe a different approach needs to be taken:

    1. Strip out all comments.
    2. Strip out all new lines.
    3. Insert new lines after opening and closing curly braces.
    4. Insert new lines after every semi-colon.
    5. Strip out all semi-colons.
    6. Count lines.
  • Nagesh 2011-04-21 11:33
    riiiiiiight:
    Okay, I think we can establish now for sure that hoodactius and nagesh are the same person.


    Wow!
  • Stevie D 2011-04-21 11:34
    dohpaz42:
    Hrm. Maybe a different approach needs to be taken:

    1. Strip out all comments.
    2. Strip out all new lines.
    3. Insert new lines after opening and closing curly braces.
    4. Insert new lines after every semi-colon.
    5. Strip out all semi-colons.
    6. Count lines.

    7. Remember not to do this on the live file.
  • Joey Alcorn 2011-04-21 11:38

    Public Function makeBrainExplode(ByVal b As Brain)
    Throw New AneurysmException
    End Function
  • dohpaz42 2011-04-21 11:38
    Stevie D:
    dohpaz42:
    Hrm. Maybe a different approach needs to be taken:

    1. Strip out all comments.
    2. Strip out all new lines.
    3. Insert new lines after opening and closing curly braces.
    4. Insert new lines after every semi-colon.
    5. Strip out all semi-colons.
    6. Count lines.

    7. Remember not to do this on the live file.


    You know, that is actually a very valid point. I once interviewed for a company that had absolutely no development environment. In fact, all of their developers (there were more than 5 at the time) would work on production files. When I asked if it were permissible to install and work off of a development environment (i.e., on the local work station), I was scoffed at as if this was some crazy idea. Thankfully, I never did get that job.
  • hoodaticus 2011-04-21 11:39
    Nagesh:
    riiiiiiight:
    Okay, I think we can establish now for sure that hoodactius and nagesh are the same person.


    Wow!
    Eww. Low blow bro!

    At least I know the difference between C++ and SQL.
  • Design Pattern 2011-04-21 11:41
    50 % of your comment (line count) is redundant!
    Nagesh:

    This is troll comment example

    This was already clear when we read the line:

    2011-04-21 11:09 • by Nagesh


    Nagesh:


    I always tell people. If all programming in the world took place in java, we would be better off 100 times than before.


    If all programming in the world took place in Java, then you would not try to counterfeit an indian programmer.

    Your not so smart, are you?
  • Meep 2011-04-21 11:43
    riiiiiiiiiiiiiiiiiiiight:
    Okay, I think we can establish now for sure that hoodactius and nagesh are the same person.


    I'm not so sure, I thought they were life partners. The real question is which one is the top and which is the bottom?
  • hoodaticus 2011-04-21 11:47
    Meep:
    riiiiiiiiiiiiiiiiiiiight:
    Okay, I think we can establish now for sure that hoodactius and nagesh are the same person.


    I'm not so sure, I thought they were life partners. The real question is which one is the top and which is the bottom?
    My heart will always belong to Morbius Wilters.
  • frits 2011-04-21 11:50
    hoodaticus:
    Meep:
    riiiiiiiiiiiiiiiiiiiight:
    Okay, I think we can establish now for sure that hoodactius and nagesh are the same person.


    I'm not so sure, I thought they were life partners. The real question is which one is the top and which is the bottom?
    My heart will always belong to Morbius Wilters.

    I thought he was an Asian chick.

    Anyway, are we *allowed* to talk about him here?
  • Ken B. 2011-04-21 12:10
    boog:
    I heard a similar story once where a "smart" manager realized that LOC was a poor metric and came up with the brillant idea to secretly write a script that counts semicolons (in C) as a measurement of productivity. The programmers eventually realized he was doing this and started using semicolons as comment formatting. Productivity skyrocketed!
    Aha! More proof that "for(;;)" is more productive than "while(1)".
  • Ken B. 2011-04-21 12:12
    I, personally, am offended by the "makeUShort()" function.

    And I get enough spam apparently generated by the "makeULong()" function.
  • boog 2011-04-21 12:14
    Ken B.:
    boog:
    I heard a similar story once where a "smart" manager realized that LOC was a poor metric and came up with the brillant idea to secretly write a script that counts semicolons (in C) as a measurement of productivity. The programmers eventually realized he was doing this and started using semicolons as comment formatting. Productivity skyrocketed!
    Aha! More proof that "for(;;)" is more productive than "while(1)".
    Indeed. By exactly 2 units of productivity.
  • Ken B. 2011-04-21 12:18
    dohpaz42:
    boog:
    I heard a similar story once where a "smart" manager realized that LOC was a poor metric and came up with the brillant idea to secretly write a script that counts semicolons (in C) as a measurement of productivity. The programmers eventually realized he was doing this and started using semicolons as comment formatting. Productivity skyrocketed!
    /*;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ;; software_units.c ;;
    ;; ;;
    ;; Description: ;;
    ;; Library of useless code that converts between types, ;;
    ;; that way we look more productive. ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;*/

    But at least this manager realized the programmers were on to him. No more counting semicolons after that.


    Hrm. Maybe a different approach needs to be taken:

    1. Strip out all comments.
    2. Strip out all new lines.
    3. Insert new lines after opening and closing curly braces.
    4. Insert new lines after every semi-colon.
    5. Strip out all semi-colons.
    6. Count lines.
    A semicolon is a perfectly valid statement on its own.
    ;;;;;;;;;; /* Define "a" */ ;;;;;;;;;;
    
    int a;
    ;;;;;;;;;; /* Define "b" */ ;;;;;;;;;;
    int b;
    ;;;;;;;;;; /* Define "c" */ ;;;;;;;;;;
    int c;
  • boog 2011-04-21 12:19
    dohpaz42:
    boog:
    I heard a similar story once where a "smart" manager realized that LOC was a poor metric and came up with the brillant idea to secretly write a script that counts semicolons (in C) as a measurement of productivity. The programmers eventually realized he was doing this and started using semicolons as comment formatting. Productivity skyrocketed!

    Hrm. Maybe a different approach needs to be taken:

    1. Strip out all comments.
    2. Strip out all new lines.
    3. Insert new lines after opening and closing curly braces.
    4. Insert new lines after every semi-colon.
    5. Strip out all semi-colons.
    6. Count lines.

    {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
    
    printf("I'm ");;;;;;;;;;;;;;;;;;;;
    printf("sure ");;;;;;;;;;;;;;;;;;;;
    printf("you're ");;;;;;;;;;;;;;;;;;;;
    printf("joking.\n");;;;;;;;;;;;;;;;;;;;
    printf("This ");;;;;;;;;;;;;;;;;;;;
    printf("is ");;;;;;;;;;;;;;;;;;;;
    printf("valid ");;;;;;;;;;;;;;;;;;;;
    printf("C.\n");;;;;;;;;;;;;;;;;;;;
    }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
  • Rictor 2011-04-21 12:20
    This comment made me laugh so hard I got a few funny looks.
  • trtrwtf 2011-04-21 12:29
    SCSimmons:
    The manager doesn't need to know that the 60 hours of overtime he paid out was 2 minutes of writing replace scripts and 59 hours and 58 minutes of playing Quake.


    And drinking beer, drinking beer is very important when you're padding out company time.
  • Patrick 2011-04-21 12:33
    If you delete a 2MB file of bad code, does that count negatively on your production?

    "Well, I'm pleased you got that entire project finished in one week, but unfortunately it says here that you only wrote four lines of code."
    "... well, that's..."
    "In one week. Do you know how much code the other members of our 'TEAM' write in a week?"
    "But they..."
    "And this project only took four lines, I mean what were you doing the rest of the time? Should I have doubts about the other estimates you give me?"
  • silent d 2011-04-21 12:41
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?


    If you want me to go on arguing, you'll have to pay for another five minutes.
  • Bubba 2011-04-21 12:44
    MakeFloat is missing.
  • Rob 2011-04-21 12:44
    Anon:
    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?


    The idea might be similar but (from what I understand) this approach is really just silly wasted lines of code.

    Depending on the types and your compiler setting, VB.Net will either allow an implicit conversion (in which case you wouldn't need to call any of these make* functions, the compiler would just let you use a double as an integer without calling makeInteger(myDouble). )

    In the situation where the compiler will not allow it (either because of Option Explicit being set on or because the types don't support it), you'd need an explicit conversion. So, your call to makeInteger would have to take an Integer as input.

    The code would end up looking like this....

    Dim myDouble as Double
    Dim myInt as Integer

    myInt = makeInteger(Ctype(myDouble, Integer))

    When you could just do

    myInt = Ctype(myDouble, Integer)

    And in the implicit case; instead of

    myInt = makeInteger(myDouble)

    You could do

    myInt = myDouble

    Some people would argue that the last example is an invitation for bugs. But they'd probably tell you to turn Option Explicit on and the compiler would disallow it, or, if you want the code to be more readable, use the built-in conversion options CType or CInt()

    *If* I'm understanding it correctly, it's just extra code that doesn't really accomplish anything. The person who wrote was either trying to inflate the line count/function count or (more likely in my opinion) wanted to avoid the implicit conversion and felt that his or her helper functions made things 'more clear'.

    Of course, it wouldn't be the first time that I've completely missed the WTF.
  • Herby 2011-04-21 12:47
    Lines of code measurements never heard of writing in APL (Iverson, c1963). There you could do a WHOLE project in one line and take DAYS doing it. Even more time debugging it as well.

    If you want a metric, try counting parenthesis in Lisp (Scheme), it gets quite a ratio!

    The only true way of doing reasonable metrics (which are useless anyway) is wiring them into the compiler. It has to unwind all the junk people write anyway, so it has a better idea of what is going on.
  • Jaime 2011-04-21 13:02
    Rob:
    Anon:
    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?


    The idea might be similar but (from what I understand) this approach is really just silly wasted lines of code.

    Depending on the types and your compiler setting, VB.Net will either allow an implicit conversion (in which case you wouldn't need to call any of these make* functions, the compiler would just let you use a double as an integer without calling makeInteger(myDouble). )

    In the situation where the compiler will not allow it (either because of Option Explicit being set on or because the types don't support it), you'd need an explicit conversion. So, your call to makeInteger would have to take an Integer as input.

    The code would end up looking like this....

    Dim myDouble as Double
    Dim myInt as Integer

    myInt = makeInteger(Ctype(myDouble, Integer))

    When you could just do

    myInt = Ctype(myDouble, Integer)

    And in the implicit case; instead of

    myInt = makeInteger(myDouble)

    You could do

    myInt = myDouble

    Some people would argue that the last example is an invitation for bugs. But they'd probably tell you to turn Option Explicit on and the compiler would disallow it, or, if you want the code to be more readable, use the built-in conversion options CType or CInt()

    *If* I'm understanding it correctly, it's just extra code that doesn't really accomplish anything. The person who wrote was either trying to inflate the line count/function count or (more likely in my opinion) wanted to avoid the implicit conversion and felt that his or her helper functions made things 'more clear'.

    Of course, it wouldn't be the first time that I've completely missed the WTF.
    Unfortunately, this code might actually do something. For example, you could use makeInteger to round a Variant to the nearest even whole number.


    Dim a
    a = 4.9
    Dim b
    b = makeInteger(a)
  • BrMcMullin 2011-04-21 13:02
    Bumble Bee Tuna:
    I get emails advertising that makeULong function every day. It must be good code.


    ISWYDT...
  • F 2011-04-21 13:02
    frits:
    Reading this article caused me to make poo.

    Clearly the more elegant solution would account for all future needs:
    Public Function makeTypeObject(Of t)(ByVal arg As t)
    
    Return arg
    End Function


    It completely fails to account for the need to turn in large amounts of code in order to satisfy management's inane metrics (and thereby get paid / promoted)
  • Anonymous Coward 2011-04-21 13:05
    In that context, I shudder to think what the makeUShort would entail.
  • dohpaz42 2011-04-21 13:08
    boog:
    dohpaz42:
    boog:
    I heard a similar story once where a "smart" manager realized that LOC was a poor metric and came up with the brillant idea to secretly write a script that counts semicolons (in C) as a measurement of productivity. The programmers eventually realized he was doing this and started using semicolons as comment formatting. Productivity skyrocketed!

    Hrm. Maybe a different approach needs to be taken:

    1. Strip out all comments.
    2. Strip out all new lines.
    3. Insert new lines after opening and closing curly braces.
    4. Insert new lines after every semi-colon.
    5. Strip out all semi-colons.
    6. Count lines.

    {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
    
    printf("I'm ");;;;;;;;;;;;;;;;;;;;
    printf("sure ");;;;;;;;;;;;;;;;;;;;
    printf("you're ");;;;;;;;;;;;;;;;;;;;
    printf("joking.\n");;;;;;;;;;;;;;;;;;;;
    printf("This ");;;;;;;;;;;;;;;;;;;;
    printf("is ");;;;;;;;;;;;;;;;;;;;
    printf("valid ");;;;;;;;;;;;;;;;;;;;
    printf("C.\n");;;;;;;;;;;;;;;;;;;;
    }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}


    It has nothing to do with the validity of code; I was simply thinking of a different way to count lines of code - with respect to developers trying to game the system by adding useless semi-colons and whitespace, etc.
  • A Kiss My 2011-04-21 13:20
    Lockwood:
    DirectCast()

    Frist time I've been hit by Akismet. Am I now "one of the guys"?
    What is this Akismet? I've been commenting here for years and I've never seen it. Let's try...
  • phew 2011-04-21 13:21
    Patrick:
    If you delete a 2MB file of bad code, does that count negatively on your production?

    "Well, I'm pleased you got that entire project finished in one week, but unfortunately it says here that you only wrote four lines of code."
    "... well, that's..."
    "In one week. Do you know how much code the other members of our 'TEAM' write in a week?"
    "But they..."
    "And this project only took four lines, I mean what were you doing the rest of the time? Should I have doubts about the other estimates you give me?"


    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...
  • Luiz Felipe 2011-04-21 13:29
    lol, i laught megabytes.
    it isnt even visual basic nor csharp
    some kind of visual sharp perhaps.
  • Gordon Bennett 2011-04-21 13:34
    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...
  • Luiz Felipe 2011-04-21 13:35
    Luiz Felipe:
    lol, i laught megabytes.
    it isnt even visual basic nor csharp
    some kind of visual sharp perhaps.

    'Adendum, wtf i clicked wrong button, need to stop with vodka.
    Public Function makeBoolean(ByVal b As Boolean)
    if b is Boolean
    return b as Boolean
    else
    return null
    End Function
  • Luiz Felipe 2011-04-21 13:35
    "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)

  • Luiz Felipe 2011-04-21 13:38
    hoodaticus:
    The generic version:
    Public Function MakeAnything(o)
    
    Return o
    End Function

    This is not the generic version.
    This is the generic versiom:

    Function MakeAnything(of T)(O as Object) AS T
    Return DirectCast(o,T)
    End Function

    But it is broken.

    Function MakeAnything(of T) AS T
    'Insert code here to random create objects on the fly, perhaps emiting IL for fun
    Return x
    End Function
  • WTF 2011-04-21 13:43
    Please tell me its a joke :-) nnnnnnnnnnnnoooooooooooooooooooooooooooooooo wwwwaaaaaaaaaaaaaayyyyyyyy !!!! That would a good WTF post.
  • WTF 2011-04-21 13:46
    Bob:
    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.


    This is a joke, right ? :-) Please tell me its a joke.

    If its not, please make a WTF post for this :-)
  • trtrwtf 2011-04-21 13:50
    dohpaz42:
    boog:
    {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
    
    printf("I'm ");;;;;;;;;;;;;;;;;;;;
    printf("sure ");;;;;;;;;;;;;;;;;;;;
    printf("you're ");;;;;;;;;;;;;;;;;;;;
    printf("joking.\n");;;;;;;;;;;;;;;;;;;;
    printf("This ");;;;;;;;;;;;;;;;;;;;
    printf("is ");;;;;;;;;;;;;;;;;;;;
    printf("valid ");;;;;;;;;;;;;;;;;;;;
    printf("C.\n");;;;;;;;;;;;;;;;;;;;
    }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}


    It has nothing to do with the validity of code; I was simply thinking of a different way to count lines of code - with respect to developers trying to game the system by adding useless semi-colons and whitespace, etc.


    Exactly. How many lines would the quoted code come out to?
  • MojoFilter 2011-04-21 13:53
    Zing, sir!
  • n_slash_a 2011-04-21 13:57
    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) {;}
    }
  • boog 2011-04-21 14:04
    dohpaz42:
    boog:
    dohpaz42:
    1. Strip out all comments.
    2. Strip out all new lines.
    3. Insert new lines after opening and closing curly braces.
    4. Insert new lines after every semi-colon.
    5. Strip out all semi-colons.
    6. Count lines.

    {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
    
    printf("You ");;;;;;;;;;;;;;;;;;;;
    printf("missed ");;;;;;;;;;;;;;;;;;;;
    printf("the ");;;;;;;;;;;;;;;;;;;;
    printf("point?\n");;;;;;;;;;;;;;;;;;;;
    printf("Maybe ");;;;;;;;;;;;;;;;;;;;
    printf("you're ");;;;;;;;;;;;;;;;;;;;
    printf("not ");;;;;;;;;;;;;;;;;;;;
    printf("joking.\n");;;;;;;;;;;;;;;;;;;;
    }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}


    It has nothing to do with the validity of code...
    I assume you mean the syntax, and it certainly matters if C allows the above syntax. Which it does.

    dohpaz42:
    I was simply thinking of a different way to count lines of code - with respect to developers trying to game the system by adding useless semi-colons and whitespace, etc.
    Acknowledged. I was simply posting code demonstrating that developers could still game the system under your new approach. Or was your approach not to be followed step-by-step in the listed order?
  • Ã 2011-04-21 14:12
    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.
  • The Great Lobachevsky 2011-04-21 14:26
    Lockwood:
    DirectCast()

    Frist time I've been hit by Akismet. Am I now "one of the guys"?


    We aren't all guys here :)
  • Gunslnger 2011-04-21 14:46
    anon:
    Bob:
    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.


    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.


    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].
  • Worf 2011-04-21 14:54
    Your Name:
    You start paying by the line, you're gonna get more lines. What do you expect?


    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
  • Gunslnger 2011-04-21 14:54
    Andy:
    In VB 6 this was the only way of doing casts, apart from creating another variable in the body of the code.


    Uh, that's not true. Besides, you should never need to do casts without using a new variable anyways.
  • hoodaticus 2011-04-21 15:02
    Gunslnger:
    Andy:
    In VB 6 this was the only way of doing casts, apart from creating another variable in the body of the code.


    Uh, that's not true. Besides, you should never need to do casts without using a new variable anyways.
    Especially since casts always create a copy.
  • ÃÆâ€â„ 2011-04-21 15:08
    Andy:
    In Hyderabad this was the only way of doing casts, apart from creating another variable in the body of the code.

    FTFY
  • boog 2011-04-21 15:14
    Gunslnger:
    anon:
    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.


    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].
    Indeed. Or in any other text editor. Or by running "wc -l". In fact, most ways I can think of to count lines include blank lines unless you explicitly say to ignore them (or remove them yourself).

    So basically, I'm pretty sure the GP's comment about being pretty sure the GGP's story is bullshit is bullshit.
  • iMalc 2011-04-21 15:49
    Not good enough to prevent you being passed through the makeSingle function, I expect.
  • iMalc 2011-04-21 15:49
    Bumble Bee Tuna:
    I get emails advertising that makeULong function every day. It must be good code.
    Not good enough to prevent you being passed through the makeSingle function, I expect.
  • Cyt 2011-04-21 15:59
    dohpaz42:

    You know, that is actually a very valid point. I once interviewed for a company that had absolutely no development environment. In fact, all of their developers (there were more than 5 at the time) would work on production files. When I asked if it were permissible to install and work off of a development environment (i.e., on the local work station), I was scoffed at as if this was some crazy idea. Thankfully, I never did get that job.


    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.
  • PRMan 2011-04-21 16:28
    QJ:
    Bob:
    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.


    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.


    Actually, that is EXACTLY the point.
  • Matt Westwood 2011-04-21 16:37
    n_slash_a:
    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) {;}
    }


    QFT +1001
  • Bas 2011-04-21 16:49
    Option Strict, Please:
    Bas:
    Clearly Visual Basic does implicit type casting for such calls, and this is just a weirdly convoluted way of explicit type casting.


    Except that the return from all of these functions is of type Object


    Sure, then you just double-casted, as the function argument still casts.
  • Splognosticus 2011-04-21 16:53
    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!
  • Bill Clinton is the Man 2011-04-21 16:55
    No VB'er worth their salt will code without 'Option Explicit On'
  • Franz Kafka 2011-04-21 17:21
    frits:

    It's usually called a "complement sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any complement from a manager.
  • Jaime 2011-04-21 17:22
    Splognosticus:
    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!
    Generics, anonymous functions, LINQ, multiline lambdas, collection initializers, ...

    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.
  • Barry 2011-04-21 18:01
    Stupid VB programmers.. what else do you expect?
  • moz 2011-04-21 19:25
    Anonymous Coward:
    In that context, I shudder to think what the makeUShort would entail.

    Oh, it's not that scary. You give some money to them, and you never see it again, leaving you short.
  • Poochy.EXE 2011-04-21 20:56
    Bumble Bee Tuna:
    I get emails advertising that makeULong function every day. It must be good code.


    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!

    * (That should be just $19.99. Sorry, our in-house proprietary floating-point arithmetic library is a little glitchy.)"
  • KITT 2011-04-21 23:02
    Poochy.EXE:


    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!

    * (That should be just $19.99. Sorry, our in-house proprietary floating-point arithmetic library is a little glitchy.)"


    Just ask for Procrustes, he'll take care of you.
  • trtwtf 2011-04-21 23:03
    Franz Kafka:
    frits:

    It's usually called a "complement sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any complement from a manager.


    Even a two's complement?
  • C-Octothorpe 2011-04-21 23:18
    frits:
    hoodaticus:
    Meep:
    riiiiiiiiiiiiiiiiiiiight:
    Okay, I think we can establish now for sure that hoodactius and nagesh are the same person.


    I'm not so sure, I thought they were life partners. The real question is which one is the top and which is the bottom?
    My heart will always belong to Morbius Wilters.

    I thought he was an Asian chick.

    Anyway, are we *allowed* to talk about him here?


    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...
  • Matt Westwood 2011-04-22 01:26
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY
  • Not of this Earth 2011-04-22 04:40
    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!
  • oheso 2011-04-22 05:33
    Don't see the problem here. Code works as specified.
  • Moritz 2011-04-22 08:03
    Being paid for lines of code is like being paid for bugs found.

    Thank you, Dilbert:
    http://dilbert.com/strips/comic/1995-11-13/
  • A. Manager 2011-04-22 08:13
    Gunslnger:
    anon:
    I know of nothing that includes blank lines when counting LoC. So basically, I'm pretty sure your story is bullshit.


    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].


    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.
  • frits 2011-04-22 08:53
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.
  • Anon 2011-04-22 09:22
    Is me a spam?
  • Matt Westwood 2011-04-22 10:41
    frits:
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.


    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.
  • frits 2011-04-22 10:56
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.


    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.


    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.
  • Matt Westwood 2011-04-22 11:18
    frits:
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.


    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.


    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.


    YHBT etc.
  • frits 2011-04-22 11:27
    Matt Westwood:
    frits:
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.


    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.


    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.


    YHBT etc.


    Riiiight
  • e john 2011-04-22 11:55
    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 ....
  • D-Coder 2011-04-22 12:42
    Cyt:
    dohpaz42:

    You know, that is actually a very valid point. I once interviewed for a company that had absolutely no development environment. In fact, all of their developers (there were more than 5 at the time) would work on production files. When I asked if it were permissible to install and work off of a development environment (i.e., on the local work station), I was scoffed at as if this was some crazy idea. Thankfully, I never did get that job.


    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.

    Some people can't be convinced.

    "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."
  • hoodaticus 2011-04-22 12:58
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.


    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.
    frits is one of the most knowledgeable people on here. you on the other hand, well... maybe carnal knowledge?
  • frits 2011-04-22 13:20
    hoodaticus:
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.


    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.
    frits is one of the most knowledgeable people on here. you on the other hand, well... maybe carnal knowledge?


    Also old jokes about Florida looking like a peen, and SQL SELECT can't find any users with a clue.
  • Franz Kafka 2011-04-22 13:48
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.


    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.


    wow Matt, teel us hao U reely fell.
  • Matt Westwood 2011-04-22 14:13
    Franz Kafka:
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.


    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.


    wow Matt, teel us hao U reely fell.


    Since you ask, you're mostly a bunch of wankers. But you're fun to laugh at and wind up.
  • frits 2011-04-22 14:45
    Matt Westwood:
    Franz Kafka:
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.


    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.


    wow Matt, teel us hao U reely fell.


    Since you ask, you're mostly a bunch of wankers. But you're fun to laugh at and wind up.


    Wow. I can almost hear that snooty posh accent coming through my computer. Or, is it Cockney? Who can tell the difference?
  • Matt Westwood 2011-04-22 15:22
    frits:
    Matt Westwood:
    Franz Kafka:
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    frits:

    It's usually called a "compliment sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.


    It's main effect, when used on me, is to be immediately suspicious of any compliment from a manager.


    FTFY


    You can spell. Good for you.


    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.


    wow Matt, teel us hao U reely fell.


    Since you ask, you're mostly a bunch of wankers. But you're fun to laugh at and wind up.


    Wow. I can almost hear that snooty posh accent coming through my computer. Or, is it Cockney? Who can tell the difference?


    Snooty posh. Think Niles Crane but more effeminate.
  • hoodaticus 2011-04-22 15:46
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    Matt Westwood:
    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.


    wow Matt, teel us hao U reely fell.


    Since you ask, you're mostly a bunch of wankers. But you're fun to laugh at and wind up.


    Wow. I can almost hear that snooty posh accent coming through my computer. Or, is it Cockney? Who can tell the difference?


    Snooty posh. Think Niles Crane but more effeminate.
    I already did.
  • Matt Westwood 2011-04-22 15:55
    hoodaticus:
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    Matt Westwood:
    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.


    wow Matt, teel us hao U reely fell.


    Since you ask, you're mostly a bunch of wankers. But you're fun to laugh at and wind up.


    Wow. I can almost hear that snooty posh accent coming through my computer. Or, is it Cockney? Who can tell the difference?


    Snooty posh. Think Niles Crane but more effeminate.
    I already did.


    Good for you.
  • Foreign Accent Guy 2011-04-22 16:00
    Matt Westwood:
    hoodaticus:
    Matt Westwood:
    frits:
    Matt Westwood:
    Franz Kafka:
    Matt Westwood:
    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.


    wow Matt, teel us hao U reely fell.


    Since you ask, you're mostly a bunch of wankers. But you're fun to laugh at and wind up.


    Wow. I can almost hear that snooty posh accent coming through my computer. Or, is it Cockney? Who can tell the difference?


    Snooty posh. Think Niles Crane but more effeminate.
    I already did.


    Good for you.


    Nah mate, you are.
  • M 2011-04-22 17:18
    silent d:
    Nagesh:
    Not paid to argue

    Are you not having weekly defect prevent meetings, where you do peer review of code?


    If you want me to go on arguing, you'll have to pay for another five minutes.


    Thank you. I already feared I would have to write that comment myself.
  • dkf 2011-04-23 01:35
    KITT:
    Just ask for Procrustes, he'll take care of you.
    That's Procrastes, you insensitive clod! You know, as in just the guy who invented procrastination. I'll have to tell you more about his life sometime, when I get around to it…
  • Coyne 2011-04-25 12:37
    I are an even more efficient programmer:


    void NoOperation() { }
    void DoNothing() { }
    void InhabitSpace() { }
    void WasteTime() { }
    void TwiddleThumbs() { }
    void VoidContent() { }
    void DozeOff() { }


    See? Lots of function points, much lest wasted space.
  • jasmine2501 2011-04-25 13:39
    WTF is up with the trackbacks?

    And yeah, code reviews don't happen in the real world.
  • OnkelD 2011-04-26 01:39
    My code! The functions do nothing!
  • bernie without a b 2011-04-26 17:47
    Bumble Bee Tuna:
    I get emails advertising that makeULong function every day. It must be good code.


    "Like"
  • genii 2011-04-26 21:50
    Good one! lol heh heh...
  • Anone 2011-04-27 02:18
    trtrwtf:
    dohpaz42:
    boog:
    {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
    
    printf("I'm ");;;;;;;;;;;;;;;;;;;;
    printf("sure ");;;;;;;;;;;;;;;;;;;;
    printf("you're ");;;;;;;;;;;;;;;;;;;;
    printf("joking.\n");;;;;;;;;;;;;;;;;;;;
    printf("This ");;;;;;;;;;;;;;;;;;;;
    printf("is ");;;;;;;;;;;;;;;;;;;;
    printf("valid ");;;;;;;;;;;;;;;;;;;;
    printf("C.\n");;;;;;;;;;;;;;;;;;;;
    }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}


    It has nothing to do with the validity of code; I was simply thinking of a different way to count lines of code - with respect to developers trying to game the system by adding useless semi-colons and whitespace, etc.


    Exactly. How many lines would the quoted code come out to?


    I think the idea is that blank lines (keeping in mind that in the proposed system semicolons are forced into one-per-line mode and then deleted) don't count.
  • Nefer 2011-04-27 08:10
    @BumbleBeeTuna.... LMAO!!!! :-D

    I think the above "coders" are rather over qualified... they should really aspire to McDonalds Floor Sweeping positions.
  • nisl 2011-04-27 12:19
    Franz Kafka:
    It's main effect, when used on me, is to be immediately suspicious of any complement from a manager.


    I would not trust a twos complement calculated by a manager either. Not even a ones complement.
  • boog 2011-04-28 16:42
    Anone:
    trtrwtf:
    dohpaz42:
    boog:
    {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
    
    printf("I'm ");;;;;;;;;;;;;;;;;;;;
    printf("sure ");;;;;;;;;;;;;;;;;;;;
    printf("you're ");;;;;;;;;;;;;;;;;;;;
    printf("joking.\n");;;;;;;;;;;;;;;;;;;;
    printf("This ");;;;;;;;;;;;;;;;;;;;
    printf("is ");;;;;;;;;;;;;;;;;;;;
    printf("valid ");;;;;;;;;;;;;;;;;;;;
    printf("C.\n");;;;;;;;;;;;;;;;;;;;
    }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}


    It has nothing to do with the validity of code; I was simply thinking of a different way to count lines of code - with respect to developers trying to game the system by adding useless semi-colons and whitespace, etc.


    Exactly. How many lines would the quoted code come out to?


    I think the idea is that blank lines (keeping in mind that in the proposed system semicolons are forced into one-per-line mode and then deleted) don't count.

    Semicolons aside, I do believe opening/closing curly braces are also for-some-reason forced into one-per-line and not deleted. Even ignoring blank lines (which wasn't stated) wouldn't fix that. Nor would it ignore the fact that I arbitrarily split my two short lines of output over 8 printfs.

    Or are there more undisclosed behaviors that make it impossible to refute dohpaz42's line-/statement-counting algorithm?
  • drfreak 2011-04-28 21:03
    I've come across over-enginneered stuff like this before. One program in particular I've inherited is a GUI app which lists Crystal reports and parameters and launches the reports once you've picked them and their respective parameters.

    The end-result was perfectly fine and did what was expected. Problem was, if you needed to find out where a particular piece of code was affecting the program results, you'd go through three or four levels of abstraction. Seriously, the previous programmer wrote an N-tiered application for something which could have taken a day or two to do; and not messy either.

    My favourite example is where report parameters are referenced. The program has an enum for parameters such as 'REPORT_PAREMATER_0' whose value was zero. It went on from there to about parameter #10 with no consideration that a given report could have more parameters, say 11 or 12.

    A relatively green programmer would likely take the enum as gospel and inform all users they could not have more than ten parameters, sorry if I sound arrogant, but changing all references to the enum to literals (for instance Parameter(0) instead of Parameter(REPORT_PARAMETER_0) saved a lot of typing and potential limitations.

    I might take it a step further in the future, and comment out the enum, but that might just piss it off.
  • Anonymous User 2011-11-20 08:00
    Interesting to see this is doing the rounds. One of my apprentices actually wrote this in December 2010 and I submitted it via the plugin, but for some reason that post never showed up on the site. I guess the people I emailed it to also passed it on and eventually it got to someone who took credit for it on here.