views:

118

answers:

6

Ok, I think this question is at the wrong place and I'll head over to http://programmers.stackexchange.com/ to read/ask about it. Thanks all for your answers up to this point. :)


apologies ;) I'm sorry if this question is a little bit subjective, but I can not come up with a better title. I'll correct it if you know something better.

In my organization there is a lot of buzz about this whole automated testing and continuous integration thing, but one argument I constantly hear is this:

How should I develop good, clean, easy to maintain code and write unit tests, if the deadline is already set and it is only half of my estimate?

I'm a developer myself, so I can understand this. But I always try to respond that not only the developers need a paradigm shift, but the management too.

If you are a developer and your estimates are cut half, no matter what you estimate, you are not going anywhere, no matter how complex or trivial your problems are. You need the backup of the management guys, the One Guy who is giving the money.

Conclusion?

Can you give me some help, may it be a good URL to read about this development/management conflict, a book or maybe a personal insight? Did you survive a large process shift like this in a Waterfall company that is now doing Lean development? Or do you know this argument and have a clever answer to it?

And please, help me rename or move this question. :-)

Update

Thanks for all the answers already! :) I think I have to make clear that my point wasn't the "do it twice as fast" statement from management. It's about the negative point of view that comes with this statement from a developer.

Is there anything I can do to help people to understand that this is not the default in software development? That the PM is not actively preventing writing good code and that maybe both sides need a bit more education about the pros/contras of clean code bases, good coverage and lots of automated tests?

A: 

A good PM does not estimate. Ever! A good PM will get an estimate from the person who is going to do the work. They will not change it. They may try to coax the worker to change it but, since the worker is the one doing the job, they should be controlling the estimate.

If you have a PM who cuts your estimate in half, make sure your estimate was in writing and then use that to explain to him (sorry for the gender bias, English doesn't really have a good neutral pronoun) and hopefully his boss that the reason your work only seems half finished is because he was screwing around with your estimates.

Tactfully point out that, if they're not going to take your estimates seriously, they should leave you alone and just pluck any old number out of their derrière. That will have the same effect of missed deadlines and unhappy customers but without you wasting time providing numbers that are just going to be ignored anyway.

In any case, the cold war between bad PMs and smart developers will naturally lead to the situation where you should initially double your estimates so that the halving will have little effect :-)

paxdiablo
+2  A: 

It may sound defeatist to say this, but I've worked in a few shops that had this issue, and they never changed- or more accurately, I found that it was not possible to change the system from within.

The issue is that, from the perspective of the management that insists on this type of development, as long as the product is being released approximately on time, and the customers are buying it, goal accomplished. To put it another way, As long as you are making money, quality does not matter.

Now, you, I, and experienced management understand the long term cost of technical debt. It may be possible to explain to a rational manager the cost of technical debt, the compounding reduction in return on investment in programmer time (by far the most expensive part of a software project), and the fact that a clean, well designed, well tested code base means that new features can be implemented more quickly, and that more time can be spent on new features instead of fixing bugs- leading to a long term improvement in the mean time between releases.

It may be possible to explain this to your management, but every place I've worked that had these issues required a critical failure before they wised up. This usually involved a large portion of the team quitting from frustration, or a large drop in sales as quality diminished due to unrealistic scheduling (in turn leading to massive layoffs). Either way, although I've heard of organizations changing after the fact.

In short, try to explain the cost of technical debt, and the benefit of a clean codebase. Explain it in terms of sales, releases, and customer satisfaction, instead of from a technical perspective. If that doesn't work, start looking for a new job, because poor management leads to a poor product, and a poor product reflects poorly on you as a developer.

CodeninjaTim
Yes, maybe I'm naive, but I like to think that people actually learn. ;-) I get the feeling that people start to realize that the critical failure that you mention might not be far ahead and that's why all this testing and continuous integration talks pop up.
cringe
uh, hit enter before the comment was ready... The thing I'm not sure about is if the pure amount of work that is needed to get to a clean and testable codebase is clear to non-programmers and the argument I mention in my question points in your direction too. If management got all the feature without testing, it's hard to contra that argument.
cringe
+1  A: 

