• 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 reviews

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 reviews"

Collapse

  • NotAllThere
    replied
    Originally posted by SpontaneousOrder View Post
    ...

    Why don't people fix mistakes when they see them?!
    Because they then get crucified by the forum regulars.

    Leave a comment:


  • MyUserName
    replied
    Originally posted by SpontaneousOrder View Post
    As we're on the topic of tulipy code and maintenance, etc - here's a gem of a javadoc for a class I just came across:

    /**
    * Retrieves disputed payments. Inaccurately named, since it is both
    * used by the ixxxxxxxx and the xxxxxxxxx!
    *
    * @author xxxxxxxx
    */


    Why don't people fix mistakes when they see them?!
    I would fix more but beating people to death is illegal
    Last edited by MyUserName; 7 January 2014, 14:10. Reason: Saw a mistake and fixed it

    Leave a comment:


  • SpontaneousOrder
    replied
    As we're on the topic of tulipy code and maintenance, etc - here's a gem of a javadoc for a class I just came across:

    /**
    * Retrieves disputed payments. Inaccurately named, since it is both
    * used by the ixxxxxxxx and the xxxxxxxxx!
    *
    * @author xxxxxxxx
    */


    Why don't people fix mistakes when they see them?!

    Leave a comment:


  • MyUserName
    replied
    Originally posted by eek View Post
    but that means you have to think. We want a simple answer which doesn't require thinking that we can take the mickey out of...
    Sorry, wrong forum.

    I meant that you should always inherit from a bass class and also add the base class as a member or you are clearly a cretin who should not be allowed near a keyboard - and NO! I don't care if you language does not support inheritance.

    Leave a comment:


  • eek
    replied
    Originally posted by MyUserName View Post
    How about 'use inheritance when it is appropriate and use composition when it is appropriate'?
    but that means you have to think. We want a simple answer which doesn't require thinking that we can take the mickey out of...

    Leave a comment:


  • MyUserName
    replied
    How about 'use inheritance when it is appropriate and use composition when it is appropriate'?

    Leave a comment:


  • d000hg
    replied
    Originally posted by minestrone View Post
    "favour composition over inheritance" but It is better that people are told just not to do it, it usually ends up a mess and adds only trouble. I would say most modern frameworks have all but stopped using inheritance as a means of integration.
    Being told not to do it is just plain daft, when nearly every class in the Java libraries inherits from something (if it is Java we're talking). Probably "if you're not sure, composite" is better advice.

    Leave a comment:


  • SpontaneousOrder
    replied
    Originally posted by minestrone View Post
    "favour composition over inheritance" but It is better that people are told just not to do it, it usually ends up a mess and adds only trouble. I would say most modern frameworks have all but stopped using inheritance as a means of integration.
    You mean "it usually ends up a mess" when used inappropriately? I'm not sure we should use yourself as the lowest common denominator of a developer's ability. Otherwise I'd better go and find a plastic lid with a spout on it for my coffee.

    Leave a comment:


  • SpontaneousOrder
    replied
    Originally posted by minestrone View Post
    Well you can talk the talk but none of that squares with what you wrote in this thread where you went off and rewrote some stuff on your own
    I spent 2 or 3 hours working, and then my code was reviewed (and approved btw). How does that not square?

    Leave a comment:


  • minestrone
    replied
    Originally posted by NotAllThere View Post
    Word to the wise, son. When you're in a hole, stop digging.
    "favour composition over inheritance" but It is better that people are told just not to do it, it usually ends up a mess and adds only trouble. I would say most modern frameworks have all but stopped using inheritance as a means of integration.

    Leave a comment:


  • minestrone
    replied
    Originally posted by SpontaneousOrder View Post
    With any luck in an Agile team you'll only have 1 numpty out of 5 or 6 developers. Pair programming and rotating developers among different aspects of the code base (rather than having guys sitting in silos) should mean apart from getting a team with all-round knowledge of the system as a whole, you also get to keep some quality control.

    You can still do the same on a non-agile project, so I'd suggest your example is more down to poor project management/company culture than anything else. Why would you let a single guy loose on his own unless you had reason to trust him? That's why they have 2 keys to launch the nukes!
    Well you can talk the talk but none of that squares with what you wrote in this thread where you went off and rewrote some stuff on your own

    Leave a comment:


  • SpontaneousOrder
    replied
    Originally posted by Unix View Post
    Not in my experience, depends on the team. The project I am working on was written by a chap who over engineered the code with over use of interfaces, inheritance, dependency injection etc that it takes as long to grep as if it were procedural spaghetti code with gotos. A good experienced developer knows when and where to use these valuable tools.
    With any luck in an Agile team you'll only have 1 numpty out of 5 or 6 developers. Pair programming and rotating developers among different aspects of the code base (rather than having guys sitting in silos) should mean apart from getting a team with all-round knowledge of the system as a whole, you also get to keep some quality control.

    You can still do the same on a non-agile project, so I'd suggest your example is more down to poor project management/company culture than anything else. Why would you let a single guy loose on his own unless you had reason to trust him? That's why they have 2 keys to launch the nukes!

    Leave a comment:


  • suityou01
    replied
    Originally posted by Unix View Post
    Not in my experience, depends on the team. The project I am working on was written by a chap who over engineered the code with over use of interfaces, inheritance, dependency injection etc that it takes as long to grep as if it were procedural spaghetti code with gotos.
    And this is how you can make yourself indispensable.

    Leave a comment:


  • Unix
    replied
    Originally posted by SpontaneousOrder View Post
    Maybe because you're in charge now and don't let them maintain their own codebase?

    Fortunately most projects I work on now are Agile, and the PM has no authority to dictate coding practises or to hire/fire from teams.
    Interestingly, without someone ignorant of modern technologies & techniques sticking their oar in, the code tends to be of a very high quality.
    Not in my experience, depends on the team. The project I am working on was written by a chap who over engineered the code with over use of interfaces, inheritance, dependency injection etc that it takes as long to grep as if it were procedural spaghetti code with gotos. A good experienced developer knows when and where to use these valuable tools.

    Leave a comment:


  • SpontaneousOrder
    replied
    Originally posted by tarbera View Post
    we wrote working code with no defects, how come any time I ask for even the smallest change now, test teams always find bugs from guys like you that know it all.??
    Maybe because you're in charge now and don't let them maintain their own codebase?

    Fortunately most projects I work on now are Agile, and the PM has no authority to dictate coding practises or to hire/fire from teams.
    Interestingly, without someone ignorant of modern technologies & techniques sticking their oar in, the code tends to be of a very high quality.

    Leave a comment:

Working...
X