Slashdot Mirror


When Smart Developers Generate Crappy Code

itwbennett writes "If you've ever worked on a team you can probably recall a time when, as a group, you produced work that was not as good as any one of you could have done on your own. Sarah Mei had this sort of sub-par teamwork experience, which she shared in her session at the O'Reilly Fluent Conference this week. Mei 'spoke about a time she worked on a team with really expert developers. Every one of them was someone whom you'd admire, who had previous written code that you and I would boast to have created. Yet, these smart people created modules that didn't talk to each other. And its quality was, to be kind, on the rotten side.' It's not an uncommon story, but why and how does it happen? The answer, says Mei, is that code quality 'is defined by its patterns of dependencies,' not all of which have equal weight. And, as it turns out, team communication is the heaviest dependency of all."

34 of 195 comments (clear)

  1. oh jeez; let's all discover agile again by rtfa-troll · · Score: 4, Funny

    people over processes; how deep.

    --
    =~ s,(.*),<sarcasm>$1</sarcasm>,g if any_point_you_wish();
    1. Re:oh jeez; let's all discover agile again by Anonymous Coward · · Score: 4, Funny

      Fix everything by having a 5 minute standup meeting for two hours every morning and then every two weeks drop everything and build a deliverable that isn't finished yet.

    2. Re:oh jeez; let's all discover agile again by 0racle · · Score: 4, Funny

      I wonder how many meetings we'll have this time around.

      --
      "I use a Mac because I'm just better than you are."
    3. Re:oh jeez; let's all discover agile again by ls671 · · Score: 4, Insightful

      You also need a lead developer who has the last word. Otherwise, forget about it.

      --
      Everything I write is lies, read between the lines.
    4. Re:oh jeez; let's all discover agile again by Comrade+Ogilvy · · Score: 3, Insightful

      I do not disagree. But when processes are so amateurish, as in the anecdotes provided in the fine article, then it always will devolve to people over processes in a way that is not enlightening. One of the main purposes of every flavor of formalized process is to enforce some minimum level of communication.

    5. Re:oh jeez; let's all discover agile again by Darinbob · · Score: 5, Funny

      8am daily standup meetings to discuss what you did the day before and what your obstructions are to prevent work getting done.
      12pm daily meetings to discuss what you've accomplished in the last 4 hours.
      2pm daily meetings with project owners to explaining that you're following industry standard processes so just remain patient.
      5pm daily meetings to plan what work you will get accomplished overnight before the 8am meeting.

      Meetings will continue until morale improves.

    6. Re:oh jeez; let's all discover agile again by khasim · · Score: 2

      But when processes are so amateurish, as in the anecdotes provided in the fine article, ...

      Emphasis on that. Crappy data leads to crappy conclusions. And her "data" is extremely crappy.

      From TFA:

      In another team of seven or eight people, developers were encouraged to do whatever they felt like ... which turned out to include, "Have every developer write code in a different language."

      I count at least two WTF's in there. You wouldn't build cars engineered around blind people would you?

      Also from TFA:

      The best of those indicators? The one that most commonly predicts quality results? Good team communication.

      So a baseball team or a football team with good communication should be able to crank out "quality" code. Wrong. And that gets back to the crappy examples she uses. Just because communication CAN be the biggest problem in a given situation does not mean that communication IS the biggest problem for all situations.

      Seriously, what programmer would not ask which language was being used? Or not have MORE questions when the answer was "everyone uses whatever they want to".

    7. Re:oh jeez; let's all discover agile again by Marxist+Hacker+42 · · Score: 3, Insightful

      Is it just me, or is the interface the job of the architect, not the code monkey?

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    8. Re:oh jeez; let's all discover agile again by jd2112 · · Score: 2

      At my last job I would have loved this light of a meeting schedule.

      --
      Any insufficiently advanced magic is indistinguishable from technology.
    9. Re:oh jeez; let's all discover agile again by pinkeen · · Score: 2

      Exactly, there is no democracy on this scale.

      There are a lot of desicions to be made when there is no superior solution - only different ones, which will affect future develeopment in distinct ways. And somebody has to make them arbitrarily.

      Some people just cannot understand that.

  2. Coding Architecture Models by Synerg1y · · Score: 4, Insightful

    Isn't this exactly what MVP, MVC, etc... are meant for?

    At that point it doesn't matter how crappy your code is, all it is is isolated to a single portion of a layer with inputs and outputs and relatively modularized as a result in regards to similar models.

    1. Re:Coding Architecture Models by hondo77 · · Score: 3, Interesting

      At that point it doesn't matter how crappy your code is, all it is is isolated to a single portion of a layer with inputs and outputs and relatively modularized as a result in regards to similar models.

      You're assuming that people actually put in that separation all the time. Just because you are using an MVC framework doesn't mean things are separated like they should be. Just like declaring something with "class" doesn't automatically make it (good) OO.

      --
      I live ze unknown. I love ze unknown. I am ze unknown.
    2. Re:Coding Architecture Models by i+kan+reed · · Score: 5, Informative

      No, and I have co-workers who I consider quite skilled, and none of them seem to know when to define an interface. Guys, enums and switches aren't replacements for subclasses.

    3. Re:Coding Architecture Models by WaywardGeek · · Score: 2

      Code architecture is key, as is a common coding methodology among the team. Brilliant coders often are loners, and if you put them on a team, each may do what they normally do and do their own thing. You'll have a program written in several different languages, and an integration nightmare.

      Here's an integration nightmare that continues to this day, thanks to lame computer language design. To reduce integration problems, a common architecture in EDA is to read a design into a common set of in-memory data structures, and to split up the extensive process of automating design implementation into several "tools". Each tool runs in sequence, moving the process forward, for example we run digital high level synthesis, then lower level technology mapping, placement, and then routing. They read from those common data structures, and write back to them. I have never seen a group succeed who did not use this architecture. The problem is how do you extend the objects in the common data structures so your tool can manipulate them? In C++, we use inheritance to extend the functionality of a class, but these shared common objects have already been instantiated by the time your tool runs, and they don't have your extensions. You can still inherit from there classes, but you'll have to copy all the objects to new objects of your subclasses to be able to use them, doubling the memory required. Alternatively, you could have a void pointer on each object in memory and use run-time hacks to cross-link them to your new extension objects, and throughout your code you wind up going back and forth through the void pointer. Various better systems are often employed, but they're all hacks to work around limitations in languages like C++, Java, D, and C#. If a team doesn't agree beforehand just how they are going to share objects and extend them, the effort is doomed before it begins.

      --
      Celebrate failure, and then learn from it - Nolan Bushnell
    4. Re:Coding Architecture Models by mbkennel · · Score: 2

      "You can still inherit from there classes, but you'll have to copy all the objects to new objects of your subclasses to be able to use them, doubling the memory required. "

      You might try a shared_ptr instead so you may have less need to copy the objects instead of a pointer to them.

      Or Lisp.

    5. Re:Coding Architecture Models by pclminion · · Score: 2

      Interfaces often make sense, but you can tell when somebody has gone interface-crazy when it is no longer possible, by simply looking at the source code, to determine what actually is going to happen -- instead, you're reduced to tracing the code in a debugger to see what actually goes on.

    6. Re:Coding Architecture Models by VortexCortex · · Score: 2

      At that point it doesn't matter how crappy your code is, all it is is isolated to a single portion of a layer with inputs and outputs and relatively modularized as a result in regards to similar models.

      You're assuming that people actually put in that separation all the time. Just because you are using an MVC framework doesn't mean things are separated like they should be. Just like declaring something with "class" doesn't automatically make it (good) OO.

      Furthermore, not everything can be separated into those classifications. Take your average "Web2.0" website for example: The components of the MVC are spread out across HTML CSS JS and back end code. Sometimes it makes sense to put some controls in the view. Blind adherence to paradigms as a core business strategy can lead to unsynergistic blue-sky thinking that leaves the best and brightest ideas out of the loop. The best game plan is to go the extra mile to make sure that movers and shakers can interface with your knowledge economy -- That's the fast track to empowering partnerships that stretch the envelope and benefit the bottom line results.

      P.S. You're welcome. Consider it payment in kind for helping me win design pattern bingo.

  3. Communication isn't the problem... by Stumbles · · Score: 3, Insightful

    if it were then projects like Linux would have collapsed a very long time ago.

    --
    My karma is not a Chameleon.
    1. Re:Communication isn't the problem... by Darinbob · · Score: 2

      Linux has been collapsing for nearly two decades now. The trick is to borrow ideas from judo so that when you get stuff done while falling.

      I think what's really happening is that Linux isn't aiming for perfect or best. It has something practical it wants to get done and there aren't long arguments over the best architecture to use. Compare to GNU Herd which had very lofty idealistic goals and lots of debate over the best says to proceed. Ultimately having something ugly that does the job will win over something beautiful that is unfinished.

  4. the basement dwellers hate people by alen · · Score: 5, Insightful

    they want to sit in a corner far from other people coding in silence
    they hate meetings and talking to people

    so what you get is code that only talks to itself

    1. Re:the basement dwellers hate people by Anonymous Coward · · Score: 5, Funny

      they want to sit in a corner far from other people coding in silence they hate meetings and talking to people

      And with good reason. Other people are annoying and I am immensely interesting to me.

  5. translation by Anonymous Coward · · Score: 3, Informative

    My team did not talk to each other and everyone went off and did their own thing. Then when it came time for integration it all went to hell...

    1. Re:translation by Grishnakh · · Score: 2

      This should be a good lesson about how group projects usually work in college; it's how all the ones I had worked out. One person does all the work, while the other person(s) claim credit and gets an equal grade even though they didn't do anything, or their contribution was very minor.

      IMO, they shouldn't have group projects in college classes at all, because they always wind up like this.

  6. Who says they were great coders? by Princeofcups · · Score: 3, Interesting

    Just because they name drop does mean they are great coders, only that they are great at self promotion. Who's to say that some silent but really competent coder wasn't responsible for the code they take credit for? I think what you saw was not "great coders can't work together," but instead, "great projects have many unsung heroes."

    --
    The only thing worse than a Democrat is a Republican.
  7. EGO, more than communication. by CaptnCrud · · Score: 2

    EGO, EGO, EGO. Every time I have seen this, at its heart, its ego. The just plain stupid notion that: "im the smartest person in the room, I dont need to confer with anyone cause im so good". I would rather work with 6 humble jr. dev's then 6 senior meglomaniacs any day of the week and twice on sunday. Sure the code quality is also going to be suspect but at least, if say a rewrite of a module is needed, people are willing to just do it rather than bitch about why its the other modules part because there work is just that good.

  8. maybe they just don't care about this project by TerraFrost · · Score: 4, Insightful

    Good code, it seems to me, isn't so much a reflection of someone's skill level as a developer in-so-much as it is a reflection of how much they cared about that particular project. Designing and architecting takes time. If you're a good dev but all you're aiming to do is write something that gets the job done here and now without regard for maintainability or scalability or anything... well that's how you get bad code. It seems to me.

  9. Re:I work in groups so it happens faster by Anonymous Coward · · Score: 3, Insightful

    A manager went to the master programmer and showed him the requirements document for a new application. The manager asked the master: ``How long will it take to design this system if I assign five programmers to it?''

    ``It will take one year,'' said the master promptly.

    ``But we need this system immediately or even sooner! How long will it take if I assign ten programmers to it?''

    The master programmer frowned. ``In that case, it will take two years.''

    ``And what if I assign a hundred programmers to it?''

    The master programmer shrugged. ``Then the design will never be completed,'' he said.

    -The Tao of Programming

  10. Excellent *individual* programmers by msobkow · · Score: 2

    They may have been excellent individual programmers capable of producing works of art on their own, but the mindset for working in a team environment is completely different from that required for individual project work.

    However, I blame not the developers, but the project management team for failing to realize that even the brightest people in the world need to be organized and have to structure their code properly to be effective. Far too often management takes the attitude that if they just hire "the best" and let them loose, miracles will happen.

    Well, they don't.

    In fact there is an entire book written about such management mistakes, in particular the fact that the more people you add to a project, the more effort and time it takes in total to complete. A little known text called "The Mythical Man-Month."

    Perhaps you've heard of it?

    If you haven't, you definitely need to read it.

    --
    I do not fail; I succeed at finding out what does not work.
  11. I call BS by bored · · Score: 4, Insightful

    While those things she list are important, it sounds like this woman actually worked in an environment where the low level architecture wasn't controlled or defined by someone with any experience with long term maintenance.

    There are a lot of really good coders, but the skills required to properly define high level interfaces between subsystems is _NOT_ something all of them posses, even though the vast majority either think they do, or fail to understand the importance of defining project API's for isolation.

    This isn't to say that people with the term "architect" in their titles get it any better. In many cases they tend to get it wrong because they are too decoupled from the actual coding portions.

    Its also something that is nearly impossible to bolt on after the fact. The last thing your project manager wants to hear, is that 3/4 of the project needs to be rewritten (or refactored to the point its not recognizable) because of some stupid problem with component isolation.

    So, how to you identify bad architecture?

    If your team can't isolate and troubleshoot the vast majority of bugs quickly (less than a hour).

    If the common answer to features, is that some large portion of the system needs to be rewritten or refactored.

    If the system is brittle, and errors aren't contained to smaller subsystems.

    If requirements changes tend to touch a lot of different system components.

    The list goes on, but I firmly believe that bad architecture is the problem in a lot of cases where people claim crappy code, or failures because the product is buggy or is not agile enough to respond to market needs.

  12. Collective agreement by Todd+Knarr · · Score: 4, Insightful

    One of the most important things when it comes to avoiding a group creating a mess is to have collective agreement on the architecture and design and the divisions and interfaces between components. Everybody doesn't have to agree that this way's the best way, but they have to agree that it's acceptable and they'll write to it. This goes both ways: you have to acknowledge that you'll follow the design even when you don't agree with it, and you also have to acknowledge that the other guy (who isn't getting his way) has valid points even though you're doing it your way instead of his.

    NB: the above is why my mantra is "I am not a rock star. I am a professional.". I'll argue vehemently for what I think is the best way to do things, but in the end I need to write code that fits well with the rest of the system even if that code isn't technically "the best way".

  13. Re:I work in groups so it happens faster by khasim · · Score: 4, Insightful

    But WHY does it take longer when you add more people? The answer is "communication channels".

    And they follow the formula of (n*(n-1))/2
    So 1 person has 0 communication channels to maintain.
    3 people have 3 channels.
    5 people have 10 channels.
    And if the EXACT same message is not present upon every one of those channels then problems start.

    So the key is NOT to focus on 10 communication channels between 5 people but to focus on reducing the scope as quickly as possible so that fewer people are needed. And the means that your best programmers can spend more of their time programming and less on maintaining communication channels.

  14. Skilled in what exactly? by PCK · · Score: 2

    Because it certainly does n't sound like it is in object orientated program design. Being able to code is just one part of being a skilled programer, being a "rockstar" style coder may seem impressive but banging out pages of code at a time is never a good sign and I say this as someone who spent a good five years working this way.

    It is only when you have to maintain your own code for years that you start to step back and think more because at the end of the day you can not code your way out of trouble, well you can but the result is never pretty or maintainable.

    Personally I find that I spend around 25% thinking, 25% coding, 25% testing and 25% documenting any one problem. The 50% spent testing and documenting is n't fun by anymeans but it's a necessary discipline. It's all about taming your inner coder and I think this is what the majority of these frameworks do indirectly by creating road blocks so that you have to hit the breaks every so often.

  15. Re:I work in groups so it happens faster by Hognoxious · · Score: 2

    Unless the division of tasks is done in a pathologically bad way, not everybody has to talk to everybody else about everything.

    Still, kudos for not [mis]using "exponential".

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  16. Re:I work in groups so it happens faster by eulernet · · Score: 5, Interesting

    No, you are totally wrong, usually people don't bother communicating, so you don't lose a lot of time on communication.

    It takes longer because of Ringelmann's effect, and this had been measured in 1914, by measuring efforts.
    Here is the original article in french: http://gallica.bnf.fr/ark:/12148/bpt6k54409695.image.f14

    When you have 1 guy, he works at 100%, but when you add 1 guy, you get 93% of their combined force.
    Here is the table from 1 to 8:
    1 => 100%
    2 => 93%
    3 => 85%
    4 => 77%
    5 => 70%
    6 => 63%
    7 => 56%
    8 => 49%

    With 8 people, you get the results of 4 people !

    In fact, when you add people in a team, everybody reduces his level to the supposed level of the group.

    If I'm alone, I think I'm the best, so I'll work at my best level.
    If there is another guy, I'll work according to our common level, so I'll reduce my effort.

    When you have a team, the team works at the lowest common level.
    You can also see that when people walk in groups, they walk together at the slowest speed.