• Dazed (unregistered) in reply to Avdi
    Anonymous:
    I'm missing the WTF here.  So he used long, descriptive variable names?  This is generally considered a Good Thing, and one of the benefits of working with modern languages which have allow long identifiers.

    Er, no. It's considered a Good Thing to write code that is easy to read.

    Excessive verbosity and superfluous sesquipedalianism are not, even in exceptional circumstances, admirable contributions to the legibility of ones programmatic endeavours, and one should be abstemious in the employment of such.

  • John Melville (unregistered) in reply to Avdi

    I think the WTF is that this is the second system we know about that the "Java Wizzard" has had to abandon, and who knows how many more.  You can get away with poor architecture until the code gets to a certian size (in my experience 7-10K LOC in C family languages.)  At that point bad code gets to brittle to work with.

    Our java wizzard seems to be doing the initial parts and getting the (easy) first gee-whiz on a lot of projects without ever driving one to completion.  When the code gets to messy and needs real architecture he "retires" to another new project.

  • (cs) in reply to Dazed
    Anonymous:
    Anonymous:
    I'm missing the WTF here.  So he used long, descriptive variable names?  This is generally considered a Good Thing, and one of the benefits of working with modern languages which have allow long identifiers.

    Er, no. It's considered a Good Thing to write code that is easy to read.

    Excessive verbosity and superfluous sesquipedalianism are not, even in exceptional circumstances, admirable contributions to the legibility of ones programmatic endeavours, and one should be abstemious in the employment of such.



    The fun is that I got this post much better than those with a lot of small words that try to keep it simple.

  • Anonymous (unregistered) in reply to Dazed
    Anonymous:
    Er, no. It's considered a Good Thing to write code that is easy to read.

    Excessive verbosity and superfluous sesquipedalianism are not, even in exceptional circumstances, admirable contributions to the legibility of ones programmatic endeavours, and one should be abstemious in the employment of such.



    um .... WTF!? ... can you dumb that down for me please?

  • (cs) in reply to AnonymousNoelCoward
    Anonymous:
    rmg66:

    What is up with the trend of younger programmers to try name everything with a sentence!

    Keep the names as short as possible. I'm trying to read code, not a novel. If more clarity is needed, write a frikin' comment!

    I long for the days of the 8-charactor limit on names...

    Rht on! I hte bng abl to undrstd wht Im rdng.  Ths chrtrs cst valbl ln sp.

    Because all programmers who avoid using long names write unreadable code.
  • Anonymous (unregistered) in reply to AnonymousNoelCoward
    Anonymous:
    and my kung fu is unstoppable

    Are you broadcast on Channel 39?
  • Anonymous (unregistered) in reply to rmg66
    rmg66:
    What is up with the trend of younger programmers to try name everything with a sentence!

    Keep the names as short as possible. I'm trying to read code, not a novel. If more clarity is needed, write a frikin' comment!

    The comments are the code.  Why increase my work tenfold if I can just make it easy to understand by more descriptive naming patterns?  I want to read code, not a novel commenting the code!

    rmg66:
    I long for the days of the 8-charactor limit on names...

    I bet you do.  I long for the day when you realize there is a need for more than 640k, but I'll not hold my breath.  Code with arbitrarily small names and more difficult to read, and usually written by those who consistently fail to comment it properly.  I'd take the descriptive names with no comments over your useless (and never really consistent) shorthand notation with minimal effort to comment.


    rmg66:
    PS_1: InsteadOfCamelCasing, lets_all_try_to_use_the_underscore.
    Much_easier_to_read!

    Um, I thought you didn't want to: read(a_novel_of_code_due_to_overlong_names).

    rmg66:
    PS_2: And Just because spaces are technically allowed nowadays doesn't mean you have to use them.

    Um, if that's in reference to identifier constructs like ${this is a variable}, then I'd have to agree that I don't like the spaces either, but it's not that much different than the overabundant use of the underscore (which in my mind looks like you are trying to underline something).


  • (cs) in reply to Dazed
    Anonymous:
    Anonymous:
    I'm missing the WTF here.  So he used long, descriptive variable names?  This is generally considered a Good Thing, and one of the benefits of working with modern languages which have allow long identifiers.

    Er, no. It's considered a Good Thing to write code that is easy to read.

    Excessive verbosity and superfluous sesquipedalianism are not, even in exceptional circumstances, admirable contributions to the legibility of ones programmatic endeavours, and one should be abstemious in the employment of such.



    You kinda failed in doing what you wanted to accomplish. It appears that you are trying to use overly descriptive words to make an example of how the Java Wizard's code was too descriptive. I have NO idea what you said thanks to your thesaurizing. On the other hand, the Java Wizard, while using long and descriptive variable names, doesn't use words that no one understands. Thus he is left with variables that have names of what they are (A REALLY GOOD THING). Is it the best naming convention in the world? NO. Is it the worst or even WTF worthy? Definitely not the worst, and only slightly WTF worthy. It is very easy to tell that the variable hasPermissionsRequiredToCompleteSigningStep stores a true/false value that represents whether the user has the proper permissions to complete the signing step. Sure, it would have been better if the variable was canCompleteSigningStep, but to flame the guy at such lengths for being a little more verbose than that is hardly called for.

    Is the biggest WTF of this short circuiting the boolean? I would hardly think so. A WTF of course, but a big one, hardly. Frankly I think he did it the way he did so that it would be more readable. It simply breaks down the logic into simpler bytes for easier consumption. I'm 99.9% positive that this programmer knew that the whole thing could have been replaced with:
    boolean hasPermissionsRequiredForRenegotiationAction =
        currentInteractiveUser.HasSpecificPermission
            (SpecificApplicationPermissions.CompleteClosingStep) &&
        currentInteractiveUser.HasSpecificPermission
            (SpecificApplicationPermissions.InitailizeClosingStep) &&
        currentInteractiveUser.HasSpecificPermission
            (SpecificApplicationPermissions.CompleteApprovalStep);

  • (cs) in reply to CodeReaper
    CodeReaper:
    ...

    The lesson here, of course, is that a reputation is for suckers.

    <font size="5">H</font>mmm!  That's what we used to say about the hot chix in school.
  • blah (unregistered) in reply to themagni
    themagni:

    There's no dress code where I work. I wear slacks, a nice shirt - with an undershirt - and nice, comfortable shoes. (And yes, for the literalists, I also wear underwear, socks, a belt, two rings, and an ID badge.) That's because I want to portray a presentable, knowledgeable, and professional image. Dress like a homeless guy and you'll be respected like a homeless guy.


    Christ, you sound like my mother.  I already don't respect you.
  • (cs) in reply to Dazed
    Anonymous:
    Er, no. It's considered a Good Thing to write code that is easy to read.

    Excessive verbosity and superfluous sesquipedalianism are not, even in exceptional circumstances, admirable contributions to the legibility of ones programmatic endeavours, and one should be abstemious in the employment of such.

    Ok. Drop the thesaurus and nobody gets hurt. Just step away. Slooowwly... Slooowwwly. There ya go.

    By the way the google toolbar spellcheck doesn't know what "sesquipedalianism" is. :)

  • Adam (unregistered) in reply to Anonymous
    Anonymous:
    Anonymous:
    Er, no. It's considered a Good Thing to write code that is easy to read.

    Excessive verbosity and superfluous sesquipedalianism are not, even in exceptional circumstances, admirable contributions to the legibility of ones programmatic endeavours, and one should be abstemious in the employment of such.



    um .... WTF!? ... can you dumb that down for me please?


    Big words make programs hard to understand. Don't use them.

  • SwordfishBob (unregistered) in reply to Xarium

    Obviously that's a joke, but have you ever worked with somebody who consistently spells words wrong? It's surprisingly annoying, especially when in an environment that does not have code completion.

    Have you ever had to use a language that consistently spells wrongly? It's COLOUR! The red-ness of the high tech beanbag is its COLOUR.

    Their, I feal better now.

  • Blah (unregistered) in reply to Dazed

    Maybe it's just me, but I'll take long (even overly long) variable names over short ones any day. I'd have IsUserValidatedAgainstSomeSystem over the half-assed, AOLICQJABBERAIM generation text-speak of IsUsrValSys.

    Besides, in the age of large screens, high resolution and Visual Assist-esque code-completion, I can't see any decent argument for the "l33t" version. I can't even see how that's easier to read. Oh, and unless you're commenting a description of IsUsrValSys every place you use it you're basically going to rely on the IDE to pop the declaration and the comment that goes with it (again, I'm a Visual Assist whore). That's not easy to read code, that's a decent IDE feature.

    I'd love to see some of these contracted-variable-name folks deal with their code outside of a syntax highlighting IDE.

  • Dr Sanchez (unregistered) in reply to Dazed
    Anonymous:
    Anonymous:
    I'm missing the WTF here.  So he used long, descriptive variable names?  This is generally considered a Good Thing, and one of the benefits of working with modern languages which have allow long identifiers.

    Er, no. It's considered a Good Thing to write code that is easy to read.

    Excessive verbosity and superfluous sesquipedalianism are not, even in exceptional circumstances, admirable contributions to the legibility of ones programmatic endeavours, and one should be abstemious in the employment of such.




    bows to the word wizzard

  • (cs)

    Here are two more WTFs that no one has pointed out yet:

    WhyTF is permission logic duplicated in each user object, rather than centralized in a singleton?

    WhyTF aren't we minimizing the number of object calls?

    int[] RenegotiateActionSteps = {Security.CompleteClosing, Security.InitializeClosing, Security.CompleteApproval};
    boolean CanRenegotiateAction = Security.IsPermitted(CurrentUser, RenegotiateActionSteps);

  • KattMan (unregistered)

    sesquipedalianism: The at of using words more complicated then necessary.  Essentially it word is an sesquipedalianism.

     

    Now for the length of the variable names, I do think they are far to long.  We have OOP for a reason.  Instead of his CheckPermissionsForAl....etc he should have made a class so he could instead say this:

    Allowed = Permissions.Action(UserID)

    Or somthing close to that.  Still very descriptive without all the novel length variable names and follows the ideas of OOP.  Permission based checks should be handle by a permissions class rather then scattered willy nilly across the application.

  • (cs)

    Some people just type really really fast without ever making a mistake. The code given is about as self documenting as is possible.

  • meh (unregistered) in reply to Digitalbath
    Anonymous:

    The real WTF is that a ***PROGRAMMER*** was impeccably dressed.  I've seen you fuckers at the user groups, and i feel blessed when  you use deoderant or wear a shirt.

    I worked at a place where all the Delphi developers wore suits and all the C++ developers wore sandals and tank tops.
    Maybe it's a language-specific uniform...
  • KattMan (unregistered) in reply to Blah

    Anonymous:
    Maybe it's just me, but I'll take long (even overly long) variable names over short ones any day. I'd have IsUserValidatedAgainstSomeSystem over the half-assed, AOLICQJABBERAIM generation text-speak of IsUsrValSys.

    Besides, in the age of large screens, high resolution and Visual Assist-esque code-completion, I can't see any decent argument for the "l33t" version. I can't even see how that's easier to read. Oh, and unless you're commenting a description of IsUsrValSys every place you use it you're basically going to rely on the IDE to pop the declaration and the comment that goes with it (again, I'm a Visual Assist whore). That's not easy to read code, that's a decent IDE feature.

    I'd love to see some of these contracted-variable-name folks deal with their code outside of a syntax highlighting IDE.

    This is another case of not using OOP.  Where is your user class?  Why not this:

    User.System.Validated(System.Name)

    Use your system class, use your user class.  User can contain an instance of system easily.

  • Anonononymous (unregistered) in reply to Blah
    Anonymous:
    Maybe it's just me, but I'll take long (even overly long) variable names over short ones any day. I'd have IsUserValidatedAgainstSomeSystem over the half-assed, AOLICQJABBERAIM generation text-speak of IsUsrValSys.

    The problem isn't so much the long variable names, it's long variable names that are almost the same.

    hasPermissionsRequiredToCompleteSigningStep hasPermissionsRequiredToInitailizeClosingStep hasPermissionsRequiredToCompleteApprovalStep

    the length of these variables makes it harder to pick out the important part of these variables, and most of it doesn't add any clarity to the variable's purpose.

    That combined with the excessive comments for a simple bit of code, If every line of code has a comment explaining what it does on the local scale, it gets harder to find the comments that describe what is happening on larger scales.

  • Gnictigezoink (unregistered) in reply to SwordfishBob
    Anonymous:
    >>Obviously that's a joke, but have you ever worked with somebody who consistently spells words wrong? It's surprisingly annoying, especially when in an environment that does not have code completion.

    Have you ever had to use a language that consistently spells wrongly? It's COLOUR! The red-ness of the high tech beanbag is its COLOUR.

    Their, I feal better now.




    THERE.

    (I feel better now.)

  • (cs) in reply to rmg66
    rmg66:

    Right On!

    What is up with the trend of younger programmers to try name everything with a sentence!

    Keep the names as short as possible. I'm trying to read code, not a novel. If more clarity is needed, write a frikin' comment!

    I long for the days of the 8-charactor limit on names...

    PS_1: InsteadOfCamelCasing, lets_all_try_to_use_the_underscore. Much_easier_to_read!

    PS_2: And Just because spaces are technically allowed nowadays doesn't mean you have to use them.

    Sheeeesh!

     

    That's right in line with this:

    CHEERLEADER, SO AND SO: a B'GRL PRTY?!?

    WHAT'S HER FACE: Taking the vowels out of words doesn't always make them cool.

    SO AND SO: 'm srry.

  • (cs) in reply to KattMan

    Reminds me of an old joke about student using labelA: labelB: in program and being told by proffesor to use long mnemonic identifiers instead. So he changed them to longMnemonicIdentifierKindaLabelA: longMnemonicIdentifierKindaLabelB:

  • (cs) in reply to Gnictigezoink

    Odd.

    I thought the WTF was that the company took the 'Java Wizard' and made him code in VB. If you've got a Java Wizard, wouldn't you have him code in Java?

  • Javariel (unregistered) in reply to Anonononymous
    Anonymous:
    The problem isn't so much the long variable names, it's long variable names that are almost the same.

    hasPermissionsRequiredToCompleteSigningStep hasPermissionsRequiredToInitailizeClosingStep hasPermissionsRequiredToCompleteApprovalStep

    the length of these variables makes it harder to pick out the important part of these variables, and most of it doesn't add any clarity to the variable's purpose.

    Exactly. Now replace that with:

    canCompleteSigningStep canInitailizeClosingStep canCompleteApprovalStep

    Half the size, just as much information.

  • Blah (unregistered) in reply to Javariel
    Exactly. Now replace that with:

    canCompleteSigningStep
    canInitailizeClosingStep
    canCompleteApprovalStep

    Half the size, just as much information.


    Oh, see, I agree with that. I was disagreeing with the really short naming.

    Side point, a couple of people have mentioned use of classes. Whilst that's a valid comment as far as OOP coding is concerned (and I don't code java, so I won't comment), it doesn't have any bearing on variable naming length/convention discussion. Yes, using the class name to absorb and scope the variables is fair enough and good practice but you can still have long/short/whatever member naming. So ignore OOP coding for the moment, I think the variable naming style should be considered as if it were a vanilla C, scope-free question.

    Point in a sentence: User::IsValidatedAgainstSomeSystem -v- User::IsValSys.

  • spinality (unregistered) in reply to Anonononymous

    This is right. But aren't the comments the biggest WTF? They add nothing to the code. They're like our favorite types of comments:

    i = (j % m);      // set i to j mod m

    Given the long names (which could indeed have been chosen better) the comments should have been removed, or replaced by

    // Get permissions as shown below

    There is one advantage in having such similar names, by the way. When listing them out alphabetically, the related names will sort together.

    This all looks like a pseudocode-writing exercise where business process elements are getting named according to some development methodology. The methodology probably specifies rules for how names are constructed and what comments should be used. It may or may not have actually been intended to survive as production code.

    Of course WTHK what was going on in those big project meetings? Or in the Wizard's head. The later history does make the whole thing amusing. Though a Big IT architect, trying to code up small-company software, is going to be a fish out of water. He still might have been a good Big IT architect.

    JMO

  • woah! (unregistered) in reply to JR
    Anonymous:

    RayS:
    OK, ignoring the apparently overrated talents of this guy, I have to admire the way that he's built up something almost like a cult around himself.

    Am I alone in now planning to set myself up in a similar manner? I think that it might help to start wearing a robe and crown or something. Perhaps bribe a few cheap people to act as disciples for a short while until it catches on.

    From now on I'll be known as "The Sultan of SQL" to my underlings.

    More like Viceroy of VB.

    !!! LOL !!!

  • (cs) in reply to rxd
    Anonymous:

    The WTF is not in the long names, although that can be annoying too. Look at the logic of that code. Ever heard of short-circuiting of logical operations? This code completely suppresses it. And yes, it deserves the WTF.



    Yes, because as we all know, changing the code so that it is better optimized it is a Good Idea. Especially when it's a microoptimization, we haven't run profilers on it, and we haven't even looked at the context it's being used in to determine how frequently it's called. The fact that the change would (IMO) hurt readability only serves to seal the case in favor of optimizing it.
     
    (I'm being somewhat facetious here, especially because a properly indented bigLongStringThatIDon'tWantToHitBackToFindOutWhatItIs && withTheActualFunctionCallsRightHere && asYouAreSuggesting is not too much harder to read than the version with separate bools. That said, I *do* think the version with separate bools is easier to read. The difference would be much less if the names were a bit shorter (but the guy who said he wants 8-character identifiers back is, IMO, nutso; I only need point you to 'umount' for a demonstration of the type of annoyance that can cause), but even then I think it'd be improved with separate variables, mostly because it makes the purpose of each clause explicit.)


  • (cs) in reply to biziclop

    biziclop:
    This WTF is pretty self-documenting. Nobody in their right minds would call anyone "Wizard" if they had the slightest idea of what he was doing.

     

    My guess is that this java wizard is actually a java alchemist, who occationally makes something useful, but it's usually the some-thing-not-so-useful came out of it most of the time.

    Documenting the code is a good practice, but this seems to overkill.

    Still, good saturday-morning laugh.. hehe..

  • yeah right (unregistered) in reply to emurphy

    import static com.corp.Permissions.*;

    public boolean hasPermissions(User user, Permission ... permissions);

    if(authorizer.hasPermissions(user, CompleteClosing, InitializeClosing, CompleteApproval)) {
        // foo
    }

  • (cs)

    Might have retired? That sounds a bit like when was like in highschool when I accidentally set a girls hair on fire and then decided to change schools because i was "asked to leave" by the principal.... some might say i also retired from that school. 

  • (cs)

    While the prolific names are a lesser evil compared to the inscrutable, indecipherable garbage of which a lot of selfish programmers are guilty, I've found that people who use eight-word variable names and method names are usually doing it to get out of the responsibility of having to document those variables and methods.  They just try to put the entire "documentation" into the name.

  • (cs) in reply to rmg66
    rmg66:

    Right On!

    What is up with the trend of younger programmers to try name everything with a sentence!

    Keep the names as short as possible. I'm trying to read code, not a novel. If more clarity is needed, write a frikin' comment!

    I long for the days of the 8-charactor limit on names...

    PS_1: InsteadOfCamelCasing, lets_all_try_to_use_the_underscore. Much_easier_to_read!

    PS_2: And Just because spaces are technically allowed nowadays doesn't mean you have to use them.

    Sheeeesh!

     


    Oh, Brother! Let me know when you get your degree. Then send me your resume so I can call you in for an interview and BITCH-SLAP you up the butt.

    CamelCasing is easy to read. Underscores are for girls.
  • DaBookshah (unregistered) in reply to woah!
    Anonymous:
    Anonymous:

    RayS:
    OK, ignoring the apparently overrated talents of this guy, I have to admire the way that he's built up something almost like a cult around himself.

    Am I alone in now planning to set myself up in a similar manner? I think that it might help to start wearing a robe and crown or something. Perhaps bribe a few cheap people to act as disciples for a short while until it catches on.

    From now on I'll be known as "The Sultan of SQL" to my underlings.

    More like Viceroy of VB.

    Bahah, no-one has noticed that VB is the only language to get an evil-sounding title. Thing back to the viceroy in star wars, its well deserved too.

    vb = crap

  • (cs) in reply to EnterUserNameHere
    EnterUserNameHere:
    <

    CamelCasing is easy to read. Underscores are for girls.

    Finally_an_argument_that_is_useful. I'm_now_an_underscores_only_man. From_now_on_when_I_see_camel_case_I'm_fixing_it! Granted_there_are_only_a_handful_of_girls_programing_(exclusing_Paula). That_just_means_I_have_to_work_harder_to_attract_one.

  • Dazed (unregistered)
    Anonymous:
    As a result I am confident in announcing that to define 'sesquipedalian' without at least name-checking its etymology is a huge rhetorical WTF ... 

    Sesqui- (as anyone who's ever been to a sesquicentennial knows) means "one and a half" and -ped- is the same "foot" root you find in pedestrian.  Originally, 'sesquipedalian' just mean "a foot and a half long." 

    My on-topic comments rarely get reactions, but I post one deliberately silly sentence and get a whole stream of reactions .... ;-)

    If we're being pedantic, the word sesquipedalis was (I understand) used in Latin to mean literally one-and-a-half feet, but can you produce an example of sesquipedalian being used in English to mean that? I've never met it being used in other than the sense of verbose, even in eighteenth-century literature.

  • feckinEejit (unregistered)

    What I'd really like to know is why he's using a static variable,that can be accessed anywhere in the jvm via the classname, as a method parameter.  At best it adds no value, at worst it means that he has no idea how static variables work.
    In light of the rest of the post I get the sneaking suspicion that the latter is the case, and it makes me wonder whether this particular 'java wizard' meant for 'SpecificApplicationPermissions.CompleteClosingStep' to be an instance variable. 
    Whatever the case, he hasn't doco'd why he is being an apparent tit, which I suppose is another wtf.

  • dsfgsfgfds (unregistered) in reply to hank miller
    I'll take out of control camel casing rather than out of control underscoring:
     
    _z
    __z
    ___z
    _z_z__z
    _z__z
     
    Unfortunately, I've had to deal with code like this.  "__z" and "___z" are especially hard to tell apart.
  • [ICR] (unregistered) in reply to SwordfishBob

    "Their"
    i before e except after....oh wait...

    I have to agree though, I dislike American spellings a lot of the time. I do have a strange ability to switch between "color" when programming and "colour" when not though. I do a lot of UI work, and thus use a lot of Americanised graphical API's, so I just use "color" to be consistent.

  • Not the Java Wizard (unregistered) in reply to Kenton
    Anonymous:
    I assume when Alex says "functional code", what he really means is "procedural code".  There's a huge difference...


    Indeed. Yet again, the article is the WTF.

    And yes, misspellings in code annoy me, but sometimes you have to work with stuff that's already misspelled and keep using those misspellings. Sometimes, too, the articles on here are 're-created', so perhaps the misspelling is due to the submitter or editor.

    The Java code is great - I might have replaced 'hasPermissionTo' with 'may', but I found it obvious what the code does at first reading, which is extremely important IMO.

  • DZ-Jay (unregistered) in reply to Anonymous Coward
    Anonymous:
    boolean hasPermissionsRequiredToInitailizeClosingStep =
    currentInteractiveUser.HasSpecificPermission
    (
    SpecificApplicationPermissions.InitailizeClosingStep
    );

    I found the WTF! He spelt Initialize wrong.


    Maybe he meant that he needs permissions to be in Italy?

        -dZ.
  • DZ-Jay (unregistered) in reply to Anonymous
    Anonymous:
    Er, no. It's considered a Good Thing to write code that is easy to read.

    Excessive verbosity and superfluous sesquipedalianism are not, even in exceptional circumstances, admirable contributions to the legibility of ones programmatic endeavours, and one should be abstemious in the employment of such.



    Roget's Thesaurus? (nice touch, wink! wink!)

        -dZ.

    --
    CAPTCHA:  captcha
    wtf??

  • (cs) in reply to rmg66
    rmg66:
    PS_1: InsteadOfCamelCasing, lets_all_try_to_use_the_underscore. Much_easier_to_read!


    I'm not against CamelCase entirely - mostly because everything in Java already uses it. It's the really long identifiers in CamelCase that I don't like. I can just about tolerate ArrayIndexOutOfBoundsException, but anything longer than that, repeatedly, is just asking for eyebleed. Especially if it has, as pointed out, words that don't add anything remarkable, like "Required", "Interactive" and "Specific" here.

    And yep, a method's local variables should rarely be longerThanThis and loop counters, temporary values, etc. should not really go beyond that 8-letter limit, lowercase, unless it's really warranted.

    Anyway, let's compare:

    "Array index... out of bounds." Got that. Java library designers get to the point. Good for them.

    "Has permissions required... to complete... approval... step." Why not "canApprove"? Someone noted that "has" is used consistently here; why not use consistently "can" to mean "has permissions for"? (Think of Hungarian warts, when used properly.) "To complete the approval step" is corporate speak that's not likely to get past a book editor, and the wording "approval step" requires thinking of the entire structure of the program rather than the task at hand - and here's the notable thing, we're not doing any other "approvals" here. (If we were, we could use canApproveBilling and canApproveShipping or whatever.) So, "can approve".


  • UTU (unregistered) in reply to DaBookshah
    Anonymous:
    Anonymous:
    Anonymous:

    RayS:
    From now on I'll be known as "The Sultan of SQL" to my underlings.

    More like Viceroy of VB.

    Bahah, no-one has noticed that VB is the only language to get an evil-sounding title. Thing back to the viceroy in star wars, its well deserved too.

    vb = crap



    But you know that "Darth Debugger" is already taken :)
  • (cs) in reply to AbstraktMethodz
    Anonymous:
    how often are permissions not required, or specific, or the current user not interactive?  long names are find if they're needed.


    Current user can also be non-interactive.

    Ever heard of a rather amusing POSIX error ENOTTY, often reported by the operating system as "Not a typewriter"? (Though GNU C library seems to report a little bit more boring and accurate message "Inappropriate ioctl for device.") Basically, triggered when the application treats stdin/stdout (or any other file handle)  specifically as a terminal (attempting terminal controls via ioctl()) without realising it's actually reading from/writing to a pipe. A handy library call to find this out is isatty() in unistd.h.

    Though I hardly expect all this to be relevant in this case =)

  • (cs) in reply to dsfgsfgfds
    Anonymous:
    I'll take out of control camel casing rather than out of control underscoring:
     
    _z
    __z
    ___z
    _z_z__z
    _z__z
     
    Unfortunately, I've had to deal with code like this.  "__z" and "___z" are especially hard to tell apart.


    That's not a problem with underscoring so much as it is just really freaking stupid. (Not to mention undefined in C and C++; names starting with a double underscore or underscore followed by a capital letter are reserved for implementation use.*) I mean, people can make identifier names like l1l11ll1 and ll111l11 or O0OO0 O000OO that are just as hard, but I haven't heard any complaints that identifiers allow numbers in them.

    I think if you went through and replaced all camelCasing with underscoring code would improve in readability. I don't think it would help tremendously, because shorter identifier names are pretty readable in camel casing.

    (I also think this particular example would be almost as hard to deal with as __z and ___z.)

    * Contrary to popular myth, my reading of the standard is that names starting with an underscore then number or underscore then lowercase letter are legal.
  • (cs) in reply to EvanED
    EvanED:
    I mean, people can make identifier names like l1l11ll1 and ll111l11 or O0OO0 O000OO that are just as hard, but I haven't heard any complaints that identifiers allow numbers in them.

    Who needs digits? Just mix lowercase L with uppercase i to get names like IIllIlII and llIIllII. Best used in boolean "or" expressions (in C-like languages):
    lIIllIIlI = IIllIlII || llIIllII;

  • (cs) in reply to John Melville
    Anonymous:

    I think the WTF is that this is the second system we know about that the "Java Wizzard" has had to abandon, and who knows how many more.  You can get away with poor architecture until the code gets to a certian size (in my experience 7-10K LOC in C family languages.)  At that point bad code gets to brittle to work with.

    All C programs are ONE line. As are all HTML pages.

Leave a comment on “The Java Wizard”

Log In or post as a guest

Replying to comment #:

« Return to Article