What do you mean your "estimates are cut half"? Do you mean you give an estimate, and management says, "No, do it in half that time"? That is unacceptable.

Someone must push back against management. (I say "someone" because I don't know your hierarchy.) There is no such thing as a free lunch. If they want it sooner, then they must make hard, painful tradeoffs. They must prioritize and drop lower-priority features.

If they say, "No. We need it all now. Do it sooner or else," hold the line. They may be surprised, and they may be upset, but you'll earn their respect. The changes will come when they start listening.

There doesn't need to be a conflict between management and development. The conflict is between management and time. It's not your fault it takes time to do things. It's their job to make the hard decisions to get the products out on time without overworking developers until they quit in exhaustion. Just saying "Wrong, do it in half that time" is not management. It's fantasy.


In reality, your management will probably continue to be foolish. If so, you can try to play their game: come up with a safe estimate that you feel is very safe with the automated testing and then double it. Complain loudly when they cut the hours by half, then sigh in resignation. Allow them to feel they are doing their job. Mission accomplished!

Paul Williams
Actually I don't experience the "do it in half the time" scenario myself. I try to give accurate estimates, but everyone in a brownfield project knows how that goes... %-) But talking to my colleague who brought the argument up makes me feel that he thinks it's the reality of software development - and maybe he experienced that a lot.
cringe
A: 

It may sound obvious, but my answer to this question is:

Writing unit tests before the code will allow you to develop good, clean and easy to maintain code

I had a problem with my management who were concerned that developers would not be able to complete their tasks on time if they will be required to write unit tests - this is a common concern when trying to implement a TDD in a Waterfall company. So I made this statement and we had to prove it by writing tests before code and not missing the deadline :) Actually when you get used to it, it will allow to write even more code.

ZloiAdun
Ah, sorry. I didn't make it clear that this comment was coming from a developer who was worried about the already tight deadlines becoming even tighter and in his point of view the management would never pay the money/time to allow developer get into good habits.
cringe
I am working at outsourcing company, and our client has a "well established" waterfall process. The resistance to writing UT was from both of their management who was afraid that developers will become overloaded, and from on-site developers as well, who were also concerned about meeting their deadlines. We discussed this about a month and a conclusion was that we need to prove, that TDD works. Now our partner seems to be sure that writing UT before the code will not affect schedule and on-site developers starting to believe that TDD allows you to develop faster.
ZloiAdun
A: 

Typically, if you improve your programming practices and code quality, you'll almost certainly speed up your development, as you'll save more time debugging than you will in writing unit tests and trying to make everything right to begin with. Very few shops are in the position of spending more time on code quality than it saves.

Another danger is if management meddles in the process, rather than just serves up impossible deadlines. If they expect you to cowboy code in order to make the deadline, you really won't be able to use good practices.

David Thornley
+3  A: 

One good example is Technical Debt. It's manager friendly. Imagine your credit card. If you accrue debt for a few weeks that can be helpful. You don't need to carry around cash for daily purchases and you pay it off at the end of the month.

This is like a crunch before a release. You take on some debt and then pay it back soon. If you keep charging things and never paying off that debt it starts to compound. That new feature you want it more difficult because the foundation you're building on is unsound. The debt you've accumulated is keeping you from acting quickly. If you're over your limit even typical small purchases won't go through.

You might also want to take a look at Facts and Fallacies of Software Engineering . It talks about estimates and the troubles they can cause when they're not reviewed as the project evolves.

Paul Rubel
This is a good point and I'll add it to my book. I think a developer gets this right, but maybe I should point it out. I always say that I can not give good estimates, because the debt is already too high to do changes without side effects on other parts.
cringe