Oh Christ, I'm doomed....

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

  1. Wicked Uncle Nigel

    Simon Wilson Guest


    long island_ice_tea();

    I'm bored, ok?
     
    Simon Wilson, Sep 28, 2010
    #21
    1. Advertisements

  2. Wicked Uncle Nigel

    prawn Guest

    prawn, Sep 28, 2010
    #22
    1. Advertisements

  3. Wicked Uncle Nigel

    Pip Luscher Guest

    Heh, yes, I had souece code that used variables i, s & t throughout
    once. And had few comments "because I prefer my code that way".

    On the other hand, one thing that also annoys me is the attitude that
    "the code is self-documenting, so doesn't need comments." This is
    bollocks IMO. Self-documenting code names might tell a reader /what/ a
    function's doing but not necessarily /why/ the **** it's doing it,
    especially where it is being called. True that comments can fail to
    get updated when the code changes, which is possibly worse still,
    mind.

    And don't get me started on the morons who try to cram as much code
    vertically as possible: there's a reason that things like manuscripts
    used to be typed double-spaced.

    And while we're at it...
     
    Pip Luscher, Sep 28, 2010
    #23
  4. Wicked Uncle Nigel

    Ace Guest

    Quite so, and it's equally, if not more, fallacious, when people say
    "the spec is in the program comments, I don't need a separate
    document."

    If I had a penny for every legacy program I've had to retro-specify...
     
    Ace, Sep 28, 2010
    #24
  5. Wicked Uncle Nigel

    M J Carley Guest

    A good way to drive the point home to a student is to point at their
    code and ask `What does that line of code do?'
     
    M J Carley, Sep 28, 2010
    #25
  6. Wicked Uncle Nigel

    darsy Guest

    you'd probably have about 78 pence.
     
    darsy, Sep 28, 2010
    #26
  7. Wicked Uncle Nigel

    Ace Guest

    <recounts>

    Yea, summat like that.
     
    Ace, Sep 28, 2010
    #27
  8. Wicked Uncle Nigel

    darsy Guest

    <fx: my mum>
    If I've told you once, I've told you a million times not to
    exaggerate.
    </fx>
     
    darsy, Sep 28, 2010
    #28
  9. Wicked Uncle Nigel

    Pete Fisher Guest

    End Sub 'TFFT

    --
    +-------------------------------------------------------------------+
    | Pete Fisher at Home: |
    | Voxan Roadster Yamaha WR250Z/Supermoto "Old Gimmer's Hillclimber" |
    | Gilera GFR * 2 Moto Morini 2C/375 Morini 350 "Forgotten Error" |
    +-------------------------------------------------------------------+
     
    Pete Fisher, Sep 28, 2010
    #29
  10. Wicked Uncle Nigel

    CT Guest

    Yes, but then you can get the stupid situation of code being peppered
    with ridiculous comments such as:

    i++; // increment
     
    CT, Sep 28, 2010
    #30
  11. Wicked Uncle Nigel

    Jim Guest

    The trouble is that when you've just written something it's all in your
    head and you can answer such a question quite easily.

    Ideally you'd make them pass bits of code around between groups or make
    them do maintenance work on their own code after some months doing
    something else.

    I think it's only when you've had to try and figure out a hairy ball of
    cruft written by someone else that you really understand the importance
    of documentation. I'm not sure there's enough time for students to learn
    this kind of mindset.
     
    Jim, Sep 28, 2010
    #31
  12. Wicked Uncle Nigel

    M J Carley Guest

    Actually, they very often can't, because they haven't thought out what
    they're doing *before* they start typing.
    The problem I have is getting them to properly test small fragments of
    code before including them in the grand design.
     
    M J Carley, Sep 28, 2010
    #32
  13. Wicked Uncle Nigel

    Pete Fisher Guest

    Get them to read Chapter 7 of "The Olduvai Imperative" by DeGrace and
    Stahl.
    --
    +-------------------------------------------------------------------+
    | Pete Fisher at Home: |
    | Voxan Roadster Yamaha WR250Z/Supermoto "Old Gimmer's Hillclimber" |
    | Gilera GFR * 2 Moto Morini 2C/375 Morini 350 "Forgotten Error" |
    +-------------------------------------------------------------------+
     
    Pete Fisher, Sep 28, 2010
    #33
  14. Wicked Uncle Nigel

    Jim Guest

    Well, that sounds like a question of lack-of-design rather than
    lack-of-documentation. Or is that the same thing?

    I guess you've tried getting them to write psuedocode as comments first?
     
    Jim, Sep 28, 2010
    #34
  15. Wicked Uncle Nigel

    M J Carley Guest

    Pretty much, for the kind of coding we're talking about.
    I've tried asking them to show me the equations. They often try to
    implement those in their heads.
     
    M J Carley, Sep 28, 2010
    #35
  16. Wicked Uncle Nigel

    Ace Guest

    Yes.

    Although there's a time and a place for ad-hoc or experimental
    programming, of course, but the key is to recognise it for what it is
    and ensure that once the programming is done, a proper specification,
    or detailed description if you prefer, is created.

    Any thorough QA/Validation process should confirm that a spec exists,
    and that it is correct and up-to-date, before putting a new program
    into production.
     
    Ace, Sep 28, 2010
    #36
  17. Wicked Uncle Nigel

    Jim Guest

    How do you create the spec? Is it out of thin air? Where is the thinking?
     
    Jim, Sep 28, 2010
    #37
  18. Wicked Uncle Nigel

    Ace Guest

    Look, if you've never done this type of programming, I'm not about to
    try and explain how, but yes, it's entirely possible to make up a
    program as you go along. And sometimes it can shortcut software
    development quite significantly. Not _always_ good, but if it's done
    with due diligence and proper post-hoc documentation, it can produce
    impressive results.

    http://en.wikipedia.org/wiki/Extreme_programming explains some of the
    ideas.
     
    Ace, Sep 28, 2010
    #38
  19. Wicked Uncle Nigel

    CT Guest

    Indeed. But Extreme Programming is just it's fancy post-2000 name.
    I've been doing that since the early 80s when it was just known as
    Making It Up As You Go Along.
     
    CT, Sep 28, 2010
    #39
  20. Wicked Uncle Nigel

    crn Guest

    Or perhaps more relevant:
    C++; /* increment C but use the original */
     
    crn, Sep 28, 2010
    #40
    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.