• Timeroot (unregistered)

    sFrist = "Frist", then?

  • K41184 (unregistered)

    My first 2nd

  • (cs)

    uhoh

    myfrist

  • Chrisb (unregistered)

    If he was changing the key in the config file then someone else must have set the key to be that value in code.

  • Anonymous Coward (unregistered)

    It's an XML file: all the values are strings.

  • Andrew (unregistered)

    His bad indeed :p

  • XXXXX (unregistered) in reply to Anonymous Coward
    Anonymous Coward:
    It's an XML file: all the values are strings.
    But that string could have been an integer, a date, or a float. Don't you know xml schema?????

    I remember back when the internet was young and all contact email addresses were dates. I could be contacted at 04-21-1628.

  • Cheong (unregistered)

    His bad is because the configuration use a key that's not the same as the key being used in code, of course it's "Mybad".

    The comment on whether it's a string is irrelevent because it should be on seperate schema file, as most configuration files are.

    If not, it's TRWTF(TM).

  • Kasper (unregistered) in reply to XXXXX
    XXXXX:
    I remember back when the internet was young and all contact email addresses were dates.
    Today anybody can get all the email addresses they want. Must have been great back then if anybody could get all the dates they wanted.
  • MartinD (unregistered)

    He corrected the config so that the key used in the config matches the key used in the code. There is no WTF here.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered)
    <tApp aKey="sContactEmailAddress" aValue="[email protected]"/>
    Dumbass. He forgot to put warts on the tags and attributes. Fixed.
  • pez (unregistered)
    architecture to our code behind having 3000-line code-behind files

    Mybad.

  • Drone (unregistered) in reply to Kasper
    Kasper:
    XXXXX:
    I remember back when the internet was young and all contact email addresses were dates.
    Today anybody can get all the email addresses they want. Must have been great back then if anybody could get all the dates they wanted.
    But... she told me she had to wash her hair!
  • ThatGuy (unregistered)

    Big deal, he added an s to the key with a dumb commit message. Sounds like the developer(s) had a gripe with this person. No WTF at all.

  • (cs)

    Well, me being responsible for Subversion in our company, I complained to one of our developers that he never put in a commit message, always leaving it empty. He solved that by no longer committing his code (as I found out after he left).

  • (cs)

    So let me get this right: the real WTF is that his commit message ought to have been "myBad"? Or "sMyBad"? Come on, do tell ...

  • (cs) in reply to Severity One
    Severity One:
    Well, me being responsible for Subversion in our company, I complained to one of our developers that he never put in a commit message, always leaving it empty. He solved that by no longer committing his code (as I found out after he left).
    Ouch ...or was it just as well that his code "undid" itself?
  • (cs) in reply to Matt Westwood

    csMyBad to indicate that it is a comment string.

  • (cs)

    Ryan you're an idiot.

  • Lord0 (unregistered)

    What a rubbish WTF. Try harder.

  • Kryptus (unregistered)
    <app key="sUselessComment" value="MyBad" /> <app key="sCaptcha" value="Genitus - WTF ?" />
  • Alex Papadimoulis (unregistered) in reply to Lord0
    Lord0:
    What a rubbish WTF. Try harder.
    Mybad.
  • Nicole (unregistered)

    It might just be a more innocent mistake.

    Like opening the file, trying to save it, but mistyping the CTRL + S accidentally adding an s without noticing it and actually saving it a second try and committing it (without running tests).

    My suggestion: ask questions about people's intentions, instead of assuming and pointing the finger.

  • (cs) in reply to TheRider
    TheRider:
    Severity One:
    Well, me being responsible for Subversion in our company, I complained to one of our developers that he never put in a commit message, always leaving it empty. He solved that by no longer committing his code (as I found out after he left).
    Ouch ...or was it just as well that his code "undid" itself?
    Put it this way: he's a brilliant programmer, but also bone-lazy.

    So whilst he would develop really sophisticated things (involving reflection, automatic bytecode generation, and similar magic), he could never be bothered by such things like generics or proper exception handling, and he really had a fondness of arrays and static methods and members.

  • Quicksilver (unregistered)

    So the WTF is that people agreed on hungarian notation and one Dev fixed the notation of another?

    Or that one developer fixd other's code to his preferred notation?

    thats at most a W not a WTF

  • Ron (unregistered) in reply to Nicole

    Committing code without viewing the changes and without running tests is not an innocent mistake.

  • Boris (unregistered) in reply to MartinD

    Haven't you read the article? He corrected value , but without using design patterns! Bad boy, bad boy, err....The article suggests rest of the team would have :-)

  • null (unregistered)
    <app key="sComment" value="Brillant!"/>

    For the earlier posters who don't "get it", this is a .Net config file value -- you don't set a schema anywhere, it's all just strings whether you like it or not.

    In any event, I don't think I've ever seen someone use hungarian in the NAME of a config value. That would be as dumb as creating a data entry form where the actual on-screen labels are "sName", "sAddress", "sPhone", etc.

    SCaptcha="sDamnum"

  • Verdict (unregistered)

    TRWTF is this getting posted at all.

    Captcha: opto - This is not opto snuff

  • Geoff (unregistered) in reply to MartinD

    You know I have had this fight before. I know there are lots of haters but I Hungarian notation is often useful in code, especially when working with languages that are not strongly typed, or offer 'features' like a variant type in an otherwise strong typed system.

    When it comes to config files though I am all for striping off 's', 'i', 'o', etc and otherwise preserving the variable name. End users sometimes see config files especially when working with support. These things don't mean anything to them and it just makes the file harder to talk about, with them.

    Working with code its never been difficult for my imagination to guess that SystemName="SomeName", read from a config file most likely gets stored in this variable sSystemName I am seeing all over the start up module.

  • rfoxmich (unregistered)

    TRWTF is XML right?

  • Ralph (unregistered) in reply to Geoff
    Geoff:
    End users sometimes see config files
    Oh the horror! The humanity! Please, make it stop!

    Users are only ever to see pictures. Cartoons. No words. No letters. The keyboard is very scary. Haven't you been paying attention the last 30 years?

  • vt_mruhlin (unregistered)

    That's really kind of a stretch to call that a WTF. He made a minor change to fix a stupid typo. Sure, the commit message could use a little work, but on a commit like that, it's at least obvious why he made the change.

    It's the guy who checks in 300 lines worth of complicated changes with the message "fix a bug" that you have to worry about...

  • Mike (unregistered) in reply to vt_mruhlin
    vt_mruhlin:
    It's the guy who checks in 300 lines worth of complicated changes with the message "fix a bug" that you have to worry about...
    Guilty.
  • (cs) in reply to Quicksilver
    Quicksilver:
    So the WTF is that people agreed on hungarian notation and one Dev fixed the notation of another?

    Or that one developer fixd other's code to his preferred notation?

    thats at most a W not a WTF

    Hungarian notation is always TRWTF.

  • emaN ruoY (unregistered) in reply to XXXXX
    XXXXX:
    Anonymous Coward:
    It's an XML file: all the values are strings.
    But that string could have been an integer, a date, or a float. Don't you know xml schema?????

    I remember back when the internet was young and all contact email addresses were dates. I could be contacted at 04-21-1628.

    I don't believe it! There was nothing in the computer world before 1970 Jan 01.

  • (cs)
    he did a commit with no indication of what the commit was for, simply to add a Hungarian Notation prefix to a configuration file setting
    So it didn't need a commit comment then did it?
  • MCoder (unregistered) in reply to Quicksilver
    Quicksilver:
    So the WTF is that people agreed on hungarian notation...

    Yes, I'd guess so. It seems there is only one sane dev at that shop.

  • (cs)

    Hmm, VB.NET has the My namespace, used for configuration (My.Settings) as well as accessing standard Windows locations (My.Computer)... perhaps it needs a My.Bad class to store examples of horrible code that if the compiler finds it in your project, it flags it as an error! :D

  • Mike (unregistered)

    He may have just added a random character (in this case s) in front just to invalidate the key. Commenting it out.

  • Shinobu (unregistered) in reply to vt_mruhlin
    vt_mruhlin:
    He made a minor change to fix a stupid typo. ... on a commit like that, it's at least obvious why he made the change.

    It's the guy who checks in 300 lines worth of complicated changes with the message "fix a bug" that you have to worry about...

    I wholeheartedly agree. It's obvious that some other code needs the value of key to be sContactEmailAddress and if it's called differently, it either won't be used or it will give an error message. A silly typo, not a WTF.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered) in reply to Geoff
    Geoff:
    You know I have had this fight before. I know there are lots of haters but I Hungarian notation is often useful in code, especially when working with languages that are not strongly typed, or offer 'features' like a variant type in an otherwise strong typed system.
    Indeed. I'm not against "functional" warts being used in a strongly typed language like C, indicating such things as an iIterator or nNumItems.

    But then you get the WTFs like the guy in the cubicle next to me found, where a previous programmer had created a new variable simply so that he could use a different wart when he needed a variable to be 16 bits for a while, instead of 8 bits. This is in straight C code, not even C++.

    Ralph:
    Geoff:
    End users sometimes see config files
    Oh the horror! The humanity! Please, make it stop!

    Users are only ever to see pictures. Cartoons. No words. No letters. The keyboard is very scary. Haven't you been paying attention the last 30 years?

    We must start requiring everyone to use voice recognition and Kinect immediately. Then everyone can look just like Tom Cruise in Minority Report... or like a babbling mental ward escapee... if you can tell the difference.

  • RyansBad (unregistered) in reply to Hatshepsut

    Agreed. Ryan is an idiot.

  • (cs)

    Well I hope Ryan L enjoys his mug. This is the most disappointing TwoOrThreeTimesAWeekWTF in a long time.

  • hax0r (unregistered)

    I'm not sure why this Ryan L. is bagging on the unnamed 'certain coder.' He insists that this developer is uninterested in learning or improving, yet the sample he provides shows said developer checking in an improvement to the code.

  • (cs) in reply to ¯\(°_o)/¯ I DUNNO LOL
    ¯\(°_o)/¯ I DUNNO LOL:
    Then everyone can look just like Tom Cruise in Minority Report... or like a babbling mental ward escapee... if you can tell the difference.

    Wait, you mean there is a difference?

  • wonk (unregistered)

    My god! It's full of strings!

  • Nagesh (unregistered)

    Why is Alex robing readers by not post article? Last two have not even been WTF :(

  • Shark8 (unregistered) in reply to ¯\(°_o)/¯ I DUNNO LOL
    ¯\(°_o)/¯ I DUNNO LOL:
    Geoff:
    You know I have had this fight before. I know there are lots of haters but I Hungarian notation is often useful in code, especially when working with languages that are not strongly typed, or offer 'features' like a variant type in an otherwise strong typed system.
    Indeed. I'm not against "functional" warts being used in a strongly typed language like C, indicating such things as an iIterator or nNumItems.
    Wait, what? C is not a strongly-typed language; implement a medium-sized project in Ada and you'll never think it is again.
  • (cs) in reply to Shark8
    Shark8:
    Wait, what? C is not a strongly-typed language; implement a medium-sized project in Ada and you'll never think it is again.
    I'll have you know that I hit the keys with much force when writing in C! If that's not strongly typed, what is?

Leave a comment on “Mybad”

Log In or post as a guest

Replying to comment #:

« Return to Article