Coding Standards

What's Hot
"Working" software has only unobserved bugs. (Parroty Error: Pieces of Nine! Pieces of Nine!)
Seriously: If you value it, take/fetch it yourself
0reaction image LOL 0reaction image Wow! 1reaction image Wisdom
«1

Comments

  • FelineGuitarsFelineGuitars Frets: 11769
    tFB Trader
    Well that is very off topic........amusing but a bit specialist.

    Many guitars have a re-sale value. Some you'll never want to sell.
    Stockist of: Earvana & Graphtech nuts, Faber Tonepros & Gotoh hardware, Fatcat bridges. Highwood Saddles.

    Pickups from BKP, Oil City & Monty's pickups.

      Expert guitar repairs and upgrades - fretwork our speciality! www.felineguitars.com.  Facebook too!

    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • dafuzzdafuzz Frets: 1522
    :D I liked that.
    All practice and no theory
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • FretwiredFretwired Frets: 24602
    Phil_aka_Pip .. very funny .. :-)

    Remember, it's easier to criticise than create!
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • Got bored before the end but my 2 personal peeves are unnecessary tight coupling and failure to separate concerns.
    ဈǝᴉʇsɐoʇǝsǝǝɥɔဪቌ
    0reaction image LOL 0reaction image Wow! 1reaction image Wisdom
  • GuyBodenGuyBoden Frets: 780
    edited October 2014
    "Don't worry, we'll just need to rewrite everything again on this next release, but there will be hardly any bugs, because this time we'll be using Improved Magic Scrum.............and I'll be ScrumMaster."
    "Music makes the rules, music is not made from the rules."
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • frankusfrankus Frets: 4719
    I'm a trained ScrumMaster ... been using Agile for about a decade and you don't know how unoriginal most "anti-scrum" comments are...

    I think I've heard that one from at least twenty ex-coworkers and at least 3 current co-workers.

    Do you know what they all had in common? They didn't have half an idea about what scrum is meant for (between them) ... having never been trained in it, worked with Agile consultants -- so basically it's the same bullshit as any other that gets foisted on grumbly developers by managers trying to get them to do something without whining.

    As for coding standards - that's easy - the tech lead enforces a house style with a tidy program and commit hooks on your version control system. Then you can save yourself the bother of getting exasperated or grumbling.
    A sig-nat-eur? What am I meant to use this for ffs?! Is this thing recording?
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • GuyBodenGuyBoden Frets: 780
    edited October 2014
    frankus said:
    I'm a trained ScrumMaster ... been using Agile for about a decade and you don't know how unoriginal most "anti-scrum" comments are...

    I think I've heard that one from at least twenty ex-coworkers and at least 3 current co-workers.

    Do you know what they all had in common? They didn't have half an idea about what scrum is meant for (between them) ... having never been trained in it, worked with Agile consultants -- so basically it's the same bullshit as any other that gets foisted on grumbly developers by managers trying to get them to do something without whining.

    As for coding standards - that's easy - the tech lead enforces a house style with a tidy program and commit hooks on your version control system. Then you can save yourself the bother of getting exasperated or grumbling.
    My fav waste of time was "Rational Rose UML. The Unified Modeling Language"
    "Music makes the rules, music is not made from the rules."
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • mellowsunmellowsun Frets: 2422
    You agile guys should have been at Waterall 2006, that was some conference. Proceedings here:

    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • mellowsunmellowsun Frets: 2422
    edited October 2014
    Problem with many shops doing Agile and TDD is that most of the tests look like this:

    public void shouldSetValue() throws Exception {
            MyInstance instance = new MyInstance();
            instance.setValue("Some value");
            assertThat(instance.getValue()).isNotEmpty();
            assertThat(instance.getValue()).isEqualTo("Some value");
        }



    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • monquixotemonquixote Frets: 17917
    tFB Trader
    You can do Scrum without doing TDD or XP. 

    My place does.
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • frankusfrankus Frets: 4719
    edited October 2014
    GuyBoden said:
    My fav waste of time was "Rational Rose UML. The Unified Modeling Language"
    UML is 7 different types of diagram used to communicate what's happening in a system, useful if you need to communicate that stuff...

    But Agile (and as part of that Scrum) is document-light - the reason being if you talk to people rather than email them documentation to read, you tend to get more stuff done. People don't read the documentation anyway, or if they do they get litigious and didactic about it.

    That said UML diagrams can save a lot of time, if used sensibly.

    I had a job in 2000 Comparing DSDM, Rational Unified Process, XP and ePrince - they were all shit, better than Waterfall which is basically the hierarchy of a company turned into a timeline : the clients shit on the salesman, the salesmen shit on the the managers, the managers shit on the business analysts, the business analysts shit on the software architects who shit on the lead tech/analysts who shit on the developers who shit on the ops people who shit on support who shit on the client.. it's only been around since the 70s and it never works - but at least everyone gets someone to shit on.

    These days I prefer to work in ISO9000, ITIL environments using Scrum or Agile properly, ideally wrapped in 6 Sigma process and I don't trust developers who think they're too cool for that ;) - work devops at a bank and you can't trust those people - they make very expensive mistakes and are usually too egotistical to own up to it even when presented with logs, strace, their commit history and test coverage.
    A sig-nat-eur? What am I meant to use this for ffs?! Is this thing recording?
    0reaction image LOL 0reaction image Wow! 1reaction image Wisdom
  • JalapenoJalapeno Frets: 6423
    Big fan of proper Agile, but rabidly anti Agile-hackers (people with no idea what they are doing or how to get where they need to be).

    One thing that bugs me at present - when the requirements baseline isn't maintained - how the blue blazes is a support team supposed to make sense of the original user stories and backlog, that has morphed umpteen time through sprints.  Who the hell can now establish what the system is supposed to do ? </rant>

    Also ... the rest of an organisation will likely be waterfall - Agile does need some sort of waterfall wrapper or it ends weeks ahead (or behind) the rest of a programme (or worse - other programmes)
    Imagine something sharp and witty here ......

    Feedback
    0reaction image LOL 0reaction image Wow! 1reaction image Wisdom
  • frankusfrankus Frets: 4719
    Jal, what do you mean the rest of the org?
    A sig-nat-eur? What am I meant to use this for ffs?! Is this thing recording?
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • mudslide73mudslide73 Frets: 3111
    Some great stuff in the documentation section.
    "A city star won’t shine too far"


    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • MyrandaMyranda Frets: 2940
    I don't see anything wrong with any of those conventions
    1reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • equalsqlequalsql Frets: 6252
    edited October 2014

    Here's a snippet from a mass of old ASP code that I was asked to maintain..

    I steadfastly refused to do so!   :-S

    While not tra.atEndOfStream
    x=tra.readline
    'if instr(x,k)>0 then
    aa(i)=dd(x)
    bb=split(aa(i),",")
    'Response.write("<br>"&bb(17))
    bbs=split(ucase(bb(17))," ")
    if bb(17)<>"" then
    got=false
    for j=1 to co-1
    if bbs(0)=cco(j) then
    got=true
    at=j
    j=co-1
    end if
    next
    if not got then
    cco(co)=bbs(0)
    at=co
    co=co+1
    end if
    got=false
    for j=1 to cccnt-1
    if bb(8)=cc(j) then got=true
    next
    if not got then
    cc(cccnt)=bb(8)
    ccn(cccnt)=right(bb(9),len(bb(9))-10)
    ccat(cccnt)=at
    cccnt=cccnt+1
    end if
    end if
    i=i+1
    'end if
    wend



      
    (pronounced: equal-sequel)   "I suffered for my art.. now it's your turn"
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • I was once asked what some C statement did, at an interview. It spread over 3 lines, was riddled with calls to functions which delivered results which were then passed into other functions or used as the subject of a switch statement after de-referencing. There were also nested if ... else clauses, and although it is likely that I could have made sense of it I just told the interviewer that anyone who wrote code like that shouldn't be hired. That kind of code usually isn't much more efficient than teasing it out a bit, and certainly would cost a lot to fix if there turned out to be a bug in it. I also remarked that if it became strictly necessary to use such "tight" coding for performance reasons, a little layout (whitespace) and helpful comments wouldn't come amiss. The interviewer said he'd never come across anyone else who refused to attempt decoding it. I got the job. Later on, I tried writing a nicely tight bit of C (not quite as obscure as the interview example, and neatly laid out with comments) ... it broke the Microtec C compiler!
    "Working" software has only unobserved bugs. (Parroty Error: Pieces of Nine! Pieces of Nine!)
    Seriously: If you value it, take/fetch it yourself
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • equalsqlequalsql Frets: 6252
    edited October 2014

    Apart from protecting their jobs, I never understand why people feel the need to use magic-numbers and variable names that you cannot search for.  My last phone call to a professor who's code I was asked to look at included the question ' what does the number 748 mean in line 463 of your code?'  The answer was ' Umm I can't remember... I think it  came out of a spreadsheet'

    Sometimes I really do despair  

    :(
    (pronounced: equal-sequel)   "I suffered for my art.. now it's your turn"
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • JalapenoJalapeno Frets: 6423
    edited October 2014
    frankus said:
    Jal, what do you mean the rest of the org?
    Huge organisation, mostly packaged s/w, big legacy, running waterfall programmes to fit with business transformation. Many different suppliers ...

    One ecommerce system running Agile/Scrum - alignment of dates/deliverables/interfaces becomes an issue.
    Imagine something sharp and witty here ......

    Feedback
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
  • IMO there are 2 classes of people who should be banned from coding:
    • Them that think they're so smart and that comments are for wimps that can't read the hex of the executable
    • Them that have a small but very basic grasp of procedural logic, but no idea of how to use the language. Some of these people are actually quite good hardware engineers 
    "Working" software has only unobserved bugs. (Parroty Error: Pieces of Nine! Pieces of Nine!)
    Seriously: If you value it, take/fetch it yourself
    0reaction image LOL 0reaction image Wow! 0reaction image Wisdom
Sign In or Register to comment.