• Anonymouse Cow-ard (unregistered) in reply to mabinogi

    In almost all programming languages the construct

    if (something == true)

    should be exactly the same as

    if (something)

    because it boils down like this:

    if (something == true)
    
    // something gets interpreted as/cast to a bool, since loose comparison is used
    if ((bool)something == true)
    
    // the bool is compared to true, which results in a bool
    if (boolResultOfCast == true)
    
    // if what's left is true (or whatever value your system uses for TRUE)
    // the following code is run
    if (boolResultOfComparison)
    
    // which is exactly the same in the end as
    if (something)
    

    -- Talking out of his ass since 1764.

  • Warlock Dan (unregistered) in reply to Wizard Stan

    [quote user="Wizard Stan"] So are you saying that it's easier when you talk to people to say "Moses did that action that applied to an object creates several subparts of that object to the waters" instead of "Moses split the waters"?[/quote]

    I'm pretty sure he's making the case that there are instances where using the description is faster, easier, and better than the simple word itself. Whether "split" is one of those instances was not part of his argument.

    Honestly, for a bunch of people that occasionally call themselves programmers, there's a lot of closed minded attitude going around. And it's not just you and your post; I've noticed a disturbing trend the last few weeks of posts that take someones argument-via-analogy and interpret it literally, in an apparent attempt to counter that argument, instead of generalizing said analogy to understand other instances where it may be true.[/quote]

    Honestly, for a bunch of people that occasionally call themselves "why can't we all get along" people, there's a lot of closed minded attitude going around. And it's not just you and your post; I've noticed a disturbing trend the last few weeks of posts that take someone's argument-via-common-sense and interpret it analogically, in an apparent attempt to counter that argument, instead of keeping to the point and not wandering off in useless analogies that may or may not be true.

    It's the word "split" for crying out loud. I'm pretty sure that guy with the "acnesis" was just splitting hairs in that comment to show off. Haha, seen that? "Splitting hairs", so funny...

  • (cs) in reply to Warlock Dan
    Warlock Dan:
    Wizard Stan:
    So are you saying that it's easier when you talk to people to say "Moses did that action that applied to an object creates several subparts of that object to the waters" instead of "Moses split the waters"?

    I'm pretty sure he's making the case that there are instances where using the description is faster, easier, and better than the simple word itself. Whether "split" is one of those instances was not part of his argument.

    Honestly, for a bunch of people that occasionally call themselves programmers, there's a lot of closed minded attitude going around. And it's not just you and your post; I've noticed a disturbing trend the last few weeks of posts that take someones argument-via-analogy and interpret it literally, in an apparent attempt to counter that argument, instead of generalizing said analogy to understand other instances where it may be true.[/the close quote tag here sure looked lonely]

    It's the word "split" for crying out loud. I'm pretty sure that guy with the "acnesis" was just splitting hairs in that comment to show off. Haha, seen that? "Splitting hairs", so funny...

    Looks like you 'split' your quote tags.

  • (cs) in reply to Lol Lolovici
    Lol Lolovici:
    Mr B:
    Did you know that the "acnestis" is the part of the back that's impossible to scratch?

    No? I didn't either until I looked it up - but I managed before by saying "that bit just behind my shoulder blades that I can't scratch". OK it was a bit long winded, but in many ways it's easier to communicate with people the long-winded way, rather than using an obscure word which you'd probably end up having to explain the meaning of anyway.

    :)

    So are you saying that it's easier when you talk to people to say "Moses did that action that applied to an object creates several subparts of that object to the waters" instead of "Moses split the waters"?

    No, I'm not saying that at all.

    However, if you were talking to someone who wasn't a Christian, you'd probably have to explain who Moses was and why he DIVIDED the waters. (not SPLIT the waters, you see, YOU used the wrong word there too...the irony, huh?) you are communicating assuming you have a base common culture and language, which is quite clearly not always true.

    Ignorance of a particular function in a language isn't a WTF, it's just a lack of knowledge. Implementing a version of a function which you didn't know existed isn't a WTF. As far as I can make out the code will work, so THAT isn't a WTF.

    The only WTF here would be a lack of code review/QA procedures by a senior developer or whoever was responsible for the code produced by the developer.

  • Real-modo (unregistered) in reply to drobnox
    drobnox:
    If, at every routine I'm writing, I were to think, hey, maybe there's an API call somewhere that does the same thing; why don't I just launch a quick internet search and spend the afternoon surfing across msdn.microsoft.com, my programs would take much longer to write, even if they would end up marginally smaller.
    You, sir or madame, are a fool, who must not be able to remember the things they looked up at earlier times. ...
    Uhhm ... ahh ... darn it, I forgot what I was going to say in response to this.
  • (cs)
    drobnox:
    If, at every routine I'm writing, I were to think, hey, maybe there's an API call somewhere that does the same thing; why don't I just launch a quick internet search and spend the afternoon surfing across msdn.microsoft.com, my programs would take much longer to write, even if they would end up marginally smaller.
    You, sir or madame, are a fool, who must not be able to remember the things they looked up at earlier times.
    Ooh, you conveniently forgot to include the sentence I started out with. "Sure, it's a WTF. I'm not gonna say it's not a WTF." See, I didn't miss the fact that the programmer in the article was ignorant of not only Split(), but also Substring(), IndexOfAny(), etc. He (assuming it's a he) doesn't know anything about strings! Not only that, but he's guilty of crimes like while(true) where there's a well-defined end condition to end the loop (in this case i>=len). He has no excuse for not writing while(i<len)! Then there's the "speed-up loop" that was mentioned earlier; the way the StringBuilder variable is used; the lack of error handling (try passing "" for input), etc. The whole function is one big WTF. <p>All I tried to say was that I didn't know what "acnestis" meant, although I was familiar with the word "nose". Does that make it clear?

  • mara (unregistered) in reply to The Gloved One
    The Gloved One:
    Tim:
    How does it deal with this:

    void func(Char[] foo); void func(Char a, Char b);

    ...

    func('a', 'b');

    string years = "40,000"; func(years.ToCharArray());
    Char[] foo always wins. Even if years = "10". You have asked for the "Char[]" version of the method.

  • Rhialto (unregistered)

    Why does someone want to split emails? Are you sure they don't want to split email addresses ?

    (and : and ; are valid characters in email addresses, like ,, if you just quote them properly)

  • m0ffx (unregistered) in reply to Bart
    Bart:
    If what you are trying to code seems like something that _should_ be in a library
    And recognising THAT is one of the things that makes a good programmer.
    xtremezone:
    SuperAnalyst:
    but if it works, it works.
    In basketball, there's such a thing as a good shot that misses and a bad shot that goes in.
    But at the end of the match, what counts is what went in.
  • mara (unregistered) in reply to Mr B
    Mr B:
    However, if you were talking to someone who wasn't a Christian, you'd probably have to explain who Moses was and why he DIVIDED the waters. (not SPLIT the waters, you see, YOU used the wrong word there too...

    If you are going to be like that I don't think Moses split or divided the waters given that the English text is a translation. YOUR translation might well say "divided" - but that is just one translation of the word.

  • Rhialto (unregistered) in reply to too_many_usernames
    50% Opacity:
    while(true == keepGoing) {...}

    (Note 1: while(keepGoing) doesn't work if you have systems for which boolean 'true' and 'false' values are both nonzero, or if you care that you actually have 'true' and not some corrupt nonzero value. Yes, such systems exist and are more common than you'd think. And remember, 'corrupt' doesn't mean just 'bad memory', it can mean 'buffer overflow' or 'virus' as well.)

    So, you're saying that if a system uses a non-zero value for "false", you should use "while (KeepGoing == true)". Well then I have a surprise for you:

    Suppose KeepGoing is false, then (KeepGoing == true) is of course false, which (according to our working assumption), would not work!

    You would need to write "while ((KeepGoing == true) == true)"!

    Of course, in the example case this value is false. So (according to our working assumption) it won't work!

    You would need to write "while (((KeepGoing == true) == true) == true)"!

    Of course, in the example case this value is false. So (according to our working assumption) it won't work!

    You would need to write "while ((((KeepGoing == true) == true) == true) == true)"!

    (ad infinitum)

    So any language where "false" is "non-zero" (by whatever measure) had better make sure that using it in conditional statements works in the normal way anyway.

  • (cs) in reply to Rhialto
    Rhialto:
    So, you're saying that if a system uses a non-zero value for "false", you should use "while (KeepGoing == true)". Well then I have a surprise for you:

    Suppose KeepGoing is false, then (KeepGoing == true) is of course false, which (according to our working assumption), would not work!

    Why not? It doesn't matter if the representation of false is zero or not. As long as false is not the same as true, "if (KeepGoing==true)" will return true if KeepGoing is true, and false otherwise. Similarly, "if (KeepGoing)" will return true if KeepGoing is true, and false if it's false.

    So either you've got your thinking cap on sideways, or you're making assumptions you're not telling us about.

  • (cs) in reply to mara
    mara:
    Mr B:
    However, if you were talking to someone who wasn't a Christian, you'd probably have to explain who Moses was and why he DIVIDED the waters. (not SPLIT the waters, you see, YOU used the wrong word there too...

    If you are going to be like that I don't think Moses split or divided the waters given that the English text is a translation. YOUR translation might well say "divided" - but that is just one translation of the word.

    Erm, yes, that was the point of what I posted, there's many verbs that serve the same purpose, it doesn't matter which one you use in English as long as you share the understanding of what that verb means.

    If you were explaining it to someone learning English, and they didn't understand ANY of the words you were using, you'd probably resort to a more verbose description.

    :)

  • ath (unregistered) in reply to Mike
    Mike:
    Speed up loop?
    for (i = 0; i < len; i++)
    {
        char ch = emails[i];
    }
    

    There is a much easier way of doing that:

  • ari (unregistered)

    so what's that supposed to be

  • (cs) in reply to Mike T
    Mike T:
    monkeyPushButton:
    SCB:
    Bobbo:
    sagaciter (rocking the captchah:
    - the a st**pid fail-training train
    The what?
    stoopid
    Thanks for making this thread not work safe.
    Thanks for making this work not thread safe (captcha: commoveo - is that latin for combover?)

    It's Latin for "thirteen hours late on a joke".

  • hobart (unregistered) in reply to method1
    method1:
    Edward Royce:
    Did you know that the "acnestis" is the part of the back that's impossible to scratch?

    For quadrupeds, yes. I don't think the term applies to humans viz :

    "That part of the spine which reaches from betwixt the shoulder blades to the loins. This name seems only applicable to quadrupeds, because they cannot reach it to scratch." From "The London Medical Dictionary"

    Probably the sort of subtle mistake one would make coding one's own version of a standard library function.

    It actually seems more like the risk you run by incorrectly using a standard library function.

    His home-rolled definition was long winded, but meant exactly what he wanted it to mean. The "standard" word he thought would express the same thing turns out to have unexpected constraints (only applies to quadrupeds).

    Admittedly something like a string split function should be part of a programmer's every day language, but there's plenty of standard functions in most languages that I've worked on that have unexpected constraints/side-effects/defects that could easily catch out the unwary developer.

  • Rhialto (unregistered) in reply to Pim
    Pim:
    So either you've got your thinking cap on sideways, or you're making assumptions you're not telling us about.

    It was 50% Opacity who started the claim that you'd need to write "expression == true" when the compiler happens to use "non zero values" for true and false. I just wanted to show that even if a compiler does that, it would still need to make "if (boolean expression which is false)" work right, even if "false" is represented by some non-zero value.

  • (cs) in reply to too_many_usernames
    too_many_usernames:

    (Note 1: while(keepGoing) doesn't work if you have systems for which boolean 'true' and 'false' values are both nonzero, or if you care that you actually have 'true' and not some corrupt nonzero value. Yes, such systems exist and are more common than you'd think. And remember, 'corrupt' doesn't mean just 'bad memory', it can mean 'buffer overflow' or 'virus' as well.)

    Any language where the expression in the parentheses of the while statement is not typed as that language's equivalent of boolean is seriously fucked up. Or to put it another way, any language where while(false) does not terminate the loop is seriously fucked up.

    It's possible to do that in C with #define false (SOME_NON_ZERO_VALUE) but you deserve to be fired for putting that line of code in your program.

    (Note 2: rvalues on the left of '==' is just a good idea, and once you get used to it, the strangeness goes away.)
    Nah, just don't put assignments in conditionals. Use the compiler warning (in gcc -Wall does the trick) to flag when you accidentally do it.
  • (cs) in reply to jeremypnet
    jeremypnet:
    It's possible to do that in C with #define false (SOME_NON_ZERO_VALUE) but you deserve to be fired for putting that line of code in your program.
    Unfortunately, sometimes a project requires that you cannot use "system reset values" for TRUE and FALSE. Since '0' is a typical reset-state value for memory, you're not allowed to use it, so you have to #define FALSE (SOME_NON_ZERO_VALUE). (And you catch the 0 value as 'invalid' because you *did* remember to initialize your variables, right?)
    jeremypnet:
    Nah, just don't put assignments in conditionals. Use the compiler warning (in gcc -Wall does the trick) to flag when you accidentally do it.
    In principle I agree with you, but we all know how practice compares with principle =)

    In general both of these concepts boil down to the same concept: never make assumptions about anything, even "standards." After all, if these things weren't problems, we probably wouldn't even have this site would we? =)

  • (cs) in reply to Rhialto
    Rhialto:
    It was 50% Opacity who started the claim that you'd need to write "expression == true" when the compiler happens to use "non zero values" for true and false. I just wanted to show that even if a compiler does that, it would still need to make "if (boolean expression which is false)" work right, even if "false" is represented by some non-zero value.
    Oops, sorry, I didn't realise that you were taking him seriously. My bad.
  • (cs) in reply to too_many_usernames
    too_many_usernames:
    sometimes a project requires that you cannot use "system reset values" for TRUE and FALSE. Since '0' is a typical reset-state value for memory, you're not allowed to use it, so you have to #define FALSE (SOME_NON_ZERO_VALUE).
    Your project should be fired! See, it won't do any good. No matter if you define your own TRUEs or FALSEs or BOOLs, the compiler will still use its own built in rules for calculating boolean expressions. For instance, (5>7) will evaluate to the predefined value of "false", not to whatever you have defined "false" to be in your source.

    Unless you overload the > operator.

  • 50% Opacity (unregistered) in reply to Rhialto
    Rhialto:
    It was 50% Opacity who started the claim...

    Hey, at least take care who you're quoting. You're thinking about too_many_usernames (ironically).

    I have a reputation to protect with this anonymous, unregistered name on this random interweb forum after all...

  • (cs) in reply to Mr B
    Mr B:
    However, if you were talking to someone who wasn't a Christian, you'd probably have to explain who Moses was
    Yeah, I doubt that any Jews would know that.
  • Wizard Stan (unregistered) in reply to Warlock Dan
    Warlock Dan:
    Wizard Stan:
    I'm pretty sure he's making the case that there are instances where using the description is faster, easier, and better than the simple word itself. Whether "split" is one of those instances was not part of his argument.

    Honestly, for a bunch of people that occasionally call themselves programmers, there's a lot of closed minded attitude going around. And it's not just you and your post; I've noticed a disturbing trend the last few weeks of posts that take someones argument-via-analogy and interpret it literally, in an apparent attempt to counter that argument, instead of generalizing said analogy to understand other instances where it may be true.

    Honestly, for a bunch of people that occasionally call themselves "why can't we all get along" people, there's a lot of closed minded attitude going around. And it's not just you and your post; I've noticed a disturbing trend the last few weeks of posts that take someone's argument-via-common-sense and interpret it analogically, in an apparent attempt to counter that argument, instead of keeping to the point and not wandering off in useless analogies that may or may not be true.

    It's the word "split" for crying out loud. I'm pretty sure that guy with the "acnesis" was just splitting hairs in that comment to show off. Haha, seen that? "Splitting hairs", so funny...

    Unfortunately it seems you've completely missed the point of my post, and then played right into what I was talking about. I don't want people to "just get along", that would be stupid. Humans thrive on competition. What I'd like, and the point I was trying to get across, is for these arguments to stop using literal interpretations and strawman arguments. There is no way to defend against them other than to say "that's not what I meant, you've missed the point" and try to say the exact same thing that was already said a second time. No one learns anything that way. Consider the example we've just witnessed. We see a programmer not using the word "split", someone comments to the effect of "that's stupid not to know the libraries. I read the dictionary several times to learn English, why can't someone read the language reference to learn these functions?" The response to that was an anecdote about a highly unknown medical word: it's in the dictionary, why wouldn't you know it? And even if you did, no one else would understand it, thus it would have to be followed with an explanation anyway. At this point, the argument could have gone "oh yes, I see that there are cases where you might not know the specific function to look for, or it may in fact be easier to build it yourself anyway for readability purposes. I was a fool to make such a gross and generalized statement" or "I disagree because of this and that." Instead, someone took it as a defense of the ignorance of the usage of "split", even going so far as to craft an extreme example revolving around the word split. This is known as a strawman argument; taking someones platform to an extreme position, and then disproving that extreme. It makes it seem as if the original platform is false when really it has done nothing but waste everyone's time. That's when I stepped in and gave my thoughts on the matter, and then you ironically responded with a strawman of your own. And now, instead of using a few small statements to get my point across and trusting others to understand what I mean, I've had to enhance the entire argument until it can (hopefully) no longer be taken the wrong way. And thus we circle back to the very original argument.

  • Rhialto (unregistered) in reply to 50% Opacity
    50% Opacity:
    Hey, at least take care who you're quoting. You're thinking about too_many_usernames (ironically).

    I have a reputation to protect with this anonymous, unregistered name on this random interweb forum after all...

    Oops. Sorry!

  • (cs) in reply to Code Dependent
    Code Dependent:
    Mr B:
    However, if you were talking to someone who wasn't a Christian, you'd probably have to explain who Moses was
    Yeah, I doubt that any Jews would know that.

    Win.

  • (cs) in reply to Code Dependent
    Code Dependent:
    Mr B:
    However, if you were talking to someone who wasn't a Christian, you'd probably have to explain who Moses was
    Yeah, I doubt that any Jews would know that.

    I just won £5.

    It did take a little while...but my gut instincts on the anality of this board were proved correct (again). ie. the willingness to argue/correct on irrelevent items outweighs the willingness to discuss the actual article.

    Well done!

    :)

  • (cs) in reply to Mr B
    Mr B:
    I just won £5.
    Wait, wait. Are you saying that you bet someone that a comment thread on a blog would go off-topic, and they took the bet?

    Wow.

    That's totally, totally... what's the word. FILE_NOT_FOUND. That's it.

  • (cs) in reply to Pim
    Pim:
    Mr B:
    I just won £5.
    Wait, wait. Are you saying that you bet someone that a comment thread on a blog would go off-topic, and they took the bet?

    Wow.

    That's totally, totally... what's the word. FILE_NOT_FOUND. That's it.

    Not quite, I bet £5 that some cock would say "oh yeah, well I'm Jewish and I've heard of Moses!"

    OK, so it's not exact, but it was close enough.

    :)

  • (cs) in reply to Mr B
    Mr B:
    Pim:
    Mr B:
    I just won £5.
    Wait, wait. Are you saying that you bet someone that a comment thread on a blog would go off-topic, and they took the bet?

    Wow.

    That's totally, totally... what's the word. FILE_NOT_FOUND. That's it.

    Not quite, I bet £5 that some cock would say "oh yeah, well I'm Jewish and I've heard of Moses!"

    OK, so it's not exact, but it was close enough.

    :)

    I just won $10 on a bet that some asshole would post a hypocritical holier-than-thou retort to the "Jew-Moses" post. Thanks!

  • WTF checker (unregistered)

    Code should be readable out loud. "if something == true then" is less readable than "if something then".

    It requires the use of boolean types and understandable variable names.

  • (cs) in reply to Code Dependent
    Code Dependent:
    Mr B:
    Pim:
    Mr B:
    I just won £5.
    Wait, wait. Are you saying that you bet someone that a comment thread on a blog would go off-topic, and they took the bet?

    Wow.

    That's totally, totally... what's the word. FILE_NOT_FOUND. That's it.

    Not quite, I bet £5 that some cock would say "oh yeah, well I'm Jewish and I've heard of Moses!"

    OK, so it's not exact, but it was close enough.

    :)

    I just won $10 on a bet that some asshole would post a hypocritical holier-than-thou retort to the "Jew-Moses" post. Thanks!

    I just won a further £5 for betting that the same cock would reply saying that he'd won a bet too.

    I can keep this up for days, weeks probably, you good for it? I suspect you may be...

    :)

  • (cs) in reply to Pim
    Pim:
    Sure, it's a WTF. I'm not gonna say it's not a WTF.

    But these modern day compiler libraries are so incredibly large, it's impossible to know, and understand, and be able to use, every single call that's included. It would take years, if not decades, for a programmer to get to know all the ins and outs of a given library. And then in the end, when he knows everything, he'll find that his knowledge is outdated and there are newer versions of the libraries with different functionalities.

    So the best you can aspire to is to learn a decent subset of the calls at your disposal, and to use those to the best of your abilities.

    If, at every routine I'm writing, I were to think, hey, maybe there's an API call somewhere that does the same thing; why don't I just launch a quick internet search and spend the afternoon surfing across msdn.microsoft.com, my programs would take much longer to write, even if they would end up marginally smaller.

    Whoa there boy! It's string.Split() for crying out loud.

    I'm not a Java developer -- most of what I write these days is in bash -- but if I were to write in Java, I'd certainly look for a "split()" function like the one in Perl before I wrote my own. Heck, I'd look for strtok() too.

  • (cs) in reply to Mr B
    Mr B:
    I can keep this up for days, weeks probably, you good for it? I suspect you may be...
    I would, but my betting buddy says after losing to me twice in one day, he's bowing out of the game. :)
  • (cs) in reply to WTF checker
    WTF checker:
    Code should be readable out loud. "if something == true then" is less readable than "if something then".

    It requires the use of boolean types and understandable variable names.

    Here's a spanner in your filthy underpants then: what if the "something" were a Boolean variable and were named appropriately, along the lines of, say, "keyExists"?

    We call these innovative things "flags". They map to real language pretty effectively. For example, "if ( trainHasArrived ) then boardTrain()".

    And by gum, you might want to have that boolean flag returned by a function! Oh my. Now that English phrase becomes "if ( hasArrived(myTrain) ) then board(myTrain)". Screw the grammatical problems: it's understandable.

    And back in the fickle world of computery things and that "keyExists" flag, you might want to say "if ( exists(key) ) then process(key)".

    And sometimes, you might want to combine a multitude of flags into a bitfield, y'know, for efficiency's sake. Then you might have to say something more like "if ( open(file) & FILE_NOT_FOUND ) then ...". And by golly, doesn't it seem all of a sudden that you have to have an understanding of logical and bitwise operations, along with those ever-so-scary Boolean types?

    Maybe computer programmers ought to understand Boolean types and use understandable variable names? And maybe computer science isn't your strong point... jus' sayin'.

  • (cs) in reply to rfsmit
    rfsmit:
    *snip* Then you might have to say something more like "if ( open(file) & FILE_NOT_FOUND ) then ...". And by golly, doesn't it seem all of a sudden that you have to have an understanding of logical and bitwise operations, along with those ever-so-scary Boolean types?

    Maybe computer programmers ought to understand Boolean types and use understandable variable names? And maybe computer science isn't your strong point... jus' sayin'.

    Oooooo...kay... so it's testing for a condition where "open(file)" returns true, and FILE_NOT_FOUND also returns true?

    We're in agreement on the use of boolean flags with meaningful names, BTW.

  • mark (unregistered) in reply to durnurd
    durnurd:
    Bobbo:
    - the a st**pid fail-training train
    The what?
    You know, those two-letter words that nobody likes to see on TV. Like... I guess.... uu in this case?

    It's uuencoded.

  • (cs) in reply to rfsmit
    rfsmit:
    WTF checker:
    Code should be readable out loud. "if something == true then" is less readable than "if something then".

    It requires the use of boolean types and understandable variable names.

    Here's a spanner in your filthy underpants then: what if the "something" were a Boolean variable and were named appropriately, along the lines of, say, "keyExists"? [snip] Maybe computer programmers ought to understand Boolean types and use understandable variable names? And maybe computer science isn't your strong point... jus' sayin'.
    Erm, did you just fail your reading comprehension test?

  • Duke of New York (unregistered)

    Have any of you considered that maybe the guy looked for a library function... and missed it? It happens. I spent a day writing and testing a base-64 encoder after I couldn't find one on MSDN, and even got it through review, before someone finally told me that Windows had one.

  • (cs) in reply to Duke of New York

    Sure it's forgivable to miss one library function, but like I said, the guy not only missed string.Split(), but also string.IndexOfAny(), string.Substring(), List.ToArray(), etc. By then it ends being forgivable.

  • kopnitski (unregistered) in reply to Edward Royce
    Edward Royce:
    Rollerscopter:
    Yeah right, cause string.Split() is an obscure, rarely-used method.

    It's a funny thing.

    When I was a very young kid and having just learned the basics of English, got adopted into an American family, I spent weeks reading dictionaries from cover to cover so I could have a better understanding of the language.

    Yet there are professional programmers who learn the syntax of a language but don't bother furthering their understanding of all the functions and objects available for that language.

    strange.

    'cause it don't get 'em laid

  • Mozzis (unregistered)

    For me, the 32,498 line count of the source file was the give-away. This is too verbose in any language.

    There is a programmer I know, who the boss swears by, who produces source files of this length no matter what the language - C++, java, ASP and now C#. They are a nightmare to debug (and yes there are plenty of bugs) in part because of their length. And ignorance of library functions is only one of several reasons for their length.

  • Steve Dougherty (unregistered)

    Why is this part there?

        for (i = 0; i < len; i++)
        {
            char ch = emails[i];
        }
    
  • kc0a (unregistered) in reply to Pim

    I have no sympathy with this position. Sure, the libraries are large, but it's not difficult to just scan the packages to see what sorts of things are there, without memorizing the details of every call. Nor is it difficult to figure out that you are not the first developer who has to split a string or formatting a date or validate an E-mail address.

  • Procedural (unregistered) in reply to monkeyPushButton
    monkeyPushButton:
    SCB:
    Bobbo:
    sagaciter (rocking the captchah:
    • the a st**pid fail-training train

    The what?

    stoopid

    Thanks for making this thread not work safe.

    You work for the office of the Spanish Inquisition ? Frankly, I never expected that.

Leave a comment on “The Complicator's Email Address Parser”

Log In or post as a guest

Replying to comment #:

« Return to Article