I'm speechless about this piece of code.
-
For checking whether the string contains a valid date the code is crap. (SCNR) This shows what the results of "high level" programming languages are. X|
Greetings from Germany
KarstenK wrote:
This shows what the results of "high level" programming languages are
Idiot developers who shouldn't be let anywhere near a keyboard without being wired up to the mains and given a shock everytime they produce crap like this.
Deja View - the feeling that you've seen this post before.
-
It's dead! =\
ROFLOLMFAO
It is now. It was removed because it was so bad and about the best comment against it was that it was complete and utter rubbish.
Deja View - the feeling that you've seen this post before.
-
It is now. It was removed because it was so bad and about the best comment against it was that it was complete and utter rubbish.
Deja View - the feeling that you've seen this post before.
Pete O`Hanlon wrote:
It was removed
It should have been '
An Article of Horror
'. It is bad that it was removed and CP deprived many of a viewing pleasure. :mad:Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
Regional Weblog (in Tamil) :: Voicing for the Society
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT. -
It worries me that we are spiralling into some kind of recursive software hellhole:
void WritePoorCode()
{
bool stuck = true;if (stuck) { GetHelpFromAnotherMuppet(); }
}
void GetHelpFromAnotherMuppet()
{
WritePoorCode();
}void Main() { if (CantAffordAProfessionalDeveloper()) { CreateACompleteMessOfASystem(); } } void CantAffordAProfessionalDeveloper() { PayPeanuts(); } void PayPeanuts() { HireSomebodyWithLittleOrNoExperience(); } void HireSomebodyWithLittleOrNoExperience() { if (LearnedFromSchool()) { GuessCode(); } if (LearnedFromInternet()) { GrapSampleFromSomePlace(); } }
WPF - Imagineers Wanted Follow your nose using DoubleAnimationUsingPath
-
void Main() { if (CantAffordAProfessionalDeveloper()) { CreateACompleteMessOfASystem(); } } void CantAffordAProfessionalDeveloper() { PayPeanuts(); } void PayPeanuts() { HireSomebodyWithLittleOrNoExperience(); } void HireSomebodyWithLittleOrNoExperience() { if (LearnedFromSchool()) { GuessCode(); } if (LearnedFromInternet()) { GrapSampleFromSomePlace(); } }
WPF - Imagineers Wanted Follow your nose using DoubleAnimationUsingPath
I'm not sure that compiles... ;)
-
I'm not sure that compiles... ;)
-
It worries me that we are spiralling into some kind of recursive software hellhole:
void WritePoorCode()
{
bool stuck = true;if (stuck) { GetHelpFromAnotherMuppet(); }
}
void GetHelpFromAnotherMuppet()
{
WritePoorCode();
}catch (System.OutOfMemoryException) { GetHelpFromAnotherMuppet(); }
Ninja (the Nerd)
Confused? You will be... -
KarstenK wrote:
This shows what the results of "high level" programming languages are
Idiot developers who shouldn't be let anywhere near a keyboard without being wired up to the mains and given a shock everytime they produce crap like this.
Deja View - the feeling that you've seen this post before.
Then even the lead developer would be shocking.
Ninja (the Nerd)
Confused? You will be... -
I've just read an article that included this little gem
://it checks it contains 11 char (dd/MMM/yyyy) if (Convert.ToInt16(chkdate.Length.ToString()) != 11) { //if it does not have 11 char then it will return false return false; }
I really don't know where to start (and yes, chkdate is a string).
Deja View - the feeling that you've seen this post before.
Why can't not ONE of you folkes be grown up enough to simply say that the rubbish: ://it checks if it contains 11 char (dd/MMM/yyyy) if (Convert.ToInt16(chkdate.Length.ToString()) != 11) { // Do something if not. } SHOULD be: :// it checks if it contains 11 char (dd/MMM/yyyy) if (chkdate.Length != 11) { // Do something if not. } How hard can it be? It's OK to pinpoint bad code like that but it's not OK not to come up with a useable alternative.
Michael M., mm it-consult dk.
-
I've just read an article that included this little gem
://it checks it contains 11 char (dd/MMM/yyyy) if (Convert.ToInt16(chkdate.Length.ToString()) != 11) { //if it does not have 11 char then it will return false return false; }
I really don't know where to start (and yes, chkdate is a string).
Deja View - the feeling that you've seen this post before.
Pete O`Hanlon wrote:
:
//it checks it contains 11 char (dd/MMM/yyyy) if (Convert.ToInt16(chkdate.Length.ToString()) != 11) { //if it does not have 11 char then it will return false return false; }
Shouldn't the comparison do this? :laugh:
if (chkdate.Length.ToString() != "11")
-
Why can't not ONE of you folkes be grown up enough to simply say that the rubbish: ://it checks if it contains 11 char (dd/MMM/yyyy) if (Convert.ToInt16(chkdate.Length.ToString()) != 11) { // Do something if not. } SHOULD be: :// it checks if it contains 11 char (dd/MMM/yyyy) if (chkdate.Length != 11) { // Do something if not. } How hard can it be? It's OK to pinpoint bad code like that but it's not OK not to come up with a useable alternative.
Michael M., mm it-consult dk.
Michael Mogensen wrote:
Why can't not ONE of you folkes be grown up enough to simply say...
Michael, Is your sense of humor having a bad day? But if we are geting serious, I'd like to point out that your question contains a double negative and means the opposite of your apparent intended meaning.
-
Pete O`Hanlon wrote:
:
//it checks it contains 11 char (dd/MMM/yyyy) if (Convert.ToInt16(chkdate.Length.ToString()) != 11) { //if it does not have 11 char then it will return false return false; }
Shouldn't the comparison do this? :laugh:
if (chkdate.Length.ToString() != "11")
...Double negative... I give up... SS... forget it... Not beeing 100% into C# (I'm c/cpp) I suppose that this issue is something in the area of 'to get the types right' right? (ough double 'right' ... sorry) If this is string: chkdate, then this is int: chkdate.length and then I compare 11 to int which is ok, or?
Michael M., mm it-consult dk.
-
...Double negative... I give up... SS... forget it... Not beeing 100% into C# (I'm c/cpp) I suppose that this issue is something in the area of 'to get the types right' right? (ough double 'right' ... sorry) If this is string: chkdate, then this is int: chkdate.length and then I compare 11 to int which is ok, or?
Michael M., mm it-consult dk.
Michael, I'm far from 100% into C#, like you, I'm a c/c++ guy. (We still have lots of stuff that's says it's c++ but it's mostly old style C). Anyway, this is an issue of getting the types right. And I was just being a smart alec. -- Tony