Oh Christ, I'm doomed....

Discussion in 'UK Motorcycles' started by Wicked Uncle Nigel, Sep 27, 2010.

  1. Wicked Uncle Nigel

    Ace Guest

    Hehe. You're not wrong.
     
    Ace, Sep 28, 2010
    #41
    1. Advertisements

  2. Wicked Uncle Nigel

    M J Carley Guest

    I have had someone not be able to tell me why they were incrementing
    the variable.
     
    M J Carley, Sep 28, 2010
    #42
    1. Advertisements

  3. Wicked Uncle Nigel

    Jim Guest

    Ah, right you are. I misread your post, we are talking at cross purposes
    again. I was actually going to suggest TDD as a possible solution to MJC.
     
    Jim, Sep 28, 2010
    #43
  4. That is now a euphemism. If I do it, does it get bigger?
     
    Stumpy McFall, Sep 28, 2010
    #44
  5. Wicked Uncle Nigel

    darsy Guest

    oh, I can believe it.

    What's ludicrous is when they can't tell you why they're trying to
    increment a constant.
     
    darsy, Sep 28, 2010
    #45
  6. Wicked Uncle Nigel

    darsy Guest

    imagine that.
     
    darsy, Sep 28, 2010
    #46
  7. Wicked Uncle Nigel

    Catman Guest

    To make it bigger, DUR!

    --
    Catman MIB#14 SKoGA#6 TEAR#4 BOTAFOF#38 Apostle#21 COSOC#3
    Tyger, Tyger Burning Bright (Remove rust to reply)
    116 Giulietta 3.0l Sprint 1.7 GTV TS GT 3.2 V6
    Triumph Sprint ST 1050: It's blue, see.
    www.cuore-sportivo.co.uk
     
    Catman, Sep 28, 2010
    #47
  8. Wicked Uncle Nigel

    darsy Guest

    "more", FFS.
     
    darsy, Sep 28, 2010
    #48
  9. Wicked Uncle Nigel

    Catman Guest

    ******

    --
    Catman MIB#14 SKoGA#6 TEAR#4 BOTAFOF#38 Apostle#21 COSOC#3
    Tyger, Tyger Burning Bright (Remove rust to reply)
    116 Giulietta 3.0l Sprint 1.7 GTV TS GT 3.2 V6
    Triumph Sprint ST 1050: It's blue, see.
    www.cuore-sportivo.co.uk
     
    Catman, Sep 28, 2010
    #49
  10. Wicked Uncle Nigel

    Simon Wilson Guest

    I knew a guy that used to write (really bad) 8085 assembler. Every
    single line had a comment, that was just the mnemonic, expanded.

    MVI A, 3 ;Move 3 into the accumulator

    etc.
     
    Simon Wilson, Sep 28, 2010
    #50
  11. Wicked Uncle Nigel

    Ben Guest

    When I code review the standard is every public method must have a
    comment that describes what the method does, how it does it, and how it
    is to be used. I don't care about comments within the method, if the
    code doesn't have that, and an equivalent class level comment, it gets
    rejected. As far as the code within methods and class design, I have a
    bunch of automated tools that run on build servers that check for best
    practise, anti-patterns, house style, security weakness, etc. Not
    infallible, but take a load off the manual code reviews.

    Doesn't make a lot of friends with new developers on my teams, but they
    soon get beaten into shape and without fail they've all said ultimately
    it's made them better developers <proud>.
     
    Ben, Sep 28, 2010
    #51
  12. Wicked Uncle Nigel

    Ben Guest

    My guys have to produce very high level software designs for me before
    they can start. I don't expect detailed UML models and the like, but a
    rough overview of stuff to find the rabbit holes first.
    Test driven development. You must write a unit test before you write
    the code. Test is based on the acceptance criteria for the code, code
    is then written to pass the test.
     
    Ben, Sep 28, 2010
    #52
  13. Wicked Uncle Nigel

    M J Carley Guest

    For me that test is `does it produce the right list of numbers' (which
    will often be generated by another piece of code).
     
    M J Carley, Sep 28, 2010
    #53
  14. Wicked Uncle Nigel

    darsy Guest

    bah.
     
    darsy, Sep 28, 2010
    #54
  15. Wicked Uncle Nigel

    Ben Guest

    Perfectly reasonable test. Exercises the other piece of code,
     
    Ben, Sep 28, 2010
    #55
  16. Wicked Uncle Nigel

    M J Carley Guest

    I once had a fair row with a student who believed that testing by
    trying to break the code was psychologically wrong. God save me from
    self-esteem.
     
    M J Carley, Sep 28, 2010
    #56
  17. Wicked Uncle Nigel

    zymurgy Guest

    In the source I looked at :

    blah ... blah ;now starts the clever bit ...

    Paul.
     
    zymurgy, Sep 28, 2010
    #57
  18. Wicked Uncle Nigel

    zymurgy Guest



    Nice.
    I liked this

    // Dear maintainer:
    //
    // Once you are done trying to 'optimize' this routine,
    // and have realized what a terrible mistake that was,
    // please increment the following counter as a warning
    // to the next guy:
    //
    // total_hours_wasted_here = 32

    from this

    http://stackoverflow.com/questions/...ment-in-source-code-you-have-ever-encountered

    Paul.
     
    zymurgy, Sep 28, 2010
    #58
  19. Using the patented Mavis Beacon "Hunt&Peck" Technique, zymurgy


    Hah! Like it. I quite recently added:

    * This doesn't work for transaction dates before
    * Thursday, 14 September 1752.

    to a piece of date-handling code. (Us COBOL guys are a tad sensitive
    about date limitations...).

    I also had a section of code marked:

    * Danger, Will Robinson! This doesn't work if one of the
    * replaced characters appears in a replacement string.

    but I decided that was sloppy, and fixed the restriction instead.
     
    Wicked Uncle Nigel, Sep 28, 2010
    #59
  20. Wicked Uncle Nigel

    spike1 Guest

    Mine just made the border cycle colours and produce a high pitched whine by
    outing to the border/sound port. Once I'd done that I added a conditional
    that detected when the caps shift key was pressed so it'd return to BASIC.
    (otherwise you had to reset the machine)
    Apart from a little bit of computer game pokery (found and disabled the
    colour card anti-piracy thing from jetset willy), that's as far as my
    machinecoding went (I used the op-codes in the back of the manual method
    too)
    --
    | |What to do if you find yourself stuck in a crack|
    | |in the ground beneath a giant boulder, which you|
    | |can't move, with no hope of rescue. |
    | Andrew Halliwell BSc |Consider how lucky you are that life has been |
    | in |good to you so far... |
    | Computer Science | -The BOOK, Hitch-hiker's guide to the galaxy.|
     
    spike1, Sep 29, 2010
    #60
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.