Slashdot Mirror


Ask Slashdot: How To Convince a Team To Write Good Code?

An anonymous reader writes "I am part of engineering team that maintains a very important component in our company. Our code quality and general engineering quality focus has been very weak: we have frequent buggy releases, our latencies are shooting up, our test coverage is nearly non-existent, and it is impossible for a newcomer in our team to get up to speed and be productive in less than a month due to unnecessary complexity. A group of 2-3 of us want to change that, and we know what needs to change technically — the better code review and release processes, better build tools, etc. But despite that, the quality of our code and design continues to suffer, and poor code continues to get released in the name of keeping the scheduled release date (product guys don't like to wait). We feel that if the right thing is done every time, we would can eliminate our issues and still release at the same pace. How do we effect the social change necessary to convince them of what is better and encourage them to take the effort to do it?"

366 comments

  1. Sooo.. by kiriath · · Score: 5, Funny

    Do you work for Blizzard?

    1. Re:Sooo.. by Anonymous Coward · · Score: 1

      Or Samsung?

    2. Re:Sooo.. by Anonymous Coward · · Score: 1

      Or Microsoft?

    3. Re:Sooo.. by Anonymous Coward · · Score: 1

      Or Yahoo?

    4. Re:Sooo.. by c0lo · · Score: 1

      Or CA?

      --
      Questions raise, answers kill. Raise questions to stay alive.
    5. Re:Sooo.. by nedwidek · · Score: 1

      IBM. Definitely IBM.

      --
      Post anonymously - For when your opinion embarrasses even you!
    6. Re:Sooo.. by phantomfive · · Score: 4, Interesting

      Heh, that raises a question. I often complain about other people's code, it's a typical developer hobby. I can name a lot of companies that produce lousy code, but

      What companies do you know that produce good, high-quality code? I was depressed to find I couldn't think of many. Maybe Sun before they disappeared, and NeXT, before they disappeared, and SGI.

      --
      "First they came for the slanderers and i said nothing."
    7. Re:Sooo.. by Anonymous Coward · · Score: 4, Funny

      So.. you are saying good code equals company goes bust? Straps on flameproof suit and helmet...

    8. Re:Sooo.. by Anonymous Coward · · Score: 0

      No, no, obviously he works for Comcast.

    9. Re:Sooo.. by cheater512 · · Score: 2

      Google's code that they have released seems pretty decent.

    10. Re:Sooo.. by phantomfive · · Score: 1

      So.. you are saying good code equals company goes bust?

      It's kind of worrisome, isn't it?

      --
      "First they came for the slanderers and i said nothing."
    11. Re:Sooo.. by phantomfive · · Score: 5, Interesting

      Google's code that they have released seems pretty decent.

      I don't know which code you were looking at, you are probably right. But I can tell you, I've spent a lot of time in the Android codebase, and that thing is giant mess. Everywhere you look there are bugs. You can report them and they don't get fixed. There is undocumented behavior. More than once I've wanted to throw my monitor out the window in a rage after working on Google code. I hate their stuff.

      --
      "First they came for the slanderers and i said nothing."
    12. Re:Sooo.. by Anonymous Coward · · Score: 0

      or PayU?

    13. Re:Sooo.. by Anonymous Coward · · Score: 0

      Ouch!

      But Really. You have a QC problem, code or not.
      Your QC is missing.

      I would suggest: Moving up feature freeze,
      add at least 3 more QC people, two for testing, and one for full code submission review. ( Hire this person from within...preferably You!)

      Have ever one in the next month read the mythical man month.

      Now, its ACCEPTABLE for your product manager, and VP of development to ship buggy releases.
      How do you change that? Leak API code bugs, and a few common bugs.
      Nothing major, just enough to put egg on their faces.
      Have it come from above...It would be a good idea on their part,
      if they don't want their company to literally vaporize,
      then ... up the ante, and start being BETTER THAN MICROSOFT.

      You see, Its all Microsoft fault. They made it acceptable to ship less than mediocre products,
      and then fix the bugs later.

      "Our code quality and general engineering quality focus has been very weak:"
      How many psychologists does it take to change a light bulb...
      One, but the LIGHT BULB HAS TO WANT TO CHANGE.

      I was always leaving anonymous notes on the VP of developments desk.
      As soon as I did, they started calling the development leads in,
      and in only a few months, new QC was in place, and two new QCs were hired.
      The code and the product improved, but not enough.

      They shipped crap on ice, and the product disappeared. No surprise.

    14. Re:Sooo.. by dgatwood · · Score: 2, Insightful

      What companies do you know that produce good, high-quality code?

      Consistently or occasionally? From what I've seen, your average company produces one or two great products and a lot of half-assed projects. I call this the Lightroom-Flash spectrum. On the upper bound, you have code that is fairly well written (apart from that case-sensitivity maps bug, ahem...), and on the lower bound, you have... well, Flash.

      What distinguishes one from the other? IMO, you can roughly quantify it as: q = 1 / (t_sub_r * b_sub_p), where q is quality, t_sub_r is time since the last ground-up rewrite, and b_sub_p is the bug punt rate—the number of bugs that got punted to the next release because you couldn't fix them.

      In the average organization, T_sub_r is a linearly increasing variable based on time, because rewrites never happen. Similarly, because the schedule is fixed, the total number of bugs is proportional to the code size, and the number of coders is also proportional to the code size, the number of bugs punted tends to be proportional to the code size.

      Assuming your code size increases roughly linearly based on time (but in sudden jumps at every release), then code quality is roughly O(1/(t^2)). With products that are given adequate care, though, the schedule lengthens or the rate of code expansion tapers off over time, so that Q is probably closer to O(1/(t * log_base_k(t))) for some base k.

      Either way, though, it's a race against the clock, because the OS is changing under you and the world is changing around you, so even if you did absolutely nothing, the code quality would fall off at a rate of O(1/t^2), because all of your bugs are punted.

      Either way, the only way you'll ever do better than 1/t is if you periodically do major rewrites of big chunks of code. Of course, this introduces a whole new set of bugs, but the code quality will improve because you will have learned (hopefully) from the mistakes of the previous version of the code. And you must do this for pretty much every section of your code on a regular basis or else the old, crufty parts will eventually degrade into a black box that everybody is afraid to touch.

      Or you could just do everyone a favor and periodically introduce code that looks like this weaved in and among what you consider crap code in an effort to force people to rewrite it.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    15. Re:Sooo.. by Anonymous Coward · · Score: 0

      Why not fix the bugs and send patches instead of just reporting them?

    16. Re:Sooo.. by Anonymous Coward · · Score: 1

      Android was not originally developed by Google - it's probably a real millstone for their devs now

    17. Re:Sooo.. by Anonymous Coward · · Score: 0

      He could, but it sounds like they don't even respond to users. The fact that a multi-billion-dollar company like Google can't commit to making the Android project a world-class development project is pretty sad and pathetic.

    18. Re:Sooo.. by Anonymous Coward · · Score: 0

      The apps for business/education API is pretty well done and I've had them check on features/timelines within an hour of a forum post. Closure from what I've looked into seems done well also.

    19. Re:Sooo.. by TheRaven64 · · Score: 2

      That certainly isn't the case on any of the projects I've worked on with Google contributors. They tend to think a nest of #ifdefs is the correct way of writing cross-platform code, and fall into the trap of thinking that the solution to any problem - especially the problem that the current codebase is overcomplicated - is to add more code.

      --
      I am TheRaven on Soylent News
    20. Re:Sooo.. by pjt33 · · Score: 1

      Sun? Did you see the size of the Java Bug Parade?

    21. Re:Sooo.. by anyanka · · Score: 1

      What companies do you know that produce good, high-quality code? I was depressed to find I couldn't think of many. Maybe Sun before they disappeared, and NeXT, before they disappeared, and SGI.

      I see you haven't tried to secure a newly installed Irix system.

    22. Re:Sooo.. by Anonymous Coward · · Score: 0

      That link you provided in your mathy tl;dr post was awesome! :-)

          http://thc.org/root/phun/unmaintain.html

      It really drives home the point that it's not specifically the language but more the *developers intent* that decides what is good/great code. Intent is also, coincidentally, something you should consider commenting in your code. Code explains itself (ie. read it) but the intent is often invisible. Code reviews should be about how but also about why.

      My 2 cents.
      KPH

    23. Re:Sooo.. by RabidReindeer · · Score: 2

      So.. you are saying good code equals company goes bust?

      It's kind of worrisome, isn't it?

      The perversity of the universe tends towards the maximum

      Larry Niven (I think).

    24. Re:Sooo.. by invid · · Score: 5, Informative

      I used to work for a company that produced avionics software. Obviously, we had to write solid code. This is how we did it: (1) Mandatory line by line code review by a different department. (2) Have a test cycle about as long as the development cycle. (3) Be willing to sacrifice the schedule to make it work. This is why planes are late and over-budget, but I wouldn't fly otherwise. And no, I had nothing to do with the 787.

      --
      The Moore-Murphy Law: The number of things that will go wrong will double every 2 years.
    25. Re:Sooo.. by hackula · · Score: 1

      So... "Here is what didn't work for me, and you should too!"

    26. Re:Sooo.. by Big+Hairy+Ian · · Score: 3, Informative
      There are a number of things you could try.

      1. Pair programming usually improves coding standards

      2. Code Reviews can promote improved standards

      3. Don't let them maintain code they've worked on before unless it's been round the rest of the team

      HTH

      --

      Build a Man a Fire, and He'll Be Warm for a Day. Set a Man on Fire, and He'll Be Warm for the Rest of His Life.

    27. Re:Sooo.. by Anonymous Coward · · Score: 0

      I worked for one non-tech company that had two managers that were awesome with code management (For mainframe batch programs). Very hands-on when it came to the review and approval process. You submitted the code changes / updates, they went through the test system for 2 weeks, then it was review to make sure all the write-up in the code was there and everything was easy to understand.

      It took a lot of time on managements hands to go through the code, but that's what it takes to make sure what's implemented is quality code that's easy to understand and fix. Because of their involvement, the mainframe operators rarely, if ever, had to call the programmer for an ABEND, they could reset and restart the program, or batch, as outlined in the code. It was awesome.

      So, in short, THAT is what management is for.

    28. Re:Sooo.. by DragonTHC · · Score: 0, Flamebait

      ID software.

      Don't say it's impossible to replace one of your developers. It's so very easy to replace one or all. There are 1,000 Chinese or Indian developers writing better code for pennies who would jump at the chance to have your job, and do it better and cheaper. But if you've given your developers all the help, proper tool sets, and support, and they still produce lousy code, it's time to find new developers.

      Depending on how many you have, get rid of them one at a time. Don't hire a new one until at least two are gone. Start with a middle of the road guy, who is probably good, but is lazy. Save the one with the most potential for last, and hopefully you won't have to fire him.

      --
      They're using their grammar skills there.
    29. Re:Sooo.. by Minwee · · Score: 1

      The perversity of the universe tends towards the maximum

      Larry Niven (I think).

      It's a restatement of Finagle's Law, which was first used by John Campbell in the 40s. Niven popularized it up in the 60s, but it was already old by then.

    30. Re:Sooo.. by Anonymous Coward · · Score: 0

      Google Guice. By Bob Lee, good stuff.

    31. Re:Sooo.. by luis_a_espinal · · Score: 2

      Heh, that raises a question. I often complain about other people's code, it's a typical developer hobby. I can name a lot of companies that produce lousy code, but What companies do you know that produce good, high-quality code? I was depressed to find I couldn't think of many. Maybe Sun before they disappeared, and NeXT, before they disappeared, and SGI.

      The small companies I've worked for have aimed to produce good code. The insurance company where I had my first professional programming job, we aimed to produce good code (and we methodically refactored badly written legacy code inherited from a contractor.)

      When I worked for Citircorp Latin America Division, I remember every development team aiming to have some quality in their deliverables. With other large companies, I've seen teams producing shitty code, but also teams having outstanding performance.

      There are people and teams churning decent work out there. Unfortunately, they get eclipsed by the hordes of code monkeys in which we drown.

    32. Re:Sooo.. by gbjbaanb · · Score: 1

      Sun?! the people who made Java so bad its still got massive security holes in it today.

      No-one makes perfect code, its as simple as that. But if you recognise that the real world and imperfect humans are involved then any code that is maintainable and working can be considered both good and high-quality.

    33. Re:Sooo.. by phantomfive · · Score: 1

      Sun?! the people who made Java so bad its still got massive security holes in it today.

      Good point. But it is readable and a well specified interface.

      any code that is maintainable and working can be considered both good and high-quality.

      Oh no, here you are very wrong, I've had to maintain some very horrible code. Just because I was able to do it doesn't mean it wasn't horrible. It slows you down like walking in molasses.

      --
      "First they came for the slanderers and i said nothing."
    34. Re:Sooo.. by Anonymous Coward · · Score: 0

      Or Adobe?

    35. Re:Sooo.. by phantomfive · · Score: 1

      I'm guessing you're talking about post-1997 SGI. Certainly they went downhill pretty quick.

      --
      "First they came for the slanderers and i said nothing."
    36. Re:Sooo.. by invid · · Score: 3

      Don't say it's impossible to replace one of your developers. It's so very easy to replace one or all.

      You're a manager, aren't you?

      Of the two outsourced to India projects I'm closely familiar with, one had to be completely scrapped because the code was unusable and the other had to be fixed requiring delays that doubled the original schedule. Good code is hard, even for China and India.

      --
      The Moore-Murphy Law: The number of things that will go wrong will double every 2 years.
    37. Re:Sooo.. by AuMatar · · Score: 2

      I don't find constant pair programming improves standards. I find it slows development to a crawl while leading to developers who are either mentally checked out or goofing around most of the day. Or depending on your developers, arguing over inanities. Or they just leave- I wouldn't stay at a job where I was going to literally have someone standing over my shoulder telling me what to do all day.

      Code reviews are good, but you have the same problem as the OP does- you have to convince people not to half ass them. Its quite easy to fall into either rubber stamping (especially if you're busy), or arguing over trivial matters. Like any other tactic it takes people committed to quality and getting things done to make it work.

      In the end, there's no substitute for developers who take pride in their work. You either have them or you don't. If you can't convince them to start taking it, no tool or technique will improve things.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    38. Re:Sooo.. by Anonymous Coward · · Score: 0

      I concur. Google may have a large number of excellent developers, but Google is a gargantuan organization. They've sucked up thousands of idiots in acquisition. And the new hires from universities usually turn out to be cargo cult programmers. At this point, I'm not so sure that the ratio of good to mediocre is any better than Silicon Valley has a whole.

    39. Re:Sooo.. by Anonymous Coward · · Score: 0

      He works for Turbine, not Blizzard. He just described DDO.

    40. Re:Sooo.. by Anonymous Coward · · Score: 0

      id software?

    41. Re:Sooo.. by Anonymous Coward · · Score: 0

      No, not Sun, seen too much horror with their code... :)

    42. Re:Sooo.. by lsatenstein · · Score: 1

      So.. you are saying good code equals company goes bust? Straps on flameproof suit and helmet...

      ===
      Good code means the programmers go bust and out of work. The company thrives due to low support costs.

      --
      Leslie Satenstein Montreal Quebec Canada
    43. Re:Sooo.. by cwsumner · · Score: 1

      Don't say it's impossible to replace one of your developers. It's so very easy to replace one or all...

      That is what managers have to say to employees. But no manager should ever fool themselves into believing it is true!

      More than one company has died because of this...

    44. Re:Sooo.. by sjames · · Score: 2

      In a sense. When a development staff are happy, working normal hours, and cranking out quality code, the management from newly minted MBAs on up to the CEO all have a single thought: "If I squeeze hard enough, I can get a few more nickles out of that department for my bonus check". So they decimate the workforce and rattle off platitudes like "work smarter, not harder" at an ever increasing rate. They set "stretch goals" but punish people severely for not meeting them. They demand shorter deadlines and more bullet points. They push out senior people and bring in fresh (cheap) grads.

      At this point, the company is doomed to fail.

      There is another scenario that might play out in other corporate cultures. In those cases, other managers see the great success and want to get the credit for themselves. So they descend upon the successful projects and mark their territory (in pretty much exactly the way dogs do). Unfortunately, being a pack of ham fisted morons, they destroy everything they touch.

  2. Easy by Anonymous Coward · · Score: 5, Funny

    1. Higher Pay
    2. Good Management
    3. Beatings

    Pick any two.

    1. Re:Easy by Savage-Rabbit · · Score: 4, Funny

      1. Higher Pay
      2. Good Management
      3. Beatings

      Pick any two.

      4. Hire the consultant in China who did such good work for that cat video guy

      --
      Only to idiots, are orders laws.
      -- Henning von Tresckow
    2. Re:Easy by boundary · · Score: 1

      Just beat them twice.

    3. Re:Easy by Cryacin · · Score: 2

      All I would need is a hammer, two nails per developer, a roll of duct tape for every 3 developers a carrot and a monkey wrench. Oh yes, and the development floor to be on international waters.

      Easy!

      --
      Science advances one funeral at a time- Max Planck
    4. Re:Easy by Anonymous Coward · · Score: 0

      Unfortunately, the OHCHR claims jurisdiction even in international waters. Signatory countries have raided vessels on the high seas for ICHR violations before. ...put your development floor in a poor Southeast Asian country instead.

  3. From today's TheDailyWTF by Anonymous Coward · · Score: 0

    "We don't need more people; we need better people!"

    1. Re:From today's TheDailyWTF by TapeCutter · · Score: 5, Insightful

      If as the submitter claims "new people take a month to get up to speed" then either their project is trivial or they are doing something right.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
    2. Re:From today's TheDailyWTF by Anonymous Coward · · Score: 5, Insightful

      One man's clean code is another man's over-engineered rubbish. The industry is not as united on the definition of "good" code as one might expect it should be, and in my (lengthy) experience with developers of different temperaments, there is great variance in how code is received and evaluated.

      The standard of judgement that gets applied to code is not objective, and never will be. It cannot be, as coding includes art as well as science.

      Trying to force your preferred coding style on to developers who operate differently will never end well. Unless you are uncommonly versatile, adapting yourself to a standard you hate will also not go well.

      Find a job where the programmers evaluate code similarly to how you do, and you will be much better off.

      As an aside, I have worked with developers on both ends of the spectrum, and found that both extremes are equally bad in different ways:

      1) Hastily-written code makes the trade show date and wins business, but can really ruin a company's reputation when the app doesn't scale and the bugs drive clients' costs through the roof. Contrary to the beliefs of those who write such code as their standard MO, constantly delivering maximum value in minimum time is NOT sustainable in the long run.

      2) Writing very clean code, and then keeping it clean, does NOT save you time in the long run. While it does reduce bugs and (in theory) makes it faster to add features in the future, the length of time it takes to write the code in the first place exceeds the time saved by fewer bugs, and the future features must also be clean, which *always* requires more refactoring than you would expect.

      Successful businesses will find a happy medium between these two extremes, much to the chagrin of developers who earnestly believe one extreme is better than the other.

    3. Re:From today's TheDailyWTF by Anonymous Coward · · Score: 1, Funny

      Try proof by counterexample.

      If you're using C++ make a "fun" header file and hide it in an automated build script.

      #define true false
      #define false !true
      #define if while
      #define continue break

    4. Re:From today's TheDailyWTF by Z00L00K · · Score: 3, Interesting

      Start with teaching the employees the importance of writing good code.

      Also teach them how to refactor code in the IDE they use to avoid gigantic monolitic methods/functions/classes.

      Then provide them with the tools. In addition to compile at the highest warning level and using the built-in support in the IDEs they should look at Stylecop for C# (even though it's more about style than finding potential bugs), Splint for C, FindBugs for Java.

      People that are willing to take in and understand the importance of writing good code will end up being better.

      And don't forget that people are competitive to some degree - so if you find a way to measure the quality of the code produced it's fine, and let it come with a small advantage. A movie ticket, a box of chocolate or something similar.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    5. Re:From today's TheDailyWTF by jellomizer · · Score: 1

      In general (meaning they are exceptions, a lot of them) engineers are not good at coding. Good coding is more of an art and math science are the mediums, and the computer is the pallet. Part of good coding is to make your code elegant, small and easy to follow. I tend to prescribe small applications that do one thing and do it well, over the large program that does it all. Then combine these small apps together in a unified UI, this makes each piece easer to debug because you know what piece is doing what. However that be the case (performance, tighter integration, etc...) that you need to make a larger project, similar rules apply, make it easy to navigate. Know where the code stars and how to follow it.
      But the biggest problem I have seen is because coding is an art form people get too personal with their code and try to protect it when it is time for it to go. So we end up with a bunch of code of different styles and ages that have been over reworked to be a hindrance, where a remake would be better.
      Get rid of code that has many different ways of doing the same thing. Avoid third party libraries that are not standard or where you don't have the source too.
      Try to maintain a coding standard, and have someone review the code at random intervals to make sure they know what is going on. Some people try to put enterprise development designs into a small app making it too bulky. Conversely some people try to code like it is a small app in an enterprise app, making it less uniform. You just need to watch them and keep them implace and Change behaviors before it is too late

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    6. Re:From today's TheDailyWTF by rjstanford · · Score: 2

      Trying to force your preferred coding style on to developers who operate differently will never end well. Unless you are uncommonly versatile, adapting yourself to a standard you hate will also not go well.

      Also, when developing, realize that having consistent code that matches the rest of the project is far more useful than having a small chunk of code that - to you - is slightly more readable in and of itself but dissimilar to everything else. Most (although not all) coding standards, after all, are relatively trivial.

      With Java, at least you have the official Sun recommendation to start with which almost every project follows somewhat. I prefer to operate as a diff of the standard - "Follow the guidelines, but lines up to XX characters are fine", for example.

      2) Writing very clean code, and then keeping it clean, does NOT save you time in the long run. While it does reduce bugs and (in theory) makes it faster to add features in the future, the length of time it takes to write the code in the first place exceeds the time saved by fewer bugs, and the future features must also be clean, which *always* requires more refactoring than you would expect.

      A very good point. If your code is well compartmentalized this gets even less efficient - if you have a big hairy ball of code that only gets tweaked once a year, but each "5 minute" fix ends up taking a full day of testing and hair-pulling, spending a month or two to fix it just won't ever pay off, especially when you add in the opportunity cost of missing a month's worth of new feature development.

      --
      You're special forces then? That's great! I just love your olympics!
    7. Re:From today's TheDailyWTF by JaredOfEuropa · · Score: 3

      I'd have to disagree with point 2. Writing clean code is not just about keeping to coding standards, keeping functions small, or even making a decent object model. It is also about making a system open and extensible by providing clean APIs, web services, mechanisms for adding extensions, function hooks, etc. That takes time and effort, but does reward you with a way to add new features faster. However, those extensions (new features) do not need to be particularly clean in themselves. Because the code for those new features will be isolated from the base code, you can get away by hooking a quick & dirty extension into your clean system. Such extensions are likely small enough to debug or change easily even if the code is messy, if you've done your homework on providing a well defined interface on the main system. Having a type 2 (clean) base system with a well defined interface allows you to add new features with type 1 programmers, delivering maximum value in minimum time, in a sustainable manner.

      You don't want to find a compromise between the two styles, you want to find the right mix.

      --
      If construction was anything like programming, an incorrectly fitted lock would bring down the entire building...
    8. Re:From today's TheDailyWTF by DoctorBonzo · · Score: 1

      Almost amusing, but wouldn't the 1st 2 #defines cause an infinite loop in the macro expander of most compilers?

    9. Re:From today's TheDailyWTF by invid · · Score: 1

      I would say six months is the average period to get up to speed with a significantly large software project. In a month you might allow someone to make a trivial change to the GUI.

      --
      The Moore-Murphy Law: The number of things that will go wrong will double every 2 years.
    10. Re:From today's TheDailyWTF by hackula · · Score: 1

      Yeah, one month is a pretty small amount of time IME. Everyone sucks at their new job for the first 6 months. Any experience otherwise is probably a perfect example of the Dunning Kreuger Effect.

    11. Re:From today's TheDailyWTF by rjstanford · · Score: 1

      I find it amusing (actually amusing, not being ironic here) that we both had similar comments but, with minor differences in interpretation of the GPP, posted them as agreements-with and differences-with the point being made by the AC above :)

      --
      You're special forces then? That's great! I just love your olympics!
    12. Re:From today's TheDailyWTF by rwv · · Score: 2

      If as the submitter claims "new people take a month to get up to speed" then either their project is trivial or they are doing something right.

      I agree... a one month ramp-up time is totally insignificant assuming the shop has a reasonable turnover of about 5% per year. If there are a significant number of people voluntarily leaving on a regular basis, however, management might have other fish to fry. That said... smart people might want to leave a place with crappy standards, so management would have the best interests to create quality controls and standards.

    13. Re:From today's TheDailyWTF by Alex+Belits · · Score: 0

      2) Writing very clean code, and then keeping it clean, does NOT save you time in the long run.

      It very much does, if the whole process is directed toward writing code that is not broken.

      While it does reduce bugs and (in theory) makes it faster to add features in the future, the length of time it takes to write the code in the first place exceeds

      If code would have less bugs if it was developed slower, then you are writing it in a hurry, and can't rely on anything written in such manner. All such code will eventually have to be replaced, thus negating all perceived savings (if it won't destroy your project first). This is acceptable as a last-resort effort for pushing a known-bad release out of the door, but it does not work in the long term.

      the time saved by fewer bugs, and the future features must also be clean, which *always* requires more refactoring than you would expect.

      Good code does not need "refactoring", unless there is a major design change in the middle of a project. If you have to constantly reimplement the same functionality, either your design is fundamentally wrong, or you never implemented it properly, or (most likely) both, and you are incompetent.

      --
      Contrary to the popular belief, there indeed is no God.
    14. Re:From today's TheDailyWTF by luis_a_espinal · · Score: 4, Insightful

      2) Writing very clean code, and then keeping it clean, does NOT save you time in the long run. While it does reduce bugs and (in theory) makes it faster to add features in the future, the length of time it takes to write the code in the first place exceeds the time saved by fewer bugs, and the future features must also be clean, which *always* requires more refactoring than you would expect.

      That is an excellent point. But I would counter that the aim is not reduce time of delivery, but to control risk (and ergo, cost). As a business, I would prefer to know that something will consistently take me, say, 4 weeks, of testing and delivery with fewer bucks, than knowing I could "deliver" in half the time, but with a "hidden", hard-to-quantify, highly variable cost of defects, maintainance or extensions.

      With the former case, I can consistently ballpark the cost and ROI. With the later, it's like driving while blind.

    15. Re:From today's TheDailyWTF by UnknownSoldier · · Score: 3, Insightful

      > Trying to force your preferred coding style on to developers who operate differently will never end well. Unless you are uncommonly versatile, adapting yourself to a standard you hate will also not go well.

      The better programmers leave their ego at the door. As Neil Peart brilliantly said recently:

      Q. I think that a lot of people are surprised to learn that you still take drum lessons. You're seen as this drum master by most everybody.
      A. What is a master but a master student?
      http://www.rollingstone.com/music/news/q-a-neil-peart-on-rushs-new-lp-and-being-a-bleeding-heart-libertarian-20120612

      If programmers have that much ego, it is probably better that they leave since they have shown that they aren't interested in learning a different perspective. (This can apply to both the young-whipper-snapper or old-crotchy ones equally.)

      Every time I was forced to use a new coding style I initially disliked it. But I always was able to put my ego and biases aside and ask myself:

        * What are the advantages of this way?
        * What are the disadvantages?

      Only by understanding BOTH answers can one really grok what works and what doesn't work. The rationale is more important then the rules.

      The same thing applies to naming conventions.

      Likewise, I've worked on code where there NO getter-setters allowed at all, where you MUST write getter-setters (even trivial ones), and ones where there no trivial getter-setters. The 3 different styles made me appreciate the different trade-offs.

      > 1) Hastily-written code makes the trade show date
      > 2) Writing very clean code, and then keeping it clean

      Yes, completely agree there are 2 extremes:

      * Ship it
      * Over-Engineer it

      > Successful businesses will find a happy medium between these two extremes,

      Again I concur 100%. A pragmatic programmer knows when to just "let it go" and when to "rip everything out" -- the code is good enough, and when to re-architect, re-engineer, re-factor, etc. because the original code no longer solves (or handles) a different set of requirements.

      It is a tough balancing act but there is one general guiding principle.

      If you can achieve the same solution with less code then that is preferred. Less code has less bugs, and less edge conditions.

      Smaller code is usually more beautiful then Large code. :-)

    16. Re:From today's TheDailyWTF by phantomfive · · Score: 1

      Writing very clean code, and then keeping it clean, does NOT save you time in the long run.

      There are different definitions of clean, but your definition is wrong. You didn't say what you think clean code is, but if it's taking you more time, then you are definitely doing something wrong.

      --
      "First they came for the slanderers and i said nothing."
    17. Re:From today's TheDailyWTF by Anonymous Coward · · Score: 0

      Spot on... IMO the developers that emphasize clean code and code reviews over design and architectural enforcment and test coverage tend to operate and play in languages and technologies that too easily enable bad developers to write awful code and don't purposely constrain a developers "creativity" in dealing with well solved problems in extremely convoluted or overly complicated ways.

      I'm looking at you PHP...

    18. Re:From today's TheDailyWTF by Alex+Belits · · Score: 0

      It is also about making a system open and extensible by providing clean APIs, web services, mechanisms for adding extensions, function hooks, etc.

      It's called "interface". Interfaces exist in many forms (functions, object model, network protocols, interprocess communications protocols, even file formats when they are used for data exchange and communications -- for example, maildir is mostly an interface) but must be handled in the same manner.

      Other aspects of design are data model (almost always a central part of design) and data flow (that is somewhat a part of data model but usually distinct from it as it involves short-lived data and its interaction with interfaces and processing mechanisms).

      --
      Contrary to the popular belief, there indeed is no God.
    19. Re:From today's TheDailyWTF by Anonymous Coward · · Score: 0

      If code is clean, it shouldn't require refactoring to extend it. I daresay that the definition of clean code, to me, is code that does not require modification to extend.

    20. Re:From today's TheDailyWTF by Bengie · · Score: 1

      I was going to say.. Around here, 6 months is "fast", 1 year is more typical.

  4. JackBlack Strippers by Anonymous Coward · · Score: 1

    Strippers and blackjack

  5. Send them to North Korea by Anonymous Coward · · Score: 1

    Make good code or no rice.

  6. Fire your boss. by John+Hasler · · Score: 0

    And perhaps his boss as well.

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    1. Re:Fire your boss. by Anonymous Coward · · Score: 0

      Thanks for the for your ingenious input. We will take it into consideration, and even possibly hire you to replace our bosses, for your ability to make excellent decisions.

    2. Re:Fire your boss. by Cryacin · · Score: 2

      He's not for hire as a perm. He's a consultant.

      --
      Science advances one funeral at a time- Max Planck
    3. Re:Fire your boss. by Anonymous Coward · · Score: 0

      It sounds like you did not understand that he meant "quit". There are *tons* of jobs for skilled coders. Talk to a few recruiters that works in your area. Interview the companies as much as they interview you. Ask to see their code before you commit to coming on board. Ask the team what they think of their code. Find out what tools they use for development, source control, defect tracking and code reviews. What is their development process like? There is no excuse for working for losers. The market is way to tight for anyone to put up with it. And there are plenty of loser coders looking for work that your management team would be happy to hire in your place.

    4. Re:Fire your boss. by Titus+Andronicus · · Score: 1

      As others have said or implied, the OP's question is itself incorrect. The actual question is about how to get management to buy in.

      Have your management read the relevant sections of the following: (1) Steve McConnell's Code Complete, (2) Chris Sterling's Managing Technical Debt.

      If management can't or won't learn these lessons, then I can't emphasize enough how correct the P, GP, and OP posts in this thread are.

      There are many ways to have management terminated or shoved aside. Go to the targeted manager(s)' boss(es). Or go to the boss(es)' boss(es)' boss(es), etc. Go the board of directors. Go to the investors. Or if management has engaged in illegal activity, report them to the proper authorities, etc. However the OP goes about having his management terminated, he is morally required to do it for the long term benefit of the investors. The investors' long term interests must come first.

  7. Stop pissing in the wind by Anonymous Coward · · Score: 5, Insightful

    What you have just described is what happens when Management does not see value in what you do.

    To them, you are just an interchangeable cog. Like, the brand of air conditioner in the office. Or the janitor. It has no bearing on their success and they don't really care what you think about anything.

    The way they see it, if you don't do your job, they'll just replace you with something else.

    Your best bet is to leave. And do as little work as possible in the meantime.

    1. Re:Stop pissing in the wind by NevarMore · · Score: 4, Funny

      Like, the brand of air conditioner in the office. Or the janitor.

      My father was an air conditioner and put me through college you insensitive clod!

    2. Re:Stop pissing in the wind by Austerity+Empowers · · Score: 5, Insightful

      I view management as cogs too, they are fairly interchangeable, and on their own worthless. Put them all together in a bag and you get a percussion instrument. Percussion instruments are essential to music, and you can bang on them with sticks or mallets.

    3. Re:Stop pissing in the wind by Anonymous Coward · · Score: 3, Insightful

      Other than doing as little as possible, I wholeheartedly agree.

      You should work hard while you're there though, if for no other reason than because doing things the right way in the wrong environment is really, really hard and you'll learn a lot. Properly made code doesn't interface well with awful code, but it's a task you'll have to do at least occasionally for as long as you're a developer. Being good at that is an invaluable skill.

      It's also nice to not feel awful about what you left behind, if you're the kind saddled with a conscience. Do it without complaining uselessly (you also shouldn't just hoof out the door without at lest trying to change things if you like where you're at), and you might even be remembered well, which is a really good thing when the economy shits itself as it occasionally does, or if somebody you worked with and respect later has an opportunity to recommend you for a better position.

    4. Re:Stop pissing in the wind by Anonymous Coward · · Score: 1

      You must be used to working inside the bowels of large monolithic corporations because I have not encountered anything like what you say. Working for smaller organisations I've discovered that if you can prove that you excel at your job then people will trust you and what you say, and you can gradually affect change. As you move through your career and are employeed at more and more senior levels this only becomes easier as you start to be employed precisely [i]because[/i] people want you to lead change and drive innovation. Of course, you also have to go in with your business hat on and realise that you can't change everything over night and probably can't down tools for months at a time to bring everything up to scratch as the business still needs to make money.

      Everytime I hear about this interchangeable cog stuff it's always followed by "so do as little as possible, collect the paycheck..." etc. This makes me think this is precisely the attitude that makes you unable to affect change. I wonder if either a) The person saying it has not very much experience and is jaded by the one or two places they've worked, or b) May well be experienced but is not actually very good and has been middling in the same job for 20 years wondering why nothing changes and is jaded by that. Of course, I'm sure there are places such as you describe as well, but there [i]could[/i] be other reasons for your own effectiveness at pushing for, and affecting, changes.

    5. Re:Stop pissing in the wind by Anonymous Coward · · Score: 0

      Yeah.. so [i][/i] doesn't work and I can't edit it as an AC :) Duh.

    6. Re:Stop pissing in the wind by Anonymous Coward · · Score: 0

      You can't edit it as logged-in user either.

    7. Re:Stop pissing in the wind by Anonymous Coward · · Score: 0

      That just shows how long it's been since I last logged in then :)

      The captcha for this post is quite apt: Impostor :D

    8. Re:Stop pissing in the wind by Anonymous Coward · · Score: 0

      Puhleeeze, don't start banging on your boss like it's a percussion instrument!

    9. Re:Stop pissing in the wind by gwayne · · Score: 1

      Bender, is that you?

    10. Re:Stop pissing in the wind by Anonymous Coward · · Score: 0

      Totally agree.
      This happens a lot when in-house IT where the core business does not have a technology focus.

      Vote with your feet. And take the group of 2-3 with you. Or even better start a company together.

  8. You are doomed by Stirling+Newberry · · Score: 5, Insightful

    It is very clear that your company is a typical feature and marketing driven morass. What happens is you flog yourselfs until something goes horribly wrong, a bunch of people are fired. Then there is a new director of technology, who gets a ground up rewrite approved to enter some new space, and the cycle of accretion and feature creep starts all over again. So advice? Polish your resume or make good friends with who ever will run the purge when it happens.

    1. Re:You are doomed by Anonymous Coward · · Score: 0, Insightful

      it was a failure the moment i saw the following line: "I am part of engineering team"

      no further discussion necessary

    2. Re:You are doomed by Anonymous Coward · · Score: 0

      And its obvious you aren't.

    3. Re:You are doomed by Anonymous Coward · · Score: 0

      I am not sure the purge is going to happen soon - revenue wise we are growing better than our estimates, and the overall sentiment in the camp is positive. That means the company as a whole is doing a lot of things right.

      We have recognized that engineering quality is a problem and though it has not hurt us too much till now, it is going to sooner or later. Upper management wants to solve the issue. Director of my team is fed up of waking up in the night on weekends due to S0 issues (not every weekend, but for any "big" release, there is always this fear in his mind). Just that they don't want to seriously reprimand the engineers, but instead bring about a change where they start taking it seriously.

    4. Re:You are doomed by Asmor · · Score: 1

      > I am not sure the purge is going to happen soon - revenue wise we are growing better than our estimates, and the overall sentiment in the camp is positive. That means the company as a whole is doing a lot of things right.

      Well, it could also mean that your company is a little tiny bubble waiting to pop.

      Or you could be right.

      I know less about economics than I do about your situation. I just like to point out flawed reasoning. :) Cheers!

    5. Re:You are doomed by Manfre · · Score: 2

      If you have buy in from management, then you have a decent chance of improving things. It's hard to give feedback without knowing what workflow stuff you have in place, so here are a few generic things that might help.

      - Get approval for time and resources necessary to set up an automated build environment for deployment packaging and also running tests on every commit. The unit tests should report test coverage to give you a metric to track progress over time.
      - Enforce a policy where an issue cannot be truly resolved without code review and test coverage.
      - Devote a percentage of team time toward code review and unit test retrofit.
      - Document whatever policy decisions are made.

    6. Re:You are doomed by gregor-e · · Score: 1

      Culture flows from the top. So long as software quality is constrained by arbitrary sales deadlines, your problem will not go away. The only way out of this mess is for management to buy into the value of quality and to insist on it, over the screams of marketing and sales. It is also a function of your customers. In many industries, customers will be ticked off for a while if you ship their product late, but if you ship them a brick, they'll never forget. Perhaps you are 'blessed' with more forgiving customers. In which case, your best optimization for the situation will be to polish up your resume and jump ship at your earliest convenience.

    7. Re:You are doomed by Anonymous Coward · · Score: 0

      Thanks, we are trying to follow some of your suggestions already. We already mandated code reviews, but now we are going to reduce the size of the group who can approve that the code is good to go.

      What specific knowledge would make you give more specific feedback? I'll list something here:

      1) We recently moved enterprise github and use pull requests for code review. We have setup jenkins for continuous build. I have setup sonar on jenkins for static code analysis and unit test coverage, but no one uses that right now (except me, to lament :-( ). That jenkins will soon deploy to nexus, so building our application becomes easy from anywhere.
      2) We currently release as we finish the change, but are going to move to once a week release train model in less than a month.
      3) We have QA and Pilot (1% release) checks before release rolls out 100%.

      Note that it is very difficult to set policies which doesn't have loopholes. Our goal is to do this without severely limiting freedom - evoking the feeling that we don't trust them doesn't look like a good idea.

    8. Re:You are doomed by Splab · · Score: 2

      Not necessarily; had the same problems described by poster in former work place. We solved it by locking down commits, bug reports and had the database guys drive development.

      No development was allowed without a bug/feature request, no commits where allowed without a bug reference. Database guys made the calls since the company money where in their domain.

      In the beginning there was a bit of unrest, but the rest of the crew quickly realized it was actually really nice to know exactly what went where and why. When you got the processes down and you can show improvement, then you go ask the big guy for more money to do proper test driven development.

    9. Re:You are doomed by bikin · · Score: 2

      How I wish the parent were wrong, but he is dead on the spot. Unfortunately, unless you can convince someone up the chain that quality matters, you are going to keep in state forever. Quality is not free, though the returns outweigh the costs. I can assume that the OP just gets a request get M features in N time, when it will certainly take 2N to create the features, and there is no way to either change M or N. So my advice is the same, just polish your resume.

    10. Re:You are doomed by Anonymous Coward · · Score: 0

      Mod parent up, even though I disagree about necessity of further discussion. The OP has demonstrated lack of capability to understand what's wrong with the term - or then maybe the same team does other kind of engineering too, not just software development.

      To clarify, a code illiterate person will be unlikely to gain credibility for even plausibly arguing that there is a quality problem. For a developer, it will be easy to find a low quality commit, see who wrote it and have a private talk with the guy/girl who did, about the reasons why. For a good Scrum master or like, it should then be non-impossible to figure out some useful action to help mitigate the reasons that pop up. Maybe it's just that 'vice president of department Y came shouting that feature A is needed right now whether it's 'done done' or not'. Maybe it's because of low morale because project/team/product lead/management is regarded clueless by the team. Maybe it's a collective burn out from disfunctional processes. Maybe salaries suck and everybody on team is working half the time on side jobs. Find the root cause, find useful actions to fix the problem.

      Check out the Capability Immaturity Model and figure out your level. Appoint or hire a Scrum master or lead developer that is capable of demonstrating, in writing, a taste for well written code and good interpersonal skills. The comms/social skills will be needed for fixing the root cause that is probably organizational. Get higher management support for investing time and money (for tools etc.) in fixing the problem.

    11. Re:You are doomed by Anonymous Coward · · Score: 0

      It is very clear that your company is a typical feature and marketing driven morass. What happens is you flog yourselfs until something goes horribly wrong, a bunch of people are fired.

      Unfortunately I work for one of those. Doubly unfortunate is that the upper-level management knows our team is what keeps the cogs going, so even when sales/marketing push us into a bug-ridden early release that burns customers and our reputation it is the sales/marketing guys that get fired and not us. Triply unfortunate is that the new sales/marketing guys they hire are just as bad or even worse.

    12. Re:You are doomed by Anonymous Coward · · Score: 0

      Of course at a certain point of shoddiness, it would have been much better to make a "good" quality product in the first place.

      Unfortunately, that requires leader to be intellectually capable of making that economic tradeoff. Most "leaders" are actually mentally challenged, though. They got their job by means of political trickery and they consider that trickery the most important thing. They are scared to "ship on time and on budget" and they essentially could not care less about egregious bugs, security issues and fundamental design faults. So they trade the short term success of "delivering" for the long-term pain that comes from shoddy work.

      They are simply too DUMB to invest into the training of developers. Most of them assume that God himself enlightened developers in some bedroom into being excellent developers. The truth is that even "seasoned" developers make serious mistakes in some aspects of their work. If they were told about that, they wouldn't. But that would imply a desire by management to have this kind of education/improvement processes. Actually, most people are very alone with their code.

    13. Re:You are doomed by Anonymous Coward · · Score: 0

      I don't think that technology can really help you. What you need is that the human processes and the conscience of developers, testers and management are focused on quality. I find it horrible that you release new software weekly. That clearly does not allow the QA team of thoroughly test and sign off bug fixes and new features.

      Bugs and other deficiencies must be serious issues and everybody must be driven to fix them, not to let them rot. Managers need to use the product daily and have a feeling of real quality. They need to look at code and documentation to assess the quality of both. Everybody must be really serious about quality instead of taking that cynical attitude we can see all to often.
      Quality is almost always possible, as long as everybody is dead serious about it can "goes the extra mile" to achieve it. Toyota got it, why should not you ? (the recent allegations against Toyota turned out to be 99,999% bullshit to help the sick American car makers)

      And NO, "agility" is not always good. I don't know your industry, but having too short cycles is definitely not good.

    14. Re:You are doomed by Anonymous Coward · · Score: 0

      Yeah, after reading that again, I conclude my Grammar Quality is absolutely abysmal. Shame on me !

    15. Re:You are doomed by Anonymous Coward · · Score: 0

      No, quality is not free...

      But compare it to "education" in the broadest sense: it costs money to provide a good education...

      But it costs even more in the long run if it's NOT provided !

      It will cost some money up front to change the working structure of the group, to formally introduce the
      QC tests and procedures, to perform the testing and document the bugs, to fix the bugs and (re-)test
      the (proposed) bug fix(es), and to document it all, including amending/adding comments in the source code.

      The near-term ROI will be quite negative, but the long-term will be even more positive. You can't buy a
      good reputation - you have to earn it, the old-fashioned way.

      The recent debacle with Java and other high-visibility software of various types make that all too obvious, IMNSHO.

      Unfortunately, a lot of times, there is a definite need to meet a project schedule promulgated by marketing requirements,
      but with proper planning, those contraints can be accommodated. That's management's job - if it means bringing in a
      contract worker or two for a quarter or two to help with the 'busy work" of creating test cases and then running them
      and documenting the results, fine. But, there will still be a test framework that can leverage future product testing, too,
      as well as perform regression testing, which is something that tends to be forgotten, much to the detriment of customers.
      (I went through considerable pain recently when Parallels Desktop for Mac Version 8 wasn't regression-tested against
      Windows 7, and stopped working with my serial lines and screwed up my printer settings. Some simple testing, taking
      less than a working day, would have exposed the problem immediately).

    16. Re:You are doomed by MadKeithV · · Score: 1

      Thanks, we are trying to follow some of your suggestions already. We already mandated code reviews, but now we are going to reduce the size of the group who can approve that the code is good to go.

      What specific knowledge would make you give more specific feedback? I'll list something here:

      1) We recently moved enterprise github and use pull requests for code review. We have setup jenkins for continuous build. I have setup sonar on jenkins for static code analysis and unit test coverage, but no one uses that right now (except me, to lament :-( ). That jenkins will soon deploy to nexus, so building our application becomes easy from anywhere. 2) We currently release as we finish the change, but are going to move to once a week release train model in less than a month. 3) We have QA and Pilot (1% release) checks before release rolls out 100%.

      Note that it is very difficult to set policies which doesn't have loopholes. Our goal is to do this without severely limiting freedom - evoking the feeling that we don't trust them doesn't look like a good idea.

      That reads like the toolkit version of "buzzword bingo" - indiscriminately throwing everything and the kitchen sink at a problem and hoping it'll solve itself. It could also be "methodology-du-jour". None of it guarantees you're solving your actual problem. "We've mandated code reviews" - sure - but are they actually finding useful issues and improving "software quality" (as ephemeral as that is to define)?
      If a release gets through QA, can you sleep soundly at night knowing it got past the most bastardly testers the universe has ever known?
      If you can't answer "yes" to those questions, do you still think those tools improved your quality? Do you still think adding yet more tools would improve the situation?

      You say you are worried about "loopholes", and are worried about trust. If you're worried, I would bet that there is already a hostile, potentially toxic development environment, and it might be that environment causing the (perceived) lack of "software quality". If people are looking for and exploiting loopholes in the rules, that's because they think the rules are stupid and not helping them to do their job. More rules / tools / buzzword bingo will make that problem *worse*, not better.

      You'd do well to talk to everyone first to figure out:
      a) If they actually think their own code is bad. You might be surprised and find they hate the code they write, BUT
      b) If they do, ask them why they can't write better code in the current circumstances.

      Like others have said, if the devs do NOT believe their code is bad things get difficult, but for your own sake, make DAMN SURE that the problem is not you before going any further!

  9. WTF by Anonymous Coward · · Score: 0

    Kick them in the nuts. Now that you have their attention tell them to write good code.

    1. Re:WTF by RabidReindeer · · Score: 1

      Kick them in the nuts. Now that you have their attention tell them to write good code.

      And while you're at it, tell them that there are plenty of people in India who will be glad to write good code for $5/week, have 3 people on a team that properly requires 10, lay off 1 of them in order to instil proper levels of terror, make the remaining 2 work 70+ hours a week (salaried, of course), and just in case that doesn't motivate them enough, tell them that they must give "110 percent" and "work smarter, not harder".

  10. This does not bode well. by Anonymous Coward · · Score: 3, Insightful

    Your inability to proof-read the text of your submission does not give me hope for your team. ("I am part of engineering team...", "...non-existant...", "...we would can eliminate...")

    1. Re:This does not bode well. by DNS-and-BIND · · Score: 2
      That's the editor's job.

      Yeah, on Slashdot...I crack myself up. Editors!

      --
      Shutting down free speech with violence isn't fighting fascism. It IS fascism!
  11. Create a presentation by eksith · · Score: 5, Insightful

    Of how much time and productivity is being wasted on inadequate practices and how much you'll improve your product, discover bugs faster and generally innovate with your improvements. Worst case, you'll need to do a shame trip on a few egregious offenders (pick their work and try to exclude names) and show how you'd do things differently.

    The benefit from your improvements must be obvious, immediate and beyond reproach.

    Fair warning: You cannot change the mind of management if they're more worried about maintaining the status quo. A very likely issue, if it's been this long with no improvements. All of the above will only work if your 2-3 people have any position of authority within the company. In my experience, the old-dogs don't want to or can't change, in which case you'll be on your own.

    Of course, you will also earn the ire of those around you if it's that type of atmosphere. People fear change when they're not the ones doing the changing.

    --
    If computers were people, I'd be a misanthrope.
    1. Re:Create a presentation by eksith · · Score: 1

      Who said anything about PP? And it isn't a waste of time to build a big picture of exactly what's needed, what needs improving and what needs weeding out. If they don't know what to change, how will they change?

      --
      If computers were people, I'd be a misanthrope.
    2. Re:Create a presentation by Anonymous Coward · · Score: 1

      Management loves powerpoint - changing the delay between slides is almost like programming to them. Makes them feel like productive, contributing members of the department. Powerpoint is the right solution, methinks.

    3. Re:Create a presentation by ahabswhale · · Score: 1

      I agree but I think the presentation needs a lot of concrete examples of wasted money. Technical debt is very expensive but most managers don't really understand it and how it impacts their schedules, competitiveness, and the bottom line. All they know how to do is count features but they really need to understand software development more so they can make more informed decisions.

      --
      Are agnostics skeptical of unicorns too?
    4. Re:Create a presentation by Anonymous Coward · · Score: 0

      Worst case, you'll need to do a shame trip on a few egregious offenders (pick their work and try to exclude names) and show how you'd do things differently.

      You have to focus on practices, though, not concrete code in itself. Otherwise the point of your talk will be "we have an incompetent person working here and I'm so much better", which isn't likely to win you any friends, unless it is so obviously true that it's strange that even management haven't noticed it - even then it might just get you in trouble. Good: we didn't do unit tests, this bug would almost certainly have been caught by unit tests, that one bug cost the business more than the equivalent of a man-month of work, and a man-month of work is a whole lot of unit tests. Bad: this is code I didn't write. See how terrible it is? Why do you allow this? Maybe good, maybe bad: This code is terrible and that cost us X$ because of reason Y. If we did code reviews this code would never have passed. Code reviews cost us Z$ and X Z.

    5. Re:Create a presentation by Anonymous Coward · · Score: 0

      Yeah. Processes and Attitude need to change. The problem is that changing Attitudes is almost always impossible. As long as shoddiness is basically OK, you can have 1001 new processes, 10001 new gadgets and people will find a way to game all of it.

      Just look at Japanese vs American car makers and you will see what I mean. American workers are seen as expensive lowlife by American companies while Japanese workers are seen (by their company) as valuable warriors who will make the difference in the next battle. Every little guy can stop the manufacturing line if he sees a defect in a Japanese factory. The American guy would be fired for "stopping the money machine".

  12. Is it too late by bobstreo · · Score: 3, Funny

    to outsource your work to someone in India giving you time to peruse Reddit?

  13. Learn how to code yourself by NetNinja · · Score: 1

    You will never convince your team to write better code if you cannot review thier code and throw it back in their face.

    Also your QA person should be slapping thier dick in the dirt.

    1. Re:Learn how to code yourself by smhsmh · · Score: 1

      You might convince a team to write good code simply by trying to convince them to write bad code, provided you can obfuscate you efforts sufficiently so what you encourage is plausible.

      Herding cats...

  14. Do you maintain your own code? by alvinrod · · Score: 2

    Do you maintain your own code? If it's as bad as you say it is, it shouldn't take much to convince everyone to improve the quality. Otherwise, try to start small. See if there's a really tiny project where you can try to implement some good practices. Make sure you document your process, and record some basic metrics (e.g. time spend developing, defect density, time spent fixing said defects, . Once you've done that, compare it to some of the other projects that have been done. If the results are good, you'll have a lot easier time selling it to management and to the rest of the team. And don't expect things to change overnight either. Successfully implementing change is a process unto itself and something that can take a while to do correctly.

    1. Re:Do you maintain your own code? by Anonymous Coward · · Score: 0

      yeah, i think as someone mentioned they are continually in the weeds. just add this feature or fix this bug as quickly as possible.
      at some point the pressure from above distorts the engineering process so much all you can do is flail. as someone else
      mentioned the people giving the orders have to be convinced before you can even attempt to instill an appropriate culture
      in the developers.

      the sad thing is, it done correctly basic quality measures will mean more features over time and fewer bugs.

      my guess is that the higher ups think that if they dont keep the pressure on, software will just fuck around.

  15. Hi, I'm In QA by cosm · · Score: 4, Insightful

    Hopefully you have a QA team...if your project is large enough and you do not have a QA team, consider proposing the concept to management. Proper controls and planning on unit test, functional test, system test, solutions test, things like that are all really required to help keep large, multi-developer projects in check, especially in this day and age of migrant coders, on-and-off contractors, and out-sourced-then-imported coding jobs.

    Having strict thresholds as to allowable defects per release, enforced feature regression guidelines, expected/projected pass/fail rates per test case, etc. can all be very useful if used PROPERLY to improve code quality. I highlight properly because some managers misuse metrics as the final yardstick of worth of employees, when at the end of the day it is much more complex than developer a fixed X defects or tester Y passed Z test cases this week. Implement proper code reviews, have a consistent and formal process for testing, finding defects, defect resolution, targeted releases. Have your QA devise up with your strategies, test plans, test cases, have them cross-reviewed, and start testing cycles based on release cycles.

    If you aren't doing any of the above, imposing some of what I mentioned is sure to have a positive impact on subsequent quality. If your code sucks, it will reflect your team, your company, your management, and your bottom line in the long haul (IMHO, YMMV, IANAManager).

    Signed,
    Your Friendly Neighborhood QA Tester

    --
    'We are trying to prove ourselves wrong as quickly as possible, because only in that way can we find progress.' RPF
    1. Re:Hi, I'm In QA by Ichijo · · Score: 1

      And give the QA team enough authority to prevent buggy releases.

      --
      Any sufficiently unpopular but cohesive argument is indistinguishable from trolling.
    2. Re:Hi, I'm In QA by Anonymous Coward · · Score: 4, Interesting

      yfnqat,

      Everything you wrote is correct and well taken. However, all the things you bring up are not nearly sufficient, and I would argue they are not even the most important. As an analogy, during the '60s, '70s and '80s Detroit automakers developed a reputation for shoddy workmanship. But they did spend a lot on quality control - tons of workers were assigned the job of "reworking" botched vehicles that came off the assembly line. And their dealers learned to do their own fix up work before moving vehicles onto the showroom floor. During the '80s, after the Japanese and Germans started kicking Detroit's butt, a slew of quality consultants came along with essentially the same recommendations:

      1. Mistakes have to be caught EARLY in the process, when they can be corrected in a cost-effective manner, not LATE
      2. Vehicle design and manufacturing have to be better engineered to reduce the incidence of errors introduced during assembly

      In other words, testing is important, but good architecture is much more important. Without good architecture you are doomed to running a treadmill to keep the bugs out as the code is churned for feature development and maintenance.

    3. Re:Hi, I'm In QA by Anonymous Coward · · Score: 0

      We do have a QA team, and they have the authority to approve/disapprove a release. The problem we've seen is that devs usually give the build too late to QA, and then QA is under pressure to complete their work in time, in which things get missed (manual QA). Our QA team is in the process of writing more extensive automated regression testing (which devs will also be able to run on any build themselves), which should reduce the issue of buggy releases. Our biggest problem in the dev-QA relationship is that dev frequently uses QA as an alternate for dev testing - which we want to avoid. We want to make sure dev doesn't completely offload the effort of fixing bugs in newly written code to QA.

      However bad code may not have functional bugs in them. Bad code taking more CPU time (little latency impact right away, but adds up in the long term) or making the component difficult to maintain is something that QA can't help into.

    4. Re:Hi, I'm In QA by Anonymous Coward · · Score: 0

      These days, QA is too obsessed with automation. They care more about running software through an automatic program to find bugs to fix. Automation saves time, but automation also explains the ever-increasing escape rate of defects that ship with software. Automation has to be balanced with manual testing.

    5. Re:Hi, I'm In QA by PCM2 · · Score: 1

      Hopefully you have a QA team...if your project is large enough and you do not have a QA team, consider proposing the concept to management

      I worked for a company that had a QA team. Basically, the presence of the QA team was seen as confirmation that every engineering decision was right and correct. Never mind that nobody ever listened to what the QA team said. The fact that they were allowed to speak up at meetings was proof that everything we did had "passed QA."

      --
      Breakfast served all day!
    6. Re:Hi, I'm In QA by Anonymous Coward · · Score: 2, Insightful

      No. Please god NO.

      QA is not the Release-Police and shouldn't _ever_ put themselves in the role. QA's role is to tell you that something _is_ a buggy piece of shit, that Devs have been too stressed, that planning didn't go into architecture, and that all the "Crunch" is going to come back and haunt twice over.

      QA can have the role of saying that something stinks, but should also be able to tell you _where_ and _what_ and in some cases _how_ it stinks.

      However, QA should not be able to say "We won't release this piece of crap" because if QA starts doing that, QA will be opposed to release and Management, thus QA will never be allowed to do a good job. QA will then be the dreaded guys of white tape or code-reverts, and you don't want that either.

      What you want is to have a QA team that are your friends. Not the roadblock to release. Even if you're trying to release a steaming pile of pig manure in the shape of IE6.

    7. Re:Hi, I'm In QA by Anonymous Coward · · Score: 0

      Having strict thresholds as to allowable defects per release, enforced feature regression guidelines, expected/projected pass/fail rates per test case, etc. can all be very useful if used PROPERLY

      I keep seeing these comments every time the issue of bad code comes up. Other comments are about methodology or tools or other solutions. I never see any examples of it actually being used to create actual good code. I do however see it being attempted over and over to create horrible messes. My current theory is this is just an armchair philosophy thing in all but very special circumstances.

      So my question to you in particular and the /. community in general is, do you have good examples of this being actually done successfully ? Preferrably a set of projects being handled with the same methodology, not just one fluke project that for all we know could have been given 10+ times the amount of money/effort given to your average project of the same difficulty.

    8. Re:Hi, I'm In QA by Hognoxious · · Score: 1

      Having a QA team that have to approve everything is a total waste of time & money.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    9. Re:Hi, I'm In QA by Comrade+Ogilvy · · Score: 1

      In the long run, a QA team matters only a little unless the C-level executives care. There will always be abundant short term (and short-sighted) incentives towards steamrolling over the QA. It is the CEO who must set expectations here -- you cannot expect water to flow up hill.

    10. Re:Hi, I'm In QA by Ichijo · · Score: 1

      What you want is to have a QA team that [is] Not the roadblock to release.

      Then how can they "assure" the "quality" of the released software?

      You're thinking of software testers, not QA. There's a difference.

      --
      Any sufficiently unpopular but cohesive argument is indistinguishable from trolling.
    11. Re:Hi, I'm In QA by toddestan · · Score: 1

      The problem is that companies give lip service to the whole idea of QA being able to stop a release that's not up to standards. Except that when QA tries to actually do just that, they just get slapped down and the release goes out anyway. Once that happens the damage is done and after a few times no one takes QA seriously anymore.

  16. I feel like we already had this conversation by Anonymous Coward · · Score: 0

    two times before.

  17. GIve them a sense of ownership by brainstyle · · Score: 5, Insightful

    People do amazing things when they feel like the thing they're creating is an extension of themselves. Far more than any engineering process or philosophy I've seen, the best work I've seen in my career is from people who identify strongly with their work.

    --
    "Why can't everyone just be straight with me?"
    "Because we live in a bendy world, dear."
    1. Re:GIve them a sense of ownership by Anonymous Coward · · Score: 0

      This.

      Specifically I'd strongly recommend reading "Drive" by Dan Pink : http://www.danpink.com/books/drive

      "Most of us believe that the best way to motivate ourselves and others is with external rewards like money—the carrot-and-stick approach. That’s a mistake, Daniel H. Pink says in, Drive: The Surprising Truth About What Motivates Us, his provocative and persuasive new book. The secret to high performance and satisfaction—at work, at school, and at home—is the deeply human need to direct our own lives, to learn and create new things, and to do better by ourselves and our world.

      Drawing on four decades of scientific research on human motivation, Pink exposes the mismatch between what science knows and what business does—and how that affects every aspect of life. He demonstrates that while carrots and sticks worked successfully in the twentieth century, that’s precisely the wrong way to motivate people for today’s challenges. In Drive, he examines the three elements of true motivation—autonomy, mastery, and purpose—and offers smart and surprising techniques for putting these into action. Along the way, he takes us to companies that are enlisting new approaches to motivation and introduces us to the scientists and entrepreneurs who are pointing a bold way forward."

    2. Re:GIve them a sense of ownership by Anonymous Coward · · Score: 0

      I agree this should ideally work. In our company, the biggest sense of ownership remains with the product guy, and the engineer is effectively acting as product fulfillment. How do you instill the sense of ownership into an engineer if the idea for the feature comes completely from outside engineering?

    3. Re:GIve them a sense of ownership by Anonymous Coward · · Score: 0

      Not in a team environment. These kinds of people almost always end up being defensive and unwilling to communicate, having carved out their turf.

  18. You must convince both management and developers by bbbbryan · · Score: 1

    Figure out who stands to gain, and convince them. For management, try two tactics in the sales pitch: 1. Better customer experience (seeing fewer defects) due to higher quality code. 2. Faster and more predictable creation of new features due to higher quality code (after the investment in the needed changes) which should improve business results over time. If these fall on deaf ears, then play hardball and say that without some investment in the code base the code will become unable to support the business, and the business will not be able to continue. It takes a while to get here, but it does happen. In parallel, sell these changes to the development team so that they welcome instead of resist the changes. Make sure the dev team is part of deciding and implementing these changes. I expect that most developers would welcome the changes you suggest. If not, perhaps they would fit better in a different environment that required less disciplined software engineering practices.

  19. Just like snipe hunting by narcc · · Score: 4, Insightful

    Get your team to write "Good Code", eh?

    Does your team write bad code? Do they think that their code is bad?

    Why do you think that your team writes bad code?

    I'll bet a nickle that the problem isn't your team. I'll bet that you're the type to write a factory factory factory under the banner of "flexibility" and not understand why everyone groans at your "superior" code.

    1. Re:Just like snipe hunting by codepunk · · Score: 1

      This is one of those times when I wish I had mod points. "spot on my friend, spot on"

      --


      Got Code?
    2. Re:Just like snipe hunting by engun · · Score: 5, Insightful

      Your comment assumes that the person who criticises bad code is always a factory factory factory guy but fails to take into account that there IS such a thing as good code and bad code. The OP has outlined the reasons for why the code is bad - such as buggy releases, lack of test coverage etc. That indicates that the code or process is bad, somewhere.

      Over-engineering is a problem yes, but just as commonly, under-engineering/non-engineering is an equally big problem. Both lead to bad code.

    3. Re:Just like snipe hunting by Anonymous Coward · · Score: 0

      He's probably the factory factory factory guy AND he's probably the guy who introduces bugs all over the place, not knowingly of course.

    4. Re:Just like snipe hunting by Marxdot · · Score: 1

      Unfortunately it may be the other way around. Worst case scenario: they're all FactoryFactoryFactoryFactoryFuckers.

    5. Re:Just like snipe hunting by junglee_iitk · · Score: 3, Insightful

      GP is part of the problem. For people like him/her, it is not about good code or bad code, it is about 'my way or the highway'.

      Calling someone "factory factory factory guy" without any basis is how you get mod points on Slashdot without being correct. For all one knows the submitter might be exact opposite.

    6. Re:Just like snipe hunting by Anonymous Coward · · Score: 0

      Though not helpful, I will give you examples of code issues (Java):

      1) People check not null against ResultSet.getInt() in JDBC (to check if a nullable Integer column is in fact null or not), when it can never return null (and checking for 0 is also wrong because it might be a valid value).
      2) People acquire a lock before try catch block (where catch blocks rethrow exceptions), and don't release it in a finally block.
      3) Many objects have a getJSON() function where we create JSON by hand (using string constant and +s). And this is not a debug string - these go into our server logs, which are parsed downstream by hadoop jobs.
      4) Inside a class we assume the member is immutable, whereas one of the getters returns a mutable copy of that object.
      5) We have some encryption and decryption in our workflow. The classes which have have the encryption/decryption algorithm have a lengthy init, but don't maintain any state. Yet we create a new object of that class for every request in our server.

      We know this because when we work on some of our code, we try to "update" to a higher quality standard, and have found such issues and fixed them.

    7. Re:Just like snipe hunting by maxwell+demon · · Score: 1

      1) People check not null against ResultSet.getInt() in JDBC (to check if a nullable Integer column is in fact null or not), when it can never return null (and checking for 0 is also wrong because it might be a valid value).

      So your complaint is that they add checks for something that shouldn't happen?
      You know, in C there's even a separate header for this type of checks: <assert.h>

      3) Many objects have a getJSON() function where we create JSON by hand (using string constant and +s). And this is not a debug string - these go into our server logs, which are parsed downstream by hadoop jobs.

      I don't see any problem with that. The method name already says that it creates a JSON string, so it cannot be a case of missing flexibility (a method named getJSON that generates anything which is not JSON would be stupid). And as long as the JSON string generated is correct, then why not generate it directly?

      Indeed, over abstraction can be detrimental as well. If there's a bug, and you have to seek for hours just to find out where the actual code doing the work sits, there's something wrong.

      5) We have some encryption and decryption in our workflow. The classes which have have the encryption/decryption algorithm have a lengthy init, but don't maintain any state. Yet we create a new object of that class for every request in our server.

      If the class doesn't maintain any state, then what is the lengthy initialization for? Maybe the problem is in the design of that class instead.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    8. Re:Just like snipe hunting by rjstanford · · Score: 1

      Somewhat agree...

      The OP has outlined the reasons for why the code is bad - such as buggy releases, lack of test coverage etc. That indicates that the code or process is bad, somewhere.

      Buggy releases are a good sign that there's a problem (assuming that the bugs actually are significant in impact, of course). Lack of test coverage though is a symptom that may explain how bad releases happen, but is not in and of itself a cause of bad releases or bad code. I've seen plenty of truly poorly written and unmaintainable code that had 100% test coverage (although the tests were often testing the wrong things), and plenty of nice, clean, maintainable code that didn't have tests associated with it (at least partially because it'd be factored down to simple, understandable methods that "didn't need" comprehensive automated testing because, once written (to do one thing with no side effects at the same internal mental level) they were rarely if ever touched and the extra (small but significant) time to spend writing tests for mostly write-once code would have been a bad business decision.

      Having said that, there's plenty of time that developers (myself included) should have better, smarter test coverage. Automated unit and integration tests are amazingly useful - but they're not the end-goal of software development, just another tool in the belt.

      --
      You're special forces then? That's great! I just love your olympics!
    9. Re:Just like snipe hunting by rjstanford · · Score: 1

      Though not helpful, I will give you examples of code issues (Java):

      I wouldn't actually call most of these code issues.

      1) People check not null against ResultSet.getInt() in JDBC (to check if a nullable Integer column is in fact null or not), when it can never return null (and checking for 0 is also wrong because it might be a valid value).

      This is an actual code problem. Start a pattern of using a result set wrapper or a utility library so that people don't have to keep remembering to use wasNull().

      2) People acquire a lock before try catch block (where catch blocks rethrow exceptions), and don't release it in a finally block.

      Another problem although thankfully one that's fairly easy to mitigate (manual locks are generally although not always fairly rare and can trigger manual code reviews; if this is a major problem then a lock wrapper can be used that releases locks when its going out of scope, etc).

      3) Many objects have a getJSON() function where we create JSON by hand (using string constant and +s). And this is not a debug string - these go into our server logs, which are parsed downstream by hadoop jobs.

      This, I don't see as a problem and and of itself. The function is completely self-contained and its implementation can be ignored by all users of the class. Its possible that it does things that using a JSON library would be annoying about, like sometimes trimming/masking certain strings or making sure that the output text is always in a consistent order - also, while adding annotations to internal attributes/methods to indicate inclusion/exclusion is a good idea, if the output is intended for a specific consumer rather than general use and the formats are basically fixed, putting all of the logic into one method may be ultimately cleaner.

      If those aren't the case, its also something that can be trivially refactored from inside the classes.

      4) Inside a class we assume the member is immutable, whereas one of the getters returns a mutable copy of that object.

      That's a problem alright, but probably easier to fix then to complain about, no?

      5) We have some encryption and decryption in our workflow. The classes which have have the encryption/decryption algorithm have a lengthy init, but don't maintain any state. Yet we create a new object of that class for every request in our server.

      Also not a code issue IMO - sounds like a well abstracted design. If long-lived utilities are more efficient, then the injected/instantiated class can be modified in one place to do whatever state management is needed and the users of the utility should never notice anything other than a speed improvement.

      We know this because when we work on some of our code, we try to "update" to a higher quality standard, and have found such issues and fixed them.

      And how long did that take? What risks were introduced in touching code that worked? Were those areas also identified to QA to test independently of the documented issue that was being worked on? Refactoring code that's regularly modified and frequently triggers bugs really pay off, but that doesn't mean that the refactoring is "free" either in time or risk. Sometimes even performance tuning a heavily relied upon piece of code, such as an encrypt/decrypt routine, wouldn't be worth it if the refactoring introduced even a single production issue, whereas throwing more hardware at the problem is fairly safe. Development shouldn't be making those decisions in a vacuum without understanding the business implications.

      --
      You're special forces then? That's great! I just love your olympics!
    10. Re:Just like snipe hunting by Anonymous Coward · · Score: 0

      One should never write a factory factory factory...

      Write a Manufacturing Facility that leverages multiple Warehouse instances that all leverage multiple, local Independent Suppliers!

      Then name them A, B, C, and D :-/

    11. Re:Just like snipe hunting by Anonymous Coward · · Score: 0

      I wish that were my problem. I have much the same problem as the original poster. Our code is trash, and it's trash because my team mates don't know and don't care how to write testable code. When I say, "we need to unit test stuff" they point out some particular function with protests that it's not unit testable, as though that's acceptable. They don't see the disconnect there. Why did they write code that couldn't be unit tested in the first place? Why can't the see the obvious step of rewriting it to be unit testable? I don't know, but from your response, I'd guess you may be one of those types of people who think it's acceptable to write code that's not unit testable.

    12. Re:Just like snipe hunting by engun · · Score: 1

      Agree with what you say a 100%. To me, and correct me if I'm wrong, tests are mainly about a means to automate testing I might otherwise have had to do manually. Beyond that, I see the law of diminishing returns hitting back too hard - and the overhead of maintaining test code more onerous than maintaining the original code itself.

  20. Yes a LOT more QA is needed also out side the box by Joe_Dragon · · Score: 2

    Yes a LOT more QA is needed also out side the box testing needs to be done do not just have auto tests they are easy to code to pass them while failing big time.

  21. Get management buy-in... by mooingyak · · Score: 1

    Get management buy in, and have them pad your estimates to allow a little bit of code rework in each release cycle.

    If that fails, lie about your estimates and use the extra time to rework the code in each release cycle.

    --
    William of Ockham had no beard. The most likely explanation is that it was chewed off by squirrels every morning.
    1. Re:Get management buy-in... by Anonymous Coward · · Score: 0

      It's funny because it's true....

    2. Re:Get management buy-in... by Anonymous Coward · · Score: 0

      This is something we are already do, and fail at. Engineers quote x days for writing unittests, say, but eventually don't and then product guys come knocking on the doors asking where is their release. I think the problem is that no unittesting is considered normal, so engineer doesn't face any penalty in this scenario - measurement is entirely based on if the product guy is happy. We are discussing how to change this.

  22. My suggestion by damn_registrars · · Score: 2

    Show them this lousy website and tell them that is what happens when your company propagates lousy code - your existence goes to pot and your company is sold for very little money to a larger company who also doesn't care.

    That should scare them straight.

    --
    Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
    1. Re:My suggestion by Ash+Vince · · Score: 1

      Show them this lousy website and tell them that is what happens when your company propagates lousy code - your existence goes to pot and your company is sold for very little money to a larger company who also doesn't care.

      That should scare them straight.

      Maybe instead of just bitching about it uselessly you could actually do something useful. Go here and help fix the awful slashdot code: http://slashcode.com/www.slashcode.com/

      After all, it is an open source project like any other.

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
    2. Re:My suggestion by damn_registrars · · Score: 1

      Maybe instead of just bitching about it uselessly you could actually do something useful. Go here and help fix the awful slashdot code: http://slashcode.com/www.slashcode.com/

      After all, it is an open source project like any other.

      An open source project is an open source project, except when it isn't. Have you looked at the last release date for slashcode? Right on the page it reads

      The public Slash repo has not been updated in awhile

      And that is from a message dated 02:01 PM October 1st, 2009, written by someone who no longer works for slasdhot.

      In other words, more than three years of changes have been made to the code since the last time it was released on that site. Making changes to that would be like suggesting new extensions to Microsoft for Windows XP.

      --
      Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
  23. you don't know what the goal is by rubycodez · · Score: 1

    the goal is to remove as much money as possible as soon as possible from customer's pockets and to put it in the pockets of your senior executives and stock holders. now shut the fuck up, quit jacking off on company time whining on slashdot, and get that shit shoveled out the door!

  24. Seek employment elsewhere by Anonymous Coward · · Score: 1

    Look for another job and be vocal about it. This is one of those cases where you have to be selfish and look after your own interests. Get your co-workers to do it too.

    There are three possible outcomes and they all have upside for you.

    1. They pay attention and fix things
    2. You leave and get a better job
    3. They fire your ass and you get a better job

    Clearly your present position is not advancing your career. Your future as a developer is mired in the same muck as your code.

  25. BEER!!! by Anonymous Coward · · Score: 0

    Dude most stupidest question ever...

  26. Start a new company, its the only way. by j-stroy · · Score: 1

    Embed your culture in a fresh structure. Your core team will have high ideals. Your new hires will be ambitious. Overvisioning will force you to cut corners to keep your first contracts and meet milestones so that everyone has a job. You will move forward with the intention of a version rewrite that addresses the hacks. New hires will question the legacy BS, Rinse, Cycle, repeat.

  27. Start small and do it in stages. by ralphbecket · · Score: 5, Informative

    (1) Code reviews. At first, just get 'em to grab a passer by to look at their code prior to check-in. If the PB cannot understand what they've done, they haven't finished the job. Later on you can upgrade to more stringent reviews, but the first thing is to get *some* reviews happening *at all*.

    (2) Comments and (some) documentation. You need to lead by example. This stuff isn't optional.

    (3) Unit testing. If your code base is a pig, you'll need to start somewhere and begin teasing out the "bits that think" (easier to UT) from the "bits that talk to things" (these are harder to UT and you can get away with integration testing here until you're in better shape). Unit testing is a skill anyone can learn. Sack 'em if they refuse to do it!

    (4) Simplify your processes and your architecture where possible. Avoid trendy bandwagons. If the obvious thing works and is maintainable, then that is probably the best way to go.

    1. Re:Start small and do it in stages. by coofercat · · Score: 2

      (5) Longer time-scales (at least for a time)

      If you're being hot-housed, you get something that ostensibly works out the door, and "to hell with the unit tests". I someone told me "I need X in a week", I'd just hash together any old crap that essentially meets the requirements. If they told me "do it as quickly as you can, let me know when it's done", then I'd probably spend a bit more time planning it out so that I could make a better job of it, and be reporting my progress along the way.

    2. Re:Start small and do it in stages. by laffer1 · · Score: 1

      Code reviews are great for developers early in their career. I think they can be insulting to mid to senior level people. I've seen shows force code review on every commit and it turned into a giant backlog of code reviews. You can't add the extra work of code reviews without adding developers or lowering the work load. They take time.

      Like anything, it has to be done correctly.

      I'm not suggesting that code review can't be useful to older programmers, but it has to be done delicately. It also can't be arbitrary criticism because you don't like someone's style.

    3. Re:Start small and do it in stages. by Anonymous Coward · · Score: 0

      Anyone who is insulted by a code review is too arrogant to work for me. I am a CTO and my code is reviewed by my staff.
       

    4. Re:Start small and do it in stages. by ralphbecket · · Score: 1

      I don't know why you were down-voted (well, other than this is Slashdot where egos are fragile things).

      I completely agree: I want my code to be reviewed for two reasons. First, a second pair of eyes invariably catches a problem I've missed, even if it's not having adequately explained my code. Second, I want to show off how cool my code is and set a target to aim for :-)

    5. Re:Start small and do it in stages. by ralphbecket · · Score: 1

      You must know some astounding programmers. I've been doing this for thirty years, I've a PhD in the subject, and I still grab people to review my code (wherein they often find something to fix). Maybe your experience of code reviews has been adversarial? They shouldn't be like that at all.

  28. Quit and work somewhere else by cryfreedomlove · · Score: 1

    You sound like a smart person who wants to be surrounded by great colleagues. There is a tremendous shortage of computer science talent nationwide. You don't have to work for a company that 'does not get it'.

  29. Act on your own initiative, and beg forgiveness... by Lodragandraoidh · · Score: 1

    I've had great success acting on my own initiative and begging forgiveness afterwards.

    That being said, the bottom line is I was able to show marked improvement. If your tools and processes have no tangible benefit - then I'm sorry, but you're going to have to pay the price for your insolence.

    --

    Lodragan Draoidh
    The more you explain it, the more I don't understand it. - Mark Twain
  30. Read "Code Complete", follow its guidelines by Anonymous Coward · · Score: 0

    Buy everyone a copy of the book "Code Complete". Give them a few days to read it, then have everyone agree to follow its guidelines. Done!

    http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670/ref=sr_1_1?ie=UTF8&qid=1358912261&sr=8-1&keywords=code+complete

    1. Re:Read "Code Complete", follow its guidelines by Marxdot · · Score: 1

      A better option is to study the Plan 9 source code or read the Practice of Programming.

  31. scrum and xp by Anonymous Coward · · Score: 0

    ask your question here...

    extremeprogramming@yahoogroups.com

    and here...

    scrumdevelopment@yahoogroups.com

    captcha: moulding

    1. Re:scrum and xp by Anonymous Coward · · Score: 0

      Are people really still doing XP? OMFG...

  32. Do the following: by Anonymous Coward · · Score: 1

    1. Write the worst code you possibly can.
              - Unnecessary subclassing and then reference methods or functions from two or three or four subclasses away.
              - Use variable names that don't reflect the values that hold them
              - Use as many classes as possible
              - Make the code as fragile as possible, use threading if possible avoiding mutexes
              - Make a lot of files that do very small things
              - Put large blocks of untested code that only run once a day.
              - Implement large data structures two different ways and then write fragile translation code to transform one object to another
              - Create an api that requires it's own processing loop completely incompatible with other processing loops.
              - Declare the current language insufficient for your task and rewrite everything in lisp.

    2. Leave and start a new company

    1. Re:Do the following: by c0lo · · Score: 1

      1. Write the worst code you possibly can.
      (long list)

      Used to be quite easy in the past. With C, you just needed let your pointer variables uninitialized or free twice the same memory.

      --
      Questions raise, answers kill. Raise questions to stay alive.
    2. Re:Do the following: by smellotron · · Score: 1

      Write the worst code you possibly can.
      <useful context snipped>

      Used to be quite easy in the past. With C, you just needed let your pointer variables uninitialized or free twice the same memory.

      What do you mean? Do you mean that C is a dead language, or that these problems no longer occur in C languages? Or maybe you mean that the types of developers who frequently had uninitialized-variable or double-free bugs no longer use C? The GP's list is all about bad data-structure design, and that can be done equally well in all languages. Maybe you're joking with the C comment, but I don't see the humor in inaccuracy—and I think it detracts from an otherwise excellent list of ways to totally screw with your maintenance programmers.

    3. Re:Do the following: by Anonymous Coward · · Score: 0

      Write the worst code you possibly can.

      <useful context snipped>

      Used to be quite easy in the past. With C, you just needed let your pointer variables uninitialized or free twice the same memory.

      What do you mean?

      It means the Heisenbugs were the worst kind to diagnose in my youth and that, nowadays, I seldom program in a member of C languages (which is a pity, 'cause I'm missing the most effective way - in terms of knowledge/effort - to screw my maintenance programmers).

  33. Bribery and Punishment by vinn · · Score: 4, Interesting

    Ok.. those are strong words in the subject, but inducing a culture change quickly is something you can incentivize. I'm not sure of your particular situation, but here's two ideas:

    1. Bribe them. Companies usually call this merit based bonuses. Break the goals of the team(s) into individual goals. If a particular module is due to be rewritten for the next release, then pay a bonus if it gets done correctly and on time. If it's not done correctly, don't pay the bonus. If it's not on time, don't pay the bonus. With regards to it being "correct", that falls into the next item..

    2. Punishment. If the code sucks, don't commit it. Force the programmer to rewrite it. That even might mean rearchitect it if there was architecture involved. Programmers hate repetition. They will very quickly learn that if they are forced to do something over that they can do it better the first time. If they find themselves working late hours to meet a deadline, perhaps because a bonus is riding on it, they'll get better.

    Most important, make sure your deadlines and features are realistic. Are you sure they are? Are people being sloppy because they feel too pressured? Shipping a buggy feature isn't a feature.

    --
    ----- obSig
    1. Re:Bribery and Punishment by Anonymous Coward · · Score: 0

      1. Peer review, peer review, peer review.

      Everyone makes mistakes. Sometimes its sloppiness, sometimes arrogance, often oversight. Take heart the advice of the parent and require all commits be reviewed before acceptance to trunk.

      2. Simplify simplify simplify. Do not accept complex code. Use a tool that measures mccabe cyclomatic complexity (it might even be built into your IDE). With the exception of large switch statements and time critical inner loops, reject any code with a cyclomatic complexity of 11 or higher. Bugs correlate exponentially with code complexity. Have the developer refactor the code so it is less complex. This may mean turning a 25 line method into a 20 line method and an 8 line method, which ends up being more code, but the resulting code will be superior. Any CS grad will be able to read the code, understand what it does and be able to determine if it does what it is supposed to.

      3. Test test test. Shoot for 100% coverage. You won't get it at first, but keep plugging. As coverage goes up, hours spent debugging will go down. All that refactoring you did in step 2 will make it vastly simpler to obtain coverage.

      4. Track track track. When a bug is found/reported. Analyze where it occurred. What what the McCabe complexity of the method? What was the test coverage on the method? Was the code uncovered or was the test flawed or was the actual functioning of the code misunderstood? You will find that bugs gravitate towards the complex code because the no one understands it, especially not the new guy who's just been there for a month.

    2. Re:Bribery and Punishment by Anonymous Coward · · Score: 0

      If you use words like bribery and punishment you've already failed.

    3. Re:Bribery and Punishment by Anonymous Coward · · Score: 0

      3: Swing the axe. I worked as a consultant for a company that ditched virtually all its developers and offshored the whole codebase, the only devs here in the US were extremely hard-working H-1Bs. The result was the next rev with both bugs stomped and features ready to go in far better time. This is a far bigger improvement from the past where bugs were only stomped when threats were directly given from on high.

      Realistically, get in touch with Tata, or another top tier coding agency. You will be glad you did because you will get an actual guarantee of code quality and release date. You will pay *pennies* on the dollar that you did before the switchover, both in costs of deadweight and payroll taxes.

      At the minimum, pull out the pink slips and get the worst apples out of the bunch. Firings are the only way to get some coding teams in a functional state sometimes.

    4. Re:Bribery and Punishment by Anonymous Coward · · Score: 0

      5. Don't repeat yourself.

    5. Re:Bribery and Punishment by Anonymous Coward · · Score: 0

      6. The oft forgotten last step of the scientific method is repetition. If you can't repeat it, it's not a process.

    6. Re:Bribery and Punishment by Hognoxious · · Score: 1

      Bugs correlate exponentially with code complexity.

      No they don't.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  34. Which part of the team you need to convince? by c0lo · · Score: 1

    and we know what needs to change technically

    Which we?

    Is the technical team than need to be convinced? Either you convince the guys to do the right thing (write better code as part of professional pride) or you need to convince the managers to impose doing the things right (i.e. better processes, tools, infrastructure). Did you note the difference between doing the right thing (part of the leadership) and doing the things right (part of management)?

    If it is the management team that need to be convinced, then either:
    a. the cost of lack of quality is greater than the cost of "missed opportunity" (i.e. the cost of not releasing in time). In this case, management should be on your side and be ready to accept an extra investment in setting up the quality system; or
    b. the cost of lost opportunity overshadows the cost of non-quality - in which case your focus on quality may not be the right thing (for the business) and you should consider your position: accept the risk of non-quality and forge ahead to early releases (maybe you'll get enough time to fix the bugs) or not accept it and find for yourself another employer.

    --
    Questions raise, answers kill. Raise questions to stay alive.
  35. QA by DavidClarkeHR · · Score: 3, Interesting

    Hopefully you have a QA team...if your project is large enough and you do not have a QA team, consider proposing the concept to management. Proper controls and planning on unit test, functional test, system test, solutions test, things like that are all really required to help keep large, multi-developer projects in check, especially in this day and age of migrant coders, on-and-off contractors, and out-sourced-then-imported coding jobs.

    My wife works in QA, and simply having a QA team is not adequate. Yes, it is one more check (or balance), but it's also redundancy that can quickly overwhelm the primary focus of your coding team.

    You need strong leaders in your coding group. If you have strong coders, and they're not strong leaders, think about structuring the work in a way that forces the code into spec. Find ways to develop those leadership attributes, and train the other coders to conform. The nice thing about working with coders is that a structured training program (training, as in behaviouralism) will work - routines, structure and cause/effect (or compulsion loops) are much easier to implement with an emotionally detached, logical group of individuals. You can actually discuss the "training" routine (but don't label it as such) and expect a level of rational resistance to change. Rationality can can be worked with, and in my experience, you don't get people who are much more rational than coders.

    It doesn't have to be a permanent arrangement, and it doesn't have to involve raises. It does have to give your team an opportunity to make the transition to a new way of coding without feeling threatened. Think of it as a clean break from a bad relationship. You can't stay friends, you need a complete change of scenery.

    --
    - Nec Impar Pluribus, or so I'm told.
  36. The Politics by Anonymous Coward · · Score: 0

    Don't rock the boat.

    Although pride of workmanship improves profit it's viewed as a counter to the current direction of the wind. This is a matter for which management will ultimately be blamed. However, as producers you should learn to understand the source of the flawed code beyond time constraints.

    "Management creates quality", W Edwards Deming

    1. Re:The Politics by rjstanford · · Score: 1

      Don't rock the boat.

      Although pride of workmanship improves profit it's viewed as a counter to the current direction of the wind. This is a matter for which management will ultimately be blamed. However, as producers you should learn to understand the source of the flawed code beyond time constraints.

      "Management creates quality", W Edwards Deming

      Also, understand your role and the role of your company. Not every level of craftsmanship is appropriate for every level of project.

      --
      You're special forces then? That's great! I just love your olympics!
  37. Well let's see by scamper_22 · · Score: 1

    "Our code quality and general engineering quality focus has been very weak"

    So you want people to write good code on top of crappy code. This is hard for people to do. Just as it would be in any field to fix up crappy work. A carpenter, plumber, artist... will all be demotivate worked on a botched job.

    "and it is impossible for a newcomer in our team to get up to speed and be productive in less than a month due to unnecessary complexity"

    How many newcomers are joining your team that this a problem? Lots of churn in your staff is going to be a detriment to performance. No different than any team based sport.

    Before you worry about details like code reviews... you must get the picture right. Do you value software developers as a skilled profession to train them on the code base, keep members on the team for their knowledge...

    Better still, are you hiring good people? You can't convince me to be a good artist. I can't draw for the life of me.

    After that, focus on quality in new code and components. Provide some time for rewrites of code they really hate.

  38. Here, Let Me Try... by Greyfox · · Score: 1
    *ahem* Write better code or you're all fired! You have one month!

    That ought to work.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  39. Reading and writing... by Anonymous Coward · · Score: 0

    In programming, there's a lever... In one side you have: more time writing, in the other side you have: more time reading.
    Code is written once, but read many, many fucking times.

    If you ignore the importance of readable code, think in the following scenario: your product finally went live, and there's a bug. There is no fucking time to fix it. In that moment, you would like to look under the hood and see something that makes sense. Bad code will be hard to read, you will maintain it, and possibly introduce another bug, then another fix is issued, but another bug is introduced, and so on.

    Write decent code. Challenge duct tape programmers, they poison your project and the industry.

  40. Dollars & Sense by multimediavt · · Score: 4, Insightful

    Yep. You're going to have to make a business case for what you want to do and show management what it will save in $$$ or change will come with much more pain, if at all. You are going to have to argue sensibly and make sense to them in a language that they understand. This should be at most two to three pages covering the nature of the problem, how it can be solved and a budget and/or cost comparison. You want to be coherent and concise without getting into too much detail and three pages is about as much as you can ask a high-level manager to read. You are talking about major process change within the structure of the company. You might think it's trivial (or not), but understanding as much as you can about what effect this has across the board (not just in the software you're writing) will help you make a better case for this kind of change. You will also need to appeal to the bottom line.

  41. Management is not on board - You're fucked by bigsexyjoe · · Score: 1

    What you are describing is a work place that does not follow modern software engineering practices. Management does not see the value in it. It will not devote the resources to cleaning up the code or refactoring. It will not develop training for new employees.

    Of course, two or three of you want to change it. I think "you" are two young people who don't understand that management doesn't care you have an older friend who agrees it could be better (although he understands nothing will change).

    I think it's pretty hopeless but it might be worthwhile to make some effort. You and your friends can put together a pitch to management. Emphasize that what you are suggesting is the orthodox way of developing software these days. Try to keep the things you want simple and practical. You might want to show management this Slashdot article so they can understand the perspective of the software engineering community on this issue. But don't come across too angry and or too radical in your suggestions. Be agreeable, and watch for changes with a cynical eye. Remember management might say they agree with you, but talk is cheap.

    Other than that, I think you need to serve your time where you are at, and then leave for some place better. Listen to lots of podcasts and read lots of articles. Keep abreast with the latest technologies and practices. This will help when it is time to leave.

    You will eventually learn that you can't fix management. You are not in the position to fix everything about your place of work.

    1. Re:Management is not on board - You're fucked by Anonymous Coward · · Score: 0

      Bang. Nail. Head.

  42. Kill the "product guys" by chriswaco · · Score: 1

    Date-driven development is almost always a disaster. The only way it works is to completely finish a reduced feature version of the application, add and test one feature at a time to it, and ship what you have when the date is hit.

  43. TDD by Jane+Q.+Public · · Score: 2

    TDD forces good test coverage, and reduces or eliminates regression errors.

    Also, TDD is correlated with successful, robust software, but code review generally is not. (Unless you count QA as "review".)

    1. Re:TDD by Anonymous Coward · · Score: 0

      How about reviews as part of QA? Even with it merits, TDD also grows code base because tests are code too, incurring a maintenance overhead, so it may or may not be cheapest way to do things.

  44. Re:Yes a LOT more QA is needed also out side the b by Savage-Rabbit · · Score: 1

    Yes a LOT more QA is needed also out side the box testing needs to be done do not just have auto tests they are easy to code to pass them while failing big time.

    You also need a management that is willing to stand behind the QA team. QA can be a thankless job and when you start trying to teach new tricks to a bunch of old dogs who have gotten away with sloppy work for years it can lead discontent in the ranks. When the QA team starts doing things like limit developer's freedom to do projects in any language they happen to have the hots for at the moment, implement a code syntax checker to enforce coding standards, mandate a set of standard coding tools, make devs write unit tests, make user tests mandatory, throws code back at devs because it failed testing, .... (the list goes on) developers get pissed off and sometimes management folds. You will not change anything until you declare that untested and unreviewed equals unfinished if you really want to piss the developers off you can add the caveat that undocumented also equals unfinished. Just remember that the best way to boil a developer is by turning the QA heat up slowly. Don't make too many changes at once. Another thing about QA is that alluvasudden (according to CS studies) your developers are spending 5+ hours writing unit tests etc. for every 10 hours they spend writing code and that is not always popular with other people within the company who have grown used to them pumping out a lot of code with quality being a fortuitous byproduct of making deadlines.

    --
    Only to idiots, are orders laws.
    -- Henning von Tresckow
  45. My Team has the Exact Same Problem by Anonymous Coward · · Score: 1

    There is too much backlog of work, and despite bringing in new people for the express purpose of improving project management, not much is changing. Our team lead is (understandably) not very enthused about suggestions to improve things, since he is up to his ears in client requests and complaints, and all of us spend all our time barely making our deadlines using the cobbled-together framework we're used to.
    It seems like a self-perpetuating problem... every time we talk about fixing things, it's always "after we catch up on our current projects."

    1. Re:My Team has the Exact Same Problem by nullchar · · Score: 1

      The only solution then is to "fix it as you go" -- thus, each "current project" action must re-write modules or add unit tests or create documentation to slowly dig your team out of their hole.

      You don't have to re-write the entire application, or create huge flow charts showing how everything works, but a little here and a little there, along with some quick code reviews so the "right hand" of the team knows what the "left foot" is doing.

      Good luck!

    2. Re:My Team has the Exact Same Problem by Anonymous Coward · · Score: 0

      Setting up Scrum roles and practices might help - have the client appoint a Product Owner, responsible for collecting, (re-)prioritizing and in general maintaining the product backlog. Maybe for both feature requests and complaints, set up bugzilla and file everything there - give Product Owner rights for setting bug/feature priorities. Get a Scrum master, besides other things to help Product Owner figure out how to do the thing - non technical people often happily accept the guidance - to make sure comms flow well between the team and client, preferrably with the Product Owner talking directly to the devs, to avoid the 'broken telephone effect'. Team lead will no longer be burdened with stochastic and random feature requests and can focus in his/her work - leading the team.

    3. Re:My Team has the Exact Same Problem by gnasher719 · · Score: 1

      It seems like a self-perpetuating problem... every time we talk about fixing things, it's always "after we catch up on our current projects."

      How do you eat an elephant? One byte at a time.

      Make it a rule: Whenever you make a change, improve _one_ thing. Depending on how bad the mess is, it may actually safe time each time you do it. Remove one static variable. Or one public member. Or one warning that the compiler gives you. Create one header file that should have always been there. And so on, and so on.

  46. Be professional by valentinas · · Score: 1

    Infrastructure, tools, culture.

    Infrastructure: continuous build server, that runs unit tests, continuous deployment to staging servers (and eventually live), github, github enterprise (or equivalent)
    Tools: depending on what language you are working with - there are many great tools to monitor code quality. Good example would be resharper for c#.
    Culture: Get everyone to do pull requests to main repo. No direct committing. Also no merging your own pull requests. Someone else has to do it and while doing it review it. Only give commit access to main repo to trusted people. Give them ability to give commit access to people they trust too. Call people on bullshit code.

  47. It starts at the top. by Anonymous Coward · · Score: 0

    The environment I'm working is a semi-military establishment with its top-level management ex-military former mainframers. And the situation there is that they have gone from having virtually no QC process in place to a water-fall model that allows the top managers to micro-manage the software development lifecycle at almost all stages, which they do.

    Here are some further characteristics contributing to this malaise:

    - Weak technical leadership, mid-level managers either have a very-out-of-date IT skill-set or do not have an IT background at all. This means that management is at a disadvantage when weighing technical solutions up front and going forward. This also usually leaves major technical decisions to the discretion of junior staff, who may not be sufficiently conversant with the technology they advocate (for example, recommend one solution that works fine for a small web-server with moderate traffic but does not at all scale up to large traffic environments), and this causes projects to fail.

    - Lack of credibility with business section. Due to problems created by the previous reason, the business section, lacking faith in their IT deparment, then is tempted to (and in the place I am working actually does) dicate technology decisions to the IT department. The see some expensive tool or platform and then dictate to IT that they have to use it. IT having no choice in the matter purchases said snazzy tool/platform, runs into big problems cost overruns, and then gets further blamed for incompetency. A senior VP in the technology department was forced to retire because of a decision imposed on him by business that ran into cost overruns.

    - Lack of incentive for developing skills in-house. The establishment I am at is using more and more commercial J2EE solutions, but they are unwilling to either train their current development teams in Java or hire people with J2EE experience. Even mid-level managers are complaining about this. In their words, top-management thinks if it can't be done on a mainframe, then it can't be done.

    - The preceding points to a BLUE COLLAR CULTURE in the IT department fostered by management at top- and mid-levels. What is "blue collar" about the IT culture is that it is expected that little or no innovation is expected to take place in the course of developing solutions - even in new product development. Research and development is generally frowned upon as unnecessary.

    - And when the blue-collar IT culture runs into reality, expensive contractors or contracting firms become a necessity, because you lack the inside technical expertise to implement new technologies. Hardware and software becomes obsolute and unsupported, and especially if a whole line of software or hardware becomes end-of-lifed, you had better be prepared to port your legacy apps to some new platform. New customers with lots of money and influence also have their own demands, which a stagnant IT department is ill prepared to accommodate.

    And so the vicious cycle continues.

    The problem is fundamentally one of who is in charge, and a distant second is who you hire. But mainly it is who is in charge, because they are the ones who hire or fire.

    If the problem is fundamentally about who runs the show (and they have to have clout with other influential down-stream customers, like the business section or customers or board members), then start with your CIO or even your CEO. Yes, they will make most of the difference. They can start giving underperforming or toxic mid- and top-level managers "golden handshakes" and replace them with more competent people. Incentives can be put in place to improve staff. Hire better developers (if you are weak technically and are a manager, then hiring good people is more a function of luck than anything). And so forth.

    So, the answer to your question (what can be done to change the culture) is very little. You can't do much at all from the bottom. Even if you are a mid-level manager there is not much you can do to change things. I've had the

  48. It's going to be hard by engun · · Score: 1

    The truth is - unless people realize it for themselves - it's really hard to do. Not every programmer has pride in their code and a genuine desire to learn and improve. Let's say you get approval to rewrite the code and reduce the unnecessary complexity. Most likely, the code will break and you won't know till it's too late. This is because, no matter how convoluted the logic - it would still be relatively debugged code. Rewriting stuff will break things, and without the unit tests - it's really hard to even get a clue where. As a result - people will blame the rewrite for the new bugs - and still never get the point.

    My suggestion is, start with pushing for process and get tests written for existing code. Try to convince people that the reasons for your release problems are the absence of good process and good tests. Explain that tests are a way to automate the drudgery of manual testing and will save time - so that it is comprehensible to management. Once those two are in place - you can safely rewrite the code without breaking existing functionality - thus avoiding being blamed for your "meddling". You can then start pushing for code refactoring next. Eventually - it will be possible to display the tangible benefits of a well-structured code based. It'll be a long hard slog.

    Sometimes though - the people around you are too calcified in their thinking to want to learn or to do things "better". In that case, find another job.

  49. Schedules by boundary · · Score: 1

    It's not just about writing better code. You also need to ensure that you have enough time to do a proper job. Sounds to me like you could do with sorting out your estimation process. If you're running out of time to do a decent job, give yourself more time, or de-scope the delivery. When you get code & test estimates, are you taking into account the fact that your code sucks, so you need to add more time for the rework that is bound to occur?

    A product manager who will never de-scope functionality or move the date for the sake of quality has no pride in his work, and I'd strongly advise against working in a company where such people rule the roost.

  50. Here's how you solve this one. by cshark · · Score: 0

    Just based on what you seem to be saying, it sounds like there are a number of issues. These issues are probably more social than they are technical. It also sounds like the team has little incentive to do the right thing, and that you more than likely have a clueless project manager (probably, but not necessarily a woman) who refuses to understand the technical aspects of whatever it is you're doing.

    If the problem is poor management, you're going to need a better project manager. Someone with a history of delivering results in situations like this. Unfortunately, great project managers are so few and far between, that I can say with some certainty that it'll take you at least a year, possibly longer to find the right one.

    If you're certain the issue is not the project management, take a look at the processes, and limit who has commit rights on the main cvs/subversion/git branch. In fact, you actually want to go so far as to give the keys to the main branch to one person who will be held accountable for the quality of the overall system. This way, nobody feels left out or punished. And everybody feels bad for the guy who can be fired for your fuck up... at least, until he starts pushing back on bad code.

    Require all code to go through an approval and review process by this person before it can be committed to the main branch of your source repository. If necessary, tie this person into the quality assurance apparatus that you already have in place for your product. Sell it to this person as a "promotion," and pay him a couple grand more a year to do it. It's not going to kill the company, and it should be enough for this guy to take the job seriously.

    Throw the word specialist, or manager in his title, and give him the the power to send code back when it needs to be fixed. Make no mistake... feelings of empathy for his plight won't last long, and he will be hated if he's part of Q/A, unless he's exceptionally charming. But do not flinch on him being the one and only person allowed to commit to main, come hell or high water. There will be objections, and they will most likely come from your worst offenders.

    I know it sounds harsh. It's just that there aren't a lot of ways to fix a situation like this one. In my experience, this method is the least invasive of the options you have available, but it can be quickly derailed by bad or inappropriate project management or team governance. Be careful, see it through, and you'll be fine.

    --

    This signature has Super Cow Powers

    1. Re:Here's how you solve this one. by Anonymous Coward · · Score: 0

      > a clueless project manager (probably, but not necessarily a woman)

      Where the hell did that come from?

  51. Frequent beatings by Anonymous Coward · · Score: 0

    until morale and performance improves

  52. Small incremental change by phantomfive · · Score: 1

    How do we effect the social change necessary to convince them of what is better and encourage them to take the effort to do it?"

    Make small incremental changes If you try to make all the changes at once, you have a high probability of failure; both at the implementation level, and at the 'convincing management' level. Choose a small change that has a high probability of success, for example, set up Hudson to do automated builds. When people see benefit from that, they will be more likely to make other changes. One thing at a time. But:

    we have frequent buggy releases,

    This raises a warning flag. Are you adding bugs to the product that get released? If so, you are the problem. First figure out how to write high-quality code yourself. That is your first step, even if you're working on a messy code base that isn't an excuse to make things worse. Don't even think of telling your team what to do if you can't write stable code yourself.

    --
    "First they came for the slanderers and i said nothing."
  53. abstract singleton factory method bridge prototype by Anonymous Coward · · Score: 2, Funny

    I'll bet that you're the type to write a factory factory factory under the banner of "flexibility" and not understand why everyone groans at your "superior" code.

    That is so 2008! These days we've shown that an abstract singleton factory method bridge prototype facade is the only way to go for maximum flexibility! Get with 2013! :-)

    Now if you'll excuse me I have to go write my unit tests for the old factory factory singleton - see how the old way makes it difficult to test!

  54. Bribery by ProfessionalCookie · · Score: 1

    Have you tried making sure they have access to great food and drinks?

    1. Re:Bribery by maxwell+demon · · Score: 1

      Have you tried making sure they have access to great food and drinks?

      With the quality of the food/drinks reflecting the quality of the code?

      --
      The Tao of math: The numbers you can count are not the real numbers.
  55. Take one for the team by Anonymous Coward · · Score: 0

    One of you has to take one for the team and become director of engineering.

  56. Have an hour meeting every week by lawpoop · · Score: 2

    My team has an hour meeting every week where we review code, how it could be better, what we can do better next time, how our overall system could change and improve. Instead of ragging on people, we sympathize when they are under deadlines and stress. People were hesitant and embarrased at first, but over time, as we've nurtured a supportive envrionment, people feel free to air their problems and ask for help. Knowing that your teammates truly have your back makes you feel good about yourself want to succeed. Sometimes people will give presentations of design patterns, functional programming, certain libraries, or new technologies like REST. Nothing big and fancy, just enough for everyone to get a handle on it and small enough to digest mentally. I don't know if this can work on every team because IT people seem to have a pandemic negativity and perfectionist syndrome. In the long run this just makes you give up and write crappy code, when you believe everything is futile and worthless when it's not perfect.

    --
    Computers are useless. They can only give you answers.
    -- Pablo Picasso
  57. Social Change? by Anonymous Coward · · Score: 0

    Why is social change the preferred method to convince anyone that your way is better? You will probably have more luck with facts and well formed arguments in favor of your approach.

  58. Automated tests facilitate fast development by Anonymous Coward · · Score: 0

    Start showing how much faster you can get work done by building and maintaining your own test suite. Once they start to like the idea, they will ask that it becomes a fully automated system with full team focus. You won't need to convince them.

    That is the main thing but the aforementioned "sense of ownership" is a great idea, too.

  59. Wrong focus by Dcnjoe60 · · Score: 1

    You have the wrong focus. Expending your energy to "How do we effect the social change necessary to convince them of what is better and encourage them to take the effort to do it?" will get you nowhere. If you want to improve the code, it is not the programming team you need to convince. You already state that code suffers to meat the deadlines.

    If you want code to improve, you need to convince management of the value of the improved code, so that it becomes their priority. Until they value it, the deadlines won't change and the code will continue to suffer.

  60. Appalling code by Anonymous Coward · · Score: 0

    You don't work for Oracle do you.

  61. Get good programmers by Anonymous Coward · · Score: 0

    You say you have software changes with a lot of bugs, bad design and slow implementation. All these are signs that you have bad programmers. No amount of culture fixing and procedures can fix that problem. Identify your good programmers and make them do all the programming (If you have no good programmers , you will have to hire some). To the others assign support roles or let them surf the Internet all day if you cannot fire them. It is not that difficult to identify the good ones. They are the ones whose changes go in with few or no problems.

  62. Have a programming contest by seven+of+five · · Score: 1

    First prize is a Cadillac Eldorado
    Second prize is a set of steak knives
    Third prize is "you're fired."

  63. Nope by russotto · · Score: 1

    We feel that if the right thing is done every time, we would can eliminate our issues and still release at the same pace.

    Nope. Writing better code generally requires more time. People will try to tell you otherwise, but either they're just off base, or they're confused by the fact that the amortized time of writing good code is less than of writing code as quickly as possible. That is, if you write all quick+dirty code, you reach a point each new feature you add takes much longer than if you had written all good code. However, at any given stage, it's quicker to write the quick+dirty code.

    And of course, once you're in the hole and full of quick+dirty code, it takes extra time to replace it with good code.

    1. Re:Nope by gnasher719 · · Score: 1

      Nope. Writing better code generally requires more time. People will try to tell you otherwise, but either they're just off base, or they're confused by the fact that the amortized time of writing good code is less than of writing code as quickly as possible. That is, if you write all quick+dirty code, you reach a point each new feature you add takes much longer than if you had written all good code. However, at any given stage, it's quicker to write the quick+dirty code.

      Absolutely true. By making the decision that is more profitable _right now_ you get yourself into a hole and eventually you lose out. But since it's code, your managers may not understand.

      Now ask them to compare Dell and Apple. One company did all the right things to make more money, and now it looks like they are up for sale. The other never listened to customers, never listened to stock analysts, never cared about money but only about making great products, and ended up having about $100bn in the bank.

    2. Re:Nope by rjstanford · · Score: 1

      Now ask them to compare Dell and Apple. One company did all the right things to make more money, and now it looks like they are up for sale. The other never listened to customers, never listened to stock analysts, never cared about money but only about making great products, and ended up having about $100bn in the bank.

      Then look at NeXT who did everything "right" and hemmoraged through obscene amounts of money without ever coming close to breaking even. Like many things in business, its about getting the balance correct.

      --
      You're special forces then? That's great! I just love your olympics!
  64. Another vague post - replies will come anyhow by NotQuiteReal · · Score: 1

    "I am part of engineering team that maintains a very important component in our company [we'll let that slide, if your code is that bad and the company hasn't folded yet, it can't be THAT important]. Our code quality and general engineering quality focus has been very weak [don't do that. Even Ford says Quality is Job One, of course they make cars, which can be a lot easier]: we have frequent buggy releases [what? no QA department?], our latencies are shooting up [your code runs slower and slower - or your is taking longer and longer to get out, even without QA(see last)], our test coverage is nearly non-existent [Again, sounds like you need QA/QC tools], and it is impossible for a newcomer in our team to get up to speed and be productive in less than a month due to unnecessary complexity [any non-trivial code will take that long]. A group of 2-3 of us want to change that [out of how many? out of 4? out of 1000?], and we know what needs to change technically — the better code review and release processes, better build tools, etc. But despite that [so, despite knowing the problems, nothing is changed... I think you have answered your question], the quality of our code and design [both?] continues to suffer, and poor code continues to get released in the name of keeping the scheduled release date (product guys don't like to wait) [so, they are on commission, and you are on salary - win-win!]. We feel that if the right thing is done every time, we would can eliminate our issues and still release at the same pace [uh? so do it?]. How do we effect the social change necessary to convince them [who? the "bad" programmers? the "release-it-now" managers?] the of what is better [for who? your workload or their sales commissions?] and encourage them to take the effort to do it? [Similar to Q:How to make a million dollars? (paraphrasing Monty Python) - A:'think of a really, really, good idea, and make a million dollars!']"

    --
    This issue is a bit more complicated than you think.
  65. Money, and recognition !! by Taco+Cowboy · · Score: 3, Insightful

    As one who has plied this trade for decades, I'll tell you that programmers are human beings, just like everyone else.

    We urge for recognition, and we need money.

    You just do not tell us to do what you want us to do without recognizing the hard work we have put into debugging the products.

    And you will not go anywhere if you do not pay us.

    --
    Muchas Gracias, Señor Edward Snowden !
    1. Re:Money, and recognition !! by Anonymous Coward · · Score: 0

      I think we do recognition well our pay is competitive to the likes of Google, though the equity is private (I am an ex Google engineer who got a raise joining this company).

      It is the historical mindset baggage which is causing us the problem.

    2. Re:Money, and recognition !! by Maximum+Prophet · · Score: 1

      "What gets rewarded, gets done"

      --- Attributed to Steve Jobs*

      * I'm sure someone else said it first.

      --
      All ideas^H^H^H^H^Hprocesses in this post are Patent Pending. (as well as the process of patenting all postings)
    3. Re:Money, and recognition !! by Anonymous Coward · · Score: 0

      That point-of-view does not apply equally well to all. Many of us, for example, are not motivated by having our ego stroked. Instead, we'd rather feel a sense of accomplishment and confidence knowing our abilities are strong.

      To get people to write better code, make them maintain some crappy code for a while.

  66. Deja Vu All Over Again. by westlake · · Score: 1
    I thought we went through all this a week or two back.

    it is impossible for a newcomer in our team to get up to speed and be productive in less than a month due to unnecessary complexity

    The miracle worker. The mutant mastermind.

    New to the team, Core component. Mission critical. Up to speed in less than a month?

    A group of 2-3 of us want to change [things]. How do we effect the social change necessary to convince them of what is better and encourage them to take the effort to do it?"

    Who is "them?"

    Your supervisors or your managers?

    More importantly, who are you?

    Not the team leaders, quite obviously, and probably no more than a bare five to ten percent of the team, if that. Unless you have the social skills to build a much broader consensus for change, you'll get absolutely nowhere no matter how good your technical arguments.

  67. Either be engineers or be coders. by MartinSchou · · Score: 1

    In every other engineering discipline I can think of, where the word "engineer" actually means something, releasing sloppy and buggy work means you'll either get fired or sued. Possibly both.

    Think of your products as buildings or structures. They have to live up to certain standards, have to work when they're put up (ever seen someone replace the foundation of a sky scraper after it's been built?) and have to be stable. Or worse - imagine chemical engineers who designed your drugs, or the mechanical engineers who designed your artificial heart were allowed to be as sloppy as software "engineers" are.

    When engineers fail to do their work properly, the fixes are mostly lengthy and expensive, and often have to be paid for by the engineering company, and their products are withdrawn from the market (or buildings and structures closed).

    As long as companies make a rule of flat out refusing to make and schedule engineering quality work, I refuse to consider their employees engineers, regardless of their education or working title.

    If you have a Ph.D in astrophysics, but you work as a janitor, I'm not going to be calling you Dr. either.

    1. Re:Either be engineers or be coders. by Anonymous Coward · · Score: 0

      Have you ever watched fresh university and college graduates write software? They introduce terrible coding practises and the senior developers are typically always rewriting the code while trying to explain the proper practices. Worse are the allegedly experienced software developers whose code is even more unmanageable than the recent graduates. On one project a co-worker spent a year tearing down and rebuilding a critical system to cover-up the fact he had no idea how to implement the system; each rebuild caused all data to flow between the various data sources which resulted in the system appearing to function but there was no facility for deletion or modification of existing "records." The project was eventually dumped onto my desk. I had to perform business rules analysis, develop the software components responsible for data management (additions, modifications, deletions, automated monitoring of each component with appropriate automatic shut-down if the central data repository became uncommunicative, reporting, etc.) in the span of 4 months before the drop-dead deadline impacting downstream projects which were concurrently being implemented. I completed the equivalent of 1 year of work in less than 3 months with only 1 defect which took approximately 30 minutes to correct and validate. That snot-nosed twenty-something should have been fired on the spot but management hired him on a permanent basis. I always approach my work with the mindset of an engineer although I am not an engineer; an artefact of working with many engineers over the course of my career.

    2. Re:Either be engineers or be coders. by Anonymous Coward · · Score: 0

      Or worse - imagine chemical engineers who designed your drugs

      That is a nightmare! Fortunately, chemical engineers don't design drugs; they design the processes to produce those drugs.

      Signed - a Ph.D. in chemical engineering

    3. Re:Either be engineers or be coders. by Anonymous Coward · · Score: 0

      Actually, engineering tends to be adequate rather than excellent. Bridges are stronger and use more material than they need to, mixing drums run too slowly, stays are too thick, and the cause is the same - no time, high pressure, do what you know is safe and will work.

    4. Re:Either be engineers or be coders. by w_dragon · · Score: 1

      Go talk to someone actually working as a civil engineer sometime and tell them that. Once they stop laughing they'll probably have lots of stories to tell you about drawings being wrong in hilarious ways, materials having the wrong tolerances being discovered too late and the quick patches they did to fix them, and how all modern construction is done as quickly and cheaply as possible. The difference between their bugs and our bugs? They have a group of people building their structures who can see if something is off during construction. We have a compiler that will blindly follow whatever we tell it to build, no matter how obvious the bugs.

  68. Improving Code by Anonymous Coward · · Score: 1

    The changes that helped our team overcome this were:
    1. Code reviews are required for every single checkin. Establish a minimum standard criteria to meet for reviews, and hold people accountable.
    2. Make a requirement that every code checkin must be accompanied by one or more unit test checkins, otherwise the code review automatically fails.
    3. Our team held contests and offered incentives. This worked especially with the overseas teams in India and China, who were more than willing to write unit tests in an effort to win an iPad.
    4. Reward those who show that they are dedicated to improving code quality.

    Results will take time. It took about a year to see results, but they were HUGE. And that first release after implementing these changes was just the start of several successful releases.

  69. In My Experience... by Anonymous Coward · · Score: 0

    The answer is complicated. If you don't have the pull to get the approval to prove what you want to do, you need to look at it from this point of view. The first question you need to answer honestly for yourself is "Does it make business sense to do this?". Answer this question as if it's your money and business on the line. If it doesn't you might as well drop the idea now. Otherwise, you need to consider whether or not you can actually do what you're proposing without getting fired for not delivering on time. If you're really concerned, you could figure out how much you can do and still deliver close to on time, to make improvement over time. In this case you want to make sure that the improvement is noticeable and attributable to you at some point.

    My point is.. If you can remain employed, and make a change that positively affect the bottom line of the company you work for and ensure that tat gain is attributable to you, you will remain employed there.

  70. Convince the product guys to wait by Anonymous Coward · · Score: 0

    It's essential that you get time to rewrite/refactor the bad code. If you want to keep the current release cycle where features are churned out as quickly as possible you will never, ever, have the time. Tools and processes can help, but the mentality of the programmers is much more important. They have to feel like they own the product and that its successes and failures reflect on them also.

    You need to make the time available to your team to be able to do this. One of the first and easier way is the various security scanner. I'd be very very surprised if everything is clean if you complaining that the code is not good. This can easily get you a few weeks to fix the issues. That time can be use to get rid of some of the worst design practices and improve things for the better. Of course you'll have to see how management would react to such a thing.

    Where I work, as a lead of a team of about 7 developers, we've finally managed to convince the 3 layers of management that a major rewrite was needed to release the next round of "must have" features. The project was started 4 to 5 years ago and was the victim of major feature creep, and that a lot of developers were left to themselves on the code, in a one man team situation.

    One of the main arguments we were able to present, and I think ultimately what got us the deal, was that we had a version that was mainly stable on its own without any recent major incidents. This reassured the management side that they would still be able to make money while we work on a much better and much more designed version, while taking into account all of the experience that the team learned over the development of the last version. Some of the features that we cannot implement in the current version are also major blockers to the continued growth of the product.

    As part of this, one of the major new things that we'll be introducing to the team is basic coding styles that will be enforced by Jenkins (for example, no HTML in a model, no SQL in a view, automated SQL injection testing). Specific modules will be owned by some specific programmers, but we're also going to force everyone to work on components which are not their own. One of the main goals is that anyone will be able to jump into anyone else's code and fix/improve things.

    You also need to see if there are some roles that are adequately filled by your current team. Having programmers in charge of multi TB databases is usually a receipe for disaster. Same goes for complex algorithms and systems administrations. If you do not have access to specialized people in the dba/SA fields, you could probably justify hiring one or 2 more people to take some of the work away from the programmers.

    Another tip, do not have a QA team or people responsible for QA. As weird as it sounds, through my various experiences, I've found that programmers tend to be much more careful when they are clearly responsible and made responsible for not breaking things.

  71. Only Love can kill the demon by BroadbandBradley · · Score: 1

    What you have are people who are apathetic about the quality of their work and who are in-fighting among each other. You already have formed an "Us and Them" (you mentioned that "2 or 3 of us" know what to do) situation which projects negative energy at the them side (works both ways) and further feeds the lack of a cohesive and collaborative space.

    Here's how you fix it, find something beautiful about the people you work with and compliment them on it. Look for the positive in people and let them know what you appreciate about them, love the people around you. Give this positive energy to everyone around you and watch how the situation changes, watch how people feel compelled to connect rather than divide. Resist the covert struggles for energy and maintain your positive focus, eventually you will be surrounded with positive people who will all work well together and good ideas will materialize as if delivered by a higher power.

    in essence, only love can kill the demon.

  72. Culture by EmperorOfCanada · · Score: 4, Insightful

    With out a doubt you need to be able to measure what works and what doesn't but the moment some first turns to any kind of standard or the nightmare word "metrics" you have already failed. Too many companies go through all the fads and all the silver bullets. They have scrum masters, and black belts in Six Sigma (I am not making up the black belt part) but the fundamental problems are not fixed. Often the first place to start is with communications. Who does communicate and who is supposed to communicate. It is great if the sales people can bounce stuff off the programmers in the lunch room and even better if the programmers meet the clients but once the sales people are able to direct a project the project will instantly start chasing rainbows.

    The second place to look is the why? Software is made for two reasons, to make money or to avoid losing money. This allows you to boil down any "solution" to the money. So if the argument gets into religious territory such as language choice, OS choice, documentation, or even commenting style you can then ask, how does this either make us money or prevent us from losing money? So someone might say, such and such a documentation system is better when you can then ask, lets look at the cost or value of us having no documentation at all vs perfect documentation. After breaking it down you might find it is a huge cost one way or another and your decision is made for you. This prevents programmers from continuing to try and impress their long past CS professor and his insatiable demands for Hungarian notation. But as a pro-documentation example if you are routinely cycling in new programmers into a project great documentation can pay for itself in spades; but first you must calculate the cost of bringing a programmer into a project sans documentation and bathed in documentation. Did that documentation save more than it cost to produce; you might argue that a good documentation is low cost but again compare that low cost to the cost of not having it at all or having less.

    So better engineered high quality code feels like a great idea but make sure that the value of increasing quality does not have a disastrous business result. A simple example would be if your company's business is famous for being first to market with each new feature. People might grumble about how it crashes quite a bit but that since they make $500,000 a day using each feature having it a week earlier than the rock solid competition is very valuable. So if you slow the process of delivery down by 8 days and make the software perfect you will be out of business in no time. This is all a bit extreme but I suspect your core business is not making software but doing something else that the software supports. So it is quite possible that your company is mildly irritated by the bugs but that they exploit the features quickly.

    Personally I have found that unit testing on larger projects ends up speeding up deliveries but on smaller projects definitely delays delivery.

    One bit of horrible experience that I have picked up over the years is that some great systems were built on truly terrible code and truly terrible architectures. The disasters were also legendary but more often than not the cost of the disasters still justified the speed to market of the terrible system. Some systems were then recoded after disasters and made great but often at the cost of many release cycles resulting in a business disaster far greater than the disasters prompting the recode. Often the best solution was to make the code base slightly less terrible and press on at full speed. I have seen this terrible code and it is just solid WTF but when you look at the piles of money generated you just get angry that your own "perfect" code didn't make you rich. But as a counter point I have seen systems so terrible that the disaster took out the company; but even there just a slightly less terrible system would have saved the company. (The example I am thinking of had no backups so they lost everything, POS, invento

    1. Re:Culture by Anonymous Coward · · Score: 0

      A nice essay, however it has nothing to do with being able to convince a team to write good code.

      I am currently employed in a situation where there's complete lack of motivation to perform well. Let me explain why:

      We are paid on monthly wages, the wage is the same no matter how you perform. There's no added bonus for doing quality code, no added bonus for getting things done before the deadline, no added bonus for anything. Wages are determined mostly by 'how long you have been in this IT-factory'.

      Why should I sweat, if I get paid exactly the same by slacking (performing a modest bit above the average) ?
      Why should I go the extra mile in order to cover up for others to meet a deadline if there's no incentive for it ?
      Why should I perform quickly, or automate things to speed up my work, when I will have to be working the same hours no matter how fast or well I perform ?

      If you want to motivate people to do good code, you need to give them a stake in it; you need to reward efficient workers with money and free time.

      Forget about the motivational speeches and managerial jargons, that's what it boils down to, and you know it.

      Ps. My work is soon done, and I will be sailing to find better, more verdant and lush lands.

    2. Re:Culture by craigminah · · Score: 1

      I concur...if salary isn't a motivator find out what is. Basic motivational theories work in situations like yours...nothing magical but it's not so simple to implement either. Find out what motivates each programmer and use that to motivate them...or you could find out what demotivates a programmer and remove that. Maybe overly simplistic, but it's worked for me although I work in a completely different field but people are people (I think).

    3. Re:Culture by donatzsky · · Score: 1

      A nice essay, however it has nothing to do with being able to convince a team to write good code.

      Not directly, no. But sometimes (often) it's management you need to convince first, and in that case this is a good way to go about it.

      As for the rest, I absolutely agree: If the team isn't motivated then that's the place to start.

  73. You don't by Anonymous Coward · · Score: 0

    If you're a worker bee your only option is in a code review. IMHO, code reviews are great. Except for the bozos that focus on where '{}'belong, how much and where whitespace should be, why you didn't comment the "widget++;" line, etc. Comments like "you're talking to hardware, when you malloc memory like that you need to ensure it doesn't wrap your address space" tend to fall below "u shuld use calloc insted of malloc".

    Don't get me wrong, code reviews are great. But it seems 90% of the time, and I'm being generous, of code review time is spent in the "you need to put the { on a separate line" kinda crap.

    If you're a manager (note: I've never been a manager), your options are to enforce where the '{}" go, how many comments you enforce, and decide Hungarian Notation solves all problems.

    Hungarian Notation is evil and anyone who endorses it should enter into the deepest pits of spaghetti code hell.

    Some people write good code. Some people write crap. Some very intelligent people write very good code that mere mortals can't understand. Most people who think they're very intelligent write really crappy code that happens to work at the time that mere mortals can't understand.

    Flashing back to my college English classes, this is where I sum things up to prove what I'm trying to say. So. A reasonable coding standard is "knock yourself out, then use this indent template". No matter how obnoxious the coding standard you're forced to use (except the hated hungarian notation) is auto-fixed and a code-review actually has the chance of being useful.

    I'm deliberately not mentioning the idiots who do things like "hardware register 0xwhatever = 0x42". I've worked with assholes like that and they don't see a thing wrong with that line of code.

    1. Re:You don't by rjstanford · · Score: 1

      What the code review should cover, however, are standards like "Have your methods do the thing that matches their name, do one thing, and don't have any avoidable or undocumented side-effects." The nice thing about forcing correct (not too much, not too little) abstraction in a code review is that a) automated tools are terrible at figuring that out, and b) you've locallized your problems - if there are any - to code that can either be refactored if its a problem or just left alone and ignored if its ugly but effective.

      --
      You're special forces then? That's great! I just love your olympics!
    2. Re:You don't by Mr2cents · · Score: 1

      +1 for the Hungarian Notation. It only creates problems, if you don't know a variable's type you just use the code editor to find out. HN is only possibly useful if you use notepad for writing code, and even then I'm being generous.

      --
      "It's too bad that stupidity isn't painful." - Anton LaVey
  74. Methods for Forcing by Epicaxia · · Score: 1

    Social changes are hard and difficult to enforce--the most reliable way is to thoroughly screen who you hire and, reciprocally, who you work for, both of which are moot points for situations like this. Therefore, I am going to enumerate three easy steps, albeit brute-force, that should help change the way you and your engineers work and think. Devious, yes--but wait on your judgement until you've read through the list, they're not all that bad.

    • * Start managing a trunk repository, and require all engineers to branch and merge as needed. Nearly every version control tool worth a darn now adays can handle distributed repositories, and most are easy to learn.
    • * Document, document, document. Interns are great for this, as it's also a good way to learn a new code base. It's also easier to track and sort new feature requests when you know where they stand with respect to your current version. This doesn't have to be Word DOCs--two easy and useful alternatives are wikis and PowerPoint (a lot easier to edit and communicate with the former; a lot easier to diagram and illustrate with the latter).
    • * Establish an expectation of workflow--specifically, bug and feature pipelines. A substantial part of this duty falls on your shoulders, as you must always know (or be able to look up) who is working on what, and where that piece fits into the big puzzle. Particularly important is the feature pipeline, as this is your interface to managers and others who interact with your code base.
    • I'm assuming, of course, that you haven't already done these things. If you have, there are many ways to take it to the next level: start using Bugzilla (or a similar tool) to track bugs and features; organize your documentation into User Guides, ICDs, and ADDs; define a small but standardized set of processes for complex challenges; etc. You get the idea--incremental is good, as you can't simply dictate, from top down, the behavior and practices of your engineers (unless... are you on a management track?). Of course, if you're in a CMMI-4 organization in which each person has their own HG clone of the primary code base, with your own QA and support staff, these are hopefully already in your rear-view mirror.

      One additional practice I would recommend is periodic release cycles--that is, release a major version every year, minor every month (or some variation thereof), and include in each release only the features and updates that are ready. If you can get to a point where your schedule and release cycle is no longer at the mercy of your requirement creep problems or an almost-done set of patches, you will find the atmosphere becomes much more productive and stress-free; quality will skyrocket as a result.

      Last but not least... I'm sure there will be many fine suggestions from knowledgeable slashdotters on this page. Pick and choose the ones you think will work (feel free to ignore all of mine, except this one) for your team / company / project--and when you sit down to implement them, don't expect to get away with 100% of your changes. Do what you can, what you are allowed, and what keeps you productive. Too many idealistic junior managers or engineers-turning-managers try to bring their 'brilliant ideas' into an environment where they simply don't work, and the lack of pragmatism leads to total failure of all of their efforts, when they could have gotten away with 60% (which is better than 0%). Throw in the vast world of methodologies, process monkeys, and paradigm acolytes, and you'll see why it's worth being cautious and flexible.

  75. The "Nut Island Effect" by rbrander · · Score: 1

    There's a decent Wikipedia article on it. Accusing your management of allowing one of the now-classic dysfunctional management failures to grow could get some discussion going.

  76. Demand Quality by Anonymous Coward · · Score: 0

    If you want quality code, you must instill the following in each of your developers (These all happen to varying degrees in my workplace and I love it):

    Read the book "Code Complete" and notice pitfalls in your own coding practices. Present key points you found interesting to the rest of the team.
    You will test a feature or component that another developer wrote that will be released and do your best to break it into a thousand pieces.
    You will conduct countless code reviews and your name will be tied to that code review. Every line is reviewed and countless bugs are caught this way.
    You will create unit tests, system tests, or other tests as necessary for new or modified code, but there must be at least one test that proves the code works, and three that prove it can handle failure scenarios gracefully.
    You will use code analysis tools to identify weak points in your coding style.
    Your code will be self-explanatory, simple, and comments will be sparse and to the point.
    Unnecessary code will be pruned as soon as it is no longer required for backwards compatibility, and it will be indicated in comment which future version of the software the unnecessary code may be pruned in.
    You will write design documents that will be reviewed by other team members and must be able to be used to develop working code. Dependencies and details are exceptionally important to flesh out at this stage.
    You will not be afraid to prototype, and you will not be afraid to throw away your prototype when one doesn't work.
    Above all, a software developer's job is to reduce complexity. Keep it simple, or you're stupid.

    Of course, quality standards only work if you monitor that they're followed and reinforce them with incentives. My workplace is intelligent enough to realize that quality is important and rewards those who make strides in this area with bonus money. The bright side is that quality pays for itself with fewer defects, fewer headaches, more uptime, and fewer embarrassing conversations with upper management.

  77. Write a business case by khchung · · Score: 2

    We feel that if the right thing is done every time, we would can eliminate our issues and still release at the same pace. How do we effect the social change necessary to convince them of what is better and encourage them to take the effort to do it?

    Write a business case showing how much these "issues" are costing your company, and by extension, how much your proposed changes is going to save.

    Then write out clearly what you want to change, how much that costs, and exactly how those changes can be objectively measured (i.e. so someone outside can know if real change has been implemented or if only lip service been paid).

    Then offer to put your money on the line, and offer to take a share of the P&L that resulted in this change you wish done, on the condition that the changes have been implemented measurably.

    Make your presentation to your manager, his manager, all the way up to the big boss who is ultimately responsible for these related costs and profits.

    Then let them decide. This is the most important part, your job is to do the work, their job is to make decisions. Don't presume you can do their work better than they do. If they decide against it, don't make a fuss, don't try to implement your changes by subterfuge, find another job if you wish, but respect that your management had made a decision.

    --
    Oliver.
    1. Re:Write a business case by Anonymous Coward · · Score: 0

      Exactly. There is a lot of crappy software out there, as long as it sells quality doesn't matter. Show that sales will increase more than the additional cost and you have a case. Don't and it won't change (and probably shouldn't quality a customer isn't willing to pay for isn't a value add). A thing to keep in mind too is that companies have a easier time hiring and paying lower salaries for people with weak coding skills. So it isn't just the process sometimes it is that they will need to spend more time and care AND hire better/more expensive people (and better tooling). A bunch of Ferrari mechanics for Ford Taurus customers doesn't make sense sometimes.

  78. Start with management buy-in, and start small by swillden · · Score: 3, Insightful

    It sounds to me like this is a group of 2-3 developers who want to improve processes, without (currently) support from the business, which just wants to keep shipping on time. If you can't get management support, you're going to have a hard time, so that's the place to start.

    If your management doesn't understand the concept of Technical Debt and how it's costing the company time, money and reducing your agility and competitiveness, that's where you need to start. How to go about educating them is something that you're going to have to figure out for yourself, since you know the people and the context, but I'll give you a warning: people don't like to be told they don't know their business. If you try to approach it like that, you're very unlikely to be successful. And, frankly, unless the group trying to initiate the change is already among the top performers, and has a track record of successfully delivering, you're unlikely to be successful no matter how you go about it. So you first need to get the guys the management perceives as being their top contributors on board.

    Still, if you can get the conversation started in the right way, technical debt is a concept that business people can easily grasp, because it so closely parallels the notion of financial debt. For that matter, you should make sure you understand it thoroughly as well, including the fact that it often makes perfect sense to take on technical debt in exchange for a business advantage which is likely to have sufficiently-large rewards. Never forget that the purpose of the code is to generate revenues, not to appeal to your sense of aesthetic purity.

    But, technical debt slows progress and massively increases the financial impact of bugs. The interest will be paid -- there's no avoiding it or deferring it -- and as the debt grows it becomes a burden which sucks up all resources. If you can get your management to understand and agree on that, you've won, as long as you don't screw it up.

    To avoid screwing it up, do not embark on a massive development process re-engineering effort. If you do, you'll fail. You'll delay the next release, cost the company large amounts of money and customer goodwill and completely undermine everything you said.

    Instead, figure out what one thing you can change which will have the most immediate significant and measurable impact. Do that, show the benefit, then move on to the next incremental improvement. This is hard. It requires you to not only figure out what will help the most, but also how to measure the before and after states, and to ensure that your measurements won't be gamed or encourage counterproductive behavior. Also, spend a lot of time thinking hard about how to make the change in a way that will have the lowest negative impact on productivity -- because anything you change is going to hurt at least a little, in the short term.

    Though you need to look at your own situation, my prediction is that the thing that will do you the most immediate good is code reviews. Automated testing is a bigger win, but has a steeper up-front cost and the value is harder to quantify. With a little care, it's easy to document the financial benefits of code reviews. But to make them work, you first need good code review tools -- sitting around a table with printouts wastes everyone's time and rarely accomplishes anything. Spend the time to find a good code review tool that you can integrate into your workflow, set it up, test and validate it and be sure that it's going to work well before you ask people to use it. Note that this is all a lot of work, and unless management is extremely enthusiastic you'll probably have to do a lot of it during evenings and weekends.

    Once you have it working for a while go back and pull out a bunch of reviews and take some time to carefully analyze what kinds of bugs were identified and fixed in the review process, and try to estimate what it would have c

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    1. Re:Start with management buy-in, and start small by Anonymous Coward · · Score: 0

      I find Code Collaborator (CC) is a great too for reviewing code.. However, you should still sit in a room to discuss the code and use CC for capturing the notes.

      With Respect to "Automated testing is a bigger win, but has a steeper up-front cost and the value is harder to quantify".. I think the value is easy to quantify. As your application grows, your automated testing will ensure you have not broken something that was previously implemented. The more use case testing you have the better your end results will be when adding new features and changing code.

    2. Re:Start with management buy-in, and start small by swillden · · Score: 1

      I find Code Collaborator (CC) is a great too for reviewing code.. However, you should still sit in a room to discuss the code and use CC for capturing the notes.

      I disagree. I find having everyone in a room creates two problems. First, merely having to schedule meetings reduces the number of code reviews that can be done, which increases the amount of code that you try to cover in a given session. It also doesn't allow reviewers to easily do research on related issues to make their commentary more informed. The result is that the reviews are much less detailed. Second, the personal interaction creates more opportunity for emotion to get involved.

      Asynchronous reviews are more time-efficient and less emotional. I submit a commit for review, you look at the diff in a nice tool and make comments, I respond with changes, and so on, until we're both happy with it, then I push my commit into the central repository. It works very well. Oh, and a byproduct is that all of the discussion about the code is captured along the way.

      With Respect to "Automated testing is a bigger win, but has a steeper up-front cost and the value is harder to quantify".. I think the value is easy to quantify. As your application grows, your automated testing will ensure you have not broken something that was previously implemented. The more use case testing you have the better your end results will be when adding new features and changing code.

      What you've (accurately) stated is the reason automated testing is so valuable. What you haven't done is offered any way to quantify the value. You've offered qualitative analysis of the value, not quantitative analysis. Also, even if you can find a good way to measure the value and to assign dollar cost and benefits to it so you can show ROI, much of the ROI of automated testing comes later. Some is immediate, of course. I don't know how many times I've discovered and fixed bugs in my code while writing unit tests, and that win is worth the effort right there -- but it's hard to track. Short of asking developers to not only write unit tests but also to keep detailed logs of what they discovered and fixed, the only way to assess the immediate impact is by observing lower bug counts during QA or later phases, and many shops don't have processes that allow them to establish good baselines for comparison.

      Code reviews, however, provide all of the documentation needed to extract a direct measurement of at least part of the value obtained, usually one that on its own justifies the effort.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  79. No brainer. by ma1wrbu5tr · · Score: 1

    Bad code = No pizza.

    --
    Why can't we go back to using jumpers to configure slot adapter cards? Why? I say!
  80. Speak financially - everyone else does. by Anonymous Coward · · Score: 0

    I'm a product guy these days. I used to be an engineer and have been a part of some great teams and some terrible teams. I've moved onto primarily being a product guy these days.

    Here's the deal. The people who are telling you that the ship is sinking are right. You basically are at an inflection point and you need to see if the ship can be righted. There's a good chance it can't. If your analysis shows it can't, I'd suggest moving on.

    The reality is that your practice, either by poor internal quality controls or by product/exec externality, is broken. What you need to do is bring this cost to light. If you're not using issue tracking with good graphing and analytics, it's time to. I know a lot of people hate it (I'm not in love with it) but you can get a good sense of these things through JIRA.

    What you're looking for is per release cycle (and adjust/augment this as appropriate for your business, this is a sketch):
    - How many man-hours total are available?
    - How many man-hours are spent on developing new features?
            -- What is the trend over the last couple releases?
            -- What is the trend as new members are added to the team? (look for nonlinearities)
    - How many man-hours are spent repairing defects?
            -- What is the trend over the last couple releases?
            -- What is the trend as new members are added to the team?
            -- Are defects generated by specific subsystems? Can that code be refactored and made more modular to (ideally) increase robustness?
            -- Are there individuals whose code/area of responsibility/general work generates more defects?
    - How many man-hours are lost due to specs & tickets that aren't locked/defined before the development cycle begins?

    These are key metrics to have on hand. Can you demonstrate losing more time to defects? That's a strong case for automated testing - but it needs to be presented in the context of losing efficiency on the team, not what's generally perceived as engineering being fussy about theoretical perfection. Losing hours on end to bugs - and to seeing the problem grow despite team growth - is an emergency and needs to be resolved.

    I would focus on things that directly and immediately impact your ability to be more responsive - automated testing, strategic narrow-scope refactoring, etc versus pair programming, long formal reviews, etc. You want to buy yourself some initial breathing room and prove your point. If it sounds like fighting a fire, it is.

    Finally, never underestimate the value of culling bad performers from your team. The most amazing thing I ever saw was reducing an engineering team by half and seeing its productivity quadruple... and no one was working longer hours. The bad performers/cultural non-fits were shown the door, given references and generous severance, and everyone else relaxed and found their groove.

    Without more specifics and knowing your team it's hard to say more. You need to present the cost & tradeoffs. If management learns they're losing an engineer or two or three every release cycle to patching dumb bugs or fixing incomplete/feature-missed code, it's an eye opener. That's hundreds of thousands of dollars that are just being set on fire.

    Ultimately you don't strictly have an engineering problem. Yes, there are things to improve, but your team is being overcommitted by product and/or exec. Your team (and your manager) need to be really transparent about the bandwidth. I guarantee it'll open eyes.

  81. Tech Support Pain! by Anonymous Coward · · Score: 0

    Force the programmers to work first level technical support for 6 months after release.

  82. No Such Thing As Grassroots Improvement in IT by wadexyz · · Score: 1

    Two or three people in a large company can't change jack shit. This type of change can only come from the top. And the chance of that happening is zero. Do what I do, grin and bear it.

  83. You might have the wrong angle. by Anonymous Coward · · Score: 0

    You shouldn't look to change others, only look to change yourself.

    If you feel the quality is not good enough, start doing things that lead by example. Convince people of the value so that they want to change themselves.

    Leading by example is the only way, you can't lead from behind. You need to show people how it's done. If you aren't showing them how it's done, then you need to up your game before you run your mouth.

  84. "Convince"? by matunos · · Score: 1

    The question presumes that developers are choosing to write crappy code and just need to be convinced to write good code. That's silly. Either they're capable of writing good code and want to, or they're not. If you have to convince people to write good code, then you have poor developers.

    That's not to say there aren't external factors that degrade the maintainability and robustness of the code, and the questioner suggests things are rushed to get stuff out of the door.

    You can try to get management's agreement to terms regarding technical debt (that is, that time will be given post-release to deal with technical debt). If this cannot be agreed to, or the managers reneg on an agreement, then you can just start estimating your work upfront taking into account (a) the effort it'll take to do things with minimal technical debt, and (b) the refactoring of existing crud that you'll need to do in whatever areas you'll have to work with.

    Things like improving new team mber ramp up time are fuzzy and speculative. If you can make the improvements you want, then you can look back to see how those improve. Gather that data so you can advocate for more changes with some data to back your arguments, including the value to the company in saved hours, increased turnaround time (after the initial investments for undoing the crap that's already there).

    Above all, prepare to go the extra mile to do the sorts of refactoring you want to do, including spendig long hours. If you're not motivated to do that, then you should ask yourself if you really care enough about the product/company to make that level of personal investment. If not, then learn to coast by their standards, or seek another team/company that provides the work environment you're looking for.

  85. Easy! by Anonymous Coward · · Score: 0

    Stop sucking!

  86. Novel idea, but feels like climbing Everest by Anonymous Coward · · Score: 0

    We have a similar issue at work, the Oracle dev guys make changes in production without proper testing/QA, approvals and logging, our Enterprise Security team is now (secretly) inserting tools to monitor all changes. When we has a major release a few years ago the code was so buggy that they threw not one but two superdomes at it to resolve the issues. Throwing hardware to resolve software issues. Yeeeaaaahhhhh.

  87. Make it visible and fun! by Anonymous Coward · · Score: 0

    The way we've started on this is making code quality visible. Using something like TeamCity you can get a coverage percentage - then write it on a whiteboard so all can see. If it's 3.00% it's a start. The reason I like coverage as a quality metric when you've got nothing and have to pick a quality metric, the coverage metric rewards deleting code and simplifying code as well as writing additional tests. Deleting code is overlooked usually on these high pressure environments but it's just as essential for long term maintenance.

    Why stop at one quality metric? Because a man with two watches never knows what the time is.

    Once you've got your project showing it's coverage %age, why not have a high score chart on a whiteboard / wiki page showing who's winning? Gamification / competition between teams can really help spur on everyone to focus on code quality.

  88. Precision pays by GerryHattrick · · Score: 1

    "...we would can..." - seems to be a bug right there.

  89. Get a Test Bastard by Anonymous Coward · · Score: 0

    You need a Test Bastard.

    The truth is: If it isn't tested, it doesn't work.

    So hire or appoint someone who will sign off on your software either working or not, who will accept the blame if it doesn't work, and who will construct and execute tests or manage the team that does so.

    Anything else is wishful thinking.

  90. probably only one answer by Anonymous Coward · · Score: 0

    Show that poor quality leads to lost customers. If it doesn't affect revenue no one (who writes the cheques) is going to want to spend money on it.

  91. "Good Code" by codeButcher · · Score: 2

    I think not enough people understand that coding is just a small part of producing a working software system. A system starts with an idea in someone's head - when this is formally documented, we often call it User Requirements. Now note that that system already exists, although not in a machine-executable form, but as a vision in someone's head. So formal software lifecycle processes usually define various levels of documentation/specification. Each of these refines and details the previous level. So each level already represents the system, but starting at a very abstract ("in the head") level, until you get to the very concrete ("machine-executable") level. (QA/testing runs in parallel, ensuring that the product at each level complies with what was specified (the product of the previous level).

    Enhancements also start as enhancements to the User Requirements and down the process, it is just an incremental addition, which is obviously a smaller work package than the original system. I don't have any experience of Agile methodologies (as you might be able to tell - military market), but if that is your environment you might be able to adapt the above, and allow for the tweaks that make Agile what it is. In effect most Agile methodologies have a lot less levels, and also divide work into a lot more but smaller incremental enhancements, enabling one to go through the remaining levels much quicker. Either some Agile or the older more formal methodologies are good, it depends on your circumstances which would be better.

    What I'm saying is that changing the coding to be better alone, is like giving some paracetamol to someone with a brain tumor. Your way of working needs fixing, and it will probably not only involve your coders but all people in the process starting from the people that provide requirements - since everyone works on some level of abstraction of the system. Formalized processes are sometimes helpful in this, as it can be a standard condition of employment to comply with company policies and procedures. In effect, you need to turn your team from a collection of individuals who do much as they please, to a single organism that is "better than the sum of its individual parts" (see "Heterozygous" for a biology analogy).

    Furthermore, all the above documentation can be helpful to newcomers (and existing employees) to get up to speed, since one can select the document at the desired level of abstraction and learn what you need to know at the quickest speed. Reading code (even good clean code), being at the lowest level of abstraction, can be quite time-consuming and frustrating.

    Now it IS a big problem to get people to write good, to-the-point, unambiguous documentation - documentation that is as terse as possible and still verbose enough to contain everything that is needed - and that can be understood by someone other than the author.

    Now to your question: (1) Do developers/employees in general, perceive that there are problems with the way they are working? If they are unhappy, then they might be more open to change that would improve their experience, than if they are quite content. (2) Once they are looking for improvement, it might be shown to them in the form of published work ("best practices") on this, or other companies' way of working, or even a small "pilot study" team in your own organization. (3) Many possible solutions exist, some contradicting others, and your org needs to find the one that will best work for them. I would say if people can provide input, they might be more accepting of the solution. Of course, an organization consists of lots of individuals so management is needed to provide (some) direction. (4) Be open to adapt/tweak for further improvements. (5) Use some carrot and stick to reinforce, but be careful of polarizing management vs employees - rather try to have people praised or censured by their peers, even if it is just weekly voted "biggest boon|booboo awards" that sit on someone's desk but don't do much else.

    --
    Free, as in your money being freed from the confines of your account.
  92. You already identified the problem by Stefan · · Score: 1

    Easy, you already identified the root of the problem: "product guys don't like to wait". Means you're in a company run by marketing/sales-people caring only for their commissions and next quarterly bonus, not quality-minded people who understands the business of building software. Probably you don't have the power to replace/educate those guys. That leaves you two options.

    1. Apply for better jobs elsewhere. You can be a bit picky since you already have a job. Easiest way to end your suffering ;-)

    2. Be a professional and convince the rest of your team the same. My philosophy when managers want to rush _every_ release out yesterday regardless of quality instead of just the occasional genuine crisis, is that their "average" instructions, however they formulate it, must be to produce a quality product. Ignore them breathing down your neck, throwing childish temper tantrums etc. They obviously don't know better. In the long run your way will provide them with more timely releases. Half a year from now they won't have less urgent planning, so you better have the code continuously in good shape.

    1. Re:You already identified the problem by rjstanford · · Score: 1

      Easy, you already identified the root of the problem: "product guys don't like to wait". Means you're in a company run by marketing/sales-people caring only for their commissions and next quarterly bonus, not quality-minded people who understands the business of building software.

      You've just identified another problem. Chances are very high (but not 100%) that your company is, actually, not in the business of building software. Its quite possibly in the business of solving buisness problems with software, but if the software contains no defects but is late or doesn't actually quite solve the right problem, that's far worse than correctly solving business problems with a few bugs.

      Additionaly, know your tolerances. There's a reason that when building a house the carpenter doing the framing - even if they're the same person who builds the cabinets - doesn't spend too much time planing the 2X6s before sheetrocking but may take several days to lovingly carve details in the entryway.

      --
      You're special forces then? That's great! I just love your olympics!
  93. Different stages of code by olafura · · Score: 1

    Here is a good presentation on what to do: http://www.infoq.com/presentations/Erlang-Scalability

    But there is a short description, if you want to innovate you have to write prototype code. If you want somebody else to be able to work on it then you have to make it more beautiful. Then you can have somebody come in and make it fast.

    If you break it down and segment who works on what face then you will be able to convince somebody in charge of change, unless he's pointy haired and then your screwed :)

  94. Cake! by Anonymous Coward · · Score: 0

    Promise them that if they write good code there will be cake after they are finished!

  95. big problem... by SuperDre · · Score: 1

    The biggest problem is.... what is good code..... It's all in the eye of the beholder, and I've seen it so many times, that what one programmer calls good code, another calls big crap, and vice versa..

    When is something good code? NO THAT DOESN'T MEAN FOLLOWING SOME RULES YOU'VE READ IN A POPULAR BOOK ON CODING....

  96. Get a dedicated person for this by Anonymous Coward · · Score: 0

    I've been trough this several times in Real Engineering (steel, not software)
    1- You explain to your manager that you barely make it as it is (there are bugs - things could be better at deadline-time)
    2- Your solution is to do SOMETHING ELSE than to work on the production part -> things will be worse at deadline-time
    3- but don't worry, after a while it will get much better.

    You need to eliminate nr.2
    Get an external resource to do the tool-improvement and create the practices. It can be a student or someone cheap, because your team will do the steering and planning, he/she does the gruntjob. It will seem to your manager that there is only improvement, not a worse situation with a promise of better days (also realize that you have to avoid nr.2 by contiuing to work as usual during the change)

  97. The way forward by jandersen · · Score: 1

    The only way of producing good quality code that I know of, is by introducing rigorous quality assurance, and by management realising that code is not ready for release until it has passed all QA tests. Not meeting deadlines is a minor sin, releasing unfinished code is a major one.

    QA is something that should be integrated on all levels:

    - When developers estimate the work, they have to learn that it takes much longer than you expect; even if you can accurately estimate how many hours a piece of code will take, you have to take into account all the overhead, like meetings, context switches, breaks (and that IS important!) etc. 30% of effective work is probably all you can realistically sustain over a longer period of time. QA in this context means that you compare your estimate to how long it actually took and change your future estimates accordingly.

    - Code must not be checked in to source code control unless accompanied by unit tests etc that demonstrably work as expected. Many source code control tools can check this automatically as part of the check-in.

    - The product must be integration tested by a separate QA team, whose only purpose in life is to break your work. They musst not be developers, because developers will know too much about how to work around problems. All integration testing must be carried out on non-development systems, so you are not unwittingly relying on development libraries and environment settings that your customers don't have.

    There are tools that can help you with this process, but really it is about management discipline, and ultimately about sustaining a good business. After all, if you take money from your customers and give a poor quality product, they will decide that you are liar, an incompetent - or both. And then they'll go away and give you a bad reputation.

    1. Re:The way forward by rjstanford · · Score: 1

      The only way of producing good quality code that I know of, is by introducing rigorous quality assurance, and by management realising that code is not ready for release until it has passed all QA tests. Not meeting deadlines is a minor sin, releasing unfinished code is a major one.

      And when you miss your first external deadline that has seven figures of penalty attached to it rather than shipping a product with known (documented) minor defects that still helps someone solve their business problems and your own company meet its contractual commitments, you'll be polishing up your resume. Unless its a small O/S pet project, software development is a means to an end not an end of itself.

      --
      You're special forces then? That's great! I just love your olympics!
    2. Re:The way forward by jandersen · · Score: 1

      As far as I remember, the question was about how to ensure good quality. And if you'll notice, QA also addresses the need to make accurate estimates of your development times. Poor quality code delivered before it is ready for shipping is like wetting your pants: initially it feels quite nice and warm, but ...

  98. two things by kcmastrpc · · Score: 1

    pay them well, let them work. don't do either, and you'll get bad code - you can count on it.

  99. peer pressure by Anonymous Coward · · Score: 0

    peer pressure. (Seems I have to actually write something to get past the filter when really two words are all that is needed.)

  100. Long since solved by Oracle by Anonymous Coward · · Score: 0

    Chain them to their workstations with no food or water until everything builds and all the tests pass.

    Any questions?

  101. Convinced? by Anonymous Coward · · Score: 0

    You don't convince them, you educate them.

  102. Joel on Software sayz by magic+maverick+ · · Score: 4, Insightful

    Joel Spolsky wrote a number of articles, years ago, that are really relevant. I'm going to link to and quote some of them:
    The Joel Test: 12 Steps to Better Code:
    1 Do you use source control?
    2 Can you make a build in one step?
    3 Do you make daily builds?
    4 Do you have a bug database?
    5 Do you fix bugs before writing new code?
    6 Do you have an up-to-date schedule?
    7 Do you have a spec?
    8 Do programmers have quiet working conditions?
    9 Do you use the best tools money can buy?
    10 Do you have testers?
    11 Do new candidates write code during their interview?
    12 Do you do hallway usability testing?

    Joel says you should be getting at least ten of those twelve. Sounds like you aren't. So, next article is relevant:
    Getting Things Done When You're Only a Grunt:

    You could just leave, I suppose. But presumably, there's some reason you're stuck there. The stock options haven't quite vested, there's no better place to work in Podunk, or perhaps your boss is holding someone you love hostage. In any case, dealing with life on a bad team can be infuriating. But there are strategies for improving your team from the bottom, and I'd like to share a few of them.

    And those are:
    "Strategy 1 Just Do It", setup a build server, write the make file to automate the build process, etc.
    "Strategy 2 Harness the Power of Viral Marketing", setup your own bug tracker. Use it for your own bugs. If someone sends you a bug in an email, add it to the tracker and reply saying that it would be so much easier if the person just added it directly to the tracker themselves. Setup local version control. Use it. Etc.
    "Strategy 3 Create a Pocket of Excellence", be excellent. Write specs and follow them. Write schedules and follow them. Etc.
    He continues with "Strategy 4 Neutralize The Bozos", "Strategy 5 Get Away From Interruptions" and "Strategy 6 Become Invaluable".

    Another article Top Five (Wrong) Reasons You Don't Have Testers explains that you need an independent Q&A team with real power, while Things You Should Never Do, Part I says don't throw out code and rewrite from scratch and Incentive Pay Considered Harmful says what it says on the tin.

    Browse around the site and read some of the other articles as well. There is a lot of good advice there.

    --
    HELP MY ACCOUNT HAS BEEN HACKED BY AN ILLIBERAL ART STUDENT SET TO DESTROY THE INTERWEBZ!
    1. Re:Joel on Software sayz by Anonymous Coward · · Score: 0

      I've read this guy's stuff on programming and he's usually wrong. Plus, his attitude is if you disagree with him, you are just too stupid to understand his genius.

    2. Re:Joel on Software sayz by undeadbill · · Score: 1

      Or Strategy 4.a, a la John F. Woods: Hire the proverbial homicidal sysadmin, let them support the code for a few months, and then let that person hold some code review meetings. There may be expenses for plastic drop cloths and quick lye, however, so ensure the new sysadmin has access to a company credit card and a van.

  103. Is the code bad? by caywen · · Score: 1

    When someone tells me my code is bad, I look them straight in the eye and say

    Is my code bad, or is it BAD ASS. Aw yeah.

  104. Define "good code" by TheDarkMaster · · Score: 1

    Your good code can be trash for me, and vice versa. The code that is excellent into the situation X can be horrible if used in the situation Y. Stop looking for "the perfect coding style that fits all," it does not exist.

    --
    Religion: The greatest weapon of mass destruction of all time
  105. Categorical Imperative by dreamtripper · · Score: 1

    Talk them about Kant and the Categorical Imperative. Transpose those moral concepts to coding and there you go! I tried that once, not sure how much difference it made, though...

  106. It is not just "convincing the team" by CptJeanLuc · · Score: 1

    As long as the company (management) is pushing strongly for pushing new releases fast, then there is no solution to your problem. You can ask for a "day of zen" where all the programmers go off-site and discuss "what is good code" until everyone is fired up, only to return to work and get back into the old mode. The todo list and release dates hasn't changed.

    In terms of "good code" there is of course never any excuse not to have properly written, formatted, and commented code etc. I am assuming the main problem with your code is it is somehow poorly architected and quality checked; bad or inconsistent design, commit stuff as soon as things seem to work, avoid spending time on writing tests - that sort of thing. New stuff gets layered on top or some quick band aid is applied, and it eventually turns into a big mess.

    For that kind of code problem, "fixing the problem" is a big thing. It is in itself an investment - the poor development processes has incurred a development "debt", which requires man-hours to fix. Lots of stuff may have to be rewritten. And in return for all this time, product managers are getting no new features to show the customers - "only" a more stable product. Secondly, new stuff will (in the short term) take a little longer to implement, because doing it right takes a little longer, plus various problems with the old code will surface that need to get fixed. Thirdly, the team's mentality towards what it means to write a good product needs to be changed - and some of the team members may not be able to change their attitude, or may not have the skills to write and architect proper code.

    In the end, this is a problem that needs to be discussed with the powers in charge, as a big and serious issue. While it may be comforting for management to let things just run as they are, this is the type of approach that leads to complex and unmaintainable products. Which at some point, so much debt has been incurred that product is completely unstable, everyone is caught up in "fixing" bugs and crashes, and new features take forever to fix even when trying to take the quick route.

    Unfortunately, with the typical near-sighted "next quarter" focus, it is an uphill battle you may well end up losing.

    1. Re:It is not just "convincing the team" by rjstanford · · Score: 1

      For that kind of code problem, "fixing the problem" is a big thing. It is in itself an investment - the poor development processes has incurred a development "debt", which requires man-hours to fix. Lots of stuff may have to be rewritten. And in return for all this time, product managers are getting no new features to show the customers - "only" a more stable product.

      A more stable product is great. Frequently, however, the product works well but is a PITA to enhance. In those cases, you're offering XX hours of no new features (and a reasonably likelyhood that the new code will have at least one glitch in it just because it hasn't had 3 years of real-life production use) in exchange for the promise that future features will be easier to implement. Sometimes that's a good deal; frequently its not.

      --
      You're special forces then? That's great! I just love your olympics!
  107. Some tips from an MBA by Anonymous Coward · · Score: 0

    As I understand the problem is:
    a) Code is buggy
    b) Management has head up ass

    This results in:
    1) poor functionality leading to poor user experience
    2) a slow on-boarding process

    The goal is:
    i) Get clean code
    ii) Extricate management head from ass

    A potential way to approach mangement is to "share" the problem with the appropriate responsible manager. Make your problem their problem (can often be done just by point out the proble.

    Indicate that the current on-boarding process takes at least twice as long as necessary and point this out to the HR manager. More time spend on-boarding directly impacts the productivity of the unit (the trainer and the trainee waste time), and therefore is wasteful. Show much much can be gained by cleaning up the code.

    Indicate to the Customer Service Manager or Sales Manager that customers are dissatisfied. See if you can get access to customer complain logs and estimate how much is being lost to competitors due to poor functionality. Do a Customer Lifetime Value calculation and show that by cleaning up the code, a customer's loyalty will increase by X months or years.

    Then do an ROI calculation. Estimate the amount of time it will take for your team to clean up the code. Estimate how much that costs the company (salaries, workplaces etc). Show an earn-back period. If you can get it to show less than 1 year earnback, then ask the HR manager and the Sales Manager to step to sign their name to your solution and ask them to help you present it to the General Manager.

    You need to get on the radar to the GM with the clear proposition of: Save money, serve customers better, make this a better place to work (retain employees).

  108. No, you don't know what needs to change by Anonymous Coward · · Score: 0

    What needs to change is that you need to reward good quality instead of punishing it. "Good-Fast-Cheap. Pick any two" tells you what you need to know. If you want good then your management MUST understand they will have to pay for it. Either by allowing the time to create good work or paying extra money for it. Management's job is always to minimize those things. They therefore always punish quality work.

    Your focus is too small. Get the big picture right and the small stuff will take care of itself.

    Good luck, you'll learn a lot while you fail.

  109. Good, Fast, Cheap by Anonymous Coward · · Score: 0

    Looks like you are using Fast & Cheap.

  110. Negative reinforcement by Anonymous Coward · · Score: 0

    I've worked as a dev in 7 different companies from seat of the pants deployments to SEI-5 rated teams and everything in between.
    There was 1 team of 7 devs that didn't have any QA, no mandatory testing, no real process besides using RCS for version control. They were all personally responsible for their code and considered any memory leak a huge bug in the code. We supported 10+ platforms. In 3 yrs, I think only about 20 bugs were reported from the thousands of users.

    At other places, we had more process, more testing, QA, bug databases, and we would have 20 bugs reported every day. I did my best as dev lead to introduce negative reinforcement for negative results. Breaking the build, too many bugs, simple oversights - all had negative outcomes that were known before. I had fresh-from-college devs on the team so we used peer pressure to teach them. One guy liked to include every file in our project inside his code. Compiles took forever. His new name was "Captain Include" for the next 3 yrs. The other team members taught him when it was necessary to include each file AND about forward declarations. His code wasn't really buggy, but there were other devs that constantly broke the code even with what appeared to be high productivity on all other measures.

    I did have individual "productivity" measurements and stats for each dev, but I never shared those with my bosses or the team. That would have destroyed the trust. There was no relationship between amount of code written and bugs introduced in our data. It really was very individual. The GUI devs had 4x higher bug rates than the non-GUI guys. They were also less experienced devs with only 1-2 yrs while the back end guys were 5-10 yr devs.

    At the SEI5 project, we didn't make too much code. It was critical that everything work perfectly. Our bugrates were tiny - 1 every other year, plus there were 7 levels of testing including from outside companies. Government project, obviously. We had so much overhead for documents, reviews, testing, builds that I can't imagine any commercial company doing it. Not even heart pacemakers.
     

  111. Short functions are key by Anonymous Coward · · Score: 0

    Any function that is longer than 1 computer screen is too long. Seriously. There is something about having a unit of code all on the same screen that can be well-tested. This makes code much, much,much less buggy.

    Also, throw out the IDE. These monstrosities hide too much from devs. Instead of writing clean, clear code, they are screwing around with IDE crap. A minimal editor and makefiles is what we need.

  112. You'll have to play your bluff by Anonymous Coward · · Score: 0

    . But despite that, the quality of our code and design continues to suffer, and poor code continues to get released in the name of keeping the scheduled release date (product guys don't like to wait)

    If you want to change things, then you'll have to fail to keep to the scheduled release dates, or release buggy software that causes client issues that come back into the account managers that appear to be running the company's development schedule despite not having any knowledge of good software development.

    But first you have to express clearly to management that the current poor software development practices are going to lead to this issue, that it won't be long until it will happen, etc. That's so you can say "I told you so, and I told you the solution" when you enact the above plan.

    But ultimately if it's only taking a new guy a month to start being productive, then your problem isn't that great right now.

  113. Open the source for someone by Parker+Lewis · · Score: 1

    In a small company that I worked, we opened the code for the client (the client has a code team and in order to convince the client to purchase our product, we offered the code for them, and then we got a deal). This fact (the client developers will check our code) make all the team code better. Open the source code, in some level, automatically make you write better code, cause you start to think "omg, what others will think about this? and my reputation as developer?".

  114. wow by Skal+Tura · · Score: 1

    wow, one should not need to convince why doing quality work is important :O
    Just leave that company, or get all of those who oppose doing quality fired. There really is no middle solutions in situ like this.

  115. Why Care About the Team? by nicholdraper · · Score: 1

    I worked at one place that fired all the programmers nearly every two years. Bad programmers come and go. So what. I worked there nine years until I quit to go to another company when I wanted to leave. If you cannot take over a project, figure out what is wrong and correct it, then maybe you're not the great programmer you think you are. Here's how to become a better programmer. Realize first what is good code, it isn't the code style, you can use a code beautifier to change that. It isn't in the comments. Although good programmers recognize when a well placed comment will help. Good code works. Support calls decrease. You can demonstrate that to a non-technical boss. Why was I still employed when they fired all programmers every two years? Because often I was the sole programmer on a project and it didn't fail. If they had a project that failed, they gave it to me and after a few releases it was fixed. So secret number one, the reason you right unit tests isn't because your boss forces you to do it, it is because you recognize that your work is your reputation. So what if you aren't given time to write good code, you're not given time to write bad code, are you? Don't even commit your code to the repository until you have tested it. Study programming, and I don't mean like you did in school, realize that professors like to teach, programmers like to program. Find a good programmer and look at his code. If there are no good programmers in your company, look at open source. Lastly, recognize that becoming a good programmer takes years. Learn a little about metrics, it will help you to show your boss that your projects are improving while you are becoming a better programmer.

  116. Just encourage it! by jameshofo · · Score: 1

    Reward good behavior and push people in the direction your trying to go, get rid of the people who are blocking your attempts to make things cleaner.

    but the attitude may be that way because the typical demand is "push push push" until the goal is met, I see a lot of people fall into this trap where they believe that if they can just get to "X" we'll be O.K. and we can stop making the developers life hell. If that's the case then its a managerial problem, the environment will tell you a lot about how things operate day to day.

    --
    Good leaders run toward problems, bad leaders hide from them.
  117. Impossible by Anonymous Coward · · Score: 0

    It is in 90% of the cases impossible for an employee to improve something his manager does not see as necessary.
    The other 10% of the jobs are worth doing.

    You can:
    1. fetch the money, feed the kids and stop complaining
    2. find one of those 10%.

    Yes, this answer is exagerated in a cynical way.

  118. Polish your resume first by Anonymous Coward · · Score: 1

    I just got fired on a project for doing this. The inevitable outages and downtime when cleaning up a 10 year old mass of hand-built, undocumented systems caused me to revamp and document the systems, but encounter some very bad failures. (When there are entire databases, subnets, user accounts, and critical production software running on developer's desktops that no one in the company has ever documented or even backed up the machine, there are going to be outages as you do cleanup.)

    The newer engineers there are doing a much better job now, partly due to my technical leadership and partly by my taking a backhoe to the documentation and throwing out most of the outdated and irrelevant material. And they were all shocked as I left the building. But when management wants 24x7 availability, new features all the time, and gives no time to do it, something's got to give. They've taken my good work and hung me out to dry because I discovered a lot of the existing "dry rot" in the project and cleared it up, but yes, it cost time and political capital when services went offline in the cleanup. They'll now get a few years of stability, and they won't be paying my senior engineering rates and I won't get stock when they go public next year. That kind of thing is why I make damn sure I get paid in real money, not just "shares".

    So, a critical lesson for me and for you, is to spend the political capital in advance to get managerial buy-in to the project, or be ready to move on if someone doesn't like any aspect of your work. Outages and breakages are *bound* to occur as a result of the cleanup, at least at first. If you're like me and do your work because you love it and want everything to work, do it but be prepared to be unloved by some parts of management. Publish if you can: publishing your work in open source projects so others can benefit from it, and so that you've got verifiable achievements on your resume, is priceless.

  119. The important thing by Anonymous Coward · · Score: 0

    Everyone seems to be focusing on money, but the truth is that to help your team develop a better code the first step is not to raise wages but to BE THE EXAMPLE,

    Write decent code, show the good practices to your team and REVIEW the team code, this is the key to motivate and guide the developers team.-

  120. How a manager should treat coders! by kurt555gs · · Score: 1

    This video clip says it all:

    http://www.youtube.com/watch?v=LvwqK2gn3S0

    --
    * Carthago Delenda Est *
  121. Are you sure? by ArrayIndexOutOfBound · · Score: 1

    There are ways to instigate a change without being loud about it. When you write your code, write it pretty, well documented and with great unit tests. When you are releasing, write good release notes. When you are in charge of a feature, do good code reviews. Make code review templates. Write good documentation. See what happens.
    If you really want to put this on the corporate agenda, you need to convince the person making technical decisions. If this gets on his or her agenda, things will happen. Beware when approaching this person - you've been thinking about this for weeks or months, while it may be quite a new idea for them. It may take a while for things to sink in. Don't expect it will happen quickly, or even the way you think is right. Plant the seeds and tend to them as they grow. Be prepared for resistance among coders too - writing docs, tests and releases are rarely seen as very compelling work, especially with tight deadlines.
    Before doing anything though, you need to think about how important this is to the business. To you, it may seem like a very important thing and a complete no-brainer. However, you may not have all the information necessary to make this decision for the business. To the product and business people, the opposite may equally seem like a no brainer. All they care about is that it does the job and hits the market when they need it. Tech leaders are often enslaved to this kind of stuff.
    Also, in my experience, many times a rewrite / major refactoring ends up costing too much and producing little benefit in the long run. Old idisyncracies are replaced by new ones and key sections of the code - often most critical to the business - end up scarred by changes around them and not better in any way. Be prepared to encounter people with similar experience and perhaps a bit of resistance along those lines.

  122. Simple by Anonymous Coward · · Score: 0

    Outsource. All you will find in the US is what you see posted here - whining about more money and that's why they code poorly. Like giving them a huge raise would make the quality any better. The moment someone says they can't do a better job due to money, they need fired. Once you show you can make a good product (code or service or whatever), you get paid to do it well. Your developer bubble burst over a decade ago, get over it.

  123. Release schedule driven solely by Product people? by Stolpskott · · Score: 1

    If by "Product" people, the OP means sales/marketing people, then this will be a constant problem, the development team will always be to blame, and you will always feel like a cross between Sisyphus and a dung beetle.
    First, you will need a development manager with the authority to hold the release of a product version.
    Second, you will need a development manager with the backbone to stand up to pressure from the "product" people and push back.
    Third, you will need a development manager who protects you from the "product" people who are used to coming to you directly and dropping tasks on you.
    Fourth, you will need a development manager who will inspire your development team to change their coding habits from fighting fires to development based on a plan. Whether than inspiration comes from higher pay, a kick up the arse, threat of firing or good old-fashioned physical intimidation/sexual innuendo is dependent on whatever works on the individual developers.
    Finally, you need all of those development managers to be the same person.
    Once you have that person in place, they need to adopt a specific development methodology - Scrum, Agile, fundamentally it does not matter at this point. You are starting from such a low level of code quality that it sounds as though just about anything will be an improvement, as long as all the developers are pulling in the same direction.
    The development manager sits down with the "product" people, establishes a list of required features for the next version, and either talks to the team about estimated development times or comes up with that figure themselves. Add time for comprehensive testing and bug fixing (not all bugs, just the major ones), plus a little extra time. That gives the release date. Product people want it sooner? Fine... what features shall we take out? Once the feature list and timeline is established, if the product people want to add features or change their mind, then either the release date is moved or those changes are held over to the next version, or other pre-agreed features that have not yet been developed are held over.
    The development manager will be the most hated person in the office for about 6 months, and (s)he will need the full backing of the company directors because you can be sure that the product people will be on the directors' cases 24x7 complaining about the obstructive person. It is not an easy job, it is not a nice job, but it is one that I have done at a couple of companies, and once the product people see a release come out on time and relatively bug-free, they will start to come around.

  124. Why write good code? Don't you like employment? by Anonymous Coward · · Score: 0

    Who gets laid off first, the guy who writes quality, modular, well documented code on which he has instructed his teammates on the functionality? Or, the guy who creates such a mess that no one can figure out what he's done? The guy who writes quality gets laid off since his work is easy transferred to another person or outsourced.

    One thing I've learned from our eastern European and Indian colleagues is there's no PERSONAL advantage to writing good code or knowledge sharing. They're from a dog-eat-dog world where survival depends on defending your turf. Defending turf means writing code that you only understand and sharing the bare minimum with others.

    In the USA we've grown up in naive academic world where helping others and creating quality for the common good is a moral virtue. That was fine decades ago but the market is far more competitive with international engineers from a world of bare-knuckle tech brawling.

    Hold the company you work for hostage with arcane systems, hold your managers hostage with bewilderingly complex code, and politely don't help your co-workers. These are the keys to prosperity:)

  125. Yeah-Leadership by Anonymous Coward · · Score: 0

    As long as managers and other leaders give shit about Quality (in many ways, not just from an "external" point of view), absolutely nothing will change.

    The guy needs to change the people above him and we all know this will never happen. Most businesspeople are money whores and they hire coding whores to be their bitches. We, the programmers, have absolutely no dignity left and will do whatever the money whores demand. That's the said truth and all We Bitches can do is to change our pimps to feel a bit more comfortable.

  126. Qualtiy code by thvv · · Score: 1

    I think there are four things you need.
    - commit to quality (has to be top to bottom)
    - use systematic process (seems like you get this)
    - check everything (at every stage)
    - improve continuously (own your process and your meta process)
    i wrote more about this at http://www.multicians.org/thvv/nasty.html

  127. make them depend on it by chstwnd · · Score: 1

    well, I think a relatively straightforward approach would be to have them tag-team assignments. not the resource you're talking about, but individual subroutines/functions. if you can afford the individuals' downtime, have them rewrite the code from scratch. have pairs work on one subroutine, but not simultaneously. half way through the initial writing phase, force them to hand off to their partner without the benefit of a handoff or status briefing. when they realize that they're taking more time to interpret the code than to finish it because it has obscure variables or function calls or zero commenting, they'll start doing it on their own. it would speed up the process if you made inputs from the individual coders fold into an annual review.

  128. Changing Culture by Anonymous Coward · · Score: 0

    The quality guru Joseph Juran wrote about this issue fifty years ago. (See "Quality Management" by Mr. Juran, I've taught this subject using this book for the ASQ, and used it as a working QM). Pick your fights; find a product team that is motivated to try a better way ("early adopters"), and give them your best effort. Do whatever it takes to make them successful. Once you have a success story, tell that story to less motivated teams. Juran claims what once a change has been adopted by 20% of the company, it takes on a life of its own and the change is invevitable. Enlisting the help of a single upper level manager (a "coach") is essential, but you probably don't need more than one.

    Good luck!
    - Ex HP QM

  129. It starts way before the first LOC is written .... by Zero__Kelvin · · Score: 1

    Solid code needs to be engineered, not written. Very few people understand that today. It is the reason why so much code is straight garbage today. Unless you can get everyone, including management, to understand that actually writing the code is a relatively small part of the equation then you will never, ever, ever succeed in getting your company to churn out anything but bug-ridden, undocumented, untested, garbage.

    --
    Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
  130. "reprimand" engineers by Anonymous Coward · · Score: 0

    Of course management will try to offload responsibility to "technical experts", as much as they can. The term is SCAPEGOAT.

    I am 99,9% sure it is not engineers at fault, but engineering management, who have failed to establish proper processes that ensure

    A) Quality of Architecture (i.e. not having serious conceptual bugs)

    B) Code Quality (i.e. not having outrageous coding practices)

    C) Quality Assurance (Close to 100% code coverage from testing, realistic test cases, regression tests, comprehensive and rigorous testing procedures before release, comprehensive testing of new features)

    D) Quality of Documentation (complete, correct documentation of 100% of features, QA on documentation, too)

    E) Source Code versioning

    F) Versioning of Test cases and test code

    G) A proper bug tracking system and proper QA checks of allegedly fixed bugs

    Many if not most managers are cynical and lazy bastards who care 99% of time about their next powerpoint presentation and 1% about actual issues and the fixing and testing of those. They delegate all the hard work and "focus on communication".

  131. XKCD by Leif_Bloomquist · · Score: 1

    Nobody's posted this yet?

    http://xkcd.com/844/

    Just to reinforce what others have said - code reviews (even starting small) and independent QA is essential as a starting point. Make the quality of the code a source of pride.

  132. Probably can't by Anonymous Coward · · Score: 0

    Been at several such places. Tried to improve things. Failed miserably every time. Got fired, hard, once, for even trying to bring up the subject.

    You need a commitment from WAY ABOVE. You usually don't have that and can't even get permission to talk to that person. Even if you do talk to them, I've never seen them swing the Titanic around. Sometimes a few half-hearted words and namby-pamby window-dressing gets done, but that'as about it.

  133. Where there's a whip by virgnarus · · Score: 1
  134. Pink Slips by Anonymous Coward · · Score: 0

    If they suck at their job and write shitty code they should be fired.

  135. Fire the programmers who won't write to standards by gestalt_n_pepper · · Score: 1

    Harsh, I know, but code improvement methods are not rocket science. A programmer who writes a single unit test that essentially does nothing but let the programmer say, "Hey, I unit tested this code!" is a programmer who needs to be shown the door. Ditto for the programmer who won't add the "Why I did this" layer of comments, or the programmer who consistently overlooks error checking, anomalous inputs or other obvious errors. For that matter, I would (and have) booted programmers whose idea of a help message is "Error on Input Block 40!", OK? A programmer who doesn't understand human factors is frankly, incompetent at their trade.

    --
    Please do not read this sig. Thank you.
  136. Rearchitect? by Jay+Juch · · Score: 1

    I realize such an endeavor is both daunting and expensive but you may want to assess your list of issues around this topic. I've worked in several mature products and the differences are quite startling. Good architecture not only prevents issues from getting in but encourages great code.

    If you don't have a detailed architecture document, this would be priority number one. As you write this document you'll also be building up a laundry list of the uglies.

    Some of the interesting findings I've seen in past:
    1. Duplicated code. Usually a symptom of lacking modularization or lack of architecture training
    2. Change complexity - to add relatively simple change, too many files are touched. could be due to over engineering or the lack of one.
    3. Slow builds, hard to configure and test. high time for componentization. cut down on the dependencies. create mocks and emulators. implement dynamic loading/plug-ins. basically, optimizing dev testing cycle results in more testing, and better code.

  137. Perfect is the Enemy of Good by Araes · · Score: 1

    Engineers and engineering companies frequently fall into the trap that a product must be "good" before it can go anywhere. Often leads to an endless cycle of perfection without actual release.

    The OP seems to be in this mode. They could instead release a quick, simple version of their work, make it functional, and then iteratively build toward the ideal "good" as needed. Has the bonus of making product marketing happy too, as they get an early look and can say whether that was what they wanted in the first place.

    1. Re:Perfect is the Enemy of Good by Anonymous Coward · · Score: 1

      That NEVER works. I've never had to time to refactor something that was rushed out to meet a deadline -- at least not until the wheels fall off. By that point, the cost to maintain poor code has become some large multiple of the cost to do it correctly the first time. Sacrificing quality for features/schedule has always been a fool's bargain in my twenty years of software engineering. That said, I never let the perfect become the enemy of the good.

    2. Re:Perfect is the Enemy of Good by stewbacca · · Score: 1

      Doing it right the first time is terrible for job security. Or at least that's what the devs I've been around lead me to believe.

  138. Block Slashdot until after the code review by davidwr · · Score: 1

    If the code isn't good, NO SLASHDOT FOR YOU!

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  139. lack of ethics by luis_a_espinal · · Score: 3, Insightful

    As one who has plied this trade for decades, I'll tell you that programmers are human beings, just like everyone else.

    We urge for recognition, and we need money.

    You just do not tell us to do what you want us to do without recognizing the hard work we have put into debugging the products.

    And you will not go anywhere if you do not pay us.

    If we need recognition in order to do work of acceptable quality, we have an ethics problem. For people with a sense of professional ethics, recognizition and remuneration are pre-conditions for staying at a company or project. But they are never pre-conditions for doing developing software with a professionally acceptable level of quality. Professionals leave, when the time is right, when they feel unrecognized or underpaid. But they do not deliver shit.

    Barring the unavoidable hacks that must happen here and there, software professionals with work ethics do not deliver shit even when unrecognized or underpaid. The greater problem in the software industry is not the lack of recognition (and certainly not the lack of good pay). It is the scarcity of developers with a sense of work ethics.

  140. well, it's better than endless dupes... (sort of.. by Thud457 · · Score: 1

    Ask Slashdot: How To Convince A Team Member That Thinks The Code We Write Isn't Good?

    --

    the preceding comment is my own and in no way reflects the opinion of the Joint Chiefs of Staff

  141. Hard to do by Murdoch5 · · Score: 1
    I would say make a loose standard, Only include major visual aspects such as brackets or control blocks. Make sure you comment the code very well so it's useful. The main issue I have when I have to look at other peoples code is mainly the fact that 99% of the world can't write a good comment that has any use. I think comments are the most mistreated and misunderstand concept in programming. I'm going to completely disagree with every programming book, prof and professional developer out there! A good comment needs to explain what you were thinking and why you thought it and how it works, anything else is not effective. For instance, this is from my working code

    /* loops forever looking to see if a message queue exists,
    * looping every 10 seconds to see if it exists
    * if it does it continues in the program,
    * otherwise it loops forever */

    This is an example of how to write an effective comment that explains what's going on, how the structure works and why it works the way it does, most code I've seen wont even put that comment there, leaving a new team member to have to look at it for a period of time longer then needed to figure it out. I also think people don't comment enough, a comment should be at any line that isn't simple enough where a non coder can sit down and figure it out with in a few seconds.

    So in my opion, focus on making effective and good comments, not a ton of code structure, formatting, characters in a line, editor to use etc... etc... etc... and NEVER include spelling. Any developer who gets mad at a spelling mistake shouldn't code, a spelling mistake that doesn't break the code doesn't matter. Spelling errors matter in documentation and legal defence not code. Also overall have fun, I find alot of standards have no fun in them, locking a standard into a military strict format just takes the fun out of coding, having to worry about every little thing with no freedom doesn't help to create an effective coding enviroment.

  142. Re:Yes a LOT more QA is needed also out side the b by Anonymous Coward · · Score: 0

    One has to note that different settings certainly require different quality standards. Avionics and medical instruments certainly require extremely high quality while nobody is really hurt by facebook fucking up.
    Office software certainly is between these two extremes, as information security is concerned (spearphising attacks etc).

    But for many companies it is exactly O.K. to ship lots of new features with shoddy quality, as their products will be bought and installed anyway, Nobody has seriously punished Adobe for delivering crap all the time, for example.

  143. I went through a similar issue about 4 years ago by BeSharps · · Score: 1

    I went through this very thing when I first started at the company I work at now almost 4 years ago. The company was fairly small, but was in the process of significantly growing (when I was hired, it was about 20-30 people, now it is around 70-80). The software manager, who I had worked with previously and had brought me in, wanted to bring in better processes including test plans, unit tests, continuous integration, common tool base, etc., had just recently started at the company, was overwhelmed with work, and had very little support from above and below. It was bad. There was no QA. There were no dedicated testers. There were no unit tests anywhere. Plus, the company was on the verge of a fairly large increase in the number of projects that needed software support, and had just suffered a fairly catastrophic failure of their core product on a major project (the company would have folded if it was a product company, fortunately as a services oriented company it was able to remain afloat and even profitable over this time).

    The way we have approached it has been to incrementally improve things over time. I would say there were very few wide sweeping changes done.Little by little, we added personnel (a dedicated tester was added right away, a QA manager 2 years ago, and a senior tester one year ago). Little by little, we improved processes (added a Development Guidelines and Practices wiki-page to outline how we do our work right away. Created a development environment setup procedure. Slowly and continuously developed build, installation, and deployment procedures. Maintained design documents by adding a little to them each week, etc.).

    On the development front, we started using Bugzilla, adding it to the core work flow - you did not write any lines of code without a bug (either issue or enhancement) being in place first. The code base was spread across Java, Matlab, Embedded Linux applications, drivers, and kernel c and c++ code, as well as custom firmware originally developed by a 3rd party contractor in c. A re-write would be impossible, and like the original poster, there would be no way to meet deadlines if we were to do it. We put in place a release process, and integration test plans for the core products. We also started to better utilize shared code between projects, adding a "common" pacakge for Java code that is built into every application, and a shared repository for both the embedded firmware and Linux source to share algorithms and processes between them.

    Our approach on improving the code quality was 3 fold:

    1) Brought in unit-test frameworks for all software components. C-Unit for embedded c, TestNG and UISpec4J for Java, slowly built up unit test firmware binaries for the custom firmware code. Note that this was done over the first 2 years, not all at once. The embedded firmware was core to our company, so we started there. Any new code developed would always have unit tests created for it. If we had to fix bugs, a unit test would be created to re-create it before fixing it.

    2) For old code, we slowly cleaned it up. It was simply a mess, especially the embedded firmware. It was basically a giant pile of monolithic code with no concept of modularization or testability. Our approach here was to slowly evolve the code into a better design. If we found a bug, as noted above, we would add a unit test for it first. When we fixed that bug, we would spend an additional 2-3 times the amount of time fixing the area of code affected, both design and implementation. Slowly, the code became more modularized, more robust, and much easier to work in. We can add features in half the time it used to take, with far less bugs and much less

    3) Any new application were done right from the beginning - incremental releases, unit test coverage, test plans, etc. It was a slow process improving what already existed, but new projects. Developers who were not onboard with this were phased out, with new developers hired to replace them.

    I would say it probably wasn't until about 2 ye

  144. Better grammar by Anonymous Coward · · Score: 0

    Start your own company selling the same products they offer and steal all their customers with promises of better releases. Or just sit back and realize that if the product is selling, then that means people are willing to pay for it which is all the "product guys" care about. Not mention if you are charging for support, there's another revenue stream to leech off of.

    It sounds like you are too much of a purist to be working at that company, I wouldn't bother with trying to inspire a revolution as you have to convince the execs that there is an ROI pot of gold at the end of the rainbow which can be next to impossible to prove. A software company that doesn't value things that are inherently designed to make the product better are like knife sales people. They don't care if the knife cuts 1 or 100 tin cans or leather belts or whatever, as long as you buy the knife. So if they say "our goal is to sell 20 knives" and the sales people sell 20 shitty knives, and you go to them and say "but these knives suck!" they'll say "maybe, but sold 20 and met our goal!" My advice, bail.

  145. Marketing-driven Deadlines by Anonymous Coward · · Score: 0

    My view is that deadlines generally are arbitrary. Sure, you can have firm deadlines when it's based on regulatory mandates, threats of termination, or similar things, but many deadlines I've dealt with were simply pulled out of someone's behind (typically someone in management). Ideally, your team should have the opportunity to strongly influence deadlines by offering a realistic work plan based on level-of-effort estimates, dependencies, and so on (yes, you can do this even in an "agile" environment). BUT, the key is to temper the typical developer optimism and be as realistic as you can

  146. Just BEANCOUNTING by Anonymous Coward · · Score: 0

    Whenever I hear "metrics", I think "Beancounting". Intellectually challenged managers and the "just stick to process and all will be OK" idiots think they can somehow delegate responsibility to some sort of brain-dead statistics.

    Shitty software will be discovered by capable development managers when they run the sw, when they execute their little suite of test cases, when they run their little testing/validation perl scripts. And YES, capable development managers are NOT powerpoint/excel jockeys; they are engineers (with authority over other engineers) who care for their product. They do that by USING the product.

    But actual managers are very often lazy, intellectually challenged bastards who would like to delegate everything except the collection of money to their underlings. They are too lazy to perform even the most basic form of quality assurance themselves.

  147. Understand the Real Process, then Change it by Anonymous Coward · · Score: 0

    You are using a process and you want to change it to a new process. The process here consists of people. The developers on your team always make a choice. Although they are used to understanding things in a certain way, and to reacting to stimuli in a certain way, they can change instantaneously if they think they are better off. So if you want to change your team understand your team and your environment, bring out your findings, advocate new behaviors with a compelling cost-benefit analysis, train people in the new behavior, and then monitor.

  148. Sonar + Technical Debt by Anonymous Coward · · Score: 0

    Install sonar, run it on your codebase (assuming it's a supported language).
    Install the technical debt plugin, show how many bugs a robot can find, and how much technical debt you have.

    technical debt = money not spent for fixing bugs not fixed, that a robot could find but your developers could not find.

    That will put a price, literally, on your problem.

  149. change the conversation by Anonymous Coward · · Score: 0

    It sounds like the biggest problem is your product guys and their demands. Honestly, who cares whether they're impatient? They'll get whatever they can out of you, so you need to start changing the conversation, and reset their expectations to reasonable levels. (But obviously, don't explain it to them in those words.) If you get pushback, explain (to your boss if necessary) about your quality concerns, and how the code has gotten progressively worse, buggier, and slower over time, and demonstrate that you have a clear plan to reverse that over time to improve the product. If you and all your engineers are on board about changing the process, you can make it happen.

    On the engineering side, every code change should have 3 steps to get it into the repository (you're only doing step 1 right now):
    1. Write the code
    2. Write the unit tests (and/or integration tests) or update existing ones
    3. Get the code through code review, making changes if necessary

    On the scheduling side, you should include estimation before agreeing to any dates, and that estimation should account for all 3 of the above steps, and also QA testing.

    Finding a unit testing framework is easy (JUnit, CppUnit, FlexUnit, etc), and you can include it in your build process. It can be optional on developer machines, but turned on for your automated build server, which emails the team if a unit test ever fails, and whose checkin caused it. It's also helpful to have a daily code coverage report (we use Cobertura for Java) emailed to everyone. When you start seeing percentage graphs of your overall test coverage, and that your own portion of the codebase has much lower coverage than someone else's, it's a great motivation to write more unit tests, and to fix the bugs you find as a result.

    For code review, I've used Gerrit (for git repositories) and Review Board (for general repositories). You can have either convention or automatic enforcement that every code change must be reviewed and approved by N other people. It's really helped my team to be more consistent, and to write things well the first time.

    For an automated build server, I've used Hudson. It's able to run the unit and integration tests, and make a new build or deployment for every code checkin.

    To help your upstream problem, here's an example conversation with your product team.
    - We need [feature] by [date].
    - I can get you an estimate tomorrow of when we can finish that feature.
    - No, we need it by [same date].
    - I'll include in the estimate what we are actually able to finish by that date.

    Or another example conversation:
    - How long would it take to do [other feature]?
    - Well, writing the code, creating unit tests, and getting through code review will take [duration].
    - What if you skip the unit tests and code review? Those don't sound important.
    - Sorry, our automated tool chain (or our engineering process) won't let us do that, for quality reasons.
    - But we really need it by [shorter duration].
    - Sorry, we really can't do that. It sounds like we'll just have to cut that feature.

  150. Simple first steps by Anonymous Coward · · Score: 0

    1) Realize that management is most likely not the solution, but may not be as much a problem as you think. Managers tend to think in different terms than code quality, but understand that code quality is important in an abstract way. So they won't tend to initiate code quality practices, but they may be open to what multiple engineers tell them they need to do.

    2) Initiate code reviews. I think there are two optimal ways to do this. One is pair programming aka continuous code review and the other is group code reviews. If you do group code reviews every Friday order lunch and have people what they present what code they wrote. This practice will also serve as a "code camp".

    3) Incorporate code quality measures into your build that spew out reports. Tools like NDepend or Crap4j can give you rough measures of code quality. You can make sure these metrics do not increase or set a goal to increase your overall quality by X/timeUnit. This actually requires a lot of buy in however, because many managers and QA groups don't want you to touch code.

  151. There's only one PERMANENT solution... by Anonymous Coward · · Score: 0

    Kill all the product guys.

    No, seriously. Murder is probably a bit overboard, I suppose, but get the hell rid of them.

    Or make them explain to you, and as many of their bosses as you can get in the room, why they prefer shipping a bad product over shipping a good product. When they bullshit a non-answer (they're product guys, they're used to being able to get away with vague mumbled buzzwords), call them on it. Publicly. Point out, for all the managers in the room, the tradeoffs caused by their approach. (Managers don't generally like to admit that tradeoffs exist until they absolutely can't avoid dealing with that fact any longer, so this is for their benefit as well.) Ask their boss, in front of them, why this behavior is seen as acceptable, given the long-term damage it is doing to the company's reputation and the additional labor costs caused by not getting it right the first time. Make sure this is all done as publicly as possible, and in front of people who (a) have a stake in the company's long-term success and (b) have the authority to set things right. Then, either the people with authority get rid of the chaff and allow the reasonable ideas to thrive, or they double-down on stupidity and fire you. But either way, your problem is solved, because you don't have to deal with them.

    Though I suppose, for all that work, a concrete-shoes approach might be more efficient and have broadly similar results.

  152. Jenkins Continuous integration game by hli · · Score: 1

    see https://wiki.jenkins-ci.org/display/JENKINS/The+Continuous+Integration+Game+plugin
    Continuous integration, together with a basic set of automated tests, ensures good quality all the times. And the game ensures that all participants want to get a good score :)
    Maybe you can add some (very basic) static code analysis - just some rules where everybody agrees that they are essential for good code.

  153. Education by plover · · Score: 1

    There are a lot of ways to improve software quality. Some are cheap and easy. Others are hard and organizational.

    • Static code analysis. Use a tool like Coverity, Klocwork, or Fortify. Get your manager to make them fix the bugs those tools reveal. It's a cheap and easy way to dramatically reduce existing bugs.
    • Code quality metrics. Use McCabe Complexity, the Maintainability Index that comes with Visual Studio, or download a copy of sonar, or whatever fits your environment. Use them to convince other developers that your code is not of high quality. If they don't believe in the tools (lots of people discount them) run them and show them in real time how the tool instantly zooms in on the modules you all know and agree are the real stinkers. As a group activity, refactor one of them, so they can all see how it becomes simple. It demonstrates why the code is bad, and how you can make it better. But don't force everyone to meet a complexity standard of 7 for every module - that's one of those ridiculous management ideas. Just use the tool to make some improvements for a while.
    • You need to be really good. Learn the SOLID design principles. Learn design patterns. Learn object-oriented design. Even if you don't buy into them as a religion, those are the concepts that underlie most readable, maintainable, high quality code. Be able to speak the language to anyone who will listen.
    • Write Automated Unit Tests. Learn how a good test serves as documentation for calling a method. Learn how hard it is to write a good test unless the code is well written, and then you can see how easy it is to write a good test. Start your code reviews by following the calls from the unit tests. But AUT are really hard to write if you've never done it before, or if you're trying to add tests to existing bad code. I highly recommend Michael Feathers' book Working Effectively With Legacy Code.
    • Use Test Driven Development. TDD forces you to think of your methods' testability first, which drives you to make decisions that keep your code tightly cohesive and loosely coupled. You think in terms of interface, and dependency injection, not in giant displays of ladder logic and inherited functionality. Besides, your valuable automated unit tests will fall by the wayside unless you keep them up. TDD is how you encourage teams to keep them current.
    • Use code reviews. Your code reviews can look at the output of the static code analysis tool, and make sure they're cleaning up the egregious errors like null pointers or off-by-one arrays. The reviewers can look at the quality metrics for identifying problem code. They can look at the automate unit tests to see if they're effectively proving the code works. And you can use the review as a time to pass on the wisdom they are missing.
    • Use management for good instead of evil. Get their focus on software quality. Get them to agree that software quality is a problem, and that you have a plan to do something about it. Get them to agree that producing good code now is more important than meeting arbitrary deadlines with bad code. Get them to agree to spend a bit more on projects so you can do TDD and AUT. And get them to push that message down to the developers.

    If it's just you, and you don't have strong management support, you'll have to start small and build up a group of allies who think as you do. Demonstrate how quality code is written instead of just asking for it. Mentor people to help improve their skills, and spread it. If you need the quick and showy splash of a new initiative, hire a new software engineer from outside the company who already does these things, and who is willing to help you implement them.

    --
    John
  154. Yeah by Safety+Cap · · Score: 2

    I used to work for a company that produced avionics software. Obviously, we had to write solid code.

    The On-Board Shuttle group is (was) even more bad-ass than that. For them, 5 9s (99.999% failure rate) was unacceptably lax.

    FTFA:

    But how much work the software does is not what makes it remarkable. What makes it remarkable is how well the software works. This software never crashes. It never needs to be re-booted. This software is bug-free. It is perfect, as perfect as human beings have achieved. Consider these stats : the last three versions of the program -- each 420,000 lines long-had just one error each. The last 11 versions of this software had a total of 17 errors. Commercial programs of equivalent complexity would have 5,000 errors.

    --
    Yeah, right.
  155. A month?! by Anonymous Coward · · Score: 0

    "it is impossible for a newcomer in our team to get up to speed and be productive in less than a month" That's cute!
    I work for one of the worlds biggest SW companies, you'll never guess which, an it really doesn't matter. When I started they told me; dont expect to be able to do anything useful within the first 6 months, and it'll take a year before you are contributing. Sure.. I beat those estimates, but not by all that much. You be happy with what yo've got!

  156. Process is about religion not logic by drew_eckhardt · · Score: 1

    The fundamental problem is that this is a religious issue for both engineers and managers. People generally don't believe until they personally witness the miracle of rapid development with predictable schedules and low customer visible defect rate.

    Working solutions in order of increasing time + difficulty:

    1. Quit and either start a new team or join an existing one with decent development practices (I insist on a code and test process walk through of every company I consider joining to avoid unpleasant surprises. Obviously this fails for groups yet to build a product, and sometimes teams panic when pivoting and abandon reasonable practices).

    2. Get promoted to a leadership role while you remain hands on. Tell every one else to do the right thing like you're doing - getting people to buy in is easiest when you're not making them do something you won't like the case would be with a non-coding manager. Most people fall into line with direction from above. Peer pressure works for most hold-outs. Any one not getting with the program can be replaced.

    3. Do the right thing on your code. With your process producing a faster more predictable release cycle you'll have higher productivity and can take over an increasing fraction of the product so the bad people with bad process have less impact.

    Applying test driven development variants to new features/subsystems/products helps a lot here because it makes shipping without good test coverage and short predictable cycle times impossible because no product code exists without the necessary infrastructure. While a "code complete" milestone may be farther into the future depending on how that's defined the total time to deliver the project will be lower and ultimately it's the ship date that matters.

    Do the same for bug reports. Every reproducible bug gets an automated test case (if it broke the first time it's complicated enough to break again).

    After a couple years you should be in good shape with enough infrastructure that the cost to add test cases is effectively zero before their benefits are considered (Perhaps most notable is that the requirement for incremental testing leads to cleaner interfaces which make complexity more linear with respect to project size. That in turn produces a lower defect rate, faster turn around time on repairs, and makes defect rate/time to repair more constant and predictable) and you don't have to worry about new people (or old people who haven't touched a piece of code in a while) breaking things accidentally.

    Here are some things which don't work:

    1. Talking to your co-workers about doing the right thing

    2. Providing anecdotes (personal and otherwise) from other companies about the benefits

    3. Buying everyone a copy of a book like

    _The Clean Coder: A Code of Conduct for Professional Programmers_ by Robert C. Martin

    http://www.amazon.com/The-Clean-Coder-Professional-Programmers/dp/0137081073/

    Quote:
    The jury is in!
    Te controversy is over.
    GOTO is harmful
    And TDD works

    in their choice of print or Kindle edition with the direction to read it on "company time."

    4. Doing the right thing and providing metrics on things like defect rate, time to repair certain classes of bugs, number of release candidates for a feature, etc. This can be very striking - memory corruption bugs made reproducible by the test environment so you fix them in 30 minutes versus three weeks for co-workers' similar bugs, a major subsystem with no QA or customer visible bugs or just one of each, etc.

    Logical people would get on board after seeing such evidence, but this is about religion not logic.

  157. Lean from others' mistakes by sbjornda · · Score: 1

    Have a regular chin-wag about the ugly stuff seen on thedailywtf.com

  158. Get out at a time of YOUR choosing by Anonymous Coward · · Score: 1

    I hate to admit it, but it is true. You probably won't find a way to fix this company. Work hard while there, but find another job. Soon.

    Once a company gets into the downward spiral, the bean counters say they can't afford 1 minute or 1 dollar that doesn't produce direct revenue. Management and bean counters set the features and delivery dates too tightly, quality slips further, and it just gets worse and worse.

    Before the crash and before I was forced into early retirement by yet another round of management hired in to try the latest whiz bang development paradigm I described it to management thus: We are being shot at with BB guns. One hit won't kill us, but 100,000 will, and it is a very painful death.

    What was once a 200 man company now exists as a one man fire fighting shop trying to keep customers, inside what was a fortune 500 company who's capialization has shriveled to insignificance.

  159. Requirements by Anonymous Coward · · Score: 0

    Give them good requirements.

    Seriously, that's the hardest step. Once they know exactly what's expected of them, down to every line break and full stop in the dialogs, good code should be a cakewalk.

  160. It's called leadership by Anonymous Coward · · Score: 0

    Techtard 421, why aren't you at your post? Return to your workstation immediately--you are not qualified to be a leader. Leadership is outside your skillset. That is all.

  161. Been there, .. by Mr2cents · · Score: 1

    I used to work on a project that shows some similarities. Ad-hoc coding, feature creep, heavy time constraints, overly complex code, ... Don't expect miracles. If you start with a heap of dung, it is never going to smell good.

    I sent an e-mail to my manager detailing 4 of the most critical problems. Fortunately, he was wiling to hear them, and we made some changes that improved the situation. But when I left there was still a scheduler (to start and stop machines at specific times) that was never rewritten. It was funny, the day I left I found the e-mail again, and then I heard a fellow-engineer had been assigned to make a trivial change to it. Expected amount of work: two weeks.

    If the problems lie deep, it is wishful thinking that you can simply fix it. In a perfect world, you would start over again. In reality, there are all sorts of constraints. Here are some tips:

    Analyze the project history: try to discover what files are changed the most, what kind of changes are mostly requested, are there modules that produce a spray of bugs whenever they are touched etc. (you do have a bug tracking system, right? If not, get one now!).

    With that analysis, try to isolate some pieces of problematic code. Remove all sharp objects from your desk while doing this, because you might want to poke your eyes out. Focus on a part that changes a lot and see how you may fix that. To give an example: every time new menu options had to be added, the guy who wrote that became pale and mumbled something and went off to implement it. A few days later it became available, with some bugs like wrong menu's popping up. So when I tried to find out what was the problem, it turned out that every goddamn menu-item had a hand-coded position ID. so if a new item had to be inserted, all the next menu's needed their id's to be incremented, and all references to those id's updated. Using some rather advanced macro's (including concatenations), I managed to clean that up. It's not cleanest solution, but it only took me 2-3 days to implement, and after that, new menu's could be added in no time and without bugs. Also, anyone could add them.

    What I want to say with this: you may improve the situation without making extremely drastic solutions. If you make just a couple of such changes, these can already have a drastic impact on development time. More importantly, it will not go unnoticed, and change the dynamic of the team and management. People will start asking the right questions: how can we further improve the situation? At that moment, your voices will be heard much louder.

    If there are no test cases (as was the case for me too), you have to reconcile with the fact that it's too late. Try to add test cases for new modules, but realize that retro-fitting unit tests to a large project with low-quality code is not realistic. The next best thing might be adding assertions wherever you encounter bugs. Also adding sanity checks (e.g. testing if large object trees contain valid data) may prove helpful in debugging.

    I hope that helps, and best of luck.
    Any further criticism/advice is always welcome.

    --
    "It's too bad that stupidity isn't painful." - Anton LaVey
  162. Public Code Reviews and Named Bug List by obscuro · · Score: 1

    Your team members are clearly not feeling the cost of their failure or the benefit of better practices. Schedule a 1.5 hour meeting where you go over the worst code that week and the best code that week. When bugs show up in a release track them back to the developer(s) involved and rename the bug to include their names.

    Identify WHAT DEVELOPERS NEED TO LEARN OR CHANGE during each code review and provide the resources for them to learn the better practice.

    Pay bonuses for good code and good practices. If you're afraid that some people will quit... don't be.

    --
    Every rule has more than one consequence.
  163. Change jobs or transfer by carys689 · · Score: 1

    Been down this path many times and all it does is cause endless self-grief and hopelessness, primarily due to lack of upper management support and resistance from peers. I will tell you what has worked: get in on the ground floor of a project as the tech leader, establish and ENFORCE "good" quality and process standards. You may not become "best buds" with the others because of this, but they'll either toe the line or move to another project or company. Either way, the project will be better for it.

  164. What motivates us by Anonymous Coward · · Score: 0

    This goes a long way in describing what motivates us.
    http://www.youtube.com/watch?v=u6XAPnuFjJc&feature=youtube_gdata

  165. What about bad code that works? by eap · · Score: 1

    I agree, code reviews are the best way to identify shitty code. What if the code is bad, but the bugs aren't really provable? Let me give some examples.

    I've seen this happen, especially in old code. The code works, but it's full of 2,000-line God Classes, dangerous half-objects, and doThisThatAndTheOther() void methods. Young developers are happy with it because it works and they continue writing the same kinds of idioms.

    Arguing for change in code this bad will require a rewrite, which is hard to justify if you can only find potentially dangerous behavior vs. real bugs. Your only argument comes to, "Yes, the code works, but down the line this catch Exception block could result in unpredictable results." Folks who don't have years of answering to customers when these problems manifest don't see the danger.

    Shirley, someone else must have been in this situation before.

    1. Re:What about bad code that works? by swillden · · Score: 1

      Rule #1: Do no harm.

      Rewriting code because it's ugly and nasty is almost always a bad idea. Leave it alone. Focus your code improvement efforts on new code, preventing more of the badness from being created. And even there, if the ugliness is deeply ingrained in the culture you have to start small. If you're given a huge pile of ugly code to review, start by asking for small improvements. Extract a set of subroutines from a 400-line method. Factor a God class into a Lesser Deity class plus a couple of support classes, that sort of thing.

      If you're the lone voice of experience among a group of young developers, you may have to teach by example, at least to begin with. Have them review your code -- because yours can also be improved -- and along the way they'll learn some things.

      You can also start to develop a culture of code excellence. Organize some lunch study sessions in which you study some good books as a group -- Design Patterns, Refactoring, Test-Driven Development, etc. Don't make these mandatory (assuming you're even in a position to do so), but it's very likely there are a few developers who are interested in improving their skills and learning cool new things. See if you can organize a committee of people who are interested in better code to propose other ideas to create a culture of healthy code.

      This is all a lot easier if you're in a bigger shop, of course. If there are only three of you and the other two think you're interest in code quality is silly, and management doesn't care, your best bet is to suck it up and live with it or find a new job.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  166. Really? by Anonymous Coward · · Score: 0

    You make it sound like the default is to intentionally right bad code. Bad code (or the opposite of writing good code) is PRIMARILY a result of externalities that are NOT under the control of the programmer. The MOST COMMON is lack of proper specifications, project planning and management!!

  167. Curry by Anonymous Coward · · Score: 0

    If you write bad code we will cut off you curry supply. Should do the trick for most coders.

  168. Good Code is independently tested and reviewed. by Summitlake · · Score: 1

    Writing good code isn't just writing clean elegant code with state of the art tools. Programmers have to be fundamentally convinced their code works. Quality assurance people have to be fundamentally convinced they can break the code. If your company is willing to take formal QA/QC seriously, QA needs to be established independently. Set up a small QA operation, make sure they are trained to learn how the code and interface should work better than the end users, send them to a quality assurance refresher course if needed, and give them "teeth." The CEO has to be enthusiastically involved and supportive if you're going to get a healthy and productive balance between two independent departments.

  169. Re:abstract singleton factory method bridge protot by Anonymous Coward · · Score: 0

    These days we've shown that an abstract singleton factory method bridge prototype facade is the only way to go for maximum flexibility!

    You know, I just stopped to wonder what one of those would look like, and after a moments reflection realised thst you just came up with the prefect description oof the spring framework. :)

  170. Job security by Anonymous Coward · · Score: 0

    If they believe they will be in the same job in the future and may have to revisit the code they produce, that gives incentive to make decent code.

  171. Feedback by cwsumner · · Score: 1

    Tell them that if the code fails, they will be the one to have to fix it at 3AM.

    Having a separate group fix the bugs, is a Bad Thing. 8-)

  172. Generate numbers to share your concern by ArunSaha · · Score: 1

    I fully understand what you mean, but unfortunately, "code is complex" is a very subjective statement. Something complex to you may not be complex to your team member. So, everyone need to arrive on a common ground on what is considered "complex."

    One widely accepted metric to measure is complexity is the cyclomatic complexity or McCabe complexity. [http://en.wikipedia.org/wiki/Cyclomatic_complexity]

    There are free and open source tools to compute cyclomatic complexities of your code base. Using a tool, you can find out complexities of functions, files, directories (by adding that of files) etc. Then find the top-10 in each category. My favorite is the top-10 complex functions.

    Install a cronjob to perform this computation every day.

    Track which functions are increasing complexity.

    Have all this information readily available in a intranet website and share that link to the team (couple of times!).

    I am pretty confident (have done it myself) that this will bring some improvements (may not be as much as you want).

  173. Taj Majah Syndrome by Anonymous Coward · · Score: 0

    As bad as it sounds, as developers, we are not building the next Taj Majal and our code will not withstand the test. What that means is, code is obsoleted every 2 years if not sooner nowadays. So, I say, write code to make things work and move onto the next project. Frameworks and unit tests just aren't agreeable to most middle-managers when there are serious deadlines that involve $$.

    I have been fighting this battle for years and I finally gave up; it simply is not worth my time to try to convince the management why we need more time on projects for unit testing, uniform development and things like PSR-1/2 standards. I followed the "standards compliance" paradigm for a long time and still lost. So, give up and just make things work as best and as fast as you can - we are also all replaceable by outsourced development. Just some thoughts.