I can't see the code



  • I just finished making a rather extensive change to a very complex chunk of logic. The logic, written by one of the original developers on the team (who can do no wrong)  contained numerous appropriate, but similarly named variables; all undocumented. Since it took me a very long time to decipher what everything did, I put in extensive comments - not just for what I did, but for the entire module - on what each variable and chunk of logic did and why.

    About a week after checkin, the original developer had updated my logic; he had removed all the comments, but left the code itself unchanged. When queried, he responded: the comments take up too many lines; I can't see (enough of) the code on screen to see what it's doing. Since the comments were in the way, I deleted them.

    So now the next poor schmuck that has to fix this jerk's code will need to do the same reverse engineering job I had to do - for nothing.



  • So not only can he do no wrong, he can prevent others from seeing that he does no wrong.

    Any modern IDE allows for comment collapsing so his statement is probably a mote point.

    I say go revert the code and check it in, with a statement such as "Comments re-added for clairty but can be collapsed for those that do not need them."



  •  I cannot believe there are no practices on code documentation at your workplace. They wouldn't even have to be official guidelines, just something that people would at least follow as a general rule-of-thumb?

    If I were put in that situation, I'd refuse to touch the code again until the documentation got put back in.



  • @KattMan said:

    Common sense

    This guy is fanatical about nonsense like this. I've learned, the hard way, to only raise issues once. If the customer chooses to ignore them, they will eventually pay me to do the work again.

    Sadly, the dumber the customer, the more they pay me for the same work. It bugs me, but as a business model, I make a pretty good living with it.

     



  • @snoofle said:

    he had removed all the comments, but left the code itself unchanged.
     

    What a complete dick.

    You can tell him I said that.



  • @snoofle said:

    @KattMan said:

    Common sense

    This guy is fanatical about nonsense like this. I've learned, the hard way, to only raise issues once. If the customer chooses to ignore them, they will eventually pay me to do the work again.

    Sadly, the dumber the customer, the more they pay me for the same work. It bugs me, but as a business model, I make a pretty good living with it.

    Did you at least refactor some of the names of the undocumented variables so that their names at least coincided with their function?



  • @snoofle said:

    Since the comments were in the way, I deleted them.
    This is why I enjoy violent videogames. I could never get away with garotting people in real life.



  • @dhromed said:

    @snoofle said:

    he had removed all the comments, but left the code itself unchanged.
     

    What a complete dick.

    You can tell him I said that.

    I try not to agree with dhromed, but no matter how hard I tried, I failed. The guy's a complete dick.

    Does he wear a black helmet, and talk in a sort of heavy breathing, by chance?




  • It is things like this that lead to work place violence.



  • Cock-punch the belligerent ass-wipe.

    Can I ask, what was your response to him when he told you this? I would have asked him if he actually spent 30 minutes (or however long he had the file checked out for) doing nothing other than deleting helpful comments.



  • @C-Octothorpe said:

    Cock-punch the belligerent ass-wipe.

    Can I ask, what was your response to him when he told you this? I would have asked him if he actually spent 30 minutes (or however long he had the file checked out for) doing nothing other than deleting helpful comments.

    It can be done much faster, but they can be re-added much faster too.



  • @zelmak said:

    Did you at least refactor
    Of course. They're still similar, but so are their functions. I just documented them clearly so the next guy (possibly myself) wouldn't go nuts.

    Fortunately, I sort of saw this coming and so kept a copy of the file - with comments - outside of source control for MY future reference.



  • @TGV said:

    Does he wear a black helmet, and talk in a sort of heavy breathing, by chance?

     

    "I can't breathe in this thing!"

     

     



  • @C-Octothorpe said:

    Can I ask, what was your response to him when he told you this?
     

    He is from - offshore. I laughed at him. He didn't get why. I have learned not to waste my breath on explanations as this particular excuse for humanity is incapable of comprehension. 

    OTOH, I've had to re-do the same work this guy has done - several times - on each of several projects - because of stuff like this, so as much as I hate this guy, his incompetence alone is managing to extend my contract by possibly years.

     



  • @snoofle said:

    as much as I hate this guy, his incompetence alone is managing to extend my contract by possibly years.

    That's what I like about you: you're a cup half-full kind of guy.

    When you have lemons, make lemonade. Or in your case, when you have off-shore developers, soak the client for all they're worth. That is, at least until the checks start bouncing.



  • @C-Octothorpe said:

    @snoofle said:

    as much as I hate this guy, his incompetence alone is managing to extend my contract by possibly years.

     

    That's what I like about you: you're a cup half-full kind of guy.

    When you have lemons, make lemonade. Or in your case, when you have off-shore developers, soak the client for all they're worth. That is, at least until the checks start bouncing.
     

    @Cave Johnson said:

    When life gives you lemons, don't make
    lemonade. Make life take the lemons back! Get mad! I don't want your
    damn lemons, what am I supposed to do with these? Demand to see life's
    manager! Make life rue the day it thought it could give Cave Johnson
    lemons! Do you know who I am? I'm the man who's gonna burn your house
    down! With the lemons! I'm gonna get my engineers to invent a
    combustible lemon that burns your house down!

     



  • @snoofle said:

    @C-Octothorpe said:

    Can I ask, what was your response to him when he told you this?
     

    He is from - offshore. I laughed at him. He didn't get why. I have learned not to waste my breath on explanations as this particular excuse for humanity is incapable of comprehension. 

    OTOH, I've had to re-do the same work this guy has done - several times - on each of several projects - because of stuff like this, so as much as I hate this guy, his incompetence alone is managing to extend my contract by possibly years.

     

    You might try a passive-aggressive approach. Repeated emails like "What does 'xx14 = xx14 * y4' do?" With no context...



  • @snoofle said:

    @C-Octothorpe said:

    Can I ask, what was your response to him when he told you this?
     

    He is from - offshore. I laughed at him. He didn't get why. I have learned not to waste my breath on explanations as this particular excuse for humanity is incapable of comprehension. 

    Perhaps he's thinking the same thing about you.  "How is it snoofle can't just look at the code itself and understand what it's doing without a bunch of extraneous comments in the way?"

    We had a guy like this who wasn't from "offshore".  His mantra was "the code is its own documentation", bolstered by the knowledge that no comment or in-house man page will be updated when someone changes the actual code.  They made him a "system architect" so that instead of writing obscure code he could just issue obscure policies recommending that everyone else write obscure code.

     



  • @ASheridan said:

    I cannot believe there are no practices on code documentation at your workplace.

    I can, solely based upon historical evidence concerning workplace practises at snoofle's current location: it's a cryin' talkin' sleepin' walkin' livin' WTF. I'm surprised Alex hasn't created a new catagory of "The Koala Snoofle Saga" to collate all his tales.

    @da Doctah said:

    Perhaps he's thinking the same thing about
    you.  "How is it snoofle can't just look at the code itself and
    understand what it's doing without a bunch of extraneous comments in the
    way?"

    Even if he begins to entertain that question... it's a start.

    Granted he may not understand cause-and-effect between his composition and snoofle's confusion, but a spark of ponderance is a good sign.

     



  • @snoofle said:

    he had removed all the comments, but left the code itself unchanged. When queried, he responded: the comments take up too many lines; I can't see (enough of) the code on screen to see what it's doing. Since the comments were in the way, I deleted them

    Send a memo to management explaining that the RCA for lost productivity indicates that the developers need bigger monitors. Win-win!



  • @snoofle said:

    When queried, he responded: the comments take up too many lines; I can't see (enough of) the code on screen to see what it's doing. Since the comments were in the way, I deleted them.
    Tell him to use a smaller font. And while he's in there, change the colour of comments to (closely) match the background.



  • @snoofle said:

    Fortunately, I sort of saw this coming and so kept a copy of the file - with comments - outside of source control for MY future reference.


    Do you not trust him not to hack the repository and remove the comments from history?



  • @pjt33 said:

    Do you not trust him not to hack the repository and remove the comments from history?
     

    If he could, please have him work on the Subversion project. That's one of the things I really hate about it, that I can't undo the damage that inconsiderate developers cause by inserting all sorts of binary files (or even Word documents) in our repository.

    On the other hand, they do like their documentation at Subversion, which is claimed as a reason why it hasn't been implemented after the first request for it came up in 2001.

     



  • @Mason Wheeler said:

    @C-Octothorpe said:
    When you have lemons, make lemonade.
    @Cave Johnson said:
    When life gives you lemons, don't make
    lemonade. Make life take the lemons back! Get mad! I don't want your
    damn lemons, what am I supposed to do with these? Demand to see life's
    manager! Make life rue the day it thought it could give Cave Johnson
    lemons! Do you know who I am? I'm the man who's gonna burn your house
    down! With the lemons! I'm gonna get my engineers to invent a
    combustible lemon that burns your house down!
    Ha! Cave Johnson was the first thing I thought off when I saw the lemonade reference.

    The extra comments they appear to have added for the 'community test chambers' are even crazier than the ones before.

     



  • @KattMan said:

    a mote point.
     

    That's the one in God's Eye, right?

     



  • @Cassidy said:

    it's a cryin' talkin' sleepin' walkin' livin' WTF
     

    ... and a hard-knock life

     


  • Winner of the 2016 Presidential Election

    @oheso said:

    That's the one in God's Eye, right?

    No, the Isle of Faces is in God's Eye. Harrenhal is just north.



  • @C-Octothorpe said:

    When you have lemons, throw a lemon party!

    FTFY



  • @joe.edwards said:

    No, the Isle of Faces is in God's Eye. Harrenhal is just north.
     

    Look harder.  I'm sure that you will find that [url=http://news.larryniven.net/biblio/display.asp?key=96]the Mote[/url] is a G2 yellow dwarf star [url=http://www.chronology.org/pournelle/ic_star-map.html#map3]approximately ten parsecs from New Caledonia[/url],capital of the trans-coalsack sector.

     



  • joe.edwards was probably just confused because he thinks of it as Murcheson's Eye.



  • @Severity One said:

    @pjt33 said:

    Do you not trust him not to hack the repository and remove the comments from history?
     

    If he could, please have him work on the Subversion project. That's one of the things I really hate about it, that I can't undo the damage that inconsiderate developers cause by inserting all sorts of binary files (or even Word documents) in our repository.

    On the other hand, they do like their documentation at Subversion, which is claimed as a reason why it hasn't been implemented after the first request for it came up in 2001.

     

    The following situation actually happened:

    1. New contractor is hired
    2. New contractor half-reads documentation and manages to install TortoiseSvn and create a workspace on his machine (with get-latest and all)
    3. New contractor does not understand how Subversion works so he installs Subversion Server on his machine and puts the data folder in his newly created workspace (that is bound to the "real" Subversion server)
    4. New contractor commit his changes at the end of the day, pushing the data and config files of his own Subversion server to the shared repository

    Finding out what actually happened was lots of fun because of course the new contractor did not understand himself what he did and insisted that he followed the documentation.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.