Slashdot Mirror


Technologies To Improve Group-Written Code?

iamdjsamba asks: "I've been working at my company as a programmer for about 4 months now, and it's apparent that the working methods could do with a refresh. Practices that we need to start changing are things like: non source-controlled changes that get uploaded to our website when they aren't ready; poor code commenting; and very little in the way of code reuse (if I write a class that could be useful to others, I have no easy way of telling everyone about it). I'm currently looking into ways to change this, and was wondering if anyone on Slashdot had experience of what's good and what's not?"

12 of 74 comments (clear)

  1. Wow. Quit now by BadAnalogyGuy · · Score: 5, Insightful

    You clearly don't have any managers or developers with any experience because the first thing that a bright manager or an experienced developer would do is install a source control system so that you don't end up in the kind of development shithole you've found yourself in.

    I'd recommend leaving for a company that's going to be around for more than a year.

    1. Re:Wow. Quit now by Anonymous Coward · · Score: 1, Insightful

      He may not have the option to just up and leave.

      The best thing you can do is get a source control system in place now. I'm assuming you aren't very senior at 4 months, so find a senior technical person to buy into it and then take it to your manager or team lead. Once people have to "sign off" on changes it is easier to establish a build process and testing and all of the rest of what you need.

      Since we don't know how large your team is, how many projects are involved, how large the codebase is, blah blah blah I can't really suggest anything more specific, but once you have a source control system that is actually used (and is enforced and bought into) then you can start fixing the rest of the problems you have with something appropriate for your size.

      If you can't get a source control system in place then you should move on as fast as you can find a new job, as the situation will never get any better.

  2. Easiest Solution... by CowboyBob500 · · Score: 2, Insightful

    ...for the first two (non-source controlled changes and lack of comments) is simply to tell all the developers that if they don't start doing this right now then they will be fired. Both of those things are individual problems and are some of the signs of a bad developer. If they're not prepared to improve their own personal precedures, show them the door...

    Bob

  3. Re: XP by Kithraya · · Score: 2, Insightful

    Maybe Extreme Progamming can help.

    No, Extreme Programming can't help anything except to drive decent/good programmers crazy, support lazy/untalented programmers, and cut everyone's productivity in half (or worse).

    From experience with both, I highly recommend Scrum over XP any day of the week. I still hate Scrum (if I wanted to spend all of my time in meetings, I'd have become an accountant intsead of a programmer), but it's far better than XP.

  4. Create simple rules by Bragi+Ragnarson · · Score: 5, Insightful

    Create and enforce simple rules:

    1. Limit access to deployment server - only one or two person can access the server. Even better - create automatic deployment scripts that can be run on the server by those persons.
    2. Create staging server - where you deploy the code from repository. Do not deploy to production until you get a "go" from the client on staged version.
    3. Use Trac - it is a great piece of software that allows sharing information between developers. It provides wiki, ticket handling and repository viewer. And you can subscribe to wiki changes RSS so you can easily publish documentation about your classes.
    4. Use framework - frameworks usually come with a set of coding concepts that ease code reuse.
    5. Communicate findings about bad practices - just talk with your colleagues and tell them how can they write better code, with examples
    6. Introduce unit testing - person that writes unit tests gets a chance to look at own code the second time, which usually means improvements and cleanups.

    And you can always switch to Ruby on Rails. It is a good example of framework that helps doing things the right way and gets in the way when you want to do something wrong.

    --
    Bragi Ragnarson Lawful Good (I change the law when it's not good)
    1. Re:Create simple rules by mr.hawk · · Score: 2, Insightful

      And you can always switch to Ruby on Rails. It is a good example of framework that helps doing things the right way and gets in the way when you want to do something wrong.

      In my experience people will often go out of their way to do things the wrong way. Not saying having a platform that encourages/discourages certain practices is a bad thing but without a strong leadership setting and enforcing standards I believe the impact would be minimal.

  5. How can yo do group dev. without source control? by KillerCow · · Score: 4, Insightful

    How can you do group development without source control? Do you have bug tracking? Automated builds? A deployment policy / methodology / sign-off (or just someone who is responsible for it)?

    It sounds like you've got a group of undisciplined cowboys. Good like imposing structure on them.

    Source control, and comments are absolutely required. The only reason not to do them is due to personalities, and if you have that problem, you don't have good devs.

    Where is the team lead / project manager in all this? Start there. This is a leadership problem that is causing business problems (bad releases, poor quality control, poor communication, no reuse, no reproducibility, no records).

    Look into sucking down some things from XP. Daily stand-up meetings, unit testing, and continuous integration would be a good start. They sound bad to cowboys, but they solve these exact problems.

  6. You have a "people" problem, not a technology one. by JaredOfEuropa · · Score: 4, Insightful

    It sounds to me you first need to get a few simple processes in place: building, reviewing, testing, releasing. This is no rocket science; you can probably come up with a simple, workable process yourself with a few hours effort. The real challenge is getting the rest of the team to follow your rules. You are probably not in a position to force the others to work to procedures, so talk to the other devs and the team leader, put a few ideas on paper, and convince the team leader or PM to implement those ideas together with the team.

    I would not go with anything like XP or any other far-reaching methodology. No better way to make your programmers hate you and their jobs is to force them to do things completely different. Instead, once you got the basics right, get a few guys interested in XP (or whatever), ask them to do a pilot, and get them to share their experiences. Once you've shown that it works and you have a few others championing the methodology, convincing the rest will be a lot easier.

    --
    If construction was anything like programming, an incorrectly fitted lock would bring down the entire building...
  7. Lightweight Management by Brainix · · Score: 4, Insightful

    I firmly believe that social problems require social solutions, business problems require business solutions, technical problems require technical solutions, etc.

    Two of the issues that you mention are poor code reuse and a lack of code comments. These sound like human problems. Don't try to solve them with technology.

    Your company may benefit from a different project management style. As many people have mentioned, you may be interested in Agile (specifically Scrum and XP). Lightweight management, lightweight processes, and lightweight tools can breathe new life into a company.

    Good luck!

    --
    Raj Against the Machine! http://social-butterfly.appspot.com/
  8. Re:Code needs comments by s31523 · · Score: 3, Insightful

    Well, we can agree to disagree. I hope I didn't imply "don't comment" your code, because that is not what I propose. I propose smart, effective commenting. I like McConnell's book Code Complete, or Kernighan and Plauger's book The Elements of Programing Style. I merely agree with Kernighan/McConnell, et. al. on "Don't comment tricky code . . . Comments can't rescue difficult code" And as emphasized in The Elements of Programming Style, "Don't document bad code - rewrite it".

    And for what it is worth, McConnell references a study done by Lind and Vairavan that shows code with large numbers of comments also tended to have the most defects and tended to consume the most development effort.

    I stand by my advise to re-write code that is clunky and awkward and requires a 100 page essay to describe it.

  9. Re: XP by chromatic · · Score: 2, Insightful

    Yeah, all those terrible practices such as testing, refactoring, incremental design, customer involvement, coding standards, and ubiquitous language shared with the customer's business domain really get in the way of coding sometime.

  10. Re:Wow. Run away now by try_anything · · Score: 2, Insightful

    Running away is the right choice. Being a "fixer" for a dysfunctional team is a job for an experienced guy with credibility and authority, who will probably be very well paid for it. A junior guy who needs to "Ask Slashdot" will not be able to make a dent in his colleagues' sloppy practices. Besides, if you're an inexperienced coder, you should be learning from people who do things right, not struggling with crappy people who set a negative example and make it hard for you to follow good practices.