• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Reply to: code comments

Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "code comments"

Collapse

  • VectraMan
    replied
    Originally posted by zeitghost
    I did once peruse a book all about (apparently) Object Oriented Assembler.

    I put it back on the shelf.
    No reason at all why you can't do object oriented assembler. You don't need to be able to define types just to be object oriented (although it does make it a bit easier).

    In fact, most of the assembler I've ever done has been done inline in C++ functions.

    Leave a comment:


  • Moscow Mule
    replied
    Originally posted by jmo21 View Post
    last client co was like that but actually worse eg:

    // Fix for bug #196, Fix By Joe Bloggs, 12/12/03
    // old code line
    .... new code....
    // end Fix for bug #196, Fix By Joe Bloggs, 12/12/03
    The sooner we can implement CVS (or indeed Subversion - I don't care) for the iSeries the better.

    I once heard a sales line that the product I work on had more lines of code than the the leading competitor. What the sales guy didn't realise was that 50+% of them were commented out bugs....

    Leave a comment:


  • jmo21
    replied
    Originally posted by VectraMan View Post
    Current ClientCo. want me to write a comment block at the start of every function with a change history of that function. I've made the point that that's what source control is for, but they haven't changed the policy yet.
    last client co did that too

    Leave a comment:


  • jmo21
    replied
    Originally posted by minestrone View Post
    Actually the most annoying ones I find are..

    // Fix for bug #196, Fix By Joe Bloggs, 12/12/03

    I want to take people outside who do that and beat them about the head with a CVS manual until they know what a repository is used for.
    last client co was like that but actually worse eg:

    // Fix for bug #196, Fix By Joe Bloggs, 12/12/03
    // old code line
    .... new code....
    // end Fix for bug #196, Fix By Joe Bloggs, 12/12/03

    Leave a comment:


  • FSM with Cheddar
    replied
    Originally posted by Sysman View Post
    Post of the month!
    Thanks

    Leave a comment:


  • Sysman
    replied
    Originally posted by FSM with Cheddar View Post
    Someone I know cut and paste some code from the internet (including comments) and put it in production code. The comments were in Spanish, but he thought he better leave them in.

    During testing it was found that the code didn't work. After putting the Spanish comments through google translator it came out as "This code is an example, and I can't get it to work, not sure why"
    Post of the month!

    Leave a comment:


  • Sysman
    replied
    Originally posted by BrilloPad View Post
    Anyone read showstopper by steve cutler?

    I thought the arguments they had over code commentating were interesting.

    Essentially no-one commented their code except Steve Cutler. Their argument being comments get out of date. He updated his comments as he went along.....


    Dave Cutler.

    Show Stopper!: The Breakneck Race to Create Windows NT and the Next Generation at Microsoft

    I am told that he was, ahem, difficult to work with.

    Leave a comment:


  • Spacecadet
    replied
    Originally posted by NickFitz View Post
    Assembler isn't object orientated... no such thing as a class
    so many deaths that could have been prevented

    Leave a comment:


  • NickFitz
    replied
    Originally posted by Ruprect View Post
    If you're writing a class that long you need to be shot.
    Assembler isn't object orientated... no such thing as a class

    Leave a comment:


  • Gros
    replied
    At a previous client a spend three days investigating why one of their services had stopped working. I tracked it down to an SQL call embedded in the following try/catch code:

    Code:
    try{
            ...lots of real code here
    }catch(Exception e){
            // ignore, probably nothing
    }
    That comment certainly helped me

    Leave a comment:


  • Mich the Tester
    replied
    Originally posted by NotAllThere View Post
    That's why you love programmers so much, and sabotage the good ones!
    We're all interdependent. You make the bugs, I find them. If you don't make bugs, I expose the crap programmers and make your life easier. We all get rich. BOOMED!

    Leave a comment:


  • Mich the Tester
    replied
    Originally posted by NotAllThere View Post
    I write comprehensive code comments that add value, thus making the job slightly longer (kerc) but making it much easier for someone else to pickup the code and replace me, while I get on with something more lucrative and interesting.
    like posting on CUK?

    Leave a comment:


  • NotAllThere
    replied
    Originally posted by Mich the Tester View Post
    The last thing testers need is bug-free software.
    That's why you love programmers so much, and sabotage the good ones!

    Leave a comment:


  • NotAllThere
    replied
    Originally posted by DimPrawn View Post
    Question.

    Do you write comprehensive code comments, thus making the job much longer (kerrching) but making it much easier for someone else to pickup the code and replace you, or write cryptic comment free code that is quick to write (no contract renewal) but no bugger can pick it up (and get called back in on a new contract)?
    I write comprehensive code comments that add value, thus making the job slightly longer (kerc) but making it much easier for someone else to pickup the code and replace me, while I get on with something more lucrative and interesting.

    Leave a comment:


  • Mich the Tester
    replied
    Originally posted by BrilloPad View Post
    What is a unit test?

    Is that like compliation?
    Yes, spelt correctly.

    The last thing testers need is bug-free software.

    Leave a comment:

Working...
X