| « Prev | Page 1 | Page 2 | Page 3 | Next » |
|
If he was changing the key in the config file then someone else must have set the key to be that value in code.
|
|
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. |
|
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). |
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. |
|
He corrected the config so that the key used in the config matches the key used in the code. There is no WTF here.
|
Dumbass. He forgot to put warts on the tags and attributes. Fixed. |
Mybad. |
But... she told me she had to wash her hair! |
|
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.
|
|
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).
|
|
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 ...
|
Ouch ...or was it just as well that his code "undid" itself? |
|
csMyBad to indicate that it is a comment string.
|
|
What a rubbish WTF. Try harder.
|
|
<app key="sUselessComment" value="MyBad" />
<app key="sCaptcha" value="Genitus - WTF ?" /> |
Re: Mybad
2012-05-03 04:06
•
by
Alex Papadimoulis
(unregistered)
|
Mybad. |
|
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. |
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. |
|
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 |
|
Committing code without viewing the changes and without running tests is not an innocent mistake.
|
|
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 :-)
|
|
<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" |
|
TRWTF is this getting posted at all.
Captcha: opto - This is not opto snuff |
|
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. |
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? |
|
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... |
Guilty. |
Hungarian notation is always TRWTF. |
I don't believe it! There was nothing in the computer world before 1970 Jan 01. |
So it didn't need a commit comment then did it? |
Yes, I'd guess so. It seems there is only one sane dev at that shop. |
|
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
|
|
He may have just added a random character (in this case s) in front just to invalidate the key. Commenting it out.
|
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. |
Re: Mybad
2012-05-03 09:51
•
by
¯\(°_o)/¯ I DUNNO LOL
(unregistered)
|
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++. 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. |
|
Agreed. Ryan is an idiot.
|
|
Well I hope Ryan L enjoys his mug. This is the most disappointing TwoOrThreeTimesAWeekWTF in a long time.
|
|
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.
|
Wait, you mean there is a difference? |
|
My god! It's full of strings!
|
|
Why is Alex robing readers by not post article? Last two have not even been WTF :(
|
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? |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